summaryrefslogtreecommitdiff
path: root/tests/ls
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ls')
-rwxr-xr-xtests/ls/abmon-align1
-rwxr-xr-xtests/ls/capability1
-rwxr-xr-xtests/ls/color-clear-to-eol1
-rwxr-xr-xtests/ls/color-dtype-dir1
-rwxr-xr-xtests/ls/dangle1
-rwxr-xr-xtests/ls/dired1
-rwxr-xr-xtests/ls/file-type1
-rwxr-xr-xtests/ls/follow-slink1
-rwxr-xr-xtests/ls/infloop1
-rwxr-xr-xtests/ls/inode1
-rwxr-xr-xtests/ls/m-option1
-rwxr-xr-xtests/ls/multihardlink1
-rwxr-xr-xtests/ls/nameless-uid1
-rwxr-xr-xtests/ls/no-arg1
-rwxr-xr-xtests/ls/no-cap1
-rwxr-xr-xtests/ls/proc-selinux-segfault1
-rwxr-xr-xtests/ls/readdir-mountpoint-inode1
-rwxr-xr-xtests/ls/recursive1
-rwxr-xr-xtests/ls/rt-11
-rwxr-xr-xtests/ls/stat-dtype1
-rwxr-xr-xtests/ls/stat-failed1
-rwxr-xr-xtests/ls/stat-free-symlinks1
-rwxr-xr-xtests/ls/stat-vs-dirent1
-rwxr-xr-xtests/ls/symlink-slash1
-rwxr-xr-xtests/ls/x-option1
25 files changed, 0 insertions, 25 deletions
diff --git a/tests/ls/abmon-align b/tests/ls/abmon-align
index 47df97ac0..51c32aba2 100755
--- a/tests/ls/abmon-align
+++ b/tests/ls/abmon-align
@@ -27,7 +27,6 @@ for mon in $(seq -w 12); do
touch -d"+$mon month" $mon.ts || framework_failure
done
-fail=0
# Note some of the following locales may be missing but if so
# we should fail back to the C locale which should be aligned
diff --git a/tests/ls/capability b/tests/ls/capability
index c45f54241..958a8ddb6 100755
--- a/tests/ls/capability
+++ b/tests/ls/capability
@@ -29,7 +29,6 @@ grep '^#define HAVE_CAP 1$' $CONFIG_HEADER > /dev/null \
(setcap --help) 2>&1 |grep 'usage: setcap' > /dev/null \
|| skip_test_ "setcap utility not found"
-fail=0
# Don't let a different umask perturb the results.
umask 22
diff --git a/tests/ls/color-clear-to-eol b/tests/ls/color-clear-to-eol
index fd65ced08..aa8cf4e77 100755
--- a/tests/ls/color-clear-to-eol
+++ b/tests/ls/color-clear-to-eol
@@ -32,7 +32,6 @@ c_pre="$e[0m$e[${color_code}m"
c_post="$e[0m$e[K\n$e[m"
printf "$c_pre$long_name$c_post\n" > exp || framework_failure
-fail=0
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 3ccf10eb8..526d9e9c1 100755
--- a/tests/ls/color-dtype-dir
+++ b/tests/ls/color-dtype-dir
@@ -33,7 +33,6 @@ mkdir d other-writable sticky || framework_failure
chmod o+w other-writable || framework_failure
chmod o+t sticky || framework_failure
-fail=0
ls --color=always > out || fail=1
cat -A out > o1 || fail=1
diff --git a/tests/ls/dangle b/tests/ls/dangle
index 687d3dfba..1f4ca2659 100755
--- a/tests/ls/dangle
+++ b/tests/ls/dangle
@@ -31,7 +31,6 @@ 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
-fail=0
# This must exit nonzero.
ls -L dangle > /dev/null 2>&1 && fail=1
diff --git a/tests/ls/dired b/tests/ls/dired
index a2a2ded9d..b4607e15f 100755
--- a/tests/ls/dired
+++ b/tests/ls/dired
@@ -25,7 +25,6 @@ fi
mkdir dir || framework_failure
-fail=0
LC_MESSAGES=C ls -lR --dired dir > out || fail=1
cat <<EOF > exp
diff --git a/tests/ls/file-type b/tests/ls/file-type
index d4b240f82..60db1d0b6 100755
--- a/tests/ls/file-type
+++ b/tests/ls/file-type
@@ -39,7 +39,6 @@ mkfifo fifo
cd ..
-fail=0
ls -F sub > out || fail=1
cat <<EOF > exp
diff --git a/tests/ls/follow-slink b/tests/ls/follow-slink
index 27b2a1c52..ba2df3f70 100755
--- a/tests/ls/follow-slink
+++ b/tests/ls/follow-slink
@@ -34,7 +34,6 @@ ln -s ../../dir1 sub/link-to-dir || framework_failure
# systems running some DJGPP-2.03 libc.
ls -F link > /dev/null || framework_failure
-fail=0
# When explicitly listing a broken link, the command must fail.
ls -L link 2> /dev/null && fail=1
diff --git a/tests/ls/infloop b/tests/ls/infloop
index b77f88cdb..d32e9782c 100755
--- a/tests/ls/infloop
+++ b/tests/ls/infloop
@@ -36,7 +36,6 @@ cat <<\EOF > exp-err || framework_failure
ls: loop/sub: not listing already-listed directory
EOF
-fail=0
timeout 1 ls -RL loop 2>err > out
# Ensure that ls exits with status 2 upon detecting a cycle
diff --git a/tests/ls/inode b/tests/ls/inode
index f911984a5..58130e236 100755
--- a/tests/ls/inode
+++ b/tests/ls/inode
@@ -26,7 +26,6 @@ fi
touch f || framework_failure
ln -s f slink || framework_failure
-fail=0
# When listed explicitly:
diff --git a/tests/ls/m-option b/tests/ls/m-option
index 836d50ead..1c2c291e1 100755
--- a/tests/ls/m-option
+++ b/tests/ls/m-option
@@ -26,7 +26,6 @@ fi
seq 2000 > b || framework_failure
touch a || framework_failure
-fail=0
# Before coreutils-5.1.1, the following would output a space after the comma.
ls -w2 -m a b > out || fail=1
diff --git a/tests/ls/multihardlink b/tests/ls/multihardlink
index 815222db0..cbe6330cd 100755
--- a/tests/ls/multihardlink
+++ b/tests/ls/multihardlink
@@ -34,7 +34,6 @@ c_end=$(printf '\033[m')
c_mh=$(printf '\033[%sm' $code_mh)
c_ex=$(printf '\033[%sm' $code_ex)
c_png=$(printf '\033[%sm' $code_png)
-fail=0
# regular file - not hard linked
LS_COLORS="mh=$code_mh" ls -U1 --color=always file > out || fail=1
diff --git a/tests/ls/nameless-uid b/tests/ls/nameless-uid
index a29b17081..4fe0f6559 100755
--- a/tests/ls/nameless-uid
+++ b/tests/ls/nameless-uid
@@ -36,7 +36,6 @@ fi
touch f || framework_failure
chown $nameless_uid f || framework_failure
-fail=0
set -- `ls -o f` || fail=1
test $3 = $nameless_uid || fail=1
diff --git a/tests/ls/no-arg b/tests/ls/no-arg
index e2c7f41ac..a3421c878 100755
--- a/tests/ls/no-arg
+++ b/tests/ls/no-arg
@@ -34,7 +34,6 @@ out
symlink
EOF
-fail=0
ls -1 > out || fail=1
diff --git a/tests/ls/no-cap b/tests/ls/no-cap
index c551f1745..c2ddf7507 100755
--- a/tests/ls/no-cap
+++ b/tests/ls/no-cap
@@ -24,7 +24,6 @@ fi
. $srcdir/test-lib.sh
require_strace_ capget
-fail=0
strace -e capget ls --color=always > /dev/null 2> out || fail=1
$EGREP 'capget\(' out || skip_test_ "your ls doesn't call capget"
diff --git a/tests/ls/proc-selinux-segfault b/tests/ls/proc-selinux-segfault
index 362e6fa3d..37caf6c87 100755
--- a/tests/ls/proc-selinux-segfault
+++ b/tests/ls/proc-selinux-segfault
@@ -26,7 +26,6 @@ fi
f=/proc/sys
test -r $f || f=.
-fail=0
ls -l $f > out || fail=1
Exit $fail
diff --git a/tests/ls/readdir-mountpoint-inode b/tests/ls/readdir-mountpoint-inode
index 763cab186..c0214732a 100755
--- a/tests/ls/readdir-mountpoint-inode
+++ b/tests/ls/readdir-mountpoint-inode
@@ -23,7 +23,6 @@ fi
. $srcdir/test-lib.sh
-fail=0
mount_points=$(df --local -P 2>&1 | sed -n 's,.*[0-9]% \(/.\),\1,p')
test -z "$mount_points" && skip_test_ "this test requires a non-root mount point"
diff --git a/tests/ls/recursive b/tests/ls/recursive
index 5a9a4dd38..28f58f323 100755
--- a/tests/ls/recursive
+++ b/tests/ls/recursive
@@ -27,7 +27,6 @@ fi
mkdir x y a b c a/1 a/2 a/3 || framework_failure
touch f a/1/I a/1/II || framework_failure
-fail=0
# This first example is from Andreas Schwab's bug report.
ls -R1 a b c > out || fail=1
diff --git a/tests/ls/rt-1 b/tests/ls/rt-1
index 564eb3ef5..5ebced6a3 100755
--- a/tests/ls/rt-1
+++ b/tests/ls/rt-1
@@ -31,7 +31,6 @@ touch -d "$date" c || framework_failure
touch -d "$date" a || framework_failure
touch -d "$date" b || framework_failure
-fail=0
ls -1t a b c > out || fail=1
cat <<EOF > exp
diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype
index 98642b3be..cdecd710d 100755
--- a/tests/ls/stat-dtype
+++ b/tests/ls/stat-dtype
@@ -44,7 +44,6 @@ chmod 600 d || framework_failure
mkdir -p e/a2345 e/b || framework_failure
chmod 600 e || framework_failure
-fail=0
ls --file-type d > out || fail=1
cat <<\EOF > exp || fail=1
diff --git a/tests/ls/stat-failed b/tests/ls/stat-failed
index c134273a4..cb31a985d 100755
--- a/tests/ls/stat-failed
+++ b/tests/ls/stat-failed
@@ -29,7 +29,6 @@ mkdir d || framework_failure
ln -s / d/s || framework_failure
chmod 600 d || framework_failure
-fail=0
ls -Log d > out
test $? = 1 || fail=1
diff --git a/tests/ls/stat-free-symlinks b/tests/ls/stat-free-symlinks
index 579362e7e..86d871e9f 100755
--- a/tests/ls/stat-free-symlinks
+++ b/tests/ls/stat-free-symlinks
@@ -28,7 +28,6 @@ touch x || framework_failure
chmod a+x x || framework_failure
ln -s x link-to-x || framework_failure
-fail=0
# ls from coreutils 6.9 would unnecessarily stat a symlink in an unusual case:
# When not coloring orphan and missing entries, and without ln=target,
diff --git a/tests/ls/stat-vs-dirent b/tests/ls/stat-vs-dirent
index 9f2b14925..73d6e8351 100755
--- a/tests/ls/stat-vs-dirent
+++ b/tests/ls/stat-vs-dirent
@@ -23,7 +23,6 @@ fi
. $srcdir/test-lib.sh
-fail=0
root_dev_ino=`stat --format=%d-%i /`
t=`pwd`
diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash
index c2dd8e7a9..704e2a398 100755
--- a/tests/ls/symlink-slash
+++ b/tests/ls/symlink-slash
@@ -26,7 +26,6 @@ fi
mkdir dir || framework_failure
ln -s dir symlink || framework_failure
-fail=0
set `ls -l symlink/`
# Prior to fileutils-4.0k, the following would have output `... symlink -> dir'.
diff --git a/tests/ls/x-option b/tests/ls/x-option
index 5079885f1..ea94d49e7 100755
--- a/tests/ls/x-option
+++ b/tests/ls/x-option
@@ -27,7 +27,6 @@ mkdir subdir || framework_failure
touch subdir/b || framework_failure
touch subdir/a || framework_failure
-fail=0
# Coreutils 6.8 and 6.9 would output this in the wrong order.
ls -x subdir > out || fail=1