Skip to content

test: set the mode the portable exchange test asserts - #18

Merged
santoshkumarradha merged 1 commit into
mainfrom
test/portable-explicit-mode
Oct 26, 2026
Merged

santoshkumarradha merged 1 commit into
mainfrom
test/portable-explicit-mode

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Summary

 let mut repository = FurrowRepository::open_composed_in(&data, &root, None)
 fs::write(root.join("new"), b"new\r\n").unwrap();
+fs::set_permissions(root.join("new"), Permissions::from_mode(0o644))   // unix only
 repository.snapshot(...)
 assert_eq!(new.mode & 0o777, 0o644);

The test asserts a freshly written file captures as 0644 but depended on the runner's umask.

Evidence

  • Before: w3_linux_exchange_preserves_bytes_paths_and_recorded_modes fails under umask 002 (the fleet runner's): left: 436, right: 420, on unmodified main.
    After: passes under umask 002 and umask 022 on Spark.

Merge Danger

Door: two-way. Test-only change.

Blast Radius: none outside this one test.

The test asserts a new file captures as 0644 but relied on the runner's
umask, so it fails under a 0002 umask (fleet jobs). Set the mode explicitly.
@santoshkumarradha
santoshkumarradha merged commit e7c7a83 into main Oct 26, 2026
4 checks passed
@santoshkumarradha santoshkumarradha mentioned this pull request Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant