summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index c776ba4..bec7022 100755
--- a/tests.sh
+++ b/tests.sh
@@ -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'