summaryrefslogtreecommitdiff
path: root/tests/rm/dangling-symlink
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-07-06 09:53:14 +0000
committerJim Meyering <jim@meyering.net>2002-07-06 09:53:14 +0000
commit66f8c36584f21340f8993f30be9b8b334731ab7a (patch)
tree44197d193d2dfc6169821f586d27675e6d41c1f0 /tests/rm/dangling-symlink
parent49d3f4be1af38d438b462965f9b831bc1b38340b (diff)
downloadcoreutils-66f8c36584f21340f8993f30be9b8b334731ab7a.tar.xz
improve the test
Diffstat (limited to 'tests/rm/dangling-symlink')
-rwxr-xr-xtests/rm/dangling-symlink15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/rm/dangling-symlink b/tests/rm/dangling-symlink
index 4fb403749..dd5b7490b 100755
--- a/tests/rm/dangling-symlink
+++ b/tests/rm/dangling-symlink
@@ -24,6 +24,19 @@ fi
fail=0
-rm dangle < /dev/null > /dev/null 2>&1 || fail=1
+# Skip this test if there is no /dev/stdin file.
+ls /dev/stdin >/dev/null 2>&1 \
+ || { (exit 77); exit; }
+
+rm dangle < /dev/stdin &
+pid=$!
+
+# The buggy rm (fileutils-4.1.9) would hang here, waiting for input.
+sleep 1
+
+# The file must no longer exist.
+ls -l dangle > /dev/null 2>&1 && fail=1
+
+kill $pid > /dev/null 2>&1
(exit $fail); exit