summaryrefslogtreecommitdiffstats
path: root/tests/posix
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-06-04 16:40:31 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-06-04 16:40:31 -0400
commit597aa41a5c1fc8f51e45dfc095eaf1aa99821bca (patch)
tree73ab49920b375e43ccfa14c6beeee8e6694d97d1 /tests/posix
parent0410d8ee2575158686767ae0b0a7ad46d1ea54eb (diff)
downloadbfs-597aa41a5c1fc8f51e45dfc095eaf1aa99821bca.tar.xz
tests: New inaccessible/ directory tree for permission errors
Diffstat (limited to 'tests/posix')
-rw-r--r--tests/posix/depth_error.out6
-rw-r--r--tests/posix/depth_error.sh8
-rw-r--r--tests/posix/prune_error.out2
-rw-r--r--tests/posix/prune_error.sh9
4 files changed, 7 insertions, 18 deletions
diff --git a/tests/posix/depth_error.out b/tests/posix/depth_error.out
index 7ed5f0d..c4f8ce4 100644
--- a/tests/posix/depth_error.out
+++ b/tests/posix/depth_error.out
@@ -1,2 +1,4 @@
-.
-./foo
+inaccessible
+inaccessible/dir
+inaccessible/file
+inaccessible/link
diff --git a/tests/posix/depth_error.sh b/tests/posix/depth_error.sh
index db414ba..9b29385 100644
--- a/tests/posix/depth_error.sh
+++ b/tests/posix/depth_error.sh
@@ -1,7 +1 @@
-cd "$TEST"
-"$XTOUCH" -p foo/bar
-
-chmod a-r foo
-defer chmod +r foo
-
-! bfs_diff . -depth
+! bfs_diff inaccessible -depth
diff --git a/tests/posix/prune_error.out b/tests/posix/prune_error.out
index 9c558e3..436c48e 100644
--- a/tests/posix/prune_error.out
+++ b/tests/posix/prune_error.out
@@ -1 +1 @@
-.
+inaccessible
diff --git a/tests/posix/prune_error.sh b/tests/posix/prune_error.sh
index 9158a17..07a2523 100644
--- a/tests/posix/prune_error.sh
+++ b/tests/posix/prune_error.sh
@@ -1,8 +1 @@
-cd "$TEST"
-"$XTOUCH" -p foo/bar
-ln -s foo/bar baz
-
-chmod a-rx foo
-defer chmod +rx foo
-
-! bfs_diff -L . -name '???' -prune -o -print
+! bfs_diff -L inaccessible -path '*/*' -prune -o -print