summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/nice6
-rwxr-xr-xtests/misc/nohup15
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/misc/nice b/tests/misc/nice
index cf4d96b23..f85666e34 100755
--- a/tests/misc/nice
+++ b/tests/misc/nice
@@ -82,6 +82,12 @@ if test x`nice -n -1 nice 2> /dev/null` = x0 ; then
mv err exp || framework_failure
nice --1 true 2> err || fail=1
compare exp err || fail=1
+ # Failure to write advisory message is fatal. Buggy through coreutils 8.0.
+ if test -w /dev/full && test -c /dev/full; then
+ nice -n -1 nice > out 2> /dev/full
+ test $? = 125 || fail=1
+ test -s out && fail=1
+ fi
else
# superuser - change succeeds
nice -n -1 nice 2> err || fail=1
diff --git a/tests/misc/nohup b/tests/misc/nohup
index ad04a1cb0..96810588e 100755
--- a/tests/misc/nohup
+++ b/tests/misc/nohup
@@ -64,6 +64,21 @@ test -f nohup.out && fail=1
rm -f nohup.out err
# ----------------------
+# Bug present through coreutils 8.0: failure to print advisory message
+# to stderr must be fatal. Requires stdout to be terminal.
+if test -w /dev/full && test -c /dev/full; then
+(
+ exec >/dev/tty
+ test -t 1 || exit 0
+ nohup echo hi 2> /dev/full
+ test $? = 125 || fail=1
+ test -f nohup.out || fail=1
+ test -s nohup.out && fail=1
+ rm -f nohup.out
+ exit $fail
+) || fail=1
+fi
+
nohup no-such-command 2> err
errno=$?
if test -t 1; then