summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/touch/fifo24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/touch/fifo b/tests/touch/fifo
new file mode 100755
index 000000000..b1a436d97
--- /dev/null
+++ b/tests/touch/fifo
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Make sure touch works on fifos without hanging.
+
+if test "$VERBOSE" = yes; then
+ set -x
+ touch --version
+fi
+
+framework_failure=0
+
+rm -rf fifo
+mkfifo fifo || framework_failure=1
+
+if test $framework_failure = 1; then
+ echo 'failure in testing framework'
+ exit 1
+fi
+
+fail=0
+
+touch fifo || fail=1
+rm -rf fifo
+
+exit $fail