summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-05-10 08:14:16 +0100
committerPádraig Brady <P@draigBrady.com>2011-05-14 10:41:29 +0100
commit5116103826c1776be0661bd591acd08fbefe9767 (patch)
tree45aaee0a87b197a6da572694cf3a434255a2395c /tests/misc
parent27873f1deb69745c79d403bbb8e1145bc18f55b8 (diff)
downloadcoreutils-5116103826c1776be0661bd591acd08fbefe9767.tar.xz
tests: refactor more tests to use mkfifo_or_skip_
* tests/cp/existing-perm-race: s/mkfifo/mkfifo_or_skip_/ * tests/cp/file-perm-race: Likewise. * tests/cp/parent-perm-race: Likewise. * tests/cp/special-f: Likewise. * tests/dd/reblock: Likewise. * tests/ls/file-type: Likewise. * tests/misc/cat-buf: Likewise. * tests/misc/mknod: Likewise. * tests/misc/printf-surprise: Likewise. * tests/misc/selinux: Likewise. * tests/misc/sort-spinlock-abuse: Likewise. * tests/misc/stdbuf: Likewise. * tests/misc/tac-continue: Likewise. * tests/init.cfg: Improve the error message when skipping.
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/cat-buf2
-rwxr-xr-xtests/misc/mknod2
-rwxr-xr-xtests/misc/printf-surprise2
-rwxr-xr-xtests/misc/selinux2
-rwxr-xr-xtests/misc/sort-spinlock-abuse2
-rwxr-xr-xtests/misc/stdbuf2
-rwxr-xr-xtests/misc/tac-continue2
7 files changed, 8 insertions, 6 deletions
diff --git a/tests/misc/cat-buf b/tests/misc/cat-buf
index 29343f7e6..348b41450 100755
--- a/tests/misc/cat-buf
+++ b/tests/misc/cat-buf
@@ -24,7 +24,7 @@ print_ver_ cat
# consumer (dd) opens the fifo therefore increasing
# the chance that dd will read the data from each
# write separately.
-mkfifo fifo || framework_failure
+mkfifo_or_skip_ fifo
echo 1 > exp
diff --git a/tests/misc/mknod b/tests/misc/mknod
index 053f96f33..c07b633a8 100755
--- a/tests/misc/mknod
+++ b/tests/misc/mknod
@@ -19,6 +19,8 @@
. "${srcdir=.}/init.sh"; path_prepend_ ../src
print_ver_ mknod
+# Ensure fifos are supported
+mkfifo_or_skip_ fifo
umask 777
diff --git a/tests/misc/printf-surprise b/tests/misc/printf-surprise
index df781a96d..ca0f8e4b8 100755
--- a/tests/misc/printf-surprise
+++ b/tests/misc/printf-surprise
@@ -48,7 +48,7 @@ require_ulimit_
# and to make an N-byte-allocating-printf require more than that, thus
# triggering the printf(3) misbehavior -- which, btw, is required by ISO C99.
-mkfifo fifo || framework_failure
+mkfifo_or_skip_ fifo
# Disable MALLOC_PERTURB_, to avoid triggering this bug
# http://bugs.debian.org/481543#77
diff --git a/tests/misc/selinux b/tests/misc/selinux
index c0bd42e62..d1bc9caea 100755
--- a/tests/misc/selinux
+++ b/tests/misc/selinux
@@ -26,7 +26,7 @@ skip_if_mcstransd_is_running_
# Create a regular file, dir, fifo.
touch f || framework_failure
mkdir d s1 s2 || framework_failure
-mkfifo p || framework_failure
+mkfifo_or_skip_ p
# special context that works both with and without mcstransd
diff --git a/tests/misc/sort-spinlock-abuse b/tests/misc/sort-spinlock-abuse
index c241c277a..b5ca30ff5 100755
--- a/tests/misc/sort-spinlock-abuse
+++ b/tests/misc/sort-spinlock-abuse
@@ -24,7 +24,7 @@ grep '^#define HAVE_PTHREAD_T 1' "$CONFIG_HEADER" > /dev/null ||
skip_test_ 'requires pthreads'
seq 100000 > in || framework_failure_
-mkfifo fifo || framework_failure_
+mkfifo_or_skip_ fifo
# Arrange for sort to require 5.0+ seconds of wall-clock time,
# while actually using far less than 1 second of CPU time.
diff --git a/tests/misc/stdbuf b/tests/misc/stdbuf
index 35b571050..80ad870c2 100755
--- a/tests/misc/stdbuf
+++ b/tests/misc/stdbuf
@@ -36,7 +36,7 @@ esac
# consumer (dd) opens the fifo therefore increasing
# the chance that dd will read the data from each
# write separately.
-mkfifo fifo || framework_failure
+mkfifo_or_skip_ fifo
# Verify input parameter checking
diff --git a/tests/misc/tac-continue b/tests/misc/tac-continue
index 912d2ced5..5902805a4 100755
--- a/tests/misc/tac-continue
+++ b/tests/misc/tac-continue
@@ -53,7 +53,7 @@ seq 5 > in
# Give tac a fifo command line argument.
# This makes it try to create a temporary file in $TMPDIR.
-mkfifo fifo
+mkfifo_or_skip fifo
seq 1000 > fifo &
TMPDIR=$FULL_PARTITION_TMPDIR tac fifo in >out 2>err && fail=1