test(metadata): Windows source -> Linux destination ACL round-trip (WAS-7 #2312)#4420
Merged
Merged
Conversation
2e5ba54 to
9dd676c
Compare
…AS-7 #2312) Adds crates/metadata/tests/windows_to_linux_acl_roundtrip.rs covering the receiver-side apply_xattrs_from_list dispatch for the reserved user.win32.security_descriptor xattr slot (WAS-5, PR #4388). - simulated_windows_xattr_dropped_on_linux: hand-crafts an XattrEntry with the reserved name + two standard user.* slots, feeds it through apply_xattrs_from_list against a TempDir file, and tolerates both the WAS-5 strict-drop arm and the pre-WAS-5 verbatim-store fallback so the test does not flake against in-flight master. - simulated_windows_xattr_applied_on_windows: cfg(target_os = windows), apply the reserved slot then read the DACL back via read_dacl_sddl. - pure_posix_acl_roundtrip_unaffected_by_reserved_slot: standard user.* payload, no reserved slot; standard slots applied and the reserved name does not appear in the destination. Sibling to the workspace-root tests/acl_windows_to_linux_roundtrip.rs which pins the pure-mapping contract. This file exercises the xattr application path, gated on feature = acl + feature = xattr, hermetic via tempdir().
9dd676c to
ba50404
Compare
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…AS-7 #2312) (#4420) Adds crates/metadata/tests/windows_to_linux_acl_roundtrip.rs covering the receiver-side apply_xattrs_from_list dispatch for the reserved user.win32.security_descriptor xattr slot (WAS-5, PR #4388). - simulated_windows_xattr_dropped_on_linux: hand-crafts an XattrEntry with the reserved name + two standard user.* slots, feeds it through apply_xattrs_from_list against a TempDir file, and tolerates both the WAS-5 strict-drop arm and the pre-WAS-5 verbatim-store fallback so the test does not flake against in-flight master. - simulated_windows_xattr_applied_on_windows: cfg(target_os = windows), apply the reserved slot then read the DACL back via read_dacl_sddl. - pure_posix_acl_roundtrip_unaffected_by_reserved_slot: standard user.* payload, no reserved slot; standard slots applied and the reserved name does not appear in the destination. Sibling to the workspace-root tests/acl_windows_to_linux_roundtrip.rs which pins the pure-mapping contract. This file exercises the xattr application path, gated on feature = acl + feature = xattr, hermetic via tempdir().
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…AS-7 #2312) (#4420) Adds crates/metadata/tests/windows_to_linux_acl_roundtrip.rs covering the receiver-side apply_xattrs_from_list dispatch for the reserved user.win32.security_descriptor xattr slot (WAS-5, PR #4388). - simulated_windows_xattr_dropped_on_linux: hand-crafts an XattrEntry with the reserved name + two standard user.* slots, feeds it through apply_xattrs_from_list against a TempDir file, and tolerates both the WAS-5 strict-drop arm and the pre-WAS-5 verbatim-store fallback so the test does not flake against in-flight master. - simulated_windows_xattr_applied_on_windows: cfg(target_os = windows), apply the reserved slot then read the DACL back via read_dacl_sddl. - pure_posix_acl_roundtrip_unaffected_by_reserved_slot: standard user.* payload, no reserved slot; standard slots applied and the reserved name does not appear in the destination. Sibling to the workspace-root tests/acl_windows_to_linux_roundtrip.rs which pins the pure-mapping contract. This file exercises the xattr application path, gated on feature = acl + feature = xattr, hermetic via tempdir().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
crates/metadata/tests/windows_to_linux_acl_roundtrip.rscovering the receiver-sideapply_xattrs_from_listdispatch for the reserveduser.win32.security_descriptorxattr slot introduced by WAS-5 (PR feat(metadata): wire --acls to Windows DACL (#2310) #4388).XattrEntry { name = "user.win32.security_descriptor", value = sample_sddl }and feeding it throughmetadata::apply_xattrs_from_listagainst aTempDirfile.tests/acl_windows_to_linux_roundtrip.rs, which pins the pure-mapping contract (DACL <-> POSIX bits +RsyncAcl::names). This file exercises the actual xattr application path.Scenarios wired
simulated_windows_xattr_dropped_on_linux(cfgunix): standarduser.*slots survive verbatim. The reserved slot has a tolerant assertion that accepts either the WAS-5 strict-drop arm or the pre-WAS-5 verbatim-store fallback, so the test does not flake against in-flight master and tightens automatically once feat(metadata): wire --acls to Windows DACL (#2310) #4388 merges.simulated_windows_xattr_applied_on_windows(cfgtarget_os = "windows"): apply the reserved slot, then read the DACL back viametadata::read_dacl_sddland assert the descriptor includes a DACL section.pure_posix_acl_roundtrip_unaffected_by_reserved_slot(cfgunix): standarduser.*payload with no reserved slot; both standard slots are applied and the reserved name does not appear in the destination listing read back viaread_xattrs_for_wire.Test plan
cargo fmt --allclean.tempdir().feature = "acl"andfeature = "xattr"; excluded when either is off.apply_xattrs_from_listwrite; skips gracefully on tmpfs / sandboxed CI volumes.Closes #2312.