You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the xattr test asserts that listxattr() on Cargo.toml returns
a length of 0.
This causes a spurious failure when Cargo.toml does have xattrs, and
this can happen in fairly normal situations like when a Linux
distribution enables selinux (as it does on an AlmaLinux 10 test system,
for example):
$ cat /etc/almalinux-release
AlmaLinux release 10.0 (Purple Lion)
$ getfattr -d -m - Cargo.toml
security.selinux=[...]
$ cargo test --features=fs,stdio xattr
[...]
thread 'xattr::xattr_basic' panicked at tests/fs/xattr.rs:88:5:
assertion `left == right` failed
left: 17
right: 0
This change fixes the failure by comparing the output of rustix
*listxattr() with an external implementation, the libc crate's
implementation of listxattr(). Rather than asserting a specific value
for rustix *listxattr(), it should match the value produced by libc
listxattr().
0 commit comments