summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-05-23 17:11:23 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-05-24 09:00:50 -0400
commitd9b3196d6c8f4fa0e7d0a4771040762edaebb1ee (patch)
treef378d6955cf3cd6817a47e3a95284441552b221e /tests.sh
parent28bbaeac8058653a4a46ae439c37d251a550f4f9 (diff)
downloadbfs-d9b3196d6c8f4fa0e7d0a4771040762edaebb1ee.tar.xz
fsade: Refactor the POSIX.1e abstractions
Since we're going to want to abstract more things that aren't part of POSIX.1e (like xattrs) in a similar way, let's give this a more generic name. And while we're at it, give it some more precise error reporting, and add some tests.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 15e341d..c776ba4 100755
--- a/tests.sh
+++ b/tests.sh
@@ -279,6 +279,9 @@ bsd_tests=(
# Primaries
+ test_acl
+ test_L_acl
+
test_delete
test_depth_maxdepth_1
@@ -642,6 +645,9 @@ bfs_tests=(
)
sudo_tests=(
+ test_capable
+ test_L_capable
+
test_mount
test_xdev
@@ -2299,6 +2305,52 @@ function test_xtype_bind_mount() {
return $ret
}
+function test_acl() {
+ rm -rf scratch/*
+
+ if ! invoke_bfs scratch -acl 2>/dev/null; then
+ return 0
+ fi
+
+ touch scratch/{normal,acl}
+ setfacl -m "u:$(id -un):rw" scratch/acl
+ ln -s acl scratch/link
+
+ bfs_diff scratch -acl
+}
+
+function test_L_acl() {
+ rm -rf scratch/*
+
+ if ! invoke_bfs scratch -acl 2>/dev/null; then
+ return 0
+ fi
+
+ touch scratch/{normal,acl}
+ setfacl -m "u:$(id -un):rw" scratch/acl
+ ln -s acl scratch/link
+
+ bfs_diff -L scratch -acl
+}
+
+function test_capable() {
+ rm -rf scratch/*
+ touch scratch/{normal,capable}
+ sudo setcap all+ep scratch/capable
+ ln -s capable scratch/link
+
+ bfs_diff scratch -capable
+}
+
+function test_L_capable() {
+ rm -rf scratch/*
+ touch scratch/{normal,capable}
+ sudo setcap all+ep scratch/capable
+ ln -s capable scratch/link
+
+ bfs_diff -L scratch -capable
+}
+
BOL=
EOL='\n'