diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2019-05-23 17:13:39 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2019-05-24 09:00:51 -0400 |
commit | f1fb3158d3f242f1884d8d8a7473ab0719e93e8c (patch) | |
tree | 4ab193109db3da98b779ed807f40adb3bb0b9fbd /tests.sh | |
parent | d9b3196d6c8f4fa0e7d0a4771040762edaebb1ee (diff) | |
download | bfs-f1fb3158d3f242f1884d8d8a7473ab0719e93e8c.tar.xz |
Implement -xattr predicate
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -648,6 +648,9 @@ sudo_tests=( test_capable test_L_capable + test_xattr + test_L_xattr + test_mount test_xdev @@ -2351,6 +2354,30 @@ function test_L_capable() { bfs_diff -L scratch -capable } +function test_xattr() { + rm -rf scratch/* + touch scratch/{normal,xattr} + # Linux tmpfs doesn't support the user.* namespace, so we use the security.* + # namespace, which is writable by root and readable by others + sudo setfattr -n security.bfs_test scratch/xattr + ln -s xattr scratch/link + ln -s normal scratch/xattr_link + sudo setfattr -h -n security.bfs_test scratch/xattr_link + + bfs_diff scratch -xattr +} + +function test_L_xattr() { + rm -rf scratch/* + touch scratch/{normal,xattr} + sudo setfattr -n security.bfs_test scratch/xattr + ln -s xattr scratch/link + ln -s normal scratch/xattr_link + sudo setfattr -h -n security.bfs_test scratch/xattr_link + + bfs_diff -L scratch -xattr +} + BOL= EOL='\n' |