Skip to content

test: skip tests the temporary folders' base cannot run - #2083

Merged
l0gicgate merged 1 commit into
mainfrom
fix/2082-skip-tests-the-tmp-base-cannot-run
Nov 7, 2026
Merged

l0gicgate merged 1 commit into
mainfrom
fix/2082-skip-tests-the-tmp-base-cannot-run

Conversation

@l0gicgate

Copy link
Copy Markdown
Contributor

Description

Package builds such as omarchy-pkgs run cargo test --release in a container whose /tmp is overlayfs, which has O_TMPFILE only since Linux 6.10 and gives file handles only when exported over NFS. Sixteen file-operation tests assumed both and failed there on every Strata release since 1.1.0, and the ui_thread test checks a debug_assert!, so it failed under any release-mode run.

  • A new test_support::temp_base module probes once per process whether the base under the temporary folders links unnamed files into place, and local_operations::tests adds the matching probe for file handles. The 16 tests, or the rows of their tables that need those primitives, skip with a message on a base without them. STRATA_REQUIRE_DEVICE_TESTS=1, which CI and scripts/test-headless.py already set on their tmpfs, fails them instead, so CI cannot skip silently.
  • The live probe replaces the handleless_base mount-type lookup in the case-rename test, which covered exfat and SMB but not overlayfs.
  • The ui_thread tests are compiled only with debug assertions.
  • docs/testing.md and docs/trash-restore-testing.md describe the requirement and the variable.

Verified by running both filesystem test modules under a seccomp filter that refuses O_TMPFILE with EOPNOTSUPP (reproduces exactly the 13 Omarchy tmpfile failures on main; all skip or pass with this change) and with TMPDIR on an unprivileged overlayfs mount (reproduces the 3 file-handle failures on main; all skip with this change). With STRATA_REQUIRE_DEVICE_TESTS=1 the same 13 tests fail with the probe's message. The 17 affected tests still pass on a tmpfs /tmp.

Visual evidence

N/A: test-only change with no user-visible behaviour.

How to test

  1. On a kernel older than 6.10, or with TMPDIR pointing at a filesystem without O_TMPFILE, run cargo test --all-targets --all-features -- --nocapture adapters::local_operations::tests::file_copy:: and confirm the tmpfile tests print Skipping: the base of the temporary folders offers no unnamed files linked into place and the run passes.
  2. With TMPDIR on an overlayfs mount, run cargo test --all-targets --all-features -- --nocapture a_file_handle_follows_the_item_and_not_its_name and confirm it skips for file handles.
  3. Repeat either run with STRATA_REQUIRE_DEVICE_TESTS=1 and confirm the same tests fail with the base of the temporary folders offers no …; point TMPDIR at a tmpfs.
  4. Run cargo test --release --all-targets --all-features -- ui_thread and confirm no ui_thread test runs or fails.

Expected result: On a tmpfs /tmp every affected test runs and passes; on an overlay or tmpfile-less base they skip with a message, and only STRATA_REQUIRE_DEVICE_TESTS=1 turns those skips into failures.

Related issue

Closes #2082

Package builds such as omarchy-pkgs run the suite in a container whose
/tmp is overlayfs, which has O_TMPFILE only since Linux 6.10 and gives
file handles only when exported over NFS. The tests that stage unnamed
files or follow file handles now probe the base once and skip with a
message where it lacks them; STRATA_REQUIRE_DEVICE_TESTS, which CI and
scripts/test-headless.py set on their tmpfs, fails them instead.

The ui_thread tests check a debug_assert!, so they are compiled only
with debug assertions rather than failing every `cargo test --release`.
@l0gicgate
l0gicgate merged commit 61e0bd0 into main Nov 7, 2026
11 checks passed
@l0gicgate
l0gicgate deleted the fix/2082-skip-tests-the-tmp-base-cannot-run branch November 24, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test suite fails on overlayfs TMPDIR and under cargo test --release

1 participant