From: Jim Meyering Date: Tue, 23 May 2000 21:13:28 +0000 (+0000) Subject: Exit 77 when run as root. Reported by Andreas Schwab. X-Git-Tag: FILEUTILS-4_0t~68 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=dfdfbc22b38f765b3bff199619eaaf0385ef481c;p=thirdparty%2Fcoreutils.git Exit 77 when run as root. Reported by Andreas Schwab. --- diff --git a/tests/mv/i-2 b/tests/mv/i-2 index 40e229fc4e..4113d9fdfc 100755 --- a/tests/mv/i-2 +++ b/tests/mv/i-2 @@ -32,6 +32,16 @@ framework_failure=0 mkdir $tmp || framework_failure=1 cd $tmp +touch file || framework_failure=1 +chmod u-w file || framework_failure=1 +(echo foo >> file) >/dev/null 2>&1 && { + echo '********************************************' + echo "$0: NOTICE: This test case cannot be run as root." + echo '********************************************' + exit 77 +} + + for i in a b c d e f g h; do echo $i > $i || framework_failure=1 done