Skip to content

Commit eba4990

Browse files
jeckersbJohan-Liebert1
authored andcommitted
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 <dev@eckersberg.com>
1 parent 82b2f90 commit eba4990

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • crates/lib/src/bootc_composefs

‎crates/lib/src/bootc_composefs/repo.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,8 @@ mod tests {
813813
.path()
814814
.join(crate::store::COMPOSEFS)
815815
.join("objects/sentinel");
816+
// composefs-rs creates objects/ lazily, so it may not exist yet.
817+
std::fs::create_dir_all(object_path.parent().unwrap()).unwrap();
816818
std::fs::write(&object_path, b"retained").unwrap();
817819
drop(repo);
818820

0 commit comments

Comments
 (0)