From 229b706f8a46bf062f5f4c0cf6e0b52de0714f69 Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Tue, 6 Oct 2026 17:34:47 -0400 Subject: [PATCH] composefs: Fix test that only fails with fs-verity test_fresh_policy_replacement_preserves_objects wrote a sentinel to objects/ without creating the directory, but composefs-rs creates objects/ lazily. On filesystems without fs-verity (e.g. tmpfs/overlay in CI) the test returned early before reaching this point, so the bug went unnoticed until the Fedora Koji %check ran on a verity-capable filesystem and failed with ENOENT. Create the directory before writing the sentinel. Assisted-by: AI Signed-off-by: John Eckersberg --- crates/lib/src/bootc_composefs/repo.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/lib/src/bootc_composefs/repo.rs b/crates/lib/src/bootc_composefs/repo.rs index 6a8d707b3b..4fe7809567 100644 --- a/crates/lib/src/bootc_composefs/repo.rs +++ b/crates/lib/src/bootc_composefs/repo.rs @@ -813,6 +813,8 @@ mod tests { .path() .join(crate::store::COMPOSEFS) .join("objects/sentinel"); + // composefs-rs creates objects/ lazily, so it may not exist yet. + std::fs::create_dir_all(object_path.parent().unwrap()).unwrap(); std::fs::write(&object_path, b"retained").unwrap(); drop(repo);