test: create fault-injection destination root in seeding fixture
CI / lint (push) Successful in 1m29s
CI / lint (pull_request) Successful in 1m29s
CI / sanitizers (address) (pull_request) Skipped
CI / sanitizers (undefined) (pull_request) Skipped
CI / fuzz-build (pull_request) Skipped
CI / coverage (pull_request) Skipped
CI / valgrind (pull_request) Skipped
CI / sanitizers (undefined) (push) Successful in 1m4s
CI / sanitizers (address) (push) Successful in 1m10s
CI / fuzz-build (push) Successful in 39s
CI / coverage (push) Successful in 58s
CI / build-and-test (pull_request) Successful in 1m55s
CI / valgrind (push) Successful in 3m23s
CI / build-and-test (push) Successful in 5m11s

The captured_config fixture assumed fault_dst already existed, relying on earlier tests in the same xdist worker creating it via _recover. Under --dist=load a worker can receive the capture test first, so the receiver rejected a missing destination root and the capture run failed. Create DEST_DIR in the autouse seeding fixture so test order/distribution cannot matter.
This commit is contained in:
2026-09-15 20:02:00 +02:00
parent 4815b1b281
commit 93c1fc3c1f
@@ -59,6 +59,10 @@ def _seed_source():
if os.path.exists(SOURCE_DIR): if os.path.exists(SOURCE_DIR):
shutil.rmtree(SOURCE_DIR) shutil.rmtree(SOURCE_DIR)
os.makedirs(os.path.join(SOURCE_DIR, "nested")) os.makedirs(os.path.join(SOURCE_DIR, "nested"))
# The receiver rejects a destination root that does not exist, and the
# capture fixture can run before any test that creates it, so create it
# here (test order/distribution must not matter).
os.makedirs(DEST_DIR, exist_ok=True)
with open(os.path.join(SOURCE_DIR, "hello.txt"), "wb") as fh: with open(os.path.join(SOURCE_DIR, "hello.txt"), "wb") as fh:
fh.write(b"fault injection payload\n" * 64) fh.write(b"fault injection payload\n" * 64)
with open(os.path.join(SOURCE_DIR, "nested", "deep.bin"), "wb") as fh: with open(os.path.join(SOURCE_DIR, "nested", "deep.bin"), "wb") as fh: