summaryrefslogtreecommitdiffstats
path: root/tests/posix/readdir_error.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-22 16:41:41 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-22 17:51:36 -0400
commita2af2746c4686201e2e0796fbdfa115d08727b86 (patch)
tree4127a4c813de4f4c91c92b0596b468cceac43a7b /tests/posix/readdir_error.sh
parentdd8ac68070176343a8781e67de4bbd6a071bb89d (diff)
downloadbfs-a2af2746c4686201e2e0796fbdfa115d08727b86.tar.xz
tests: Use test-specific scratch directories
Diffstat (limited to 'tests/posix/readdir_error.sh')
-rw-r--r--tests/posix/readdir_error.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/posix/readdir_error.sh b/tests/posix/readdir_error.sh
index fc48eb1..82fcd17 100644
--- a/tests/posix/readdir_error.sh
+++ b/tests/posix/readdir_error.sh
@@ -1,27 +1,27 @@
test "$UNAME" = "Linux" || skip
-clean_scratch
-mkfifo scratch/{fever,pid,wait,running}
+cd "$TEST"
+mkfifo hang pid wait running
(
# Create a zombie process
- cat scratch/fever >/dev/null &
- # Write the PID to scratch/pid
- echo $! >scratch/pid
+ cat hang >/dev/null &
+ # Write the PID to pid
+ echo $! >pid
# Don't wait on the zombie process
- exec cat scratch/wait scratch/fever >scratch/running
+ exec cat wait hang >running
) &
# Kill the parent cat on exit
defer kill -9 %1
# Read the child PID
-read -r pid <scratch/pid
+read -r pid <pid
# Make sure the parent cat is running before we kill the child, because bash
# will wait() on its children
-echo >scratch/wait &
-read -r _ <scratch/running
+echo >wait &
+read -r _ <running
# Turn the child into a zombie
kill -9 "$pid"