diff options
Diffstat (limited to 'tests/misc')
35 files changed, 107 insertions, 107 deletions
diff --git a/tests/misc/chcon b/tests/misc/chcon index 4e36eceda..0f367ef89 100755 --- a/tests/misc/chcon +++ b/tests/misc/chcon @@ -22,8 +22,8 @@ require_root_ require_selinux_ skip_if_mcstransd_is_running_ -mkdir -p d/sub/s2 || framework_failure -touch f g d/sub/1 d/sub/2 || framework_failure +mkdir -p d/sub/s2 || framework_failure_ +touch f g d/sub/1 d/sub/2 || framework_failure_ # Set to a specified context. diff --git a/tests/misc/env b/tests/misc/env index d5e4fd627..a72179526 100755 --- a/tests/misc/env +++ b/tests/misc/env @@ -31,7 +31,7 @@ test -s out && fail=1 env -u a -i -u a -- > out || fail=1 test -s out && fail=1 env -i -- a=b > out || fail=1 -echo a=b > exp || framework_failure +echo a=b > exp || framework_failure_ compare exp out || fail=1 # These tests verify exact status of internal failure. @@ -62,20 +62,20 @@ fi ENV_TEST1=a export ENV_TEST1 -: >out || framework_failure +: >out || framework_failure_ env ENV_TEST2= > all || fail=1 -grep '^ENV_TEST' all | LC_ALL=C sort >> out || framework_failure +grep '^ENV_TEST' all | LC_ALL=C sort >> out || framework_failure_ env -u ENV_TEST1 ENV_TEST3=c > all || fail=1 -grep '^ENV_TEST' all | LC_ALL=C sort >> out || framework_failure +grep '^ENV_TEST' all | LC_ALL=C sort >> out || framework_failure_ env ENV_TEST1=b > all || fail=1 -grep '^ENV_TEST' all | LC_ALL=C sort >> out || framework_failure +grep '^ENV_TEST' all | LC_ALL=C sort >> out || framework_failure_ env ENV_TEST2= env > all || fail=1 -grep '^ENV_TEST' all | LC_ALL=C sort >> out || framework_failure +grep '^ENV_TEST' all | LC_ALL=C sort >> out || framework_failure_ env -u ENV_TEST1 ENV_TEST3=c env > all || fail=1 -grep '^ENV_TEST' all | LC_ALL=C sort >> out || framework_failure +grep '^ENV_TEST' all | LC_ALL=C sort >> out || framework_failure_ env ENV_TEST1=b env > all || fail=1 -grep '^ENV_TEST' all | LC_ALL=C sort >> out || framework_failure -cat <<EOF >exp || framework_failure +grep '^ENV_TEST' all | LC_ALL=C sort >> out || framework_failure_ +cat <<EOF >exp || framework_failure_ ENV_TEST1=a ENV_TEST2= ENV_TEST3=c @@ -88,12 +88,12 @@ EOF compare exp out || fail=1 # PATH modifications affect exec. -mkdir unlikely_name || framework_failure -cat <<EOF > unlikely_name/also_unlikely || framework_failure +mkdir unlikely_name || framework_failure_ +cat <<EOF > unlikely_name/also_unlikely || framework_failure_ #!/bin/sh echo pass EOF -chmod +x unlikely_name/also_unlikely || framework_failure +chmod +x unlikely_name/also_unlikely || framework_failure_ env also_unlikely && fail=1 test x`PATH=$PATH:unlikely_name env also_unlikely` = xpass || fail=1 test x`env PATH="$PATH":unlikely_name also_unlikely` = xpass || fail=1 @@ -107,7 +107,7 @@ export PATH # '/bin/sh -i', rather than '/bin/sh -- -i', which doesn't do what we want. # Avoid the issue by using an executable rather than a script. # Test -u, rather than -i, to minimize PATH problems. -ln -s "$abs_top_builddir/src/echo" ./-u || framework_failure +ln -s "$abs_top_builddir/src/echo" ./-u || framework_failure_ case `env -u echo echo good` in good) ;; *) fail=1 ;; @@ -124,18 +124,18 @@ esac # After options have ended, the first argument not containing = is a program. env a=b -- true test $? = 127 || fail=1 -ln -s "$abs_top_builddir/src/echo" ./-- || framework_failure +ln -s "$abs_top_builddir/src/echo" ./-- || framework_failure_ case `env a=b -- true || echo fail` in true) ;; *) fail=1 ;; esac # No way to directly invoke program name containing =. -cat <<EOF >./c=d || framework_failure +cat <<EOF >./c=d || framework_failure_ #!/bin/sh echo pass EOF -chmod +x c=d || framework_failure +chmod +x c=d || framework_failure_ test "x`env c=d echo fail`" = xfail || fail=1 test "x`env -- c=d echo fail`" = xfail || fail=1 test "x`env ./c=d echo fail`" = xfail || fail=1 diff --git a/tests/misc/env-null b/tests/misc/env-null index b5b6418ce..2480e7281 100755 --- a/tests/misc/env-null +++ b/tests/misc/env-null @@ -43,12 +43,12 @@ test $? = 125 || fail=1 test -s out && fail=1 # Test env -0 on a one-variable environment. -printf 'a=b\nc=\0' > exp || framework_failure +printf 'a=b\nc=\0' > exp || framework_failure_ env -i -0 "$(printf 'a=b\nc=')" > out || fail=1 compare exp out || fail=1 # Test printenv -0 on particular values. -printf 'b\nc=\0' > exp || framework_failure +printf 'b\nc=\0' > exp || framework_failure_ env "$(printf 'a=b\nc=')" printenv -0 a > out || fail=1 compare exp out || fail=1 env -u a printenv -0 a > out diff --git a/tests/misc/fmt-long-line b/tests/misc/fmt-long-line index 6f3617347..4d424c095 100755 --- a/tests/misc/fmt-long-line +++ b/tests/misc/fmt-long-line @@ -19,9 +19,9 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ fmt -printf '%2030s\n' ' '|sed 's/../ y/g' > in || framework_failure +printf '%2030s\n' ' '|sed 's/../ y/g' > in || framework_failure_ -cat <<\EOF > exp || framework_failure +cat <<\EOF > exp || framework_failure_ y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y diff --git a/tests/misc/head-c b/tests/misc/head-c index 7217904e2..468aee206 100755 --- a/tests/misc/head-c +++ b/tests/misc/head-c @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ head -echo abc > in || framework_failure +echo abc > in || framework_failure_ (head -c1; head -c1) < in > out || fail=1 case "`cat out`" in diff --git a/tests/misc/head-pos b/tests/misc/head-pos index 222755ade..79e2a43e0 100755 --- a/tests/misc/head-pos +++ b/tests/misc/head-pos @@ -20,7 +20,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ head -(echo a; echo b) > in || framework_failure +(echo a; echo b) > in || framework_failure_ (head -n 1 >/dev/null; cat) < in > out || fail=1 cat <<EOF > exp diff --git a/tests/misc/ls-time b/tests/misc/ls-time index 241780893..333be7535 100755 --- a/tests/misc/ls-time +++ b/tests/misc/ls-time @@ -32,15 +32,15 @@ u1='1998-01-14 11:00' u2='1998-01-14 12:00' u3='1998-01-14 13:00' -touch -m -d "$t3" a || framework_failure -touch -m -d "$t2" b || framework_failure -touch -m -d "$t1" c || framework_failure +touch -m -d "$t3" a || framework_failure_ +touch -m -d "$t2" b || framework_failure_ +touch -m -d "$t1" c || framework_failure_ -touch -a -d "$u3" c || framework_failure -touch -a -d "$u2" b || framework_failure +touch -a -d "$u3" c || framework_failure_ +touch -a -d "$u2" b || framework_failure_ # Make sure A has ctime at least 1 second more recent than C's. sleep 2 -touch -a -d "$u1" a || framework_failure +touch -a -d "$u1" a || framework_failure_ # A has ctime more recent than C. @@ -52,7 +52,7 @@ test "$*" = 'a c' || fail=1 sleep 2 # Create a link, updating c's ctime. -ln c d || framework_failure +ln c d || framework_failure_ # Before we go any further, verify that touch's -m option works. set -- `ls --full -l a` @@ -69,7 +69,7 @@ have been $t3. EOF #` ls --full -l a - framework_failure + framework_failure_ ;; esac diff --git a/tests/misc/nice b/tests/misc/nice index f63a28ecd..1212381df 100755 --- a/tests/misc/nice +++ b/tests/misc/nice @@ -74,7 +74,7 @@ if test x`nice -n -1 nice 2> /dev/null` = x0 ; then # unprivileged user - warn about failure to change nice -n -1 true 2> err || fail=1 test -s err || fail=1 - mv err exp || framework_failure + 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. diff --git a/tests/misc/od-N b/tests/misc/od-N index 6efe85385..2aa210674 100755 --- a/tests/misc/od-N +++ b/tests/misc/od-N @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ od -echo abcdefg > in || framework_failure +echo abcdefg > in || framework_failure_ (od -An -N3 -c; od -An -N3 -c) < in > out diff --git a/tests/misc/od-float b/tests/misc/od-float index 437bd87da..0daea12d1 100755 --- a/tests/misc/od-float +++ b/tests/misc/od-float @@ -29,7 +29,7 @@ export LC_ALL=C # on x86: sometimes there was no space between the columns. set x $(echo aaaabaaa | tr ab '\376\377' | od -t fF) || - framework_failure + framework_failure_ case "$*" in *0-*) fail=1;; esac @@ -38,7 +38,7 @@ case $3,$4 in esac set x $(echo aaaaaaaabaaaaaaa | tr ab '\376\377' | od -t fD) || - framework_failure + framework_failure_ case "$*" in *0-*) fail=1;; esac @@ -47,7 +47,7 @@ case $3,$4 in esac set x $(echo aaaaaaaaaaaaaaaabaaaaaaaaaaaaaaa | tr ab '\376\377' | od -t fL) || - framework_failure + framework_failure_ case "$*" in *0-*) fail=1;; esac diff --git a/tests/misc/od-multiple-t b/tests/misc/od-multiple-t index 30af78f9c..4f8698768 100755 --- a/tests/misc/od-multiple-t +++ b/tests/misc/od-multiple-t @@ -22,8 +22,8 @@ print_ver_ od # Choose 48 bytes for the input, as that is lcm for 1, 2, 4, 8, 12, 16; # we don't anticipate any other native object size on modern hardware. -seq 19 > in || framework_failure -test `wc -c < in` -eq 48 || framework_failure +seq 19 > in || framework_failure_ +test `wc -c < in` -eq 48 || framework_failure_ list='a c dC dS dI dL oC oS oI oL uC uS uI uL xC xS xI xL fF fD fL' diff --git a/tests/misc/od-x8 b/tests/misc/od-x8 index 4936109d8..b66269faf 100755 --- a/tests/misc/od-x8 +++ b/tests/misc/od-x8 @@ -23,7 +23,7 @@ print_ver_ od od -t x8 /dev/null >/dev/null || skip_ "od lacks support for 8-byte quantities" -echo abcdefgh |tr -d '\n' > in || framework_failure +echo abcdefgh |tr -d '\n' > in || framework_failure_ od -An -t x8 in > out-raw || fail=1 diff --git a/tests/misc/pathchk1 b/tests/misc/pathchk1 index 91d8777c3..23649d3bb 100755 --- a/tests/misc/pathchk1 +++ b/tests/misc/pathchk1 @@ -20,7 +20,7 @@ print_ver_ pathchk skip_if_root_ -touch file || framework_failure +touch file || framework_failure_ # This should exit nonzero. Before 2.0.13, it gave a diagnostic, diff --git a/tests/misc/printenv b/tests/misc/printenv index 607914c10..a13a139c9 100755 --- a/tests/misc/printenv +++ b/tests/misc/printenv @@ -23,7 +23,7 @@ print_ver_ printenv # printenv as a builtin, so we must invoke it via "env". # But beware of $_, set by many shells to the last command run. # Also, filter out LD_PRELOAD, which is set when running under valgrind. -env | grep -Ev '^(_|LD_PRELOAD=)' > exp || framework_failure +env | grep -Ev '^(_|LD_PRELOAD=)' > exp || framework_failure_ env -- printenv | grep -Ev '^(_|LD_PRELOAD=)' > out || fail=1 compare exp out || fail=1 @@ -38,7 +38,7 @@ fi env -- printenv ENV_TEST > out test $? = 1 || fail=1 test -s out && fail=1 -echo a > exp || framework_failure +echo a > exp || framework_failure_ ENV_TEST=a env -- printenv ENV_TEST > out || fail=1 compare exp out || fail=1 @@ -46,7 +46,7 @@ compare exp out || fail=1 ENV_TEST1=a ENV_TEST2=b env -- printenv ENV_TEST2 ENV_TEST1 ENV_TEST2 > out \ || fail=1 ENV_TEST1=a ENV_TEST2=b env -- printenv ENV_TEST1 ENV_TEST2 >> out || fail=1 -cat <<EOF > exp || framework_failure +cat <<EOF > exp || framework_failure_ b a b @@ -60,7 +60,7 @@ ENV_TEST1=a env -- printenv ENV_TEST2 ENV_TEST1 > out test $? = 1 || fail=1 ENV_TEST1=a env -- printenv ENV_TEST1 ENV_TEST2 >> out test $? = 1 || fail=1 -cat <<EOF > exp || framework_failure +cat <<EOF > exp || framework_failure_ a a EOF @@ -68,7 +68,7 @@ compare exp out || fail=1 # Non-standard environment variable name. Shells won't create it, but # env can, and printenv must be able to deal with it. -echo b > exp || framework_failure +echo b > exp || framework_failure_ env -- -a=b printenv -- -a > out || fail=1 compare exp out || fail=1 diff --git a/tests/misc/ptx-overrun b/tests/misc/ptx-overrun index 0f412d172..d4f8d0a24 100755 --- a/tests/misc/ptx-overrun +++ b/tests/misc/ptx-overrun @@ -22,7 +22,7 @@ print_ver_ ptx # Using a long file name makes an abort more likely. # Even with no file name, valgrind detects the buffer overrun. f=01234567890123456789012345678901234567890123456789 -touch $f empty || framework_failure +touch $f empty || framework_failure_ # Specifying a regular expression ending in a lone backslash diff --git a/tests/misc/pwd-option b/tests/misc/pwd-option index c90049320..708401ff2 100755 --- a/tests/misc/pwd-option +++ b/tests/misc/pwd-option @@ -19,16 +19,16 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ pwd -mkdir -p a/b || framework_failure -ln -s a/b c || framework_failure +mkdir -p a/b || framework_failure_ +ln -s a/b c || framework_failure_ base=$(env -- pwd) # Remove any logical paths from $PWD. -cd "$base" || framework_failure -test "x$PWD" = "x$base" || framework_failure +cd "$base" || framework_failure_ +test "x$PWD" = "x$base" || framework_failure_ # Enter a logical directory. -cd c || framework_failure +cd c || framework_failure_ test "x$PWD" = "x$base/c" || skip_ "cd does not properly update \$PWD" env -- pwd -L > out || fail=1 diff --git a/tests/misc/readlink-fp-loop b/tests/misc/readlink-fp-loop index 37d40928d..1c50d6a4f 100755 --- a/tests/misc/readlink-fp-loop +++ b/tests/misc/readlink-fp-loop @@ -25,11 +25,11 @@ cwd=$("$abs_top_builddir/src/pwd") # two different times with no actual loop. In addition, arrange # so that the second and fourth calls to readlink operate on S. -ln -s s p || framework_failure -ln -s d s || framework_failure -mkdir d || framework_failure -echo 2 > d/2 || framework_failure -ln -s ../s/2 d/1 || framework_failure +ln -s s p || framework_failure_ +ln -s d s || framework_failure_ +mkdir d || framework_failure_ +echo 2 > d/2 || framework_failure_ +ln -s ../s/2 d/1 || framework_failure_ # With coreutils-6.9, this would fail with ELOOP. readlink -v -e p/1 > out || fail=1 @@ -38,7 +38,7 @@ echo "$cwd/d/2" > exp || fail=1 compare out exp || fail=1 # Construct a real loop and make sure readlink still detects it. -ln -sf ../s/1 d/2 || framework_failure +ln -sf ../s/1 d/2 || framework_failure_ readlink -v -e p/1 2> out && fail=1 readlink_msg=$(cat out) case $readlink_msg in @@ -48,13 +48,13 @@ esac symlink_loop_msg=${readlink_msg#'readlink: p/1: '} # Exercise the hash table code. -ln -nsf ../s/3 d/2 || framework_failure -ln -nsf ../p/4 d/3 || framework_failure -ln -nsf ../p/5 d/4 || framework_failure -ln -nsf ../p/6 d/5 || framework_failure -ln -nsf ../p/7 d/6 || framework_failure -ln -nsf ../p/8 d/7 || framework_failure -echo x > d/8 || framework_failure +ln -nsf ../s/3 d/2 || framework_failure_ +ln -nsf ../p/4 d/3 || framework_failure_ +ln -nsf ../p/5 d/4 || framework_failure_ +ln -nsf ../p/6 d/5 || framework_failure_ +ln -nsf ../p/7 d/6 || framework_failure_ +ln -nsf ../p/8 d/7 || framework_failure_ +echo x > d/8 || framework_failure_ readlink -v -e p/1 > out || fail=1 echo "$cwd/d/8" > exp || fail=1 compare out exp || fail=1 @@ -62,7 +62,7 @@ compare out exp || fail=1 # A trivial loop ln -s loop loop readlink -v -e loop 2> out && fail=1 -echo "readlink: loop: $symlink_loop_msg" > exp || framework_failure +echo "readlink: loop: $symlink_loop_msg" > exp || framework_failure_ compare out exp || fail=1 Exit $fail diff --git a/tests/misc/runcon-no-reorder b/tests/misc/runcon-no-reorder index dd2c3e65e..7a4825680 100755 --- a/tests/misc/runcon-no-reorder +++ b/tests/misc/runcon-no-reorder @@ -20,7 +20,7 @@ print_ver_ runcon diag='runcon: runcon may be used only on a SELinux kernel' -echo "$diag" > exp || framework_failure +echo "$diag" > exp || framework_failure_ # This test works even on systems without SELinux. diff --git a/tests/misc/selinux b/tests/misc/selinux index df3cb3ec1..f5961be73 100755 --- a/tests/misc/selinux +++ b/tests/misc/selinux @@ -24,8 +24,8 @@ require_selinux_ skip_if_mcstransd_is_running_ # Create a regular file, dir, fifo. -touch f || framework_failure -mkdir d s1 s2 || framework_failure +touch f || framework_failure_ +mkdir d s1 s2 || framework_failure_ mkfifo_or_skip_ p diff --git a/tests/misc/shred-passes b/tests/misc/shred-passes index 9930b3afb..fd9532055 100755 --- a/tests/misc/shred-passes +++ b/tests/misc/shred-passes @@ -22,14 +22,14 @@ print_ver_ shred # shred a single letter, zero length file which should result in # 3 random passes and a single rename. -touch f || framework_failure +touch f || framework_failure_ echo "\ shred: f: pass 1/3 (random)... shred: f: pass 2/3 (random)... shred: f: pass 3/3 (random)... shred: f: removing shred: f: renamed to 0 -shred: f: removed" > exp || framework_failure +shred: f: removed" > exp || framework_failure_ shred -v -u f 2>out || fail=1 diff --git a/tests/misc/shred-remove b/tests/misc/shred-remove index 0b89f00ea..4abf83697 100755 --- a/tests/misc/shred-remove +++ b/tests/misc/shred-remove @@ -24,8 +24,8 @@ skip_if_root_ # In this case, shred would try to rename the file 256^10 times # before terminating. file=0123456789 -touch $file || framework_failure -chmod u-w $file || framework_failure +touch $file || framework_failure_ +chmod u-w $file || framework_failure_ # This would take so long that it appears to infloop diff --git a/tests/misc/shuf b/tests/misc/shuf index 10d285846..8adb1d4e4 100755 --- a/tests/misc/shuf +++ b/tests/misc/shuf @@ -20,7 +20,7 @@ print_ver_ shuf getlimits_ -seq 100 > in || framework_failure +seq 100 > in || framework_failure_ shuf in >out || fail=1 @@ -49,7 +49,7 @@ seq 1860 | shuf > /dev/null || fail=1 # coreutils-6.12 and earlier would output a newline terminator, not \0. shuf --zero-terminated -i 1-1 > out || fail=1 -printf '1\0' > exp || framework_failure +printf '1\0' > exp || framework_failure_ cmp out exp || { fail=1; echo "missing NUL terminator?" 1>&2; } # Ensure shuf -n operates efficiently for small n. Before coreutils-8.13 diff --git a/tests/misc/sort-benchmark-random b/tests/misc/sort-benchmark-random index e6ae12fee..6a61a1462 100755 --- a/tests/misc/sort-benchmark-random +++ b/tests/misc/sort-benchmark-random @@ -34,7 +34,7 @@ for (my $i=0; $i < $num_lines; $i++) printf "%c", 32 + rand(94); } print "\n"; -}' > in || framework_failure +}' > in || framework_failure_ # We need to generate a lot of data for sort to show a noticeable # improvement in performance. Sorting it in PERL may take awhile. @@ -44,7 +44,7 @@ open (FILE, "<in"); my @list = <FILE>; print sort(@list); close (FILE); -' > exp || framework_failure +' > exp || framework_failure_ time sort in > out || fail=1 diff --git a/tests/misc/sort-compress b/tests/misc/sort-compress index ab0c0909f..9d1eb6065 100755 --- a/tests/misc/sort-compress +++ b/tests/misc/sort-compress @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ sort -seq -w 2000 > exp || framework_failure -tac exp > in || framework_failure +seq -w 2000 > exp || framework_failure_ +tac exp > in || framework_failure_ # This should force the use of temp files sort -S 1k in > out || fail=1 diff --git a/tests/misc/sort-compress-hang b/tests/misc/sort-compress-hang index 0bc46dce8..ddd4f2d2c 100755 --- a/tests/misc/sort-compress-hang +++ b/tests/misc/sort-compress-hang @@ -20,7 +20,7 @@ print_ver_ sort very_expensive_ -cat <<\EOF >compress || framework_failure +cat <<\EOF >compress || framework_failure_ #!/bin/sh tr 41 14 || exit touch ok diff --git a/tests/misc/sort-compress-proc b/tests/misc/sort-compress-proc index de0457300..60c8af7b3 100755 --- a/tests/misc/sort-compress-proc +++ b/tests/misc/sort-compress-proc @@ -27,7 +27,7 @@ insize=$(stat -c %s - <in) || fail=1 # This compressor's behavior is adjustable via environment variables. export PRE_COMPRESS= export POST_COMPRESS= -cat <<\EOF >compress || framework_failure +cat <<\EOF >compress || framework_failure_ #!/bin/sh eval "$PRE_COMPRESS" tr 41 14 || exit diff --git a/tests/misc/sort-continue b/tests/misc/sort-continue index 43881ac2e..42db01eb1 100755 --- a/tests/misc/sort-continue +++ b/tests/misc/sort-continue @@ -24,7 +24,7 @@ print_ver_ sort || skip_ 'fd-limited sort failed; are you running under valgrind?' for i in $(seq 31); do - echo $i | tee -a in > __test.$i || framework_failure + echo $i | tee -a in > __test.$i || framework_failure_ done diff --git a/tests/misc/sort-merge-fdlimit b/tests/misc/sort-merge-fdlimit index ec9d49228..2de14f4f7 100755 --- a/tests/misc/sort-merge-fdlimit +++ b/tests/misc/sort-merge-fdlimit @@ -21,7 +21,7 @@ print_ver_ sort require_ulimit_ -mkdir in err || framework_failure +mkdir in err || framework_failure_ for i in `seq 17`; do diff --git a/tests/misc/sort-rand b/tests/misc/sort-rand index 175b4bd10..e39dfa2da 100755 --- a/tests/misc/sort-rand +++ b/tests/misc/sort-rand @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ sort -seq 100 > in || framework_failure +seq 100 > in || framework_failure_ sort --random-sort in > out || fail=1 diff --git a/tests/misc/stat-hyphen b/tests/misc/stat-hyphen index 9378979f8..9a950ba64 100755 --- a/tests/misc/stat-hyphen +++ b/tests/misc/stat-hyphen @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ stat -printf -- '-\n' > exp || framework_failure -touch f || framework_failure +printf -- '-\n' > exp || framework_failure_ +touch f || framework_failure_ stat --format=%n - < f > out || fail=1 stat -f - < f && fail=1 diff --git a/tests/misc/stat-slash b/tests/misc/stat-slash index 3209792aa..c317855d6 100755 --- a/tests/misc/stat-slash +++ b/tests/misc/stat-slash @@ -19,12 +19,12 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ stat -touch file || framework_failure -mkdir dir || framework_failure -ln -s file link1 || framework_failure -ln -s dir link2 || framework_failure +touch file || framework_failure_ +mkdir dir || framework_failure_ +ln -s file link1 || framework_failure_ +ln -s dir link2 || framework_failure_ -cat <<EOF > exp || framework_failure +cat <<EOF > exp || framework_failure_ link1 symbolic link directory diff --git a/tests/misc/tee b/tests/misc/tee index daace67e7..2dd70d74a 100755 --- a/tests/misc/tee +++ b/tests/misc/tee @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ tee -echo line >sample || framework_failure -nums=`seq 9` || framework_failure +echo line >sample || framework_failure_ +nums=`seq 9` || framework_failure_ for n in 0 $nums; do files=`seq $n` diff --git a/tests/misc/truncate-owned-by-other b/tests/misc/truncate-owned-by-other index 652034807..e7dfb38b3 100755 --- a/tests/misc/truncate-owned-by-other +++ b/tests/misc/truncate-owned-by-other @@ -24,8 +24,8 @@ require_root_ group_num=$(id -g $NON_ROOT_USERNAME) # Create a file owned by root, and writable by $NON_ROOT_USERNAME. -echo > root-owned || framework_failure -chgrp +$group_num . root-owned || framework_failure +echo > root-owned || framework_failure_ +chgrp +$group_num . root-owned || framework_failure_ chmod g+w root-owned # Ensure that the current directory is searchable by $NON_ROOT_USERNAME. diff --git a/tests/misc/wc-files0 b/tests/misc/wc-files0 index 1f4b49544..49df3b4b0 100755 --- a/tests/misc/wc-files0 +++ b/tests/misc/wc-files0 @@ -19,9 +19,9 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ wc -echo 2 > 2b || framework_failure -echo 2 words > 2w || framework_failure -printf '2b\n2w\n' |tr '\n' '\0' > names || framework_failure +echo 2 > 2b || framework_failure_ +echo 2 words > 2w || framework_failure_ +printf '2b\n2w\n' |tr '\n' '\0' > names || framework_failure_ wc --files0-from=names > out || fail=1 diff --git a/tests/misc/xattr b/tests/misc/xattr index 05437d037..2529910dc 100755 --- a/tests/misc/xattr +++ b/tests/misc/xattr @@ -22,7 +22,7 @@ print_ver_ cp mv ginstall # Skip this test if cp was built without xattr support: -touch src dest || framework_failure +touch src dest || framework_failure_ cp --preserve=xattr -n src dest \ || skip_ "coreutils built without xattr support" @@ -30,7 +30,7 @@ cp --preserve=xattr -n src dest \ cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" b_other="$other_partition_tmpdir/b" -rm -f "$b_other" || framework_failure +rm -f "$b_other" || framework_failure_ # testing xattr name-value pair xattr_name="user.foo" @@ -38,9 +38,9 @@ xattr_value="bar" xattr_pair="$xattr_name=\"$xattr_value\"" # create new file and check its xattrs -touch a || framework_failure +touch a || framework_failure_ getfattr -d a >out_a || skip_ "failed to get xattr of file" -grep -F "$xattr_pair" out_a && framework_failure +grep -F "$xattr_pair" out_a && framework_failure_ # try to set user xattr on file setfattr -n "$xattr_name" -v "$xattr_value" a >out_a \ @@ -71,7 +71,7 @@ getfattr -d d >out_d || skip_ "failed to get xattr of file" grep -F "$xattr_pair" out_d || fail=1 # test if --preserve=xattr works even for files without write access -chmod a-w a || framework_failure +chmod a-w a || framework_failure_ rm -f e cp --preserve=xattr a e || fail=1 getfattr -d e >out_e || skip_ "failed to get xattr of file" @@ -82,9 +82,9 @@ src_perm=$(stat --format=%a a) dst_perm=$(stat --format=%a e) test "$dst_perm" = "$src_perm" || fail=1 -chmod u+w a || framework_failure +chmod u+w a || framework_failure_ -rm b || framework_failure +rm b || framework_failure_ # install should never preserve xattr ginstall a b || fail=1 @@ -105,12 +105,12 @@ EOF # try to set user xattr on file on other partition test_mv=1 -touch "$b_other" || framework_failure +touch "$b_other" || framework_failure_ setfattr -n "$xattr_name" -v "$xattr_value" "$b_other" >out_a \ || test_mv=0 getfattr -d "$b_other" >out_b || test_mv=0 grep -F "$xattr_pair" out_b || test_mv=0 -rm -f "$b_other" || framework_failure +rm -f "$b_other" || framework_failure_ if test $test_mv -eq 1; then # mv should preserve xattr when copying content from one partition to another |