Story: Hotfix: two macOS test failures that assert Linux-only facts
Table of Contents
This page documents a story in Sprint 26. It captures the goal, current status, acceptance criteria, and the tasks that compose it.
1. Goal
With the macOS build compiling again, its test phase runs and fails in two places, both of them facts about Linux that the tests assert rather than defects in the product:
filesystem_scoped_temp_file_tests.cppcomparessut.path().parent_path()withstd::filesystem::temp_directory_path()as strings. macOS returns the system temp directory with a trailing separator –confstr's_CS_DARWIN_USER_TEMP_DIRends in one – so the same directory has two spellings and the comparison fails:"/var/folders/.../T" == "/var/folders/.../T/".systemd_notify_tests.cppbinds an abstract unix datagram socket, whose name begins with a NUL byte, to prove that systemd's leading@is not a literal file name. The abstraction is a Linux extension; macOS has pathname sockets only, sobindfails withNo such file or directoryand takes the wholeores.service.testsbinary with it.
Neither failure can be fixed by changing the product: the temp file is already created in the directory the platform names, and systemd is Linux-only. The assertions are what move.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent sprint | Sprint 26 |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-09-28 |
3. Acceptance
- The two temp-directory assertions pass for both spellings of the temp directory, and still assert that the file and the directory are the platform's temp directory.
- The abstract-socket case is skipped on platforms without an abstract namespace, with a message that says why, and still runs on Linux.
ores.platform.testsandores.service.testspass on Linux, and the macOS job's test phase gets past both.
4. Tasks
| Task | State | Start | End | Description |
|---|---|---|---|---|
| Implement Hotfix: two macOS test failures that assert Linux-only facts | DONE | 2026-09-28 | 2026-09-28 | Compare the temp directory as a directory, make the abstract-socket case Linux-only, reproduce the macOS condition locally to prove the first, and scan the tests for any other Linux-only assumption. |
5. Decisions
- The temp assertions compare directories rather than strings
(
std::filesystem::equivalent), not normalised spellings.lexically_normal()was tried first and does not strip a trailing separator –path("/tmp/").lexically_normal()is still"/tmp/"– so the assertion now states what it means: the file landed in the system temp directory, however the platform spells it. It also survives macOS resolving/varthrough/private/var, which a string comparison would not. - The abstract-socket case is skipped, not rewritten to a pathname socket.
The case exists to pin the
@to NUL translation, which only systemd needs and only Linux can express; a pathname socket would test a different thing and pass while proving nothing. - Both fixes are in tests. Nothing in the product reads a path as a string or assumes an abstract namespace, and the scan recorded on the task found no other test that does either.
6. Out of scope
- The remaining macOS-only facilities the tests skip by design (the
/sys/class/netcross-checks, for instance). They already skip with a message.