From 115c65d3f466401f9804565f5ed333336e003c63 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 9 Mar 2001 18:03:22 +0000 Subject: Ensure that /dev/full is a character device (using test -c) as well as being writable, before trying to write to it. Otherwise, the test could mistakenly append a newline to an existing, regular, writable, /dev/full file. Suggested by Ulrich Drepper. --- tests/help-version | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/help-version') diff --git a/tests/help-version b/tests/help-version index a30a309f1..d0ae9a4d6 100755 --- a/tests/help-version +++ b/tests/help-version @@ -11,7 +11,7 @@ expected_failure_status_sort=2 case "$all_programs" in *nohup*) - if test -w /dev/full && echo > /dev/full; then + if test -w /dev/full && test -c /dev/full && echo > /dev/full; then cat 1>&2 <<\EOF ************************************************ WARNING: On this system, the built-in echo function of /bin/sh @@ -51,7 +51,7 @@ for i in $all_programs; do ./$i --version >/dev/null || fail=1 # Make sure they fail upon `disk full' error. - if test -w /dev/full; then + if test -w /dev/full && test -c /dev/full; then ./$i --help >/dev/full 2>/dev/null && fail=1 ./$i --version >/dev/full 2>/dev/null status=$? -- cgit v1.2.3-54-g00ecf