mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-20 18:56:39 +02:00
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:
committed by
Jim Meyering
parent
8e2767a3f0
commit
554caaf6ff
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user