diff options
Diffstat (limited to 'tests')
250 files changed, 735 insertions, 739 deletions
diff --git a/tests/chgrp/default-no-deref b/tests/chgrp/default-no-deref index 6f864f54d..3e31a2a66 100755 --- a/tests/chgrp/default-no-deref +++ b/tests/chgrp/default-no-deref @@ -23,7 +23,7 @@ require_membership_in_two_groups_ set _ $groups; shift g2=$2 -mkdir d && touch f && ln -s ../f d/s || framework_failure +mkdir d && touch f && ln -s ../f d/s || framework_failure_ g_init=`stat --printf=%g f` diff --git a/tests/chgrp/no-x b/tests/chgrp/no-x index 12235de63..2555c4532 100755 --- a/tests/chgrp/no-x +++ b/tests/chgrp/no-x @@ -26,8 +26,8 @@ set _ $groups; shift g1=$1 g2=$2 -mkdir -p d/no-x/y || framework_failure -chmod u=rw d/no-x || framework_failure +mkdir -p d/no-x/y || framework_failure_ +chmod u=rw d/no-x || framework_failure_ # This must exit nonzero. diff --git a/tests/chgrp/posix-H b/tests/chgrp/posix-H index 2ae2ff3c6..a0e6ff095 100755 --- a/tests/chgrp/posix-H +++ b/tests/chgrp/posix-H @@ -24,11 +24,11 @@ set _ $groups; shift g1=$1 g2=$2 -mkdir 1 2 3 || framework_failure -touch 1/1F 2/2F 3/3F || framework_failure -ln -s 1 1s || framework_failure -ln -s ../3 2/2s || framework_failure -chgrp -R $g1 1 2 3 || framework_failure +mkdir 1 2 3 || framework_failure_ +touch 1/1F 2/2F 3/3F || framework_failure_ +ln -s 1 1s || framework_failure_ +ln -s ../3 2/2s || framework_failure_ +chgrp -R $g1 1 2 3 || framework_failure_ chgrp --preserve-root -H -R $g2 1s 2 || fail=1 diff --git a/tests/chmod/c-option b/tests/chmod/c-option index d80038c3d..d5002a27f 100755 --- a/tests/chmod/c-option +++ b/tests/chmod/c-option @@ -21,8 +21,8 @@ print_ver_ chmod umask 0 file=f -touch $file || framework_failure -chmod 444 $file || framework_failure +touch $file || framework_failure_ +chmod 444 $file || framework_failure_ skip_if_setgid_ diff --git a/tests/chmod/equal-x b/tests/chmod/equal-x index fc4a8f5ef..3505696ae 100755 --- a/tests/chmod/equal-x +++ b/tests/chmod/equal-x @@ -20,7 +20,7 @@ print_ver_ chmod file=f -touch $file || framework_failure +touch $file || framework_failure_ umask 005 for mode in =x =xX =Xx =x,=X =X,=x; do diff --git a/tests/chmod/equals b/tests/chmod/equals index 39d2d62a0..249412cf6 100755 --- a/tests/chmod/equals +++ b/tests/chmod/equals @@ -21,7 +21,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ chmod -touch f || framework_failure +touch f || framework_failure_ expected_u=-rwx------ diff --git a/tests/chmod/inaccessible b/tests/chmod/inaccessible index 90126a86c..7c0518017 100755 --- a/tests/chmod/inaccessible +++ b/tests/chmod/inaccessible @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ chmod -mkdir -p d/e || framework_failure -chmod 0 d/e d || framework_failure +mkdir -p d/e || framework_failure_ +chmod 0 d/e d || framework_failure_ chmod u+rwx d d/e || fail=1 diff --git a/tests/chmod/no-x b/tests/chmod/no-x index 0fb70f967..f45c4466e 100755 --- a/tests/chmod/no-x +++ b/tests/chmod/no-x @@ -21,8 +21,8 @@ print_ver_ chmod skip_if_root_ -mkdir -p d/no-x/y a/b || framework_failure -chmod u=rw d/no-x || framework_failure +mkdir -p d/no-x/y a/b || framework_failure_ +chmod u=rw d/no-x || framework_failure_ # This must exit nonzero. diff --git a/tests/chmod/setgid b/tests/chmod/setgid index 364d25d5f..23278dec2 100755 --- a/tests/chmod/setgid +++ b/tests/chmod/setgid @@ -21,7 +21,7 @@ print_ver_ chmod umask 0 -mkdir d || framework_failure +mkdir d || framework_failure_ chmod g+s d 2> /dev/null && env -- test -g d || { @@ -33,7 +33,7 @@ chmod g+s d 2> /dev/null && env -- test -g d || id_g=`id -g` && test -n "$id_g" && chgrp "$id_g" d && - chmod g+s d || framework_failure + chmod g+s d || framework_failure_ } # "chmod g+s d" does nothing on some NFS file systems. diff --git a/tests/chmod/thru-dangling b/tests/chmod/thru-dangling index e967eb929..38187d002 100755 --- a/tests/chmod/thru-dangling +++ b/tests/chmod/thru-dangling @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ chmod -ln -s non-existent dangle || framework_failure +ln -s non-existent dangle || framework_failure_ # This operation cannot succeed since the symbolic link dangles. diff --git a/tests/chmod/usage b/tests/chmod/usage index 0566db49d..b840c1109 100755 --- a/tests/chmod/usage +++ b/tests/chmod/usage @@ -66,17 +66,17 @@ for case in $cases; do case $files in '') - touch -- $all_files || framework_failure + touch -- $all_files || framework_failure_ chmod $args 2>/dev/null && fail=1 ;; ?*) - touch -- $files || framework_failure + touch -- $files || framework_failure_ chmod $args || fail=1 for file in $files; do # Test for misparsing args by creating all $files but $file. # chmod has a bug if it succeeds even though $file is absent. rm -f -- $all_files && touch -- $files && rm -- $file \ - || framework_failure + || framework_failure_ chmod $args 2>/dev/null && fail=1 done ;; diff --git a/tests/chown/basic b/tests/chown/basic index 5626029ae..102f17c79 100755 --- a/tests/chown/basic +++ b/tests/chown/basic @@ -20,7 +20,7 @@ print_ver_ chgrp require_root_ -touch f || framework_failure +touch f || framework_failure_ chown -R --preserve-root 0:1 f diff --git a/tests/chown/deref b/tests/chown/deref index fbe71c7b0..c228bde80 100755 --- a/tests/chown/deref +++ b/tests/chown/deref @@ -20,7 +20,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ chown -ln -s no-such dangle || framework_failure +ln -s no-such dangle || framework_failure_ set _ `ls -ldo dangle`; shift; user=$3 diff --git a/tests/chown/separator b/tests/chown/separator index c10c5d909..147544b43 100755 --- a/tests/chown/separator +++ b/tests/chown/separator @@ -19,17 +19,17 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ chown -id_u=`id -u` || framework_failure -test -n "$id_u" || framework_failure +id_u=`id -u` || framework_failure_ +test -n "$id_u" || framework_failure_ -id_un=`id -un` || framework_failure -test -n "$id_un" || framework_failure +id_un=`id -un` || framework_failure_ +test -n "$id_un" || framework_failure_ -id_g=`id -g` || framework_failure -test -n "$id_g" || framework_failure +id_g=`id -g` || framework_failure_ +test -n "$id_g" || framework_failure_ -id_gn=`id -gn` || framework_failure -test -n "$id_gn" || framework_failure +id_gn=`id -gn` || framework_failure_ +test -n "$id_gn" || framework_failure_ # FreeBSD 6.x's getgrnam fails to look up a group name containing # a space. On such a system, skip this test if the group name contains diff --git a/tests/cp/abuse b/tests/cp/abuse index 7ed8a037b..43b7df0d9 100755 --- a/tests/cp/abuse +++ b/tests/cp/abuse @@ -19,12 +19,12 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -mkdir a b c || framework_failure -ln -s ../t a/1 || framework_failure -echo payload > b/1 || framework_failure +mkdir a b c || framework_failure_ +ln -s ../t a/1 || framework_failure_ +echo payload > b/1 || framework_failure_ echo "cp: will not copy \`b/1' through just-created symlink \`c/1'" \ - > exp || framework_failure + > exp || framework_failure_ # Check both cases: a dangling symlink, and one pointing to a writable file. diff --git a/tests/cp/acl b/tests/cp/acl index 8c132a940..261a1c954 100755 --- a/tests/cp/acl +++ b/tests/cp/acl @@ -26,8 +26,8 @@ require_acl_ grep '^#define USE_ACL 1' $CONFIG_HEADER > /dev/null || skip_ "insufficient ACL support" -mkdir -p a b || framework_failure -touch a/file || framework_failure +mkdir -p a b || framework_failure_ +touch a/file || framework_failure_ # Ensure that setfacl and getfacl work on this file system. skip=no @@ -38,23 +38,23 @@ test $skip = yes && # copy a file without preserving permissions cp a/file b/ || fail=1 -acl2=`cd b && getfacl file` || framework_failure +acl2=`cd b && getfacl file` || framework_failure_ test "$acl1" = "$acl2" || fail=1 # Update with acl set above -acl1=`cd a && getfacl file` || framework_failure +acl1=`cd a && getfacl file` || framework_failure_ # copy a file, preserving permissions cp -p a/file b/ || fail=1 -acl2=`cd b && getfacl file` || framework_failure +acl2=`cd b && getfacl file` || framework_failure_ test "$acl1" = "$acl2" || fail=1 # copy a file, preserving permissions, with --attributes-only -echo > a/file || framework_failure # add some data -test -s a/file || framework_failure +echo > a/file || framework_failure_ # add some data +test -s a/file || framework_failure_ cp -p --attributes-only a/file b/ || fail=1 test -s b/file && fail=1 -acl2=`cd b && getfacl file` || framework_failure +acl2=`cd b && getfacl file` || framework_failure_ test "$acl1" = "$acl2" || fail=1 Exit $fail diff --git a/tests/cp/backup-dir b/tests/cp/backup-dir index c89aac5c2..708b9d7dd 100755 --- a/tests/cp/backup-dir +++ b/tests/cp/backup-dir @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -mkdir x y || framework_failure +mkdir x y || framework_failure_ cp -a x y || fail=1 diff --git a/tests/cp/backup-is-src b/tests/cp/backup-is-src index 8e683ed85..bb6478940 100755 --- a/tests/cp/backup-is-src +++ b/tests/cp/backup-is-src @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -echo a > a || framework_failure -echo a-tilde > a~ || framework_failure +echo a > a || framework_failure_ +echo a-tilde > a~ || framework_failure_ # This cp command should exit nonzero. cp --b=simple a~ a > out 2>&1 && fail=1 diff --git a/tests/cp/capability b/tests/cp/capability index be5fb082a..a0fb60849 100755 --- a/tests/cp/capability +++ b/tests/cp/capability @@ -31,8 +31,8 @@ grep '^#define HAVE_CAP 1' $CONFIG_HEADER > /dev/null \ || skip_ "getcap utility not found" -touch file || framework_failure -chown $NON_ROOT_USERNAME file || framework_failure +touch file || framework_failure_ +chown $NON_ROOT_USERNAME file || framework_failure_ setcap 'cap_net_bind_service=ep' file || skip_ "setcap doesn't work" diff --git a/tests/cp/cp-HL b/tests/cp/cp-HL index 49d1fa4d9..9a146240d 100755 --- a/tests/cp/cp-HL +++ b/tests/cp/cp-HL @@ -19,10 +19,10 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -mkdir src-dir dest-dir || framework_failure -echo f > f || framework_failure -ln -s f slink || framework_failure -ln -s no-such-file src-dir/slink || framework_failure +mkdir src-dir dest-dir || framework_failure_ +echo f > f || framework_failure_ +ln -s f slink || framework_failure_ +ln -s no-such-file src-dir/slink || framework_failure_ cp -H -R slink src-dir dest-dir || fail=1 diff --git a/tests/cp/cp-a-selinux b/tests/cp/cp-a-selinux index 76684d6f4..8a8e37415 100755 --- a/tests/cp/cp-a-selinux +++ b/tests/cp/cp-a-selinux @@ -31,11 +31,11 @@ cleanup_() { cd /; umount "$cwd/mnt"; } ctx=root:object_r:tmp_t:s0 # Check basic functionality - before check on fixed context mount -touch c || framework_failure -chcon $ctx c || framework_failure -cp -a c d 2>err || framework_failure -cp --preserve=context c e || framework_failure -cp --preserve=all c f || framework_failure +touch c || framework_failure_ +chcon $ctx c || framework_failure_ +cp -a c d 2>err || framework_failure_ +cp --preserve=context c e || framework_failure_ +cp --preserve=all c f || framework_failure_ ls -Z d | grep $ctx || fail=1 test -s err && fail=1 #there must be no stderr output for -a ls -Z e | grep $ctx || fail=1 @@ -52,11 +52,11 @@ mount -oloop,context=$ctx blob mnt || skip=1 test $skip = 1 \ && skip_ "insufficient mount/ext2 support" -cd mnt || framework_failure +cd mnt || framework_failure_ -echo > f || framework_failure +echo > f || framework_failure_ -echo > g || framework_failure +echo > g || framework_failure_ # /bin/cp from coreutils-6.7-3.fc7 would fail this test by letting cp # succeed (giving no diagnostics), yet leaving the destination file empty. cp -a f g 2>err || fail=1 @@ -85,7 +85,7 @@ grep "Operation not supported" err && fail=1 # NFS mounted directory. When doing that, I get this diagnostic: # cp: failed to set the security context of `g' to `system_u:object_r:nfs_t': \ # Operation not supported -cat <<\EOF > exp || framework_failure=1 +cat <<\EOF > exp || framework_failure_ cp: failed to set the security context of EOF diff --git a/tests/cp/cp-deref b/tests/cp/cp-deref index 89900f6f2..1230ae0cb 100755 --- a/tests/cp/cp-deref +++ b/tests/cp/cp-deref @@ -20,9 +20,9 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -mkdir a b c d || framework_failure -ln -s ../c a || framework_failure -ln -s ../c b || framework_failure +mkdir a b c d || framework_failure_ +ln -s ../c a || framework_failure_ +ln -s ../c b || framework_failure_ # Before coreutils-5.94, the following would fail with this message: diff --git a/tests/cp/cp-i b/tests/cp/cp-i index 1bd51fa66..8e9d940e4 100755 --- a/tests/cp/cp-i +++ b/tests/cp/cp-i @@ -19,15 +19,15 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -mkdir -p a b/a/c || framework_failure -touch a/c || framework_failure +mkdir -p a b/a/c || framework_failure_ +touch a/c || framework_failure_ # coreutils 6.2 cp would neglect to prompt in this case. echo n | cp -iR a b 2>/dev/null || fail=1 # test miscellaneous combinations of -f -i -n parameters -touch c d || framework_failure +touch c d || framework_failure_ echo "\`c' -> \`d'" > out_copy > out_empty diff --git a/tests/cp/cp-mv-enotsup-xattr b/tests/cp/cp-mv-enotsup-xattr index 2f26dbd82..9857fec41 100755 --- a/tests/cp/cp-mv-enotsup-xattr +++ b/tests/cp/cp-mv-enotsup-xattr @@ -56,9 +56,9 @@ xattr_name="user.foo" xattr_value="bar" xattr_pair="$xattr_name=\"$xattr_value\"" -echo test > xattr/a || framework_failure +echo test > xattr/a || framework_failure_ getfattr -d xattr/a >out_a || skip_ "failed to get xattr of file" -grep -F "$xattr_pair" out_a >/dev/null && framework_failure +grep -F "$xattr_pair" out_a >/dev/null && framework_failure_ setfattr -n "$xattr_name" -v "$xattr_value" xattr/a >out_a \ || skip_ "failed to set xattr of file" getfattr -d xattr/a >out_a || skip_ "failed to get xattr of file" diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents index 2f19af227..fcb5c447a 100755 --- a/tests/cp/cp-parents +++ b/tests/cp/cp-parents @@ -25,10 +25,10 @@ working_umask_or_skip_ # Run the setgid check from the just-created directory. skip_if_setgid_ -mkdir foo bar || framework_failure -mkdir -p a/b/c d e g || framework_failure -ln -s d/a sym || framework_failure -touch f || framework_failure +mkdir foo bar || framework_failure_ +mkdir -p a/b/c d e g || framework_failure_ +ln -s d/a sym || framework_failure_ +touch f || framework_failure_ # With 4.0.37 and earlier (back to when?), this would fail diff --git a/tests/cp/deref-slink b/tests/cp/deref-slink index 9cc4962ac..e34b29b6f 100755 --- a/tests/cp/deref-slink +++ b/tests/cp/deref-slink @@ -20,8 +20,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -touch f slink-target || framework_failure -ln -s slink-target slink || framework_failure +touch f slink-target || framework_failure_ +ln -s slink-target slink || framework_failure_ cp -d f slink || fail=1 diff --git a/tests/cp/dir-rm-dest b/tests/cp/dir-rm-dest index 23979a95d..c6712e2ed 100755 --- a/tests/cp/dir-rm-dest +++ b/tests/cp/dir-rm-dest @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -mkdir d e || framework_failure +mkdir d e || framework_failure_ # Do it once with no destination... cp -R --remove-destination d e || fail=1 diff --git a/tests/cp/dir-slash b/tests/cp/dir-slash index 57184ab13..e206bd007 100755 --- a/tests/cp/dir-slash +++ b/tests/cp/dir-slash @@ -20,8 +20,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -mkdir dir1 dir2 || framework_failure -touch dir1/file || framework_failure +mkdir dir1 dir2 || framework_failure_ +touch dir1/file || framework_failure_ cp -R dir1/ dir2 || fail=1 diff --git a/tests/cp/dir-vs-file b/tests/cp/dir-vs-file index 5a4451600..5beaf306b 100755 --- a/tests/cp/dir-vs-file +++ b/tests/cp/dir-vs-file @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -mkdir dir || framework_failure -touch file || framework_failure +mkdir dir || framework_failure_ +touch file || framework_failure_ # In 4.0.35, this cp invocation silently succeeded. diff --git a/tests/cp/fail-perm b/tests/cp/fail-perm index 83d4711c3..404c83e39 100755 --- a/tests/cp/fail-perm +++ b/tests/cp/fail-perm @@ -19,11 +19,11 @@ print_ver_ cp skip_if_root_ -chmod g-s . || framework_failure -mkdir D D/D || framework_failure -touch D/a || framework_failure -chmod 0 D/a || framework_failure -chmod u=rx,go=,-st D || framework_failure +chmod g-s . || framework_failure_ +mkdir D D/D || framework_failure_ +touch D/a || framework_failure_ +chmod 0 D/a || framework_failure_ +chmod u=rx,go=,-st D || framework_failure_ # This is expected to exit non-zero, because it can't read D/a. diff --git a/tests/cp/fiemap-empty b/tests/cp/fiemap-empty index 095d1b7c3..6ce595767 100755 --- a/tests/cp/fiemap-empty +++ b/tests/cp/fiemap-empty @@ -55,7 +55,7 @@ filefrag -v space.test | grep -F 'unwritten' > /dev/null || rm space.test # Ensure we read a large empty file quickly -fallocate -l 300MiB empty.big || framework_failure +fallocate -l 300MiB empty.big || framework_failure_ timeout 3 cp --sparse=always empty.big cp.test || fail=1 test $(stat -c %s empty.big) = $(stat -c %s cp.test) || fail=1 rm empty.big cp.test @@ -63,7 +63,7 @@ rm empty.big cp.test # Ensure we handle extents beyond file size correctly. # Note until we support fallocate, we will not maintain # the file allocation. FIXME: amend this test when fallocate is supported. -fallocate -l 10MiB -n unwritten.withdata || framework_failure +fallocate -l 10MiB -n unwritten.withdata || framework_failure_ dd count=10 if=/dev/urandom conv=notrunc iflag=fullblock of=unwritten.withdata cp unwritten.withdata cp.test || fail=1 test $(stat -c %s unwritten.withdata) = $(stat -c %s cp.test) || fail=1 diff --git a/tests/cp/into-self b/tests/cp/into-self index ed10f2bc2..deb5a5325 100755 --- a/tests/cp/into-self +++ b/tests/cp/into-self @@ -24,7 +24,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -mkdir a dir || framework_failure +mkdir a dir || framework_failure_ # This command should exit nonzero. diff --git a/tests/cp/link b/tests/cp/link index 22c6ed257..73c8bb318 100755 --- a/tests/cp/link +++ b/tests/cp/link @@ -20,9 +20,9 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -touch src || framework_failure -touch dest || framework_failure -touch dest2 || framework_failure +touch src || framework_failure_ +touch dest || framework_failure_ +touch dest2 || framework_failure_ cp -f --link src dest || fail=1 diff --git a/tests/cp/link-heap b/tests/cp/link-heap index 1b80021e0..d622bc4e7 100755 --- a/tests/cp/link-heap +++ b/tests/cp/link-heap @@ -26,10 +26,10 @@ b=$(printf %031d 1) (mkdir $a \ && cd $a \ && seq --format=%031g 10000 |xargs touch \ - && seq --format=d%030g 10000 |xargs mkdir ) || framework_failure -cp -al $a $b || framework_failure -mkdir e || framework_failure -mv $a $b e || framework_failure + && seq --format=d%030g 10000 |xargs mkdir ) || framework_failure_ +cp -al $a $b || framework_failure_ +mkdir e || framework_failure_ +mv $a $b e || framework_failure_ (ulimit -v 20000; cp -al e f) || fail=1 diff --git a/tests/cp/link-no-deref b/tests/cp/link-no-deref index 12007e2a6..ca0e5478c 100755 --- a/tests/cp/link-no-deref +++ b/tests/cp/link-no-deref @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -ln -s no-such-file dangling-slink || framework_failure +ln -s no-such-file dangling-slink || framework_failure_ # Prior to coreutils-6.0, this would fail on non-Linux kernels, diff --git a/tests/cp/link-preserve b/tests/cp/link-preserve index 1e42b898a..d1212e518 100755 --- a/tests/cp/link-preserve +++ b/tests/cp/link-preserve @@ -20,12 +20,12 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -touch a || framework_failure -ln a b || framework_failure -mkdir c || framework_failure -cp -d a b c || framework_failure -test -f c/a || framework_failure -test -f c/b || framework_failure +touch a || framework_failure_ +ln a b || framework_failure_ +mkdir c || framework_failure_ +cp -d a b c || framework_failure_ +test -f c/a || framework_failure_ +test -f c/b || framework_failure_ a_inode=`ls -i c/a|sed 's,c/.*,,'` diff --git a/tests/cp/link-symlink b/tests/cp/link-symlink index 0d09f5d83..fff1c5cb1 100755 --- a/tests/cp/link-symlink +++ b/tests/cp/link-symlink @@ -22,7 +22,7 @@ print_ver_ cp # Check that the timestamps of the symlink are copied # if we're using hardlink to symlink emulation. touch file -ln -s file link || framework_failure +ln -s file link || framework_failure_ touch -m -h -d 2011-01-01 link || skip_ "Your system doesn't support updating symlink timestamps" case `stat --format=%y link` in diff --git a/tests/cp/parent-perm b/tests/cp/parent-perm index 896145faa..6c8218148 100755 --- a/tests/cp/parent-perm +++ b/tests/cp/parent-perm @@ -23,14 +23,14 @@ working_umask_or_skip_ # cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least require_local_dir_ -mkdir -p a/b/c a/b/d e || framework_failure -touch a/b/c/foo a/b/d/foo || framework_failure -cp -p --parent a/b/c/foo e || framework_failure +mkdir -p a/b/c a/b/d e || framework_failure_ +touch a/b/c/foo a/b/d/foo || framework_failure_ +cp -p --parent a/b/c/foo e || framework_failure_ # Make permissions of e/a different, so that we exercise the # code in cp -p --parents that propagates permissions even # to a destination directory that it doesn't create. -chmod g-rx e/a e/a/b || framework_failure +chmod g-rx e/a e/a/b || framework_failure_ cp -p --parent a/b/d/foo e || fail=1 diff --git a/tests/cp/parent-perm-race b/tests/cp/parent-perm-race index 366efbaa7..0f5200250 100755 --- a/tests/cp/parent-perm-race +++ b/tests/cp/parent-perm-race @@ -23,7 +23,7 @@ print_ver_ cp require_local_dir_ umask 002 -mkdir mode ownership d || framework_failure +mkdir mode ownership d || framework_failure_ chmod g+s d 2>/dev/null # The cp test is valid either way. diff --git a/tests/cp/preserve-2 b/tests/cp/preserve-2 index 023a2909e..03c6a7134 100755 --- a/tests/cp/preserve-2 +++ b/tests/cp/preserve-2 @@ -22,7 +22,7 @@ print_ver_ cp # cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least require_local_dir_ -touch f || framework_failure +touch f || framework_failure_ cp --preserve=mode,links f g || fail=1 diff --git a/tests/cp/preserve-slink-time b/tests/cp/preserve-slink-time index 0f9bfe53d..f9c60198a 100755 --- a/tests/cp/preserve-slink-time +++ b/tests/cp/preserve-slink-time @@ -23,7 +23,7 @@ grep '^#define HAVE_UTIMENSAT 1' "$CONFIG_HEADER" > /dev/null || grep '^#define HAVE_LUTIMES 1' "$CONFIG_HEADER" > /dev/null || skip_ 'this system lacks the utimensat function' -ln -s no-such dangle || framework_failure +ln -s no-such dangle || framework_failure_ # If the current file system lacks sub-second resolution, sleep for 2s to # ensure that the times on the copy are different from those of the original. @@ -32,9 +32,9 @@ case $(stat --format=%y dangle) in esac # Can't use --format=%x, as lstat() modifies atime on some platforms. -cp -Pp dangle d2 || framework_failure -stat --format=%y dangle > t1 || framework_failure -stat --format=%y d2 > t2 || framework_failure +cp -Pp dangle d2 || framework_failure_ +stat --format=%y dangle > t1 || framework_failure_ +stat --format=%y d2 > t2 || framework_failure_ compare t1 t2 || fail=1 diff --git a/tests/cp/proc-zero-len b/tests/cp/proc-zero-len index 77c764b2e..53abc43f9 100755 --- a/tests/cp/proc-zero-len +++ b/tests/cp/proc-zero-len @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -touch empty || framework_failure +touch empty || framework_failure_ f=/proc/cpuinfo test -r $f || f=empty diff --git a/tests/cp/r-vs-symlink b/tests/cp/r-vs-symlink index feca7d631..0ca358cf4 100755 --- a/tests/cp/r-vs-symlink +++ b/tests/cp/r-vs-symlink @@ -23,9 +23,9 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -echo abc > foo || framework_failure -ln -s foo slink || framework_failure -ln -s no-such-file no-file || framework_failure +echo abc > foo || framework_failure_ +ln -s foo slink || framework_failure_ +ln -s no-such-file no-file || framework_failure_ # This would fail in 4.1.5, not in 4.1.6. diff --git a/tests/cp/reflink-auto b/tests/cp/reflink-auto index 1639bb4d4..90251e0d4 100755 --- a/tests/cp/reflink-auto +++ b/tests/cp/reflink-auto @@ -22,9 +22,9 @@ print_ver_ cp cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" a_other="$other_partition_tmpdir/a" -rm -f "$a_other" || framework_failure +rm -f "$a_other" || framework_failure_ -echo non_zero_size > "$a_other" || framework_failure +echo non_zero_size > "$a_other" || framework_failure_ # we shouldn't be able to reflink() files on separate partitions cp --reflink "$a_other" b && fail=1 diff --git a/tests/cp/reflink-perm b/tests/cp/reflink-perm index 367704d72..a712d740a 100755 --- a/tests/cp/reflink-perm +++ b/tests/cp/reflink-perm @@ -23,10 +23,10 @@ print_ver_ cp : > time_check : > file ts='2009-08-28 19:00' -touch -d "$ts" file || framework_failure +touch -d "$ts" file || framework_failure_ test time_check -nt file || skip_ "The system clock is wrong" -chmod a=rwx file || framework_failure +chmod a=rwx file || framework_failure_ umask 077 cp --reflink=auto --preserve file copy || fail=1 diff --git a/tests/cp/slink-2-slink b/tests/cp/slink-2-slink index 82a1d7b36..fb148e08e 100755 --- a/tests/cp/slink-2-slink +++ b/tests/cp/slink-2-slink @@ -20,11 +20,11 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -touch file || framework_failure -ln -s file a || framework_failure -ln -s file b || framework_failure -ln -s no-such-file c || framework_failure -ln -s no-such-file d || framework_failure +touch file || framework_failure_ +ln -s file a || framework_failure_ +ln -s file b || framework_failure_ +ln -s no-such-file c || framework_failure_ +ln -s no-such-file d || framework_failure_ cp --update --no-dereference a b || fail=1 cp --update --no-dereference c d || fail=1 diff --git a/tests/cp/sparse b/tests/cp/sparse index 294b90482..4d78640ee 100755 --- a/tests/cp/sparse +++ b/tests/cp/sparse @@ -25,7 +25,7 @@ require_sparse_support_ # Make its size one larger than 128K, in order to tickle the # bug in coreutils-6.0. size=`expr 128 \* 1024 + 1` -dd bs=1 seek=$size of=sparse < /dev/null 2> /dev/null || framework_failure +dd bs=1 seek=$size of=sparse < /dev/null 2> /dev/null || framework_failure_ cp --sparse=always sparse copy || fail=1 diff --git a/tests/cp/sparse-fiemap b/tests/cp/sparse-fiemap index 37d8ea7a4..5eedb4fa7 100755 --- a/tests/cp/sparse-fiemap +++ b/tests/cp/sparse-fiemap @@ -100,8 +100,8 @@ for i in $(seq 1 2 21); do # j: 6 extents found # exclude the physical block numbers; they always differ - filefrag -v j1 > ff1 || framework_failure - filefrag -vs j2 > ff2 || framework_failure + filefrag -v j1 > ff1 || framework_failure_ + filefrag -vs j2 > ff2 || framework_failure_ { f ff1; f ff2; } | $PERL $abs_top_srcdir/tests/filefrag-extent-compare \ || { warn_ ignoring filefrag-reported extent map differences diff --git a/tests/cp/special-bits b/tests/cp/special-bits index 9168f143e..e3e555937 100755 --- a/tests/cp/special-bits +++ b/tests/cp/special-bits @@ -24,12 +24,12 @@ print_ver_ cp require_root_ -touch a b c || framework_failure -chmod u+sx,go= a || framework_failure -chmod u=rwx,g=sx,o= b || framework_failure -chmod a=r,ug+sx c || framework_failure -chown $NON_ROOT_USERNAME . || framework_failure -chmod u=rwx,g=rx,o=rx . || framework_failure +touch a b c || framework_failure_ +chmod u+sx,go= a || framework_failure_ +chmod u=rwx,g=sx,o= b || framework_failure_ +chmod a=r,ug+sx c || framework_failure_ +chown $NON_ROOT_USERNAME . || framework_failure_ +chmod u=rwx,g=rx,o=rx . || framework_failure_ cp -p a a2 || fail=1 diff --git a/tests/cp/src-base-dot b/tests/cp/src-base-dot index e9bef6596..069c1935c 100755 --- a/tests/cp/src-base-dot +++ b/tests/cp/src-base-dot @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -mkdir x y || framework_failure +mkdir x y || framework_failure_ cd y diff --git a/tests/cp/symlink-slash b/tests/cp/symlink-slash index 70a843534..45c306936 100755 --- a/tests/cp/symlink-slash +++ b/tests/cp/symlink-slash @@ -20,8 +20,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -mkdir dir || framework_failure -ln -s dir symlink || framework_failure +mkdir dir || framework_failure_ +ln -s dir symlink || framework_failure_ cp -dR symlink/ s || fail=1 set `ls -l s` diff --git a/tests/cp/thru-dangling b/tests/cp/thru-dangling index 9e061220b..62f111587 100755 --- a/tests/cp/thru-dangling +++ b/tests/cp/thru-dangling @@ -19,11 +19,11 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -ln -s no-such dangle || framework_failure -echo hi > f || framework_failure -echo hi > exp || framework_failure +ln -s no-such dangle || framework_failure_ +echo hi > f || framework_failure_ +echo hi > exp || framework_failure_ echo "cp: not writing through dangling symlink \`dangle'" \ - > exp-err || framework_failure + > exp-err || framework_failure_ # Starting with 6.9.90, this usage fails, by default: diff --git a/tests/dd/direct b/tests/dd/direct index 9350545a6..41874f772 100755 --- a/tests/dd/direct +++ b/tests/dd/direct @@ -19,13 +19,13 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ dd -truncate -s 8192 in || framework_failure +truncate -s 8192 in || framework_failure_ dd if=in oflag=direct of=out 2> /dev/null \ || skip_ 'this file system lacks support for O_DIRECT' -truncate -s 511 short || framework_failure -truncate -s 8191 m1 || framework_failure -truncate -s 8193 p1 || framework_failure +truncate -s 511 short || framework_failure_ +truncate -s 8191 m1 || framework_failure_ +truncate -s 8193 p1 || framework_failure_ for i in short m1 p1; do rm -f out diff --git a/tests/dd/misc b/tests/dd/misc index 820984c92..27520c4c4 100755 --- a/tests/dd/misc +++ b/tests/dd/misc @@ -26,9 +26,9 @@ tmp_sym=dd-sym tmp_out=dd-out warn=0 -echo data > $tmp_in || framework_failure -ln $tmp_in $tmp_in2 || framework_failure -ln -s $tmp_in $tmp_sym || framework_failure +echo data > $tmp_in || framework_failure_ +ln $tmp_in $tmp_in2 || framework_failure_ +ln -s $tmp_in $tmp_sym || framework_failure_ dd if=$tmp_in of=$tmp_out 2> /dev/null || fail=1 compare $tmp_in $tmp_out || fail=1 @@ -87,9 +87,9 @@ test "$outbytes" -eq 3 || fail=1 # There might be some missed failures but it's unlikely. (echo a; sleep .1; echo b) \ | env LC_ALL=C dd bs=4 status=noxfer iflag=fullblock >out 2>err || fail=1 -printf 'a\nb\n' > out_ok || framework_failure +printf 'a\nb\n' > out_ok || framework_failure_ echo "1+0 records in -1+0 records out" > err_ok || framework_failure +1+0 records out" > err_ok || framework_failure_ compare out_ok out || fail=1 compare err_ok err || fail=1 diff --git a/tests/dd/nocache b/tests/dd/nocache index 0af165dc9..5dcd897a4 100755 --- a/tests/dd/nocache +++ b/tests/dd/nocache @@ -31,7 +31,7 @@ dd iflag=nocache,direct if=/dev/null && fail=1 # The rest ensure that the documented uses cases # proceed without error for f in ifile ofile; do - dd if=/dev/zero of=$f conv=fdatasync count=100 || framework_failure + dd if=/dev/zero of=$f conv=fdatasync count=100 || framework_failure_ done # Advise to drop cache for whole file diff --git a/tests/dd/reblock b/tests/dd/reblock index f66a9ba7c..558d729e1 100755 --- a/tests/dd/reblock +++ b/tests/dd/reblock @@ -20,14 +20,14 @@ print_ver_ dd # 2 short reads -> 1 full write + 1 partial write -cat <<\EOF > exp-reblock || framework_failure +cat <<\EOF > exp-reblock || framework_failure_ 0+2 records in 1+1 records out 4 bytes (4 B) copied EOF # 2 short reads -> 2 partial writes -cat <<\EOF > exp-no-reblock || framework_failure +cat <<\EOF > exp-no-reblock || framework_failure_ 0+2 records in 0+2 records out 4 bytes (4 B) copied diff --git a/tests/dd/skip-seek-past-dev b/tests/dd/skip-seek-past-dev index a54e0106c..3f1927fe5 100755 --- a/tests/dd/skip-seek-past-dev +++ b/tests/dd/skip-seek-past-dev @@ -33,7 +33,7 @@ get_device_size() { # Get path to device the current dir is on. # Note df can only get fs size, not device size. -device=$(df -P . | tail -n1 | cut -d' ' -f1) || framework_failure +device=$(df -P . | tail -n1 | cut -d' ' -f1) || framework_failure_ dev_size=$(get_device_size "$device") || skip_ "failed to determine size of $device" @@ -45,14 +45,14 @@ timeout 10 dd bs=1 skip=$DEV_OFLOW count=0 status=noxfer < "$device" 2> err test "$?" = "1" || fail=1 echo "dd: \`standard input': cannot skip: Invalid argument 0+0 records in -0+0 records out" > err_ok || framework_failure +0+0 records out" > err_ok || framework_failure_ compare err_ok err || fail=1 timeout 10 dd bs=1 seek=$DEV_OFLOW count=0 status=noxfer > "$device" 2> err test "$?" = "1" || fail=1 echo "dd: \`standard output': cannot seek: Invalid argument 0+0 records in -0+0 records out" > err_ok || framework_failure +0+0 records out" > err_ok || framework_failure_ compare err_ok err || fail=1 Exit $fail diff --git a/tests/dd/skip-seek-past-file b/tests/dd/skip-seek-past-file index 29ae8ebf9..c1930def4 100755 --- a/tests/dd/skip-seek-past-file +++ b/tests/dd/skip-seek-past-file @@ -22,12 +22,12 @@ require_sparse_support_ # for `truncate --size=$OFF_T_MAX` eval $(getlimits) # for OFF_T limits -printf "1234" > file || framework_failure +printf "1234" > file || framework_failure_ echo "\ dd: \`standard input': cannot skip to specified offset 0+0 records in -0+0 records out" > skip_err || framework_failure +0+0 records out" > skip_err || framework_failure_ # skipping beyond number of blocks in file should issue a warning dd bs=1 skip=5 count=0 status=noxfer < file 2> err || fail=1 @@ -60,7 +60,7 @@ compare skip_err err || fail=1 # seeking beyond end of file is OK dd bs=1 seek=5 count=0 status=noxfer > file 2> err || fail=1 echo "0+0 records in -0+0 records out" > err_ok || framework_failure +0+0 records out" > err_ok || framework_failure_ compare err_ok err || fail=1 # skipping > OFF_T_MAX should fail immediately diff --git a/tests/dd/unblock-sync b/tests/dd/unblock-sync index 28ed568d0..a6fd4a52c 100755 --- a/tests/dd/unblock-sync +++ b/tests/dd/unblock-sync @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ dd -printf 000100020003xx > in || framework_failure +printf 000100020003xx > in || framework_failure_ dd cbs=4 ibs=4 conv=unblock,sync < in > out 2> /dev/null || fail=1 diff --git a/tests/df/total-verify b/tests/df/total-verify index bc9c99e5f..bbf2e3b9c 100755 --- a/tests/df/total-verify +++ b/tests/df/total-verify @@ -21,7 +21,7 @@ print_ver_ df df || skip_ "df fails" -cat <<\EOF > check-df || framework_failure +cat <<\EOF > check-df || framework_failure_ my ($total, $used, $avail) = (0, 0, 0); while (<>) { @@ -52,9 +52,9 @@ EOF # Use --block-size=512 to keep df from printing rounded-to-kilobyte # numbers which wouldn't necessarily add up to the displayed total. -df --total -P --block-size=512 > space || framework_failure +df --total -P --block-size=512 > space || framework_failure_ cat space # this helps when debugging any test failure -df --total -i -P > inode || framework_failure +df --total -i -P > inode || framework_failure_ cat inode $PERL check-df space || fail=1 diff --git a/tests/du/basic b/tests/du/basic index e12ff1e1a..3cb3c0d99 100755 --- a/tests/du/basic +++ b/tests/du/basic @@ -19,12 +19,12 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ du -mkdir -p a/b d d/sub || framework_failure +mkdir -p a/b d d/sub || framework_failure_ # Ensure that these files contain more than 64 bytes, so that we don't # immediately disqualify file systems (e.g., NetApp) on which smaller # files take up zero disk blocks. -printf '%*s' 257 make-sure-the-file-is-non-empty > a/b/F || framework_failure +printf '%*s' 257 make-sure-the-file-is-non-empty > a/b/F || framework_failure_ printf %4096s x > d/1 cp d/1 d/sub/2 diff --git a/tests/du/deref b/tests/du/deref index ebd9c18ae..63837939f 100755 --- a/tests/du/deref +++ b/tests/du/deref @@ -22,11 +22,11 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ du -mkdir -p a/sub || framework_failure -ln -s a/sub slink || framework_failure -touch b || framework_failure -ln -s .. a/sub/dotdot || framework_failure -ln -s nowhere dangle || framework_failure +mkdir -p a/sub || framework_failure_ +ln -s a/sub slink || framework_failure_ +touch b || framework_failure_ +ln -s .. a/sub/dotdot || framework_failure_ +ln -s nowhere dangle || framework_failure_ # This used to fail with the following diagnostic: diff --git a/tests/du/deref-args b/tests/du/deref-args index 767f94e7a..474f7d06c 100755 --- a/tests/du/deref-args +++ b/tests/du/deref-args @@ -20,10 +20,10 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ du -mkdir -p dir/a || framework_failure -ln -s dir slink || framework_failure -printf %65536s x > 64k || framework_failure -ln -s 64k slink-to-64k || framework_failure +mkdir -p dir/a || framework_failure_ +ln -s dir slink || framework_failure_ +printf %65536s x > 64k || framework_failure_ +ln -s 64k slink-to-64k || framework_failure_ du -D slink | sed 's/^[0-9][0-9]* //' > out diff --git a/tests/du/exclude b/tests/du/exclude index 580454d72..7403f5d04 100755 --- a/tests/du/exclude +++ b/tests/du/exclude @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ du -mkdir -p a/b/c a/x/y a/u/v || framework_failure +mkdir -p a/b/c a/x/y a/u/v || framework_failure_ du --exclude=x a | sed 's/^[0-9][0-9]* //' | sort > out || fail=1 diff --git a/tests/du/fd-leak b/tests/du/fd-leak index 65933b254..ad744a8c0 100755 --- a/tests/du/fd-leak +++ b/tests/du/fd-leak @@ -34,7 +34,7 @@ for i in $x; do done # This may fail due to command line limitations. -touch $f || framework_failure +touch $f || framework_failure_ # With coreutils-5.0, this would fail due to a file descriptor leak. diff --git a/tests/du/inacc-dest b/tests/du/inacc-dest index 73f5d6665..fac7e0ede 100755 --- a/tests/du/inacc-dest +++ b/tests/du/inacc-dest @@ -22,7 +22,7 @@ print_ver_ du skip_if_root_ mkdir f && cd f && mkdir a b c d e && touch c/j && chmod a-x c \ - || framework_failure + || framework_failure_ du > ../t 2>&1 && fail=1 diff --git a/tests/du/inacc-dir b/tests/du/inacc-dir index 2eb40ddb2..c160fbbf5 100755 --- a/tests/du/inacc-dir +++ b/tests/du/inacc-dir @@ -19,7 +19,7 @@ print_ver_ du skip_if_root_ -mkdir -p a/sub || framework_failure +mkdir -p a/sub || framework_failure_ du -s a > exp || fail=1 diff --git a/tests/du/inaccessible-cwd b/tests/du/inaccessible-cwd index 220ac7b4f..2f16782d1 100755 --- a/tests/du/inaccessible-cwd +++ b/tests/du/inaccessible-cwd @@ -25,9 +25,9 @@ print_ver_ du skip_if_root_ cwd=`pwd` -mkdir -p no-x a/b || framework_failure -cd no-x || framework_failure -chmod 0 . || framework_failure +mkdir -p no-x a/b || framework_failure_ +cd no-x || framework_failure_ +chmod 0 . || framework_failure_ du "$cwd/a" > /dev/null || fail=1 diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable index 92cd3788c..8523963fb 100755 --- a/tests/du/long-from-unreadable +++ b/tests/du/long-from-unreadable @@ -41,10 +41,10 @@ dir=`printf '%200s\n' ' '|tr ' ' x` # Construct a hierarchy containing a relative file with a name # longer than PATH_MAX. # for i in `seq 52`; do -# mkdir $dir || framework_failure -# cd $dir || framework_failure +# mkdir $dir || framework_failure_ +# cd $dir || framework_failure_ # done -# cd $tmp || framework_failure +# cd $tmp || framework_failure_ # Sheesh. Bash 3.1.5 can't create this hierarchy. I get # cd: error retrieving current directory: getcwd: @@ -57,11 +57,11 @@ cwd=`pwd` $PERL \ -e 'my $d = '$dir'; foreach my $i (1..52)' \ -e ' { mkdir ($d, 0700) && chdir $d or die "$!" }' \ - || framework_failure + || framework_failure_ -mkdir inaccessible || framework_failure -cd inaccessible || framework_failure -chmod 0 . || framework_failure +mkdir inaccessible || framework_failure_ +cd inaccessible || framework_failure_ +chmod 0 . || framework_failure_ du -s "$cwd/$dir" > /dev/null || fail=1 diff --git a/tests/du/long-sloop b/tests/du/long-sloop index 1f46a4a40..6c1d8d5de 100755 --- a/tests/du/long-sloop +++ b/tests/du/long-sloop @@ -30,14 +30,14 @@ print_ver_ du n=400 dir_list=`seq $n` -mkdir $dir_list || framework_failure +mkdir $dir_list || framework_failure_ file=1 i_minus_1=0 for i in $dir_list `expr $n + 1`; do case $i_minus_1 in 0) ;; *) - ln -s ../$i $i_minus_1/s || framework_failure + ln -s ../$i $i_minus_1/s || framework_failure_ file=$file/s;; esac i_minus_1=$i diff --git a/tests/du/move-dir-while-traversing b/tests/du/move-dir-while-traversing index 68302b8ff..322a9a593 100755 --- a/tests/du/move-dir-while-traversing +++ b/tests/du/move-dir-while-traversing @@ -59,7 +59,7 @@ EOF chmod a+x inotify-watch-for-dir-access.py t=T/U -mkdir d2 || framework_failure +mkdir d2 || framework_failure_ long=d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z # One iteration of this loop creates a tree with which # du sometimes completes its traversal before the above rename. @@ -68,7 +68,7 @@ long=d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z # Using 10 iterations was not enough, either. # Using 30, I saw no failure in 200 trials. for i in $(seq 30); do - mkdir -p $t/3/a/b/c/$i/$long || framework_failure + mkdir -p $t/3/a/b/c/$i/$long || framework_failure_ done # Prohibit suspension, which could otherwise cause a timeout-induced FP failure. diff --git a/tests/du/no-deref b/tests/du/no-deref index 2abad5fc5..09a1dcc41 100755 --- a/tests/du/no-deref +++ b/tests/du/no-deref @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ du -mkdir -p dir/a/b || framework_failure -ln -s dir slink || framework_failure +mkdir -p dir/a/b || framework_failure_ +ln -s dir slink || framework_failure_ du slink | sed 's/^[0-9][0-9]* //' > out diff --git a/tests/du/no-x b/tests/du/no-x index de3417f82..e45f317e0 100755 --- a/tests/du/no-x +++ b/tests/du/no-x @@ -21,8 +21,8 @@ print_ver_ du skip_if_root_ -mkdir -p d/no-x/y || framework_failure -chmod u=rw d/no-x || framework_failure +mkdir -p d/no-x/y || framework_failure_ +chmod u=rw d/no-x || framework_failure_ # This must exit nonzero. diff --git a/tests/du/one-file-system b/tests/du/one-file-system index b4c631896..8a57c9934 100755 --- a/tests/du/one-file-system +++ b/tests/du/one-file-system @@ -20,7 +20,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ du -mkdir -p b/c y/z || framework_failure +mkdir -p b/c y/z || framework_failure_ # Due to a used-uninitialized variable, the "du -x" from coreutils-6.6 diff --git a/tests/du/restore-wd b/tests/du/restore-wd index 032413ae0..01fa0646b 100755 --- a/tests/du/restore-wd +++ b/tests/du/restore-wd @@ -20,7 +20,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ du -mkdir a b || framework_failure +mkdir a b || framework_failure_ # With du from coreutils-4.5.5 and 4.5.6, this would fail with diff --git a/tests/du/trailing-slash b/tests/du/trailing-slash index 21045bd7f..7c97ccec9 100755 --- a/tests/du/trailing-slash +++ b/tests/du/trailing-slash @@ -22,8 +22,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ du -mkdir -p dir/1/2 || framework_failure -ln -s dir slink || framework_failure +mkdir -p dir/1/2 || framework_failure_ +ln -s dir slink || framework_failure_ du slink/ | sed 's/^[0-9][0-9]* //' > out diff --git a/tests/du/two-args b/tests/du/two-args index 4f15d62ea..89a1461bc 100755 --- a/tests/du/two-args +++ b/tests/du/two-args @@ -23,11 +23,11 @@ print_ver_ du # Run this test from a sub-directory one level deeper than normal, # so that the "du .." below doesn't traverse sibling directories # that may be inaccessible due concurrently-running tests. -mkdir sub || framework_failure -cd sub || framework_failure +mkdir sub || framework_failure_ +cd sub || framework_failure_ t=t -mkdir -p $t/1 $t/2 || framework_failure +mkdir -p $t/1 $t/2 || framework_failure_ test -d $t || fail=1 du $t/1 $t/2 > /dev/null || fail=1 diff --git a/tests/init.cfg b/tests/init.cfg index 60c5108d4..d60dd1fdc 100644 --- a/tests/init.cfg +++ b/tests/init.cfg @@ -4,9 +4,6 @@ # TESTS_ENVIRONMENT definition. stderr_fileno_=9 -# FIXME: eventually, FIXME: s/(framework_failure)\>/${1}_/ and remove the -# FIXME: definition of framework_failure below - # Having an unsearchable directory in PATH causes execve to fail with EACCES # when applied to an unresolvable program name, contrary to the desired ENOENT. # Avoid the problem by rewriting PATH to exclude unsearchable directories. @@ -52,7 +49,7 @@ require_acl_() is_local_dir_() { - test $# = 1 || framework_failure + test $# = 1 || framework_failure_ df --local "$1" >/dev/null 2>&1 } @@ -108,7 +105,7 @@ require_readable_root_() # with the named syscall. Usage: require_strace_ unlink require_strace_() { - test $# = 1 || framework_failure + test $# = 1 || framework_failure_ strace -V < /dev/null > /dev/null 2>&1 || skip_ 'no strace program' @@ -265,13 +262,12 @@ require_root_() } skip_if_root_() { uid_is_privileged_ && skip_ "must be run as non-root"; } -framework_failure() { fatal_ 'failure in testing framework'; } # Set `groups' to a space-separated list of at least two groups # of which the user is a member. require_membership_in_two_groups_() { - test $# = 0 || framework_failure + test $# = 0 || framework_failure_ groups=${COREUTILS_GROUPS-`(id -G || /usr/xpg4/bin/id -G) 2>/dev/null`} case "$groups" in @@ -326,7 +322,7 @@ require_dirent_d_type_() # Does the current (working-dir) file system support sparse files? require_sparse_support_() { - test $# = 0 || framework_failure + test $# = 0 || framework_failure_ # Test whether we can create a sparse file. # For example, on Darwin6.5 with a file system of type hfs, it's not possible. # NTFS requires 128K before a hole appears in a sparse file. @@ -342,7 +338,7 @@ require_sparse_support_() mkfifo_or_skip_() { - test $# = 1 || framework_failure + test $# = 1 || framework_failure_ if ! mkfifo "$1"; then # Make an exception of this case -- usually we interpret framework-creation # failure as a test failure. However, in this case, when running on a SunOS @@ -369,12 +365,12 @@ skip_if_setgid_() skip_if_mcstransd_is_running_() { - test $# = 0 || framework_failure + test $# = 0 || framework_failure_ # When mcstransd is running, you'll see only the 3-component # version of file-system context strings. Detect that, # and if it's running, skip this test. - __ctx=$(stat --printf='%C\n' .) || framework_failure + __ctx=$(stat --printf='%C\n' .) || framework_failure_ case $__ctx in *:*:*:*) ;; # four components is ok *) # anything else probably means mcstransd is running diff --git a/tests/install/basic-1 b/tests/install/basic-1 index 688e6beca..9863becf9 100755 --- a/tests/install/basic-1 +++ b/tests/install/basic-1 @@ -23,9 +23,9 @@ skip_if_root_ dir=dir file=file -rm -rf $dir $file || framework_failure -mkdir -p $dir || framework_failure -echo foo > $file || framework_failure +rm -rf $dir $file || framework_failure_ +mkdir -p $dir || framework_failure_ +echo foo > $file || framework_failure_ ginstall $file $dir || fail=1 # Make sure the source file still exists. diff --git a/tests/install/install-C b/tests/install/install-C index e66b74ffe..5adebdee9 100755 --- a/tests/install/install-C +++ b/tests/install/install-C @@ -25,11 +25,11 @@ mode2=0755 mode3=2755 -echo test > a || framework_failure -echo "\`a' -> \`b'" > out_installed_first || framework_failure +echo test > a || framework_failure_ +echo "\`a' -> \`b'" > out_installed_first || framework_failure_ echo "removed \`b' -\`a' -> \`b'" > out_installed_second || framework_failure -: > out_empty || framework_failure +\`a' -> \`b'" > out_installed_second || framework_failure_ +: > out_empty || framework_failure_ # destination file does not exist ginstall -Cv -m$mode1 a b > out || fail=1 @@ -54,22 +54,22 @@ ginstall -Cv -m$mode3 a b > out || fail=1 compare out out_installed_second || fail=1 # files are not regular files -ln -s a c || framework_failure -ln -s b d || framework_failure +ln -s a c || framework_failure_ +ln -s b d || framework_failure_ ginstall -Cv -m$mode1 c d > out || fail=1 echo "removed \`d' \`c' -> \`d'" > out_installed_second_cd compare out out_installed_second_cd || fail=1 # destination file exists but content differs -echo test1 > a || framework_failure +echo test1 > a || framework_failure_ ginstall -Cv -m$mode1 a b > out || fail=1 compare out out_installed_second || fail=1 ginstall -Cv -m$mode1 a b > out || fail=1 compare out out_empty || fail=1 # destination file exists but content differs (same size) -echo test2 > a || framework_failure +echo test2 > a || framework_failure_ ginstall -Cv -m$mode1 a b > out || fail=1 compare out out_installed_second || fail=1 ginstall -Cv -m$mode1 a b > out || fail=1 diff --git a/tests/install/install-C-root b/tests/install/install-C-root index 743f80efd..b46c4183c 100755 --- a/tests/install/install-C-root +++ b/tests/install/install-C-root @@ -27,7 +27,7 @@ g1=1 g2=2 -echo test > a || framework_failure +echo test > a || framework_failure_ echo "\`a' -> \`b'" > out_installed_first echo "removed \`b' \`a' -> \`b'" > out_installed_second diff --git a/tests/install/install-C-selinux b/tests/install/install-C-selinux index 072297dc8..64375415b 100755 --- a/tests/install/install-C-selinux +++ b/tests/install/install-C-selinux @@ -21,7 +21,7 @@ print_ver_ ginstall require_selinux_ -echo test > a || framework_failure +echo test > a || framework_failure_ chcon -u system_u a || skip_ "chcon doesn't work" echo "\`a' -> \`b'" > out_installed_first diff --git a/tests/install/strip-program b/tests/install/strip-program index d7971797e..0f1e9fa22 100755 --- a/tests/install/strip-program +++ b/tests/install/strip-program @@ -21,11 +21,11 @@ print_ver_ ginstall working_umask_or_skip_ -cat <<EOF > b || framework_failure +cat <<EOF > b || framework_failure_ #!$PREFERABLY_POSIX_SHELL sed s/b/B/ \$1 > \$1.t && mv \$1.t \$1 EOF -chmod a+x b || framework_failure +chmod a+x b || framework_failure_ echo abc > src || fail=1 diff --git a/tests/ln/backup-1 b/tests/ln/backup-1 index 1dc72a71e..6a123e3fb 100755 --- a/tests/ln/backup-1 +++ b/tests/ln/backup-1 @@ -22,7 +22,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ln -touch a b || framework_failure +touch a b || framework_failure_ ln b b~ || fail=1 ln -f --b=simple a b || fail=1 diff --git a/tests/ln/hard-backup b/tests/ln/hard-backup index d3bed539f..e6c9631b7 100755 --- a/tests/ln/hard-backup +++ b/tests/ln/hard-backup @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ln -touch f || framework_failure +touch f || framework_failure_ ln --backup f f 2> out && fail=1 diff --git a/tests/ln/hard-to-sym b/tests/ln/hard-to-sym index 72d8e2734..64626f46c 100755 --- a/tests/ln/hard-to-sym +++ b/tests/ln/hard-to-sym @@ -22,7 +22,7 @@ print_ver_ ln # =================================================== # ensure -s silently overrides -L, -P -touch a || framework_failure +touch a || framework_failure_ ln -L -s a symlink1 || fail=1 ln -P -s symlink1 symlink2 || fail=1 ln -s -L -P symlink2 symlink3 || fail=1 @@ -34,7 +34,7 @@ ls=`ls -lG hard-to-a`x case "$ls" in *'hard-to-ax') ;; *'hard-to-a -> '*x) fail=1 ;; - *) framework_failure ;; + *) framework_failure_ ;; esac # =================================================== @@ -45,12 +45,12 @@ case "$ls" in *'hard-to-3 -> symlink2x') ;; *'hard-to-3x') fail=1 ;; *'hard-to-3 -> '*x) fail=1 ;; - *) framework_failure ;; + *) framework_failure_ ;; esac # =================================================== # Create a hard link to a dangling symlink. -ln -s /no-such-dir || framework_failure +ln -s /no-such-dir || framework_failure_ ln -L no-such-dir hard-to-dangle 2>err && fail=1 case `cat err` in *' accessing `no-such-dir'\':*) ;; @@ -60,8 +60,8 @@ ln -P no-such-dir hard-to-dangle || fail=1 # =================================================== # Create a hard link to a symlink to a directory. -mkdir d || framework_failure -ln -s d link-to-dir || framework_failure +mkdir d || framework_failure_ +ln -s d link-to-dir || framework_failure_ ln -L link-to-dir hard-to-dir-link 2>err && fail=1 case `cat err` in *': `link-to-dir'\'': hard link not allowed for directory'*) ;; diff --git a/tests/ln/misc b/tests/ln/misc index 51e97d197..454c7156f 100755 --- a/tests/ln/misc +++ b/tests/ln/misc @@ -26,60 +26,60 @@ f=tln-file # Create a simple symlink with both source and destination files # in current directory. -touch $f || framework_failure -rm -f $t || framework_failure +touch $f || framework_failure_ +rm -f $t || framework_failure_ ln -s $f $t || fail=1 test -f $t || fail=1 rm $t $f # Create a symlink with source file and explicit destination directory/file. -touch $f || framework_failure -rm -rf $d || framework_failure -mkdir $d || framework_failure +touch $f || framework_failure_ +rm -rf $d || framework_failure_ +mkdir $d || framework_failure_ ln -s ../$f $d/$t || fail=1 test -f $d/$t || fail=1 rm -rf $d $f # Create a symlink with source file and destination directory. -touch $f || framework_failure -rm -rf $d || framework_failure -mkdir $d || framework_failure +touch $f || framework_failure_ +rm -rf $d || framework_failure_ +mkdir $d || framework_failure_ ln -s ../$f $d || fail=1 test -f $d/$f || fail=1 rm -rf $d $f # See whether a trailing slash is followed too far. -touch $f || framework_failure -rm -rf $d || framework_failure -mkdir $d $d/$f || framework_failure +touch $f || framework_failure_ +rm -rf $d || framework_failure_ +mkdir $d $d/$f || framework_failure_ ln $f $d/ 2> /dev/null && fail=1 ln -s $f $d/ 2> /dev/null && fail=1 rm -rf $d $f # Make sure we get a failure with existing dest without -f option -touch $t || framework_failure +touch $t || framework_failure_ # FIXME: don't ignore the error message but rather test # it to make sure it's the right one. ln -s $t $t 2> /dev/null && fail=1 rm $t # Make sure -sf fails when src and dest are the same -touch $t || framework_failure +touch $t || framework_failure_ ln -sf $t $t 2> /dev/null && fail=1 rm $t # Create a symlink with source file and no explicit directory -rm -rf $d || framework_failure -mkdir $d || framework_failure -touch $d/$f || framework_failure +rm -rf $d || framework_failure_ +mkdir $d || framework_failure_ +touch $d/$f || framework_failure_ ln -s $d/$f || fail=1 test -f $f || fail=1 rm -rf $d $f # Create a symlink with source file and destination symlink-to-directory. -rm -rf $d $f $ld || framework_failure -touch $f || framework_failure -mkdir $d || framework_failure +rm -rf $d $f $ld || framework_failure_ +touch $f || framework_failure_ +mkdir $d || framework_failure_ ln -s $d $ld ln -s ../$f $ld || fail=1 test -f $d/$f || fail=1 @@ -87,9 +87,9 @@ rm -rf $d $f $ld # Create a symlink with source file and destination symlink-to-directory. # BUT use the new --no-dereference option. -rm -rf $d $f $ld || framework_failure -touch $f || framework_failure -mkdir $d || framework_failure +rm -rf $d $f $ld || framework_failure_ +touch $f || framework_failure_ +mkdir $d || framework_failure_ ln -s $d $ld af=`pwd`/$f ln --no-dereference -fs "$af" $ld || fail=1 @@ -98,8 +98,8 @@ rm -rf $d $f $ld # Try to create a symlink with backup where the destination file exists # and the backup file name is a hard link to the destination file. -touch a b || framework_failure -ln b b~ || framework_failure +touch a b || framework_failure_ +ln b b~ || framework_failure_ ln -f --b=simple a b || fail=1 # =================================================== @@ -108,7 +108,7 @@ ln -f --b=simple a b || fail=1 # This was fixed in 4.0.34. Broken in 4.0r. for cmd in ln cp mv ginstall; do rm -rf a x a.orig - touch a x || framework_failure + touch a x || framework_failure_ $cmd --backup=simple --suffix=.orig x a || fail=1 test -f a.orig || fail=1 done diff --git a/tests/ln/sf-1 b/tests/ln/sf-1 index d9e9123e2..db2b4306d 100755 --- a/tests/ln/sf-1 +++ b/tests/ln/sf-1 @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ln -echo foo > a || framework_failure -ln -s . b || framework_failure +echo foo > a || framework_failure_ +ln -s . b || framework_failure_ ln -sf a b > err 2>&1 && fail=1 case `cat err` in diff --git a/tests/ln/slash-decorated-nonexistent-dest b/tests/ln/slash-decorated-nonexistent-dest index 29238451c..4716292fd 100755 --- a/tests/ln/slash-decorated-nonexistent-dest +++ b/tests/ln/slash-decorated-nonexistent-dest @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ln -touch f || framework_failure +touch f || framework_failure_ # Before coreutils-7.6, this would succeed on Solaris 10 diff --git a/tests/ln/target-1 b/tests/ln/target-1 index da37e311e..3441ee0c5 100755 --- a/tests/ln/target-1 +++ b/tests/ln/target-1 @@ -24,7 +24,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ln -mkdir d || framework_failure +mkdir d || framework_failure_ ln -s --target-dir=d ../f || fail=1 Exit $fail diff --git a/tests/ls/abmon-align b/tests/ls/abmon-align index e2f8dc22a..d581d8e28 100755 --- a/tests/ls/abmon-align +++ b/tests/ls/abmon-align @@ -20,7 +20,7 @@ print_ver_ ls for mon in $(seq -w 12); do - touch -d"+$mon month" $mon.ts || framework_failure + touch -d"+$mon month" $mon.ts || framework_failure_ done diff --git a/tests/ls/capability b/tests/ls/capability index c4762c963..da6182076 100755 --- a/tests/ls/capability +++ b/tests/ls/capability @@ -55,7 +55,7 @@ for ex in '' ex=:; do dir: \e[${code}mcap_neg\e[0m cap_pos -" > out_ok || framework_failure +" > out_ok || framework_failure_ compare out out_ok || fail=1 done diff --git a/tests/ls/color-clear-to-eol b/tests/ls/color-clear-to-eol index dc41e3565..164b163c7 100755 --- a/tests/ls/color-clear-to-eol +++ b/tests/ls/color-clear-to-eol @@ -20,13 +20,13 @@ print_ver_ ls long_name=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.foo -touch $long_name || framework_failure +touch $long_name || framework_failure_ e='\33' color_code='0;31;42' c_pre="$e[0m$e[${color_code}m" c_post="$e[0m$e[K\n" -printf "$c_pre$long_name$c_post\n" > exp || framework_failure +printf "$c_pre$long_name$c_post\n" > exp || framework_failure_ env TERM=xterm COLUMNS=80 LS_COLORS="*.foo=$color_code" TIME_STYLE=+T \ ls -og --color=always $long_name > out || fail=1 diff --git a/tests/ls/color-dtype-dir b/tests/ls/color-dtype-dir index 8f6b279f0..b677240db 100755 --- a/tests/ls/color-dtype-dir +++ b/tests/ls/color-dtype-dir @@ -25,9 +25,9 @@ print_ver_ ls # Don't let a different umask perturb the results. umask 22 -mkdir d other-writable sticky || framework_failure -chmod o+w other-writable || framework_failure -chmod o+t sticky || framework_failure +mkdir d other-writable sticky || framework_failure_ +chmod o+w other-writable || framework_failure_ +chmod o+t sticky || framework_failure_ ls --color=always > out || fail=1 diff --git a/tests/ls/color-norm b/tests/ls/color-norm index 20bc1217f..c8691034b 100755 --- a/tests/ls/color-norm +++ b/tests/ls/color-norm @@ -30,9 +30,9 @@ export TIME_STYLE="+norm" # helper to strip ls columns up to "norm" time qls() { sed 's/-r.*norm/norm/'; } -touch exe || framework_failure -chmod u+x exe || framework_failure -touch nocolor || framework_failure +touch exe || framework_failure_ +chmod u+x exe || framework_failure_ +touch nocolor || framework_failure_ TCOLORS="no=7:ex=01;32" @@ -58,10 +58,10 @@ LS_COLORS=$TCOLORS ls -mFU --color nocolor exe >> out || fail=1 # Ensure no coloring is done unless enabled LS_COLORS=$TCOLORS ls -gGU nocolor exe | qls >> out || fail=1 -cat -A out > out.display || framework_failure -mv out.display out || framework_failure +cat -A out > out.display || framework_failure_ +mv out.display out || framework_failure_ -cat <<\EOF > exp || framework_failure +cat <<\EOF > exp || framework_failure_ ^[[0m^[[7mnorm ^[[m^[[01;32mexe^[[0m$ ^[[7mnorm nocolor^[[0m$ ^[[0m^[[7m^[[m^[[01;32mexe^[[0m ^[[7mnocolor^[[0m$ diff --git a/tests/ls/dangle b/tests/ls/dangle index 2f722de3d..35035febe 100755 --- a/tests/ls/dangle +++ b/tests/ls/dangle @@ -19,13 +19,13 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ls -ln -s no-such-file dangle || framework_failure -mkdir -p dir/sub || framework_failure -ln -s dir slink-to-dir || framework_failure -mkdir d || framework_failure -ln -s no-such d/dangle || framework_failure -printf '? dangle\n' > subdir_Li_exp || framework_failure -printf 'total 0\n? dangle\n' > subdir_Ls_exp || framework_failure +ln -s no-such-file dangle || framework_failure_ +mkdir -p dir/sub || framework_failure_ +ln -s dir slink-to-dir || framework_failure_ +mkdir d || framework_failure_ +ln -s no-such d/dangle || framework_failure_ +printf '? dangle\n' > subdir_Li_exp || framework_failure_ +printf 'total 0\n? dangle\n' > subdir_Ls_exp || framework_failure_ # This must exit nonzero. diff --git a/tests/ls/dired b/tests/ls/dired index 076ee7aad..18cd1eaa3 100755 --- a/tests/ls/dired +++ b/tests/ls/dired @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ls -mkdir dir || framework_failure +mkdir dir || framework_failure_ LC_MESSAGES=C ls -lR --dired dir > out || fail=1 diff --git a/tests/ls/follow-slink b/tests/ls/follow-slink index 0715d6962..cb4922b37 100755 --- a/tests/ls/follow-slink +++ b/tests/ls/follow-slink @@ -20,15 +20,15 @@ print_ver_ ls # Isolate output files from directory being listed -mkdir dir dir/sub dir1 || framework_failure -cd dir || framework_failure -ln -s link link || framework_failure -ln -s ../../dir1 sub/link-to-dir || framework_failure +mkdir dir dir/sub dir1 || framework_failure_ +cd dir || framework_failure_ +ln -s link link || framework_failure_ +ln -s ../../dir1 sub/link-to-dir || framework_failure_ # Make sure the symlink was created. # `ln -s link link' succeeds, but creates no file on # systems running some DJGPP-2.03 libc. -ls -F link > /dev/null || framework_failure +ls -F link > /dev/null || framework_failure_ # When explicitly listing a broken link, the command must fail. diff --git a/tests/ls/infloop b/tests/ls/infloop index e994de960..34d963311 100755 --- a/tests/ls/infloop +++ b/tests/ls/infloop @@ -20,15 +20,15 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ls -mkdir loop || framework_failure -ln -s ../loop loop/sub || framework_failure +mkdir loop || framework_failure_ +ln -s ../loop loop/sub || framework_failure_ -cat <<\EOF > exp-out || framework_failure +cat <<\EOF > exp-out || framework_failure_ loop: sub EOF -cat <<\EOF > exp-err || framework_failure +cat <<\EOF > exp-err || framework_failure_ ls: loop/sub: not listing already-listed directory EOF diff --git a/tests/ls/inode b/tests/ls/inode index b570fecae..7b28640de 100755 --- a/tests/ls/inode +++ b/tests/ls/inode @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ls -touch f || framework_failure -ln -s f slink || framework_failure +touch f || framework_failure_ +ln -s f slink || framework_failure_ # When listed explicitly: diff --git a/tests/ls/m-option b/tests/ls/m-option index e0dd447ff..2e6ec03d2 100755 --- a/tests/ls/m-option +++ b/tests/ls/m-option @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ls -seq 2000 > b || framework_failure -touch a || framework_failure +seq 2000 > b || framework_failure_ +touch a || framework_failure_ # Before coreutils-5.1.1, the following would output a space after the comma. diff --git a/tests/ls/multihardlink b/tests/ls/multihardlink index a9d31f4b7..4a5900073 100755 --- a/tests/ls/multihardlink +++ b/tests/ls/multihardlink @@ -20,7 +20,7 @@ print_ver_ ls working_umask_or_skip_ -touch file file1 || framework_failure +touch file file1 || framework_failure_ ln file1 file2 || skip_ "can't create hard link" code_mh='44;37' code_ex='01;32' @@ -32,33 +32,33 @@ c_png=$(printf '\033[%sm' $code_png) # regular file - not hard linked LS_COLORS="mh=$code_mh" ls -U1 --color=always file > out || fail=1 -printf "file\n" > out_ok || framework_failure +printf "file\n" > out_ok || framework_failure_ compare out out_ok || fail=1 # hard links LS_COLORS="mh=$code_mh" ls -U1 --color=always file1 file2 > out || fail=1 printf "$c0${c_mh}file1$c0 ${c_mh}file2$c0 -" > out_ok || framework_failure +" > out_ok || framework_failure_ compare out out_ok || fail=1 # hard links and png (hard link coloring takes precedence) -mv file2 file2.png || framework_failure +mv file2 file2.png || framework_failure_ LS_COLORS="mh=$code_mh:*.png=$code_png" ls -U1 --color=always file1 file2.png \ > out || fail=1 printf "$c0${c_mh}file1$c0 ${c_mh}file2.png$c0 -" > out_ok || framework_failure +" > out_ok || framework_failure_ compare out out_ok || fail=1 # hard links and exe (exe coloring takes precedence) -chmod a+x file2.png || framework_failure +chmod a+x file2.png || framework_failure_ LS_COLORS="mh=$code_mh:*.png=$code_png:ex=$code_ex" \ ls -U1 --color=always file1 file2.png > out || fail=1 -chmod a-x file2.png || framework_failure +chmod a-x file2.png || framework_failure_ printf "$c0${c_ex}file1$c0 ${c_ex}file2.png$c0 -" > out_ok || framework_failure +" > out_ok || framework_failure_ compare out out_ok || fail=1 # hard links and png (hard link coloring disabled => png coloring enabled) @@ -66,7 +66,7 @@ LS_COLORS="mh=00:*.png=$code_png" ls -U1 --color=always file1 file2.png > out \ || fail=1 printf "file1 $c0${c_png}file2.png$c0 -" > out_ok || framework_failure +" > out_ok || framework_failure_ compare out out_ok || fail=1 # hard links and png (hard link coloring not enabled explicitly => png coloring) @@ -74,7 +74,7 @@ LS_COLORS="*.png=$code_png" ls -U1 --color=always file1 file2.png > out \ || fail=1 printf "file1 $c0${c_png}file2.png$c0 -" > out_ok || framework_failure +" > out_ok || framework_failure_ compare out out_ok || fail=1 Exit $fail diff --git a/tests/ls/nameless-uid b/tests/ls/nameless-uid index a0de6ce92..49521037e 100755 --- a/tests/ls/nameless-uid +++ b/tests/ls/nameless-uid @@ -32,8 +32,8 @@ if test x$nameless_uid = x; then skip_ "couldn't find a nameless UID" fi -touch f || framework_failure -chown $nameless_uid f || framework_failure +touch f || framework_failure_ +chown $nameless_uid f || framework_failure_ set -- `ls -o f` || fail=1 diff --git a/tests/ls/no-arg b/tests/ls/no-arg index 5e26114b4..f61846b97 100755 --- a/tests/ls/no-arg +++ b/tests/ls/no-arg @@ -19,11 +19,11 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ls -mkdir -p dir/subdir || framework_failure -touch dir/subdir/file2 || framework_failure -ln -s f symlink || framework_failure +mkdir -p dir/subdir || framework_failure_ +touch dir/subdir/file2 || framework_failure_ +ln -s f symlink || framework_failure_ -cat > exp <<\EOF || framework_failure +cat > exp <<\EOF || framework_failure_ dir exp out diff --git a/tests/ls/recursive b/tests/ls/recursive index 4e42890de..677b5fdb2 100755 --- a/tests/ls/recursive +++ b/tests/ls/recursive @@ -20,8 +20,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ls -mkdir x y a b c a/1 a/2 a/3 || framework_failure -touch f a/1/I a/1/II || framework_failure +mkdir x y a b c a/1 a/2 a/3 || framework_failure_ +touch f a/1/I a/1/II || framework_failure_ # This first example is from Andreas Schwab's bug report. diff --git a/tests/ls/rt-1 b/tests/ls/rt-1 index f546c9ed0..05d2a039f 100755 --- a/tests/ls/rt-1 +++ b/tests/ls/rt-1 @@ -21,9 +21,9 @@ print_ver_ ls touch date=1998-01-15 -touch -d "$date" c || framework_failure -touch -d "$date" a || framework_failure -touch -d "$date" b || framework_failure +touch -d "$date" c || framework_failure_ +touch -d "$date" a || framework_failure_ +touch -d "$date" b || framework_failure_ ls -1t a b c > out || fail=1 diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype index dfa2dd555..8ee94344f 100755 --- a/tests/ls/stat-dtype +++ b/tests/ls/stat-dtype @@ -27,18 +27,18 @@ print_ver_ ls # Skip this test unless "." is on a file system with useful d_type info. # FIXME: This uses "ls -p" to decide whether to test "ls" with other options, # but if ls's d_type code is buggy then "ls -p" might be buggy too. -mkdir -p c/d || framework_failure -chmod a-x c || framework_failure +mkdir -p c/d || framework_failure_ +chmod a-x c || framework_failure_ if test "X`ls -p c 2>&1`" != Xd/; then skip_ "'.' is not on a suitable file system for this test" fi -mkdir d || framework_failure -ln -s / d/s || framework_failure -chmod 600 d || framework_failure +mkdir d || framework_failure_ +ln -s / d/s || framework_failure_ +chmod 600 d || framework_failure_ -mkdir -p e/a2345 e/b || framework_failure -chmod 600 e || framework_failure +mkdir -p e/a2345 e/b || framework_failure_ +chmod 600 e || framework_failure_ ls --file-type d > out || fail=1 diff --git a/tests/ls/stat-failed b/tests/ls/stat-failed index 3ce941350..5a22c7bf9 100755 --- a/tests/ls/stat-failed +++ b/tests/ls/stat-failed @@ -21,9 +21,9 @@ print_ver_ ls skip_if_root_ -mkdir d || framework_failure -ln -s / d/s || framework_failure -chmod 600 d || framework_failure +mkdir d || framework_failure_ +ln -s / d/s || framework_failure_ +chmod 600 d || framework_failure_ ls -Log d > out diff --git a/tests/ls/stat-free-symlinks b/tests/ls/stat-free-symlinks index 21f5c1268..ab2011925 100755 --- a/tests/ls/stat-free-symlinks +++ b/tests/ls/stat-free-symlinks @@ -20,9 +20,9 @@ print_ver_ ls require_strace_ stat -touch x || framework_failure -chmod a+x x || framework_failure -ln -s x link-to-x || framework_failure +touch x || framework_failure_ +chmod a+x x || framework_failure_ +ln -s x link-to-x || framework_failure_ # ls from coreutils 6.9 would unnecessarily stat a symlink in an unusual case: diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash index b74e8d172..d70e4cd7b 100755 --- a/tests/ls/symlink-slash +++ b/tests/ls/symlink-slash @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ls -mkdir dir || framework_failure -ln -s dir symlink || framework_failure +mkdir dir || framework_failure_ +ln -s dir symlink || framework_failure_ set `ls -l symlink/` diff --git a/tests/ls/x-option b/tests/ls/x-option index 1bd152acb..7a451f54b 100755 --- a/tests/ls/x-option +++ b/tests/ls/x-option @@ -19,9 +19,9 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ ls -mkdir subdir || framework_failure -touch subdir/b || framework_failure -touch subdir/a || framework_failure +mkdir subdir || framework_failure_ +touch subdir/b || framework_failure_ +touch subdir/a || framework_failure_ # Coreutils 6.8 and 6.9 would output this in the wrong order. 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 diff --git a/tests/mkdir/p-3 b/tests/mkdir/p-3 index 0adfbea6a..76a6911ab 100755 --- a/tests/mkdir/p-3 +++ b/tests/mkdir/p-3 @@ -22,9 +22,9 @@ print_ver_ mkdir skip_if_root_ -mkdir no-access || framework_failure -mkdir no-acce2s || framework_failure -mkdir -p no-acce3s/d || framework_failure +mkdir no-access || framework_failure_ +mkdir no-acce2s || framework_failure_ +mkdir -p no-acce3s/d || framework_failure_ p=`pwd` (cd no-access && chmod 0 . && mkdir -p "$p/a/b" u/v) 2> /dev/null && fail=1 diff --git a/tests/mkdir/p-thru-slink b/tests/mkdir/p-thru-slink index 85886b1ee..2af786d5d 100755 --- a/tests/mkdir/p-thru-slink +++ b/tests/mkdir/p-thru-slink @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ mkdir -ln -s . slink || framework_failure +ln -s . slink || framework_failure_ mkdir -p slink/x || fail=1 test -d x || fail=1 diff --git a/tests/mkdir/parents b/tests/mkdir/parents index 72d5a2ba2..aa1f24d83 100755 --- a/tests/mkdir/parents +++ b/tests/mkdir/parents @@ -20,7 +20,7 @@ print_ver_ mkdir skip_if_setgid_ -mkdir -m 700 e-dir || framework_failure +mkdir -m 700 e-dir || framework_failure_ # Make sure `mkdir -p existing-dir' succeeds diff --git a/tests/mv/acl b/tests/mv/acl index 669868d34..75ae27e0f 100755 --- a/tests/mv/acl +++ b/tests/mv/acl @@ -29,9 +29,9 @@ grep '^#define USE_ACL 1' $CONFIG_HEADER > /dev/null || cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" -touch file || framework_failure +touch file || framework_failure_ t1=$other_partition_tmpdir/t1 -touch $t1 || framework_failure +touch $t1 || framework_failure_ skip_partition=none # Ensure that setfacl and getfacl work on this file system. @@ -45,23 +45,23 @@ test $skip_partition != none && # move the access acl of a file mv file "$other_partition_tmpdir" || fail=1 -acl2=`cd "$other_partition_tmpdir" && getfacl file` || framework_failure +acl2=`cd "$other_partition_tmpdir" && getfacl file` || framework_failure_ test "$acl1" = "$acl2" || fail=1 # move the access acl of a directory -mkdir dir || framework_failure -setfacl -m user:bin:rw dir || framework_failure -acl1=`getfacl dir` || framework_failure +mkdir dir || framework_failure_ +setfacl -m user:bin:rw dir || framework_failure_ +acl1=`getfacl dir` || framework_failure_ mv dir "$other_partition_tmpdir" || fail=1 -acl2=`cd "$other_partition_tmpdir" && getfacl dir` || framework_failure +acl2=`cd "$other_partition_tmpdir" && getfacl dir` || framework_failure_ test "$acl1" = "$acl2" || fail=1 # move the default acl of a directory -mkdir dir2 || framework_failure -setfacl -d -m user:bin:rw dir2 || framework_failure -acl1=`getfacl dir2` || framework_failure +mkdir dir2 || framework_failure_ +setfacl -d -m user:bin:rw dir2 || framework_failure_ +acl1=`getfacl dir2` || framework_failure_ mv dir2 "$other_partition_tmpdir" || fail=1 -acl2=`cd "$other_partition_tmpdir" && getfacl dir2` || framework_failure +acl2=`cd "$other_partition_tmpdir" && getfacl dir2` || framework_failure_ test "$acl1" = "$acl2" || fail=1 Exit $fail diff --git a/tests/mv/atomic b/tests/mv/atomic index dfc2cbf67..2a3ca966b 100755 --- a/tests/mv/atomic +++ b/tests/mv/atomic @@ -30,8 +30,8 @@ require_strace_ unlink # $ strace -qe unlink ./mv -T s1 s2 # $ -ln -s t1 s1 || framework_failure -ln -s t2 s2 || framework_failure +ln -s t1 s1 || framework_failure_ +ln -s t2 s2 || framework_failure_ strace -qe unlink mv -T s1 s2 > out 2>&1 || fail=1 diff --git a/tests/mv/atomic2 b/tests/mv/atomic2 index e69d166fc..0bb229f0b 100755 --- a/tests/mv/atomic2 +++ b/tests/mv/atomic2 @@ -28,8 +28,8 @@ require_strace_ unlink # $ rm -f a b b2; touch a b; ln b b2; strace -e unlink ./mv a b # $ -touch a b || framework_failure -ln b b2 || framework_failure +touch a b || framework_failure_ +ln b b2 || framework_failure_ strace -qe unlink mv a b > out 2>&1 || fail=1 diff --git a/tests/mv/backup-dir b/tests/mv/backup-dir index c5725d65c..3026365dd 100755 --- a/tests/mv/backup-dir +++ b/tests/mv/backup-dir @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ mv -mkdir A B || framework_failure -touch X Y || framework_failure +mkdir A B || framework_failure_ +touch X Y || framework_failure_ # Before coreutils-6.2, the " (backup: `B.~1~')" suffix was not printed. diff --git a/tests/mv/backup-is-src b/tests/mv/backup-is-src index 489798157..ba05870ab 100755 --- a/tests/mv/backup-is-src +++ b/tests/mv/backup-is-src @@ -24,9 +24,9 @@ cleanup_() { rm -rf "$other_partition_tmpdir"; } a="$other_partition_tmpdir/a" a2="$other_partition_tmpdir/a~" -rm -f "$a" "$a2" || framework_failure -echo a > "$a" || framework_failure -echo a2 > "$a2" || framework_failure +rm -f "$a" "$a2" || framework_failure_ +echo a > "$a" || framework_failure_ +echo a2 > "$a2" || framework_failure_ # This mv command should exit nonzero. mv --b=simple "$a2" "$a" > out 2>&1 && fail=1 diff --git a/tests/mv/childproof b/tests/mv/childproof index 40a923e4f..8c49de15d 100755 --- a/tests/mv/childproof +++ b/tests/mv/childproof @@ -23,9 +23,9 @@ print_ver_ cp mv ln skip_if_root_ -mkdir a b c || framework_failure -echo a > a/f || framework_failure -echo b > b/f || framework_failure +mkdir a b c || framework_failure_ +echo a > a/f || framework_failure_ +echo b > b/f || framework_failure_ cp a/f b/f c 2> /dev/null && fail=1 diff --git a/tests/mv/diag b/tests/mv/diag index ccf034e49..2007ee063 100755 --- a/tests/mv/diag +++ b/tests/mv/diag @@ -19,9 +19,9 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ mv -touch f1 || framework_failure -touch f2 || framework_failure -touch d || framework_failure +touch f1 || framework_failure_ +touch f2 || framework_failure_ +touch d || framework_failure_ # These mv commands should all exit nonzero. diff --git a/tests/mv/dir-file b/tests/mv/dir-file index 885f512bf..8c6925564 100755 --- a/tests/mv/dir-file +++ b/tests/mv/dir-file @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ mv -mkdir -p dir/file || framework_failure -> file || framework_failure +mkdir -p dir/file || framework_failure_ +> file || framework_failure_ # These should both fail, but until fileutils-4.0q only the second one did. diff --git a/tests/mv/dir2dir b/tests/mv/dir2dir index 4d6955e3f..452bb7de9 100755 --- a/tests/mv/dir2dir +++ b/tests/mv/dir2dir @@ -20,8 +20,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ mv -mkdir -p a/t b/t || framework_failure -touch a/t/f || framework_failure +mkdir -p a/t b/t || framework_failure_ +touch a/t/f || framework_failure_ # Expect this to fail with the expected diagnostic. diff --git a/tests/mv/force b/tests/mv/force index 984b46d32..4aa754003 100755 --- a/tests/mv/force +++ b/tests/mv/force @@ -22,8 +22,8 @@ print_ver_ mv ff=mvforce ff2=mvforce2 -echo force-contents > $ff || framework_failure -ln $ff $ff2 || framework_failure +echo force-contents > $ff || framework_failure_ +ln $ff $ff2 || framework_failure_ # This mv command should exit nonzero. mv $ff $ff > out 2>&1 && fail=1 diff --git a/tests/mv/hard-2 b/tests/mv/hard-2 index 27ff87086..dbc412b61 100755 --- a/tests/mv/hard-2 +++ b/tests/mv/hard-2 @@ -22,11 +22,11 @@ print_ver_ cp mv skip_if_root_ -mkdir dst || framework_failure -(cd dst && touch a b c) || framework_failure -touch a || framework_failure -ln a b || framework_failure -ln a c || framework_failure +mkdir dst || framework_failure_ +(cd dst && touch a b c) || framework_failure_ +touch a || framework_failure_ +ln a b || framework_failure_ +ln a c || framework_failure_ # ====================================== diff --git a/tests/mv/hard-3 b/tests/mv/hard-3 index 586c593c9..8b76c28e4 100755 --- a/tests/mv/hard-3 +++ b/tests/mv/hard-3 @@ -34,12 +34,12 @@ print_ver_ cp skip_if_root_ -mkdir -p x dst/x || framework_failure -touch dst/x/b || framework_failure +mkdir -p x dst/x || framework_failure_ +touch dst/x/b || framework_failure_ chmod a-w dst/x -touch a || framework_failure -ln a x/b || framework_failure -ln a c || framework_failure +touch a || framework_failure_ +ln a x/b || framework_failure_ +ln a c || framework_failure_ # ====================================== diff --git a/tests/mv/hard-4 b/tests/mv/hard-4 index 6cc640459..013de0f4b 100755 --- a/tests/mv/hard-4 +++ b/tests/mv/hard-4 @@ -18,8 +18,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ mv -touch a || framework_failure -ln a b || framework_failure +touch a || framework_failure_ +ln a b || framework_failure_ mv a b || fail=1 diff --git a/tests/mv/hard-link-1 b/tests/mv/hard-link-1 index 7014196ad..3b6fe25f6 100755 --- a/tests/mv/hard-link-1 +++ b/tests/mv/hard-link-1 @@ -24,9 +24,9 @@ cleanup_() { rm -rf "$other_partition_tmpdir"; } dir=hlink -mkdir $dir || framework_failure -> $dir/a || framework_failure -ln $dir/a $dir/b || framework_failure +mkdir $dir || framework_failure_ +> $dir/a || framework_failure_ +ln $dir/a $dir/b || framework_failure_ mv $dir "$other_partition_tmpdir" || fail=1 diff --git a/tests/mv/hard-verbose b/tests/mv/hard-verbose index 27e8a92ad..95d959d57 100755 --- a/tests/mv/hard-verbose +++ b/tests/mv/hard-verbose @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ mv -touch x || framework_failure -ln x y || framework_failure +touch x || framework_failure_ +ln x y || framework_failure_ mv --verbose x y > out || fail=1 diff --git a/tests/mv/i-2 b/tests/mv/i-2 index 6eef6f6db..538e12823 100755 --- a/tests/mv/i-2 +++ b/tests/mv/i-2 @@ -23,10 +23,10 @@ print_ver_ cp mv skip_if_root_ for i in a b c d e f g h; do - echo $i > $i || framework_failure + echo $i > $i || framework_failure_ done -chmod 0 b d f h || framework_failure -echo y > y || framework_failure +chmod 0 b d f h || framework_failure_ +echo y > y || framework_failure_ mv -if a b || fail=1 mv -fi c d < y >/dev/null 2>&1 || fail=1 diff --git a/tests/mv/i-3 b/tests/mv/i-3 index 867b7cb62..a65c3b575 100755 --- a/tests/mv/i-3 +++ b/tests/mv/i-3 @@ -25,8 +25,8 @@ trap '' TTIN # Ignore SIGTTIN test "$(uname -s)" = FreeBSD && skip_ "known spurious failure on FreeBSD" -touch f g h i || framework_failure -chmod 0 g i || framework_failure +touch f g h i || framework_failure_ +chmod 0 g i || framework_failure_ ls /dev/stdin >/dev/null 2>&1 \ diff --git a/tests/mv/i-4 b/tests/mv/i-4 index f91f6bfc5..e7a381f6b 100755 --- a/tests/mv/i-4 +++ b/tests/mv/i-4 @@ -20,9 +20,9 @@ print_ver_ mv for i in a b; do - echo $i > $i || framework_failure + echo $i > $i || framework_failure_ done -echo y > y || framework_failure +echo y > y || framework_failure_ mv -i a b < y >/dev/null 2>&1 || fail=1 diff --git a/tests/mv/i-5 b/tests/mv/i-5 index 64c06fe92..82596b9e0 100755 --- a/tests/mv/i-5 +++ b/tests/mv/i-5 @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ mv -mkdir a || framework_failure -touch b || framework_failure +mkdir a || framework_failure_ +touch b || framework_failure_ # coreutils 6.2 mv would neglect to prompt in this case. diff --git a/tests/mv/i-link-no b/tests/mv/i-link-no index 9ead3bcc8..7858eb91b 100755 --- a/tests/mv/i-link-no +++ b/tests/mv/i-link-no @@ -19,13 +19,13 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ mv -mkdir a b || framework_failure -echo foo > a/foo || framework_failure -ln a/foo a/bar || framework_failure -echo FUBAR > b/FUBAR || framework_failure -ln b/FUBAR b/bar || framework_failure -chmod a-w b/bar || framework_failure -echo n > no || framework_failure +mkdir a b || framework_failure_ +echo foo > a/foo || framework_failure_ +ln a/foo a/bar || framework_failure_ +echo FUBAR > b/FUBAR || framework_failure_ +ln b/FUBAR b/bar || framework_failure_ +chmod a-w b/bar || framework_failure_ +echo n > no || framework_failure_ mv a/bar a/foo b < no > out 2> err || fail=1 diff --git a/tests/mv/into-self b/tests/mv/into-self index 67e601239..a4df10a6b 100755 --- a/tests/mv/into-self +++ b/tests/mv/into-self @@ -22,9 +22,9 @@ print_ver_ mv dir=toself-dir file=toself-file -rm -rf $dir $file || framework_failure -mkdir -p $dir/a/b || framework_failure -touch $file || framework_failure +rm -rf $dir $file || framework_failure_ +mkdir -p $dir/a/b || framework_failure_ +touch $file || framework_failure_ # This mv command should fail. diff --git a/tests/mv/into-self-2 b/tests/mv/into-self-2 index a2939d998..28e212768 100755 --- a/tests/mv/into-self-2 +++ b/tests/mv/into-self-2 @@ -27,8 +27,8 @@ file="$other_partition_tmpdir/file" symlink=symlink -echo whatever > $file || framework_failure -ln -s $file $symlink || framework_failure +echo whatever > $file || framework_failure_ +ln -s $file $symlink || framework_failure_ # This mv command should exit nonzero. mv $symlink $file > out 2>&1 && fail=1 diff --git a/tests/mv/into-self-3 b/tests/mv/into-self-3 index a934ea247..8d1eadb5f 100755 --- a/tests/mv/into-self-3 +++ b/tests/mv/into-self-3 @@ -22,7 +22,7 @@ print_ver_ mv dir1=is3-dir1 dir2=is3-dir2 -mkdir $dir1 $dir2 || framework_failure +mkdir $dir1 $dir2 || framework_failure_ # This mv command should exit nonzero. mv $dir1 $dir2 $dir2 > out 2>&1 && fail=1 diff --git a/tests/mv/into-self-4 b/tests/mv/into-self-4 index 6af1f8abb..7a3546e47 100755 --- a/tests/mv/into-self-4 +++ b/tests/mv/into-self-4 @@ -20,8 +20,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ mv -touch file || framework_failure -ln -s file s || framework_failure +touch file || framework_failure_ +ln -s file s || framework_failure_ # This must fail. diff --git a/tests/mv/leak-fd b/tests/mv/leak-fd index 095a843d5..881d7ee47 100755 --- a/tests/mv/leak-fd +++ b/tests/mv/leak-fd @@ -38,11 +38,11 @@ for i in `echo $b`; do echo $i$j done done > .dirs -mkdir `cat .dirs` || framework_failure +mkdir `cat .dirs` || framework_failure_ sed 's,$,/f,' .dirs | xargs touch last_file=`tail -n1 .dirs`/f -test -f $last_file || framework_failure +test -f $last_file || framework_failure_ mv * "$other_partition_tmpdir" || fail=1 diff --git a/tests/mv/mv-n b/tests/mv/mv-n index 8d9e0da2e..ada2ade63 100755 --- a/tests/mv/mv-n +++ b/tests/mv/mv-n @@ -21,37 +21,37 @@ print_ver_ mv # test miscellaneous combinations of -f -i -n parameters -touch a b || framework_failure +touch a b || framework_failure_ echo "\`a' -> \`b'" > out_move > out_empty # ask for overwrite, answer no -touch a b || framework_failure +touch a b || framework_failure_ echo n | mv -vi a b 2>/dev/null > out1 || fail=1 compare out1 out_empty || fail=1 # ask for overwrite, answer yes -touch a b || framework_failure +touch a b || framework_failure_ echo y | mv -vi a b 2>/dev/null > out2 || fail=1 compare out2 out_move || fail=1 # -n wins (as the last option) -touch a b || framework_failure +touch a b || framework_failure_ echo y | mv -vin a b 2>/dev/null > out3 || fail=1 compare out3 out_empty || fail=1 # -n wins (as the last option) -touch a b || framework_failure +touch a b || framework_failure_ echo y | mv -vfn a b 2>/dev/null > out4 || fail=1 compare out4 out_empty || fail=1 # -n wins (as the last option) -touch a b || framework_failure +touch a b || framework_failure_ echo y | mv -vifn a b 2>/dev/null > out5 || fail=1 compare out5 out_empty || fail=1 # options --backup and --no-clobber are mutually exclusive -touch a || framework_failure +touch a || framework_failure_ mv -bn a b 2>/dev/null && fail=1 Exit $fail diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1 index 429795313..f43a70791 100755 --- a/tests/mv/mv-special-1 +++ b/tests/mv/mv-special-1 @@ -24,11 +24,11 @@ cleanup_() { rm -rf "$other_partition_tmpdir"; } null=mv-null dir=mv-dir -rm -f $null || framework_failure -mknod $null p || framework_failure -test -p $null || framework_failure -mkdir -p $dir/a/b/c $dir/d/e/f || framework_failure -touch $dir/a/b/c/file1 $dir/d/e/f/file2 || framework_failure +rm -f $null || framework_failure_ +mknod $null p || framework_failure_ +test -p $null || framework_failure_ +mkdir -p $dir/a/b/c $dir/d/e/f || framework_failure_ +touch $dir/a/b/c/file1 $dir/d/e/f/file2 || framework_failure_ # We used to... # exit 77 here to indicate that we couldn't run the test. diff --git a/tests/mv/no-target-dir b/tests/mv/no-target-dir index a73fae9ed..1d800e17f 100755 --- a/tests/mv/no-target-dir +++ b/tests/mv/no-target-dir @@ -20,11 +20,11 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ mv -mkdir -p d/sub empty src d2/sub e2 || framework_failure -touch f || framework_failure +mkdir -p d/sub empty src d2/sub e2 || framework_failure_ +touch f || framework_failure_ # Skip this test if there's an underlying kernel bug. -mkdir a b b/a || framework_failure +mkdir a b b/a || framework_failure_ mv a b || skip_ "your kernel's rename syscall is buggy" diff --git a/tests/mv/part-fail b/tests/mv/part-fail index 2c0d0e5b3..8d2566964 100755 --- a/tests/mv/part-fail +++ b/tests/mv/part-fail @@ -25,8 +25,8 @@ skip_if_root_ cleanup_() { t=$other_partition_tmpdir; chmod -R 700 "$t"; rm -rf "$t"; } . "$abs_srcdir/other-fs-tmpdir" -touch k "$other_partition_tmpdir/k" || framework_failure -chmod u-w "$other_partition_tmpdir" || framework_failure +touch k "$other_partition_tmpdir/k" || framework_failure_ +chmod u-w "$other_partition_tmpdir" || framework_failure_ mv -f k "$other_partition_tmpdir" 2> out && fail=1 diff --git a/tests/mv/part-hardlink b/tests/mv/part-hardlink index 5c975fd43..5e27ff35b 100755 --- a/tests/mv/part-hardlink +++ b/tests/mv/part-hardlink @@ -24,11 +24,11 @@ print_ver_ mv cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" -touch f || framework_failure -ln f g || framework_failure -mkdir a b || framework_failure -touch a/1 || framework_failure -ln a/1 b/1 || framework_failure +touch f || framework_failure_ +ln f g || framework_failure_ +mkdir a b || framework_failure_ +touch a/1 || framework_failure_ +ln a/1 b/1 || framework_failure_ mv f g "$other_partition_tmpdir" || fail=1 diff --git a/tests/mv/part-rename b/tests/mv/part-rename index 9edb2516a..e3a7db1da 100755 --- a/tests/mv/part-rename +++ b/tests/mv/part-rename @@ -23,7 +23,7 @@ print_ver_ mv cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" -mkdir foo || framework_failure +mkdir foo || framework_failure_ mv foo/ "$other_partition_tmpdir/bar" || fail=1 diff --git a/tests/mv/perm-1 b/tests/mv/perm-1 index 2366bd79e..cab0076f2 100755 --- a/tests/mv/perm-1 +++ b/tests/mv/perm-1 @@ -21,8 +21,8 @@ print_ver_ mv skip_if_root_ -mkdir -p no-write/dir || framework_failure -chmod u-w no-write || framework_failure +mkdir -p no-write/dir || framework_failure_ +chmod u-w no-write || framework_failure_ mv no-write/dir . > out 2>&1 && fail=1 diff --git a/tests/mv/sticky-to-xpart b/tests/mv/sticky-to-xpart index f689d9d0a..3d61c3c27 100755 --- a/tests/mv/sticky-to-xpart +++ b/tests/mv/sticky-to-xpart @@ -30,14 +30,14 @@ cleanup_() { rm -rf "$other_partition_tmpdir"; } # file from a sticky tmpdir to a directory owned by that user on # a different partition. -mkdir t || framework_failure -chmod a=rwx,o+t t || framework_failure -echo > t/root-owned || framework_failure -chmod a+r t/root-owned || framework_failure -chown "$NON_ROOT_USERNAME" "$other_partition_tmpdir" || framework_failure +mkdir t || framework_failure_ +chmod a=rwx,o+t t || framework_failure_ +echo > t/root-owned || framework_failure_ +chmod a+r t/root-owned || framework_failure_ +chown "$NON_ROOT_USERNAME" "$other_partition_tmpdir" || framework_failure_ # We have to allow $NON_ROOT_USERNAME access to ".". -chmod go+x . || framework_failure +chmod go+x . || framework_failure_ # Ensure that $NON_ROOT_USERNAME can access the required version of mv. diff --git a/tests/mv/to-symlink b/tests/mv/to-symlink index 600fde35f..162ac55cd 100755 --- a/tests/mv/to-symlink +++ b/tests/mv/to-symlink @@ -26,9 +26,9 @@ rem_file="$other_partition_tmpdir/file" rem_symlink="$other_partition_tmpdir/symlink" file=to-sym -echo local > $file || framework_failure -echo remote > $rem_file || framework_failure -ln -s $rem_file $rem_symlink || framework_failure +echo local > $file || framework_failure_ +echo remote > $rem_file || framework_failure_ +ln -s $rem_file $rem_symlink || framework_failure_ # This mv command should succeed, unlinking the symlink # before copying. diff --git a/tests/mv/trailing-slash b/tests/mv/trailing-slash index 6215b149b..104cf594c 100755 --- a/tests/mv/trailing-slash +++ b/tests/mv/trailing-slash @@ -22,7 +22,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ mv -mkdir foo || framework_failure +mkdir foo || framework_failure_ mv foo/ bar || fail=1 @@ -30,8 +30,8 @@ mv foo/ bar || fail=1 # mv and cp would misbehave for coreutils versions [5.3.0..5.97], 6.0 and 6.1 for cmd in mv 'cp -r'; do for opt in '' -T -u; do - rm -rf d e || framework_failure - mkdir d || framework_failure + rm -rf d e || framework_failure_ + mkdir d || framework_failure_ $cmd $opt d e/ || fail=1 if test "$cmd" = mv; then diff --git a/tests/mv/update b/tests/mv/update index 6a746ec85..0f8ac8927 100755 --- a/tests/mv/update +++ b/tests/mv/update @@ -19,9 +19,9 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp mv -echo old > old || framework_failure -touch -d yesterday old || framework_failure -echo new > new || framework_failure +echo old > old || framework_failure_ +touch -d yesterday old || framework_failure_ +echo new > new || framework_failure_ for interactive in '' -i; do diff --git a/tests/readlink/can-e b/tests/readlink/can-e index c2ad5046e..9034a9a19 100755 --- a/tests/readlink/can-e +++ b/tests/readlink/can-e @@ -23,18 +23,18 @@ pwd=`pwd` my_pwd=$("$abs_top_builddir/src/pwd") tmp=d -mkdir $tmp || framework_failure -cd $tmp || framework_failure +mkdir $tmp || framework_failure_ +cd $tmp || framework_failure_ -mkdir subdir removed || framework_failure -touch regfile || framework_failure +mkdir subdir removed || framework_failure_ +touch regfile || framework_failure_ -ln -s regfile link1 || framework_failure -ln -s subdir link2 || framework_failure -ln -s missing link3 || framework_failure -ln -s subdir/missing link4 || framework_failure +ln -s regfile link1 || framework_failure_ +ln -s subdir link2 || framework_failure_ +ln -s missing link3 || framework_failure_ +ln -s subdir/missing link4 || framework_failure_ -cd "$pwd/$tmp/removed" || framework_failure +cd "$pwd/$tmp/removed" || framework_failure_ # Skip this test if the system doesn't let you remove the working directory. if rmdir ../removed 2>/dev/null; then diff --git a/tests/readlink/can-f b/tests/readlink/can-f index 40812f8e2..a557c2297 100755 --- a/tests/readlink/can-f +++ b/tests/readlink/can-f @@ -23,19 +23,19 @@ pwd=`pwd` my_pwd=$("$abs_top_builddir/src/pwd") tmp=d -mkdir $tmp || framework_failure -cd $tmp || framework_failure +mkdir $tmp || framework_failure_ +cd $tmp || framework_failure_ -mkdir subdir removed || framework_failure -touch regfile || framework_failure +mkdir subdir removed || framework_failure_ +touch regfile || framework_failure_ -ln -s regfile link1 || framework_failure -ln -s subdir link2 || framework_failure -ln -s missing link3 || framework_failure -ln -s subdir/missing link4 || framework_failure -ln -s link5 link5 || framework_failure +ln -s regfile link1 || framework_failure_ +ln -s subdir link2 || framework_failure_ +ln -s missing link3 || framework_failure_ +ln -s subdir/missing link4 || framework_failure_ +ln -s link5 link5 || framework_failure_ -cd "$pwd/$tmp/removed" || framework_failure +cd "$pwd/$tmp/removed" || framework_failure_ # Skip this test if the system doesn't let you remove the working directory. if rmdir ../removed 2>/dev/null; then diff --git a/tests/readlink/can-m b/tests/readlink/can-m index 355156731..150d6572c 100755 --- a/tests/readlink/can-m +++ b/tests/readlink/can-m @@ -23,18 +23,18 @@ pwd=`pwd` my_pwd=$("$abs_top_builddir/src/pwd") tmp=d -mkdir $tmp || framework_failure -cd $tmp || framework_failure +mkdir $tmp || framework_failure_ +cd $tmp || framework_failure_ -mkdir subdir removed || framework_failure -touch regfile || framework_failure +mkdir subdir removed || framework_failure_ +touch regfile || framework_failure_ -ln -s regfile link1 || framework_failure -ln -s subdir link2 || framework_failure -ln -s missing link3 || framework_failure -ln -s subdir/missing link4 || framework_failure +ln -s regfile link1 || framework_failure_ +ln -s subdir link2 || framework_failure_ +ln -s missing link3 || framework_failure_ +ln -s subdir/missing link4 || framework_failure_ -cd "$pwd/$tmp/removed" || framework_failure +cd "$pwd/$tmp/removed" || framework_failure_ # Skip this test if the system doesn't let you remove the working directory. if rmdir ../removed 2>/dev/null; then diff --git a/tests/readlink/rl-1 b/tests/readlink/rl-1 index 957816e88..f6a108589 100755 --- a/tests/readlink/rl-1 +++ b/tests/readlink/rl-1 @@ -19,10 +19,10 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ readlink -mkdir subdir || framework_failure -touch regfile || framework_failure -ln -s regfile link1 || framework_failure -ln -s missing link2 || framework_failure +mkdir subdir || framework_failure_ +touch regfile || framework_failure_ +ln -s regfile link1 || framework_failure_ +ln -s missing link2 || framework_failure_ v=`readlink link1` || fail=1 diff --git a/tests/rm/deep-2 b/tests/rm/deep-2 index eb624eeb2..b7651da32 100755 --- a/tests/rm/deep-2 +++ b/tests/rm/deep-2 @@ -24,18 +24,18 @@ print_ver_ rm # the offending euidaccess_stat call. skip_if_root_ -mkdir x || framework_failure -cd x || framework_failure +mkdir x || framework_failure_ +cd x || framework_failure_ # Construct a hierarchy containing a relative file with a name : ${PERL=perl} $PERL \ -e 'my $d = "x" x 200; foreach my $i (1..52)' \ -e ' { mkdir ($d, 0700) && chdir $d or die "$!" }' \ - || framework_failure + || framework_failure_ -cd .. || framework_failure -echo n > no || framework_failure +cd .. || framework_failure_ +echo n > no || framework_failure_ rm ---presume-input-tty -r x < no > out || fail=1 diff --git a/tests/rm/dir-no-w b/tests/rm/dir-no-w index 292836b54..b4721ad4e 100755 --- a/tests/rm/dir-no-w +++ b/tests/rm/dir-no-w @@ -20,7 +20,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rm -mkdir --mode=0500 unwritable-dir || framework_failure +mkdir --mode=0500 unwritable-dir || framework_failure_ # For rm from coreutils-5.0.1, this would prompt. diff --git a/tests/rm/dir-nonrecur b/tests/rm/dir-nonrecur index 1b347d957..2e2f15237 100755 --- a/tests/rm/dir-nonrecur +++ b/tests/rm/dir-nonrecur @@ -20,7 +20,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rm -mkdir d || framework_failure +mkdir d || framework_failure_ rm d 2> out && fail=1 diff --git a/tests/rm/dot-rel b/tests/rm/dot-rel index dd23b373c..fdf4fc174 100755 --- a/tests/rm/dot-rel +++ b/tests/rm/dot-rel @@ -20,8 +20,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rm -mkdir a b || framework_failure -touch a/f b/f || framework_failure +mkdir a b || framework_failure_ +touch a/f b/f || framework_failure_ rm -r a b || fail=1 diff --git a/tests/rm/empty-inacc b/tests/rm/empty-inacc index 20abd5c72..f36c6f2d6 100755 --- a/tests/rm/empty-inacc +++ b/tests/rm/empty-inacc @@ -20,7 +20,7 @@ print_ver_ rm skip_if_root_ -mkdir -m0 inacc || framework_failure +mkdir -m0 inacc || framework_failure_ # Also exercise the different code path that's taken for a directory # that is empty (hence removable) and unreadable. diff --git a/tests/rm/ext3-perf b/tests/rm/ext3-perf index 95cce33d4..1ee8bf944 100755 --- a/tests/rm/ext3-perf +++ b/tests/rm/ext3-perf @@ -44,7 +44,7 @@ df -T -t ext3 -t ext4dev -t ext4 . \ || skip_ 'this test runs only on an ext3 or ext4 file system' # Skip if there are too few inodes free. Require some slack. -free_inodes=$(stat -f --format=%d .) || framework_failure +free_inodes=$(stat -f --format=%d .) || framework_failure_ min_free_inodes=$(expr 12 \* $n / 10) test $min_free_inodes -lt $free_inodes \ || skip_ "too few free inodes on '.': $free_inodes;" \ @@ -59,7 +59,7 @@ mkdir d && test -f $n && cd .. && ok=1 -test $ok = 1 || framework_failure +test $ok = 1 || framework_failure_ setup_duration=$(expr $(date +%s) - $start) echo creating a $n-entry directory took $setup_duration seconds diff --git a/tests/rm/f-1 b/tests/rm/f-1 index 3b0d51537..2d353649c 100755 --- a/tests/rm/f-1 +++ b/tests/rm/f-1 @@ -21,7 +21,7 @@ test=f-1 . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rm -mkdir -p d || framework_failure +mkdir -p d || framework_failure_ rm -f d/no-such-file || fail=1 diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm index 4137d9dac..cd294c5bc 100755 --- a/tests/rm/fail-2eperm +++ b/tests/rm/fail-2eperm @@ -24,9 +24,9 @@ require_root_ # The containing directory must be owned by the user who eventually runs rm. chown $NON_ROOT_USERNAME . -mkdir a || framework_failure -chmod 1777 a || framework_failure -touch a/b || framework_failure +mkdir a || framework_failure_ +chmod 1777 a || framework_failure_ +touch a/b || framework_failure_ # Try to ensure that $NON_ROOT_USERNAME can access diff --git a/tests/rm/fail-eacces b/tests/rm/fail-eacces index 750924f62..8e9b5b07e 100755 --- a/tests/rm/fail-eacces +++ b/tests/rm/fail-eacces @@ -29,13 +29,13 @@ mkdir d && ln -s f d/slink && chmod a-w d && ok=1 -test $ok = 1 || framework_failure +test $ok = 1 || framework_failure_ mkdir e && ln -s f e/slink && chmod a-w e && ok=1 -test $ok = 1 || framework_failure +test $ok = 1 || framework_failure_ rm -rf d/f 2> out && fail=1 diff --git a/tests/rm/hash b/tests/rm/hash index cdadbab70..48560ddf2 100755 --- a/tests/rm/hash +++ b/tests/rm/hash @@ -27,7 +27,7 @@ echo "$0: creating 78 trees, each of depth 153; this will take a while..." >&2 y=`seq 1 150|tr -sc '\n' y|tr '\n' /` for i in 1 2 3; do for j in a b c d e f g h i j k l m n o p q r s t u v w x y z; do - mkdir -p t/$i/$j/$y || framework_failure + mkdir -p t/$i/$j/$y || framework_failure_ done done diff --git a/tests/rm/i-1 b/tests/rm/i-1 index 369f91263..e8e487672 100755 --- a/tests/rm/i-1 +++ b/tests/rm/i-1 @@ -22,9 +22,9 @@ test=i-1 print_ver_ rm t=t -mkdir -p $t || framework_failure -echo > $t/a || framework_failure -test -f $t/a || framework_failure +mkdir -p $t || framework_failure_ +echo > $t/a || framework_failure_ +test -f $t/a || framework_failure_ echo y > $t/$test.Iy echo n > $t/$test.In diff --git a/tests/rm/i-never b/tests/rm/i-never index c6dc080a0..5ffde73c7 100755 --- a/tests/rm/i-never +++ b/tests/rm/i-never @@ -21,9 +21,9 @@ print_ver_ rm skip_if_root_ -touch f || framework_failure -chmod 0 f || framework_failure -touch exp || framework_failure +touch f || framework_failure_ +chmod 0 f || framework_failure_ +touch exp || framework_failure_ rm --interactive=never f > out || fail=1 diff --git a/tests/rm/i-no-r b/tests/rm/i-no-r index 6e46d2238..9316b828f 100755 --- a/tests/rm/i-no-r +++ b/tests/rm/i-no-r @@ -21,8 +21,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rm -mkdir dir || framework_failure -echo y > y || framework_failure +mkdir dir || framework_failure_ +echo y > y || framework_failure_ # This must fail. diff --git a/tests/rm/ignorable b/tests/rm/ignorable index 8c76f40a7..bff42f255 100755 --- a/tests/rm/ignorable +++ b/tests/rm/ignorable @@ -20,7 +20,7 @@ print_ver_ rm skip_if_root_ -touch existing-non-dir || framework_failure +touch existing-non-dir || framework_failure_ # With coreutils-6.3, this would exit nonzero. It should not. diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible index b5fa5881e..e87ab793d 100755 --- a/tests/rm/inaccessible +++ b/tests/rm/inaccessible @@ -26,7 +26,7 @@ require_openat_support_ skip_if_root_ p=`pwd` -mkdir abs1 abs2 no-access || framework_failure +mkdir abs1 abs2 no-access || framework_failure_ set +x diff --git a/tests/rm/interactive-always b/tests/rm/interactive-always index 7b9130a9d..032c645ed 100755 --- a/tests/rm/interactive-always +++ b/tests/rm/interactive-always @@ -22,11 +22,11 @@ test=interactive-always print_ver_ rm touch file1-1 file1-2 file2-1 file2-2 file3-1 file3-2 file4-1 file4-2 \ - || framework_failure + || framework_failure_ # If asked, answer no to first question, then yes to second. echo 'n -y' > $test.I || framework_failure -rm -f out err || framework_failure +y' > $test.I || framework_failure_ +rm -f out err || framework_failure_ # The prompt has a trailing space, and no newline, so an extra diff --git a/tests/rm/interactive-once b/tests/rm/interactive-once index 4971fe52f..fc1c76dd7 100755 --- a/tests/rm/interactive-once +++ b/tests/rm/interactive-once @@ -21,12 +21,12 @@ test=interactive-once . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rm -mkdir -p dir1-1 dir2-1 dir2-2 || framework_failure +mkdir -p dir1-1 dir2-1 dir2-2 || framework_failure_ touch file1-1 file2-1 file2-2 file2-3 file3-1 file3-2 file3-3 file3-4 \ - || framework_failure -echo y > $test.Iy || framework_failure -echo n > $test.In || framework_failure -rm -f out err || framework_failure + || framework_failure_ +echo y > $test.Iy || framework_failure_ +echo n > $test.In || framework_failure_ +rm -f out err || framework_failure_ # The prompt has a trailing space, and no newline, so an extra diff --git a/tests/rm/ir-1 b/tests/rm/ir-1 index bac607cb8..228770232 100755 --- a/tests/rm/ir-1 +++ b/tests/rm/ir-1 @@ -22,10 +22,10 @@ test=ir-1 print_ver_ rm t=t -mkdir -p $t $t/a $t/b $t/c || framework_failure -> $t/a/a || framework_failure -> $t/b/bb || framework_failure -> $t/c/cc || framework_failure +mkdir -p $t $t/a $t/b $t/c || framework_failure_ +> $t/a/a || framework_failure_ +> $t/b/bb || framework_failure_ +> $t/c/cc || framework_failure_ cat <<EOF > $test.I y diff --git a/tests/rm/no-give-up b/tests/rm/no-give-up index 5ecd2750f..544b8c241 100755 --- a/tests/rm/no-give-up +++ b/tests/rm/no-give-up @@ -21,12 +21,12 @@ print_ver_ rm require_root_ -mkdir d || framework_failure -touch d/f || framework_failure -chown -R $NON_ROOT_USERNAME d || framework_failure +mkdir d || framework_failure_ +touch d/f || framework_failure_ +chown -R $NON_ROOT_USERNAME d || framework_failure_ # Ensure that non-root can access files in root-owned ".". -chmod go=x . || framework_failure +chmod go=x . || framework_failure_ # This must fail, since `.' is not writable by $NON_ROOT_USERNAME. diff --git a/tests/rm/one-file-system b/tests/rm/one-file-system index 1ef61a735..064d27c2b 100755 --- a/tests/rm/one-file-system +++ b/tests/rm/one-file-system @@ -35,7 +35,7 @@ mkdir -p a/b $t/y mount --bind $t a/b \ || skip_ "This test requires mount with a working --bind option." -cat <<\EOF > exp || framework_failure +cat <<\EOF > exp || framework_failure_ rm: skipping `a/b', since it's on a different device EOF diff --git a/tests/rm/r-1 b/tests/rm/r-1 index c415a3bf3..c1d04bd5c 100755 --- a/tests/rm/r-1 +++ b/tests/rm/r-1 @@ -22,10 +22,10 @@ test=r-1 . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rm -mkdir a a/a || framework_failure -> b || framework_failure +mkdir a a/a || framework_failure_ +> b || framework_failure_ -cat <<\EOF > $test.E || framework_failure +cat <<\EOF > $test.E || framework_failure_ removed directory: `a/a' removed directory: `a' removed `b' diff --git a/tests/rm/r-2 b/tests/rm/r-2 index f38a181c4..71df2f0fe 100755 --- a/tests/rm/r-2 +++ b/tests/rm/r-2 @@ -20,12 +20,12 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rm -mkdir t t/a t/a/b || framework_failure -> t/a/f || framework_failure -> t/a/b/g || framework_failure +mkdir t t/a t/a/b || framework_failure_ +> t/a/f || framework_failure_ +> t/a/b/g || framework_failure_ # FIXME: if this fails, it's a framework failure -cat <<\EOF | sort > t/E || framework_failure +cat <<\EOF | sort > t/E || framework_failure_ removed directory: `t/a' removed directory: `t/a/b' removed `t/a/b/g' diff --git a/tests/rm/r-3 b/tests/rm/r-3 index 5372046f6..e47ee093e 100755 --- a/tests/rm/r-3 +++ b/tests/rm/r-3 @@ -26,8 +26,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rm -mkdir t || framework_failure -cd t || framework_failure +mkdir t || framework_failure_ +cd t || framework_failure_ # Create 500 files (20 * 25). for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j; do @@ -35,12 +35,12 @@ for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j; do for j in a b c d e f g h i j k l m n o p q r s t u v w x y; do files="$files $i$j" done - touch $files || framework_failure + touch $files || framework_failure_ done -test -f 0a || framework_failure -test -f by || framework_failure -cd .. || framework_failure +test -f 0a || framework_failure_ +test -f by || framework_failure_ +cd .. || framework_failure_ rm -rf t || fail=1 test -d t && fail=1 diff --git a/tests/rm/r-4 b/tests/rm/r-4 index 9c6824d13..56135c42a 100755 --- a/tests/rm/r-4 +++ b/tests/rm/r-4 @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rm -mkdir d || framework_failure -touch d/a || framework_failure +mkdir d || framework_failure_ +touch d/a || framework_failure_ rm -fr d/. 2>/dev/null && fail=1 rm -fr d/./ 2>/dev/null && fail=1 diff --git a/tests/rm/readdir-bug b/tests/rm/readdir-bug index 3f1596728..41405ebf7 100755 --- a/tests/rm/readdir-bug +++ b/tests/rm/readdir-bug @@ -24,12 +24,12 @@ print_ver_ rm # What counts is a combination of the number of files and # the lengths of their names. For details, see # http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html -mkdir b || framework_failure -cd b || framework_failure +mkdir b || framework_failure_ +cd b || framework_failure_ for i in `seq 1 250`; do - touch `printf %040d $i` || framework_failure + touch `printf %040d $i` || framework_failure_ done -cd .. || framework_failure +cd .. || framework_failure_ # On a buggy system, this would fail with the diagnostic, diff --git a/tests/rm/rm1 b/tests/rm/rm1 index e90996d8f..ce0d87150 100755 --- a/tests/rm/rm1 +++ b/tests/rm/rm1 @@ -20,8 +20,8 @@ print_ver_ rm skip_if_root_ -mkdir -p b/a/p b/c b/d || framework_failure -chmod u-w b/a || framework_failure +mkdir -p b/a/p b/c b/d || framework_failure_ +chmod u-w b/a || framework_failure_ # This should fail. diff --git a/tests/rm/rm2 b/tests/rm/rm2 index c73349f0b..0cd089291 100755 --- a/tests/rm/rm2 +++ b/tests/rm/rm2 @@ -20,10 +20,10 @@ print_ver_ rm skip_if_root_ -mkdir -p a/0 || framework_failure -mkdir -p a/1/2 b/3 || framework_failure -mkdir a/2 a/3 || framework_failure -chmod u-x a/1 b || framework_failure +mkdir -p a/0 || framework_failure_ +mkdir -p a/1/2 b/3 || framework_failure_ +mkdir a/2 a/3 || framework_failure_ +chmod u-x a/1 b || framework_failure_ # Exercise two separate code paths -- though both result diff --git a/tests/rm/rm3 b/tests/rm/rm3 index 5e1eb71a4..56aea8c1e 100755 --- a/tests/rm/rm3 +++ b/tests/rm/rm3 @@ -20,14 +20,14 @@ print_ver_ rm skip_if_root_ -mkdir -p z || framework_failure -cd z || framework_failure -touch empty empty-u || framework_failure +mkdir -p z || framework_failure_ +cd z || framework_failure_ +touch empty empty-u || framework_failure_ echo not-empty > fu ln -s empty-f slink ln -s . slinkdot -mkdir d du || framework_failure -chmod u-w fu du empty-u || framework_failure +mkdir d du || framework_failure_ +chmod u-w fu du empty-u || framework_failure_ cd .. diff --git a/tests/rm/rm4 b/tests/rm/rm4 index a02cf740d..08ed64ad8 100755 --- a/tests/rm/rm4 +++ b/tests/rm/rm4 @@ -20,7 +20,7 @@ print_ver_ rm skip_if_root_ -mkdir dir || framework_failure +mkdir dir || framework_failure_ # This should fail. diff --git a/tests/rm/rm5 b/tests/rm/rm5 index 54d0e4ce9..5c33bf729 100755 --- a/tests/rm/rm5 +++ b/tests/rm/rm5 @@ -20,14 +20,14 @@ print_ver_ rm skip_if_root_ -mkdir -p d/e || framework_failure -cat <<EOF > in || framework_failure +mkdir -p d/e || framework_failure_ +cat <<EOF > in || framework_failure_ y y y EOF -cat <<\EOF > exp || framework_failure +cat <<\EOF > exp || framework_failure_ rm: descend into directory `d' rm: remove directory `d/e' rm: remove directory `d' diff --git a/tests/rm/unread2 b/tests/rm/unread2 index d41e7a72f..ae3365f25 100755 --- a/tests/rm/unread2 +++ b/tests/rm/unread2 @@ -20,7 +20,7 @@ print_ver_ rm skip_if_root_ -mkdir -p a/b || framework_failure +mkdir -p a/b || framework_failure_ chmod u-r a diff --git a/tests/rm/unread3 b/tests/rm/unread3 index 021662b08..7553af5c3 100755 --- a/tests/rm/unread3 +++ b/tests/rm/unread3 @@ -20,7 +20,7 @@ print_ver_ rm skip_if_root_ -mkdir -p a/1 b c d/2 e/3 || framework_failure +mkdir -p a/1 b c d/2 e/3 || framework_failure_ t=`pwd` diff --git a/tests/rm/v-slash b/tests/rm/v-slash index ba3855333..6620742ec 100755 --- a/tests/rm/v-slash +++ b/tests/rm/v-slash @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rm -mkdir a || framework_failure -touch a/x || framework_failure +mkdir a || framework_failure_ +touch a/x || framework_failure_ rm --verbose -r a/// > out || fail=1 diff --git a/tests/rmdir/fail-perm b/tests/rmdir/fail-perm index 9af747b85..8d012c048 100755 --- a/tests/rmdir/fail-perm +++ b/tests/rmdir/fail-perm @@ -20,8 +20,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rmdir -mkdir d d/e d/e/f || framework_failure -chmod a-w d || framework_failure +mkdir d d/e d/e/f || framework_failure_ +chmod a-w d || framework_failure_ # This rmdir command outputs two diagnostics. diff --git a/tests/rmdir/ignore b/tests/rmdir/ignore index b6faaeadd..c8db2243c 100755 --- a/tests/rmdir/ignore +++ b/tests/rmdir/ignore @@ -20,7 +20,7 @@ print_ver_ rmdir cwd=`pwd` -mkdir -p "$cwd/a/b/c" "$cwd/a/x" || framework_failure +mkdir -p "$cwd/a/b/c" "$cwd/a/x" || framework_failure_ rmdir -p --ignore-fail-on-non-empty "$cwd/a/b/c" || fail=1 # $cwd/a/x should remain diff --git a/tests/rmdir/t-slash b/tests/rmdir/t-slash index e7785c372..902743381 100755 --- a/tests/rmdir/t-slash +++ b/tests/rmdir/t-slash @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rmdir -mkdir dir || framework_failure +mkdir dir || framework_failure_ # Prior to coreutils-4.5.2, this would fail with the following: diff --git a/tests/split/b-chunk b/tests/split/b-chunk index 48c57e077..3191620aa 100755 --- a/tests/split/b-chunk +++ b/tests/split/b-chunk @@ -29,7 +29,7 @@ rm x?? split -e -n 10 /dev/null || fail=1 stat x?? 2>/dev/null && fail=1 -printf '1\n2\n3\n4\n5\n' > in || framework_failure +printf '1\n2\n3\n4\n5\n' > in || framework_failure_ split -n 3 in > out || fail=1 split -n 1/3 in > b1 || fail=1 diff --git a/tests/split/fail b/tests/split/fail index 1fe368cf2..039f457a3 100755 --- a/tests/split/fail +++ b/tests/split/fail @@ -20,7 +20,7 @@ print_ver_ split getlimits_ -touch in || framework_failure +touch in || framework_failure_ split -a 0 in 2> /dev/null || fail=1 diff --git a/tests/split/l-chunk b/tests/split/l-chunk index 8b4d157a1..7bf698989 100755 --- a/tests/split/l-chunk +++ b/tests/split/l-chunk @@ -48,7 +48,7 @@ stat x?? 2>/dev/null && fail=1 lines=\ 12345~1~12345~1~12345~1~12345~1~12345~~~12345~1~12345~1~12345~1~12345~1~12345~1~ -printf "%s" "$lines" | tr '~' '\n' > in || framework_failure +printf "%s" "$lines" | tr '~' '\n' > in || framework_failure_ echo 'split: 16: invalid chunk number' > exp split -n l/16/15 in 2>err && fail=1 @@ -60,9 +60,9 @@ printf '%s' "\ 06 08 08 02 06 08 08 02 06 08 08 10 06 08 02 06 08 00 08 02 06 08 02 06 08 00 10 06 00 08 00 02 06 00 02 06 00 08 00 01 07 00 02 06 00 08 00 02 16 -" > exp || framework_failure +" > exp || framework_failure_ -sed 's/00 *//g' exp > exp.elide_empty || framework_failure +sed 's/00 *//g' exp > exp.elide_empty || framework_failure_ DEBUGGING= test "$DEBUGGING" && test "$VERBOSE" && set +x diff --git a/tests/split/lines b/tests/split/lines index 932c178e5..1612c2e23 100755 --- a/tests/split/lines +++ b/tests/split/lines @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ split -printf '1\n2\n3\n4\n5\n' > in || framework_failure +printf '1\n2\n3\n4\n5\n' > in || framework_failure_ split --lines=2 in > out || fail=1 cat <<\EOF > exp-1 diff --git a/tests/split/r-chunk b/tests/split/r-chunk index d3165fb79..ea2ac9f20 100755 --- a/tests/split/r-chunk +++ b/tests/split/r-chunk @@ -31,7 +31,7 @@ rm x?? split -e -n r/10 /dev/null || fail=1 stat x?? 2>/dev/null && fail=1 -printf '1\n2\n3\n4\n5\n' > in || framework_failure +printf '1\n2\n3\n4\n5\n' > in || framework_failure_ split -n r/3 in > out || fail=1 test -s out && fail=1 diff --git a/tests/split/suffix-length b/tests/split/suffix-length index 7577aaa50..efb0d8166 100755 --- a/tests/split/suffix-length +++ b/tests/split/suffix-length @@ -22,7 +22,7 @@ print_ver_ split a_z='a b c d e f g h i j k l m n o p q r s t u v w x y z' # Generate a 27-byte file -printf %s $a_z 0 |tr -d ' ' > in || framework_failure +printf %s $a_z 0 |tr -d ' ' > in || framework_failure_ files= for i in $a_z; do @@ -32,10 +32,10 @@ files="${files}xba" for f in $files; do printf 'creating file `%s'\''\n' $f -done > exp || framework_failure +done > exp || framework_failure_ echo split: output file suffixes exhausted \ - > exp-too-short || framework_failure + > exp-too-short || framework_failure_ # This should fail. diff --git a/tests/tail-2/F-vs-rename b/tests/tail-2/F-vs-rename index b615ad3e6..5b4223e2b 100755 --- a/tests/tail-2/F-vs-rename +++ b/tests/tail-2/F-vs-rename @@ -21,7 +21,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ tail -touch a b || framework_failure +touch a b || framework_failure_ debug='---disable-inotify' debug= diff --git a/tests/tail-2/big-4gb b/tests/tail-2/big-4gb index 11faed5fb..874081168 100755 --- a/tests/tail-2/big-4gb +++ b/tests/tail-2/big-4gb @@ -25,8 +25,8 @@ expensive_ # at the beginning and another set of 8 bytes at the end. # The rest will be NUL bytes. On most modern systems, the following # creates a file that takes up only a few KB. Here, du -sh says 16K. -echo abcdefgh | tr -d '\n' > big || framework_failure -echo 87654321 | tr -d '\n' > tmp || framework_failure +echo abcdefgh | tr -d '\n' > big || framework_failure_ +echo 87654321 | tr -d '\n' > tmp || framework_failure_ # Seek 4GB - 8 dd bs=1 seek=4294967288 if=tmp of=big 2> err || dd_failed=1 if test "$dd_failed" = 1; then diff --git a/tests/tail-2/follow-stdin b/tests/tail-2/follow-stdin index e79f8f0a0..51520ab67 100755 --- a/tests/tail-2/follow-stdin +++ b/tests/tail-2/follow-stdin @@ -19,8 +19,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ tail -echo line > exp || framework_failure -echo line > in || framework_failure +echo line > exp || framework_failure_ +echo line > in || framework_failure_ timeout 1 tail -f < in > out 2> err diff --git a/tests/tail-2/inotify-hash-abuse b/tests/tail-2/inotify-hash-abuse index a01e57498..9415f9692 100755 --- a/tests/tail-2/inotify-hash-abuse +++ b/tests/tail-2/inotify-hash-abuse @@ -21,7 +21,7 @@ print_ver_ tail # 9 is a magic number, related to internal details of tail.c and hash.c n=9 -seq $n | xargs touch || framework_failure +seq $n | xargs touch || framework_failure_ debug='---disable-inotify' debug= diff --git a/tests/tail-2/inotify-hash-abuse2 b/tests/tail-2/inotify-hash-abuse2 index fc2b24b9c..424c2ebde 100755 --- a/tests/tail-2/inotify-hash-abuse2 +++ b/tests/tail-2/inotify-hash-abuse2 @@ -20,7 +20,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ tail -touch f || framework_failure +touch f || framework_failure_ debug='---disable-inotify -s .001' debug= diff --git a/tests/tail-2/inotify-race b/tests/tail-2/inotify-race index b88b8473c..6c4c02b65 100755 --- a/tests/tail-2/inotify-race +++ b/tests/tail-2/inotify-race @@ -28,8 +28,8 @@ print_ver_ tail # cleanup and exit correctly when it receives a SIGTERM, thus hanging the test. very_expensive_ -touch file || framework_failure -touch tail.out || framework_failure +touch file || framework_failure_ +touch tail.out || framework_failure_ ( timeout 10s gdb --version ) > gdb.out 2>&1 case $(cat gdb.out) in diff --git a/tests/tail-2/pid b/tests/tail-2/pid index f75c3deb2..31594e22f 100755 --- a/tests/tail-2/pid +++ b/tests/tail-2/pid @@ -20,7 +20,7 @@ print_ver_ tail getlimits_ -touch empty here || framework_failure +touch empty here || framework_failure_ for inotify in ---disable-inotify ''; do diff --git a/tests/tail-2/pipe-f2 b/tests/tail-2/pipe-f2 index 3422c23cf..f1ae47015 100755 --- a/tests/tail-2/pipe-f2 +++ b/tests/tail-2/pipe-f2 @@ -22,7 +22,7 @@ print_ver_ tail mkfifo_or_skip_ fifo echo 1 > fifo & -echo 1 > exp || framework_failure +echo 1 > exp || framework_failure_ timeout 10 tail -f fifo > out test $? = 124 || fail=1 diff --git a/tests/tail-2/start-middle b/tests/tail-2/start-middle index ab6ad5763..3dcbacbf9 100755 --- a/tests/tail-2/start-middle +++ b/tests/tail-2/start-middle @@ -20,7 +20,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ tail -(echo 1; echo 2) > k || framework_failure +(echo 1; echo 2) > k || framework_failure_ sh -c 'read x; tail' < k > out || fail=1 diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f index d17a6c238..1720a6eca 100755 --- a/tests/tail-2/tail-n0f +++ b/tests/tail-2/tail-n0f @@ -26,8 +26,8 @@ print_ver_ tail require_proc_pid_status_ -touch empty || framework_failure -echo anything > nonempty || framework_failure +touch empty || framework_failure_ +echo anything > nonempty || framework_failure_ for inotify in ---disable-inotify ''; do diff --git a/tests/tail-2/wait b/tests/tail-2/wait index 8fd19948c..a1119703e 100755 --- a/tests/tail-2/wait +++ b/tests/tail-2/wait @@ -20,8 +20,8 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ tail -touch here || framework_failure -{ touch unreadable && chmod a-r unreadable; } || framework_failure +touch here || framework_failure_ +{ touch unreadable && chmod a-r unreadable; } || framework_failure_ for inotify in ---disable-inotify ''; do @@ -58,7 +58,7 @@ for inotify in ---disable-inotify ''; do { local delay="$1" - touch k || framework_failure + touch k || framework_failure_ tail -s.1 --max-unchanged-stats=2 -F $inotify k > tail.out & pid=$! sleep $delay diff --git a/tests/touch/60-seconds b/tests/touch/60-seconds index 1bf312310..578aedc53 100755 --- a/tests/touch/60-seconds +++ b/tests/touch/60-seconds @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ touch -echo 60.000000000 > exp || framework_failure +echo 60.000000000 > exp || framework_failure_ # Before coreutils-7.7, this would fail, complaining of diff --git a/tests/touch/empty-file b/tests/touch/empty-file index 9c9804363..9af34e1fa 100755 --- a/tests/touch/empty-file +++ b/tests/touch/empty-file @@ -36,12 +36,12 @@ SLEEP_SECONDS=${SLEEP_SECONDS=$DEFAULT_SLEEP_SECONDS} for d in $TOUCH_DIR_LIST; do rm -rf $d/a $d/b $d/c - > $d/a || framework_failure - test -f $d/a || framework_failure - > $d/b || framework_failure - test -f $d/b || framework_failure - > $d/c || framework_failure - test -f $d/c || framework_failure + > $d/a || framework_failure_ + test -f $d/a || framework_failure_ + > $d/b || framework_failure_ + test -f $d/b || framework_failure_ + > $d/c || framework_failure_ + test -f $d/c || framework_failure_ done echo sleeping for $SLEEP_SECONDS seconds... diff --git a/tests/touch/no-dereference b/tests/touch/no-dereference index b73274627..cf69ffcc8 100755 --- a/tests/touch/no-dereference +++ b/tests/touch/no-dereference @@ -19,9 +19,9 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ touch -ln -s nowhere dangling || framework_failure -touch file || framework_failure -ln -s file link || framework_failure +ln -s nowhere dangling || framework_failure_ +touch file || framework_failure_ +ln -s file link || framework_failure_ # These first tests should work on every platform. diff --git a/tests/touch/no-rights b/tests/touch/no-rights index 159062b7b..d8b4ae64b 100755 --- a/tests/touch/no-rights +++ b/tests/touch/no-rights @@ -21,11 +21,11 @@ print_ver_ touch # Make sure t2 is newer than t1. -touch -d '2000-01-01 00:00' t1 || framework_failure -touch -d '2000-01-02 00:00' t2 || framework_failure +touch -d '2000-01-01 00:00' t1 || framework_failure_ +touch -d '2000-01-02 00:00' t2 || framework_failure_ set x `ls -t t1 t2` -test "$*" = "x t2 t1" || framework_failure +test "$*" = "x t2 t1" || framework_failure_ chmod 0 t1 diff --git a/tests/touch/now-owned-by-other b/tests/touch/now-owned-by-other index b4d5d04b0..23c245df0 100755 --- a/tests/touch/now-owned-by-other +++ b/tests/touch/now-owned-by-other @@ -23,8 +23,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/touch/read-only b/tests/touch/read-only index 4745786f0..58545548c 100755 --- a/tests/touch/read-only +++ b/tests/touch/read-only @@ -20,8 +20,8 @@ print_ver_ touch skip_if_root_ -: > read-only || framework_failure -chmod 444 read-only || framework_failure +: > read-only || framework_failure_ +chmod 444 read-only || framework_failure_ touch read-only || fail=1 diff --git a/tests/touch/relative b/tests/touch/relative index 47f358bd1..a530eaa67 100755 --- a/tests/touch/relative +++ b/tests/touch/relative @@ -20,7 +20,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ touch -TZ=UTC0 touch --date='2004-01-16 12:00 +0000' f || framework_failure +TZ=UTC0 touch --date='2004-01-16 12:00 +0000' f || framework_failure_ # Set times back by 5 days. diff --git a/tests/touch/trailing-slash b/tests/touch/trailing-slash index 2e2d2a747..605668feb 100755 --- a/tests/touch/trailing-slash +++ b/tests/touch/trailing-slash @@ -19,12 +19,12 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ touch -ln -s nowhere dangling || framework_failure -ln -s loop loop || framework_failure -touch file || framework_failure -ln -s file link1 || framework_failure -mkdir dir || framework_failure -ln -s dir link2 || framework_failure +ln -s nowhere dangling || framework_failure_ +ln -s loop loop || framework_failure_ +touch file || framework_failure_ +ln -s file link1 || framework_failure_ +mkdir dir || framework_failure_ +ln -s dir link2 || framework_failure_ # Trailing slash can only appear on directory or symlink-to-directory. |