Skip to content

test(metadata): Windows source -> Linux destination ACL round-trip (WAS-7 #2312)#4420

Merged
oferchen merged 1 commit into
masterfrom
feature/was-7-cross-platform-roundtrip
May 18, 2026
Merged

test(metadata): Windows source -> Linux destination ACL round-trip (WAS-7 #2312)#4420
oferchen merged 1 commit into
masterfrom
feature/was-7-cross-platform-roundtrip

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • 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 introduced by WAS-5 (PR feat(metadata): wire --acls to Windows DACL (#2310) #4388).
  • Simulates a Windows source on a non-Windows host by hand-crafting an XattrEntry { name = "user.win32.security_descriptor", value = sample_sddl } and feeding it through metadata::apply_xattrs_from_list against a TempDir file.
  • Sibling to the workspace-root 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 (cfg unix): standard user.* 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 (cfg target_os = "windows"): apply the reserved slot, then read the DACL back via metadata::read_dacl_sddl and assert the descriptor includes a DACL section.
  • pure_posix_acl_roundtrip_unaffected_by_reserved_slot (cfg unix): standard user.* payload with no reserved slot; both standard slots are applied and the reserved name does not appear in the destination listing read back via read_xattrs_for_wire.

Test plan

  • cargo fmt --all clean.
  • Tests hermetic via tempdir().
  • File gated on feature = "acl" and feature = "xattr"; excluded when either is off.
  • Filesystem support pre-checked via a probe apply_xattrs_from_list write; skips gracefully on tmpfs / sandboxed CI volumes.

Closes #2312.

@github-actions github-actions Bot added the test label May 18, 2026
@oferchen oferchen force-pushed the feature/was-7-cross-platform-roundtrip branch from 2e5ba54 to 9dd676c Compare May 18, 2026 00:56
…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().
@oferchen oferchen force-pushed the feature/was-7-cross-platform-roundtrip branch from 9dd676c to ba50404 Compare May 18, 2026 01:13
@oferchen oferchen merged commit 9058fa8 into master May 18, 2026
4 of 15 checks passed
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().
@oferchen oferchen deleted the feature/was-7-cross-platform-roundtrip branch May 19, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant