tests: complete the renaming framework_failure -> framework_failure_

These changes were mostly mechanical, made by running the
following command:

  git grep -lw framework_failure | grep -v ChangeLog \
    | xargs perl -pi -e 's/\b(framework_failure)\b/${1}_/'

and then editing init.cfg and `tests/cp/cp-a-selinux' by hand.

* tests/init.cfg (framework_failure): Remove, `framework_failure_'
from init.sh should be used instead in the tests.
Remove now-obsolete "FIXME" comment.
(is_local_dir_, require_strace_, require_membership_in_two_groups_,
require_sparse_support_, skip_if_mcstransd_is_running_,
mkfifo_or_skip_) Use `framework_failure_', not `framework_failure'.
* Many test scripts: Likewise.
This commit is contained in:
Stefano Lattarini authored and Jim Meyering committed 2011-08-08 10:11:48 +02:00
1 parent 8e2767a3f0
commit 554caaf6ff
250 files changed
+735 -739

No files matched your search

+1 -1
View File
@@ -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`
+2 -2
View File
@@ -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.
+5 -5
View File
@@ -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
+2 -2
View File
@@ -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_
+1 -1
View File
@@ -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
+1 -1
View File
@@ -21,7 +21,7 @@
. "${srcdir=.}/init.sh"; path_prepend_ ../src
print_ver_ chmod
touch f || framework_failure
touch f || framework_failure_
expected_u=-rwx------
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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.
+2 -2
View File
@@ -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.
+1 -1
View File
@@ -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.
+3 -3
View File
@@ -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
;;
+1 -1
View File
@@ -20,7 +20,7 @@
print_ver_ chgrp
require_root_
touch f || framework_failure
touch f || framework_failure_
chown -R --preserve-root 0:1 f
+1 -1
View File
@@ -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
+8 -8
View File
@@ -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
+4 -4
View File
@@ -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.
+8 -8
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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"
+4 -4
View File
@@ -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
+9 -9
View File
@@ -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
+3 -3
View File
@@ -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:
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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"
+4 -4
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View 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.
+5 -5
View File
@@ -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.
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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.
+3 -3
View File
@@ -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
+4 -4
View File
@@ -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
+1 -1
View File
@@ -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,
+6 -6
View File
@@ -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/.*,,'`
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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.
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+5 -5
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+6 -6
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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`
+4 -4
View File
@@ -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:
+4 -4
View File
@@ -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
+5 -5
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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
+3 -3
View 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
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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
+5 -5
View File
@@ -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:
+4 -4
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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
+7 -7
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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.
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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.
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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
+7 -11
View File
@@ -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
+3 -3
View File
@@ -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.
+8 -8
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+6 -6
View File
@@ -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'*) ;;
+25 -25
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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
+6 -6
View File
@@ -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$
+7 -7
View File
@@ -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.
+1 -1
View File
@@ -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
+5 -5
View File
@@ -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.
+4 -4
View File
@@ -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
+2 -2
View File
@@ -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:
Loaded 100 of 250 files, more files were not shown because too many files have changed in this diff. Show more