27071fbfec68d1403a24dc43e2c5d4f68d55136c
[platform/upstream/coreutils.git] / tests / touch / fifo
1 #!/bin/sh
2 # Make sure touch works on fifos without hanging.
3
4 if test "$VERBOSE" = yes; then
5   set -x
6   touch --version
7 fi
8
9 framework_failure=0
10
11 tmp=fifo-$$
12 rm -rf $tmp
13 mkfifo $tmp || framework_failure=1
14
15 if test $framework_failure = 1; then
16   # Make an exception of this case -- usually we interpret framework-creation
17   # failure as a test failure.  However, in this case, when running on a SunOS
18   # system using a disk NFS mounted from OpenBSD, the above fails like this:
19   # mkfifo: cannot make fifo `fifo-10558': Not owner
20   echo '********************************************'
21   echo 'NOTICE: unable to create test prerequisites'
22   echo '********************************************'
23   exit 77
24 fi
25
26 fail=0
27
28 touch $tmp || fail=1
29 rm -rf $tmp
30
31 exit $fail