summaryrefslogtreecommitdiffstats
path: root/tests/bsd
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-10-20 13:21:41 -0400
committerTavian Barnes <tavianator@tavianator.com>2022-10-20 13:21:41 -0400
commit55a1ad42bd172aa235015b88c092a225ec7f4862 (patch)
treeffe5cc53024ee1a8c9a7c7029671bae7852025c9 /tests/bsd
parent4ec966263444dfae8837cd73b980cfdb9aabd93f (diff)
downloadbfs-55a1ad42bd172aa235015b88c092a225ec7f4862.tar.xz
tests: Add a helper for cleaning scratch
And try to unmount things if the a test left them mounted.
Diffstat (limited to 'tests/bsd')
-rw-r--r--tests/bsd/L_acl.sh2
-rw-r--r--tests/bsd/acl.sh2
-rw-r--r--tests/bsd/flags.sh2
-rw-r--r--tests/bsd/rm.sh2
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/bsd/L_acl.sh b/tests/bsd/L_acl.sh
index d8f5a7d..4f990bb 100644
--- a/tests/bsd/L_acl.sh
+++ b/tests/bsd/L_acl.sh
@@ -1,4 +1,4 @@
-rm -rf scratch/*
+clean_scratch
skip_unless invoke_bfs scratch -quit -acl
diff --git a/tests/bsd/acl.sh b/tests/bsd/acl.sh
index 5bbfccc..c669005 100644
--- a/tests/bsd/acl.sh
+++ b/tests/bsd/acl.sh
@@ -1,4 +1,4 @@
-rm -rf scratch/*
+clean_scratch
skip_unless invoke_bfs scratch -quit -acl
diff --git a/tests/bsd/flags.sh b/tests/bsd/flags.sh
index 99d0fdb..fd25150 100644
--- a/tests/bsd/flags.sh
+++ b/tests/bsd/flags.sh
@@ -1,6 +1,6 @@
skip_unless invoke_bfs scratch -quit -flags offline
-rm -rf scratch/*
+clean_scratch
$TOUCH scratch/{foo,bar}
skip_unless chflags offline scratch/bar
diff --git a/tests/bsd/rm.sh b/tests/bsd/rm.sh
index 2e8b613..e661a37 100644
--- a/tests/bsd/rm.sh
+++ b/tests/bsd/rm.sh
@@ -1,4 +1,4 @@
-rm -rf scratch/*
+clean_scratch
touchp scratch/foo/bar/baz
(cd scratch && invoke_bfs . -rm)