summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko2010-05-11 03:53:57 +0200
committerDenys Vlasenko2010-05-11 03:53:57 +0200
commitbfa1b2e8e8aaddcf849011a12cb2ac634b27f339 (patch)
tree4a5fbaef1371fb8b2ca504e753fa2a31d25234d4 /testsuite
parent6334390aef2eb52cc827a6d18f942b2b8a04ef59 (diff)
downloadbusybox-bfa1b2e8e8aaddcf849011a12cb2ac634b27f339.zip
busybox-bfa1b2e8e8aaddcf849011a12cb2ac634b27f339.tar.gz
randomtest fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/ar.tests4
-rwxr-xr-xtestsuite/awk.tests2
-rwxr-xr-xtestsuite/busybox.tests7
-rwxr-xr-xtestsuite/cpio.tests2
-rwxr-xr-xtestsuite/diff.tests10
-rw-r--r--testsuite/du/du-h-works2
-rw-r--r--testsuite/du/du-l-works2
-rw-r--r--testsuite/du/du-m-works2
-rw-r--r--testsuite/du/du-s-works2
-rw-r--r--testsuite/du/du-works2
-rw-r--r--testsuite/echo/echo-does-not-print-newline2
-rw-r--r--testsuite/echo/echo-prints-slash-zero2
-rw-r--r--testsuite/find/find-supports-minus-xdev2
-rw-r--r--testsuite/ls/ls-1-works2
-rw-r--r--testsuite/ls/ls-h-works2
-rwxr-xr-xtestsuite/makedevs.tests2
-rw-r--r--testsuite/md5sum/md5sum-verifies-non-binary-file2
-rwxr-xr-xtestsuite/mdev.tests22
-rwxr-xr-xtestsuite/mount.tests15
-rwxr-xr-xtestsuite/od.tests2
-rwxr-xr-xtestsuite/patch.tests2
-rwxr-xr-xtestsuite/pidof.tests4
-rwxr-xr-xtestsuite/sort.tests2
-rw-r--r--testsuite/tail/tail-works2
-rwxr-xr-xtestsuite/tar.tests6
-rw-r--r--testsuite/tar/tar_with_prefix_fields1
-rwxr-xr-xtestsuite/tr.tests6
-rw-r--r--testsuite/tr/tr-d-alnum-works2
-rw-r--r--testsuite/tr/tr-rejects-wrong-class2
-rw-r--r--testsuite/tr/tr-works2
30 files changed, 89 insertions, 28 deletions
diff --git a/testsuite/ar.tests b/testsuite/ar.tests
index f112eb6..4630d08 100755
--- a/testsuite/ar.tests
+++ b/testsuite/ar.tests
@@ -18,10 +18,10 @@ testing "ar creates archives" \
rm test.a
testing "ar replaces things in archives" \
- "echo 'blah!' >file1 && echo 'blast!'> file2 && ar cr test.a README file1 file2 && mv file2 file1 && ar cr test.a file1 && ar p test.a file1" \
+ "echo 'blah!' >file1 && echo 'blast!' >file2 && ar cr test.a README file1 file2 && mv file2 file1 && ar cr test.a file1 && ar p test.a file1" \
"blast!\n" \
"" \
""
-rm test.a
+rm test.a file1 file1 2>/dev/null
exit $FAILCOUNT
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index efa03a7..0691a79 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -18,9 +18,11 @@ testing "awk -F case 7" "awk -F '[#]' '{ print NF }'" "5\n" "" "z##abc##zz\n"
# 4294967295 = 0xffffffff
testing "awk bitwise op" "awk '{ print or(4294967295,1) }'" "4.29497e+09\n" "" "\n"
+optional DESKTOP
testing "awk hex const 1" "awk '{ print or(0xffffffff,1) }'" "4.29497e+09\n" "" "\n"
testing "awk hex const 2" "awk '{ print or(0x80000000,1) }'" "2.14748e+09\n" "" "\n"
testing "awk oct const" "awk '{ print or(01234,1) }'" "669\n" "" "\n"
+SKIP=
# long field seps requiring regex
testing "awk long field sep" "awk -F-- '{ print NF, length(\$NF), \$NF }'" \
diff --git a/testsuite/busybox.tests b/testsuite/busybox.tests
index 6eeb325..18ac36f 100755
--- a/testsuite/busybox.tests
+++ b/testsuite/busybox.tests
@@ -10,8 +10,9 @@ HELPDUMP=`true | busybox 2>&1 | cat`
# We need to test under calling the binary under other names.
-
+optional SHOW_USAGE
testing "busybox --help busybox" "true | busybox --help busybox 2>&1 | cat" "$HELPDUMP\n\n" "" ""
+SKIP=
ln -s `which busybox` busybox-suffix
for i in busybox ./busybox-suffix
@@ -26,11 +27,11 @@ do
testing "$i --help" "$i --help 2>&1" "$HELPDUMP\n\n" "" ""
- optional CAT
+ optional SHOW_USAGE CAT
testing "" "$i cat" "moo" "" "moo"
testing "$i --help cat" "$i --help cat 2>&1 | grep print" \
"Concatenate FILEs and print them to stdout\n" "" ""
- optional ""
+ SKIP=
testing "$i --help unknown" "$i --help unknown 2>&1" \
"unknown: applet not found\n" "" ""
diff --git a/testsuite/cpio.tests b/testsuite/cpio.tests
index b4c41dd..8cb8b78 100755
--- a/testsuite/cpio.tests
+++ b/testsuite/cpio.tests
@@ -31,6 +31,7 @@ rm -rf cpio.testdir cpio.testdir2 2>/dev/null
# testing "test name" "command" "expected result" "file input" "stdin"
+optional FEATURE_LS_SORTFILES
testing "cpio extracts zero-sized hardlinks" \
"$ECHO -ne '$hexdump' | bzcat | cpio -i 2>&1; echo \$?;
ls -ln cpio.testdir | $FILTER_LS" \
@@ -41,6 +42,7 @@ ls -ln cpio.testdir | $FILTER_LS" \
-rw-r--r-- 2 $user $group 0 y
" \
"" ""
+SKIP=
test x"$SKIP_KNOWN_BUGS" = x"" && {
diff --git a/testsuite/diff.tests b/testsuite/diff.tests
index 72ebb6c..06d5a4f 100755
--- a/testsuite/diff.tests
+++ b/testsuite/diff.tests
@@ -106,6 +106,7 @@ rm -rf diff1 diff2
mkdir diff1 diff2 diff2/subdir
echo qwe >diff1/-
echo asd >diff2/subdir/-
+optional FEATURE_DIFF_DIR
testing "diff diff1 diff2/subdir" \
"diff -ur diff1 diff2/subdir | $TRIM_TAB" \
"\
@@ -116,8 +117,10 @@ testing "diff diff1 diff2/subdir" \
+asd
" \
"" ""
+SKIP=
# using directory structure from prev test...
+optional FEATURE_DIFF_DIR
testing "diff dir dir2/file/-" \
"diff -ur diff1 diff2/subdir/- | $TRIM_TAB" \
"\
@@ -128,10 +131,12 @@ testing "diff dir dir2/file/-" \
+asd
" \
"" ""
+SKIP=
# using directory structure from prev test...
mkdir diff1/test
mkfifo diff2/subdir/test
+optional FEATURE_DIFF_DIR
testing "diff of dir and fifo" \
"diff -ur diff1 diff2/subdir | $TRIM_TAB" \
"\
@@ -143,10 +148,12 @@ testing "diff of dir and fifo" \
Only in diff2/subdir: test
" \
"" ""
+SKIP=
# using directory structure from prev test...
rmdir diff1/test
echo >diff1/test
+optional FEATURE_DIFF_DIR
testing "diff of file and fifo" \
"diff -ur diff1 diff2/subdir | $TRIM_TAB" \
"\
@@ -158,9 +165,11 @@ testing "diff of file and fifo" \
File diff2/subdir/test is not a regular file or directory and was skipped
" \
"" ""
+SKIP=
# using directory structure from prev test...
mkfifo diff1/test2
+optional FEATURE_DIFF_DIR
testing "diff -rN does not read non-regular files" \
"diff -urN diff1 diff2/subdir | $TRIM_TAB" \
"\
@@ -173,6 +182,7 @@ File diff2/subdir/test is not a regular file or directory and was skipped
File diff1/test2 is not a regular file or directory and was skipped
" \
"" ""
+SKIP=
# clean up
rm -rf diff1 diff2
diff --git a/testsuite/du/du-h-works b/testsuite/du/du-h-works
index 3f8ff3d..a1b4b49 100644
--- a/testsuite/du/du-h-works
+++ b/testsuite/du/du-h-works
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_HUMAN_READABLE
+
d=/bin
du -h "$d" > logfile.gnu
busybox du -h "$d" > logfile.bb
diff --git a/testsuite/du/du-l-works b/testsuite/du/du-l-works
index c3d2ec0..64dcf87 100644
--- a/testsuite/du/du-l-works
+++ b/testsuite/du/du-l-works
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
+
d=/bin
du -l "$d" > logfile.gnu
busybox du -l "$d" > logfile.bb
diff --git a/testsuite/du/du-m-works b/testsuite/du/du-m-works
index bf0a90e..6e733c0 100644
--- a/testsuite/du/du-m-works
+++ b/testsuite/du/du-m-works
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_HUMAN_READABLE
+
d=/bin
du -m "$d" > logfile.gnu
busybox du -m "$d" > logfile.bb
diff --git a/testsuite/du/du-s-works b/testsuite/du/du-s-works
index ae97077..0c870ce 100644
--- a/testsuite/du/du-s-works
+++ b/testsuite/du/du-s-works
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
+
d=/bin
du -s "$d" > logfile.gnu
busybox du -s "$d" > logfile.bb
diff --git a/testsuite/du/du-works b/testsuite/du/du-works
index 46a336d..4db684a 100644
--- a/testsuite/du/du-works
+++ b/testsuite/du/du-works
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
+
d=/bin
du "$d" > logfile.gnu
busybox du "$d" > logfile.bb
diff --git a/testsuite/echo/echo-does-not-print-newline b/testsuite/echo/echo-does-not-print-newline
index 2ed03ca..2857c0d 100644
--- a/testsuite/echo/echo-does-not-print-newline
+++ b/testsuite/echo/echo-does-not-print-newline
@@ -1 +1,3 @@
+# FEATURE: CONFIG_FEATURE_FANCY_ECHO
+
test `busybox echo -n word | wc -c` -eq 4
diff --git a/testsuite/echo/echo-prints-slash-zero b/testsuite/echo/echo-prints-slash-zero
index d246632..d97ed8e 100644
--- a/testsuite/echo/echo-prints-slash-zero
+++ b/testsuite/echo/echo-prints-slash-zero
@@ -1 +1,3 @@
+# FEATURE: CONFIG_FEATURE_FANCY_ECHO
+
test "`busybox echo -e -n 'msg\n\0' | od -t x1 | head -n 1`" = "0000000 6d 73 67 0a 00"
diff --git a/testsuite/find/find-supports-minus-xdev b/testsuite/find/find-supports-minus-xdev
index 4c559a1..c807fc8 100644
--- a/testsuite/find/find-supports-minus-xdev
+++ b/testsuite/find/find-supports-minus-xdev
@@ -1 +1,3 @@
+# FEATURE: CONFIG_FEATURE_FIND_XDEV
+
busybox find . -xdev >/dev/null 2>&1
diff --git a/testsuite/ls/ls-1-works b/testsuite/ls/ls-1-works
index 8856949..71ab9a6 100644
--- a/testsuite/ls/ls-1-works
+++ b/testsuite/ls/ls-1-works
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_LS_SORTFILES
+
[ -n "$d" ] || d=..
LC_ALL=C ls -1 "$d" > logfile.gnu
LC_ALL=C busybox ls -1 "$d" > logfile.bb
diff --git a/testsuite/ls/ls-h-works b/testsuite/ls/ls-h-works
index 0c83f7c..60016ba 100644
--- a/testsuite/ls/ls-h-works
+++ b/testsuite/ls/ls-h-works
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_LS_SORTFILES CONFIG_FEATURE_HUMAN_READABLE
+
[ -n "$d" ] || d=..
LC_ALL=C ls -h "$d" > logfile.gnu
LC_ALL=C busybox ls -h "$d" > logfile.bb
diff --git a/testsuite/makedevs.tests b/testsuite/makedevs.tests
index 72fc933..f69b4a6 100755
--- a/testsuite/makedevs.tests
+++ b/testsuite/makedevs.tests
@@ -16,7 +16,7 @@ FILTER_LS2="sed -e 's/, */,/g' -e 's/ */ /g' | cut -d' ' -f 1-4,9-"
rm -rf makedevs.testdir
mkdir makedevs.testdir
-optional FEATURE_MAKEDEVS_TABLE FEATURE_FIND_NOT FEATURE_FIND_TYPE FEATURE_LS_RECURSIVE
+optional FEATURE_MAKEDEVS_TABLE FEATURE_FIND_NOT FEATURE_FIND_TYPE FEATURE_LS_RECURSIVE FEATURE_LS_SORTFILES
testing "makedevs -d ../makedevs.device_table.txt ." \
"(cd makedevs.testdir && makedevs -d ../makedevs.device_table.txt . 2>&1);
find makedevs.testdir ! -type d | sort | xargs ls -lnR | $FILTER_LS" \
diff --git a/testsuite/md5sum/md5sum-verifies-non-binary-file b/testsuite/md5sum/md5sum-verifies-non-binary-file
index 8566a23..1df818e 100644
--- a/testsuite/md5sum/md5sum-verifies-non-binary-file
+++ b/testsuite/md5sum/md5sum-verifies-non-binary-file
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
+
touch foo
md5sum foo > bar
busybox md5sum -c bar
diff --git a/testsuite/mdev.tests b/testsuite/mdev.tests
index 270f629..0b45254 100755
--- a/testsuite/mdev.tests
+++ b/testsuite/mdev.tests
@@ -27,7 +27,7 @@ echo "8:0" >mdev.testdir/sys/block/sda/dev
# env - PATH=$PATH: on some systems chroot binary won't otherwise be found
-optional STATIC
+optional STATIC FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
testing "mdev add /block/sda" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -ln mdev.testdir/dev | $FILTER_LS" \
@@ -41,7 +41,7 @@ SKIP=
rm -rf mdev.testdir/dev/*
echo ".* 1:1 666" >mdev.testdir/etc/mdev.conf
echo "sda 2:2 444" >>mdev.testdir/etc/mdev.conf
-optional STATIC FEATURE_MDEV_CONF
+optional STATIC FEATURE_MDEV_CONF FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
testing "mdev stops on first rule" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -ln mdev.testdir/dev | $FILTER_LS" \
@@ -55,7 +55,7 @@ SKIP=
rm -rf mdev.testdir/dev/*
echo "-.* 1:1 666" >mdev.testdir/etc/mdev.conf
echo "sda 2:2 444" >>mdev.testdir/etc/mdev.conf
-optional STATIC FEATURE_MDEV_CONF
+optional STATIC FEATURE_MDEV_CONF FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
testing "mdev does not stop on dash-rule" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -ln mdev.testdir/dev | $FILTER_LS" \
@@ -70,7 +70,7 @@ rm -rf mdev.testdir/dev/*
echo "\$MODALIAS=qw 1:1 666" >mdev.testdir/etc/mdev.conf
echo "\$MODALIAS=qw. 2:2 444" >>mdev.testdir/etc/mdev.conf
echo "\$MODALIAS=qw. 3:3 400" >>mdev.testdir/etc/mdev.conf
-optional STATIC FEATURE_MDEV_CONF
+optional STATIC FEATURE_MDEV_CONF FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
testing "mdev \$ENVVAR=regex match" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda MODALIAS=qwe chroot mdev.testdir /mdev 2>&1;
ls -ln mdev.testdir/dev | $FILTER_LS" \
@@ -83,7 +83,7 @@ SKIP=
# continuing to use directory structure from prev test
rm -rf mdev.testdir/dev/*
echo "sda 0:0 444 >disk/scsiA" >mdev.testdir/etc/mdev.conf
-optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_LS_RECURSIVE
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
testing "mdev move/symlink rule '>bar/baz'" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -lnR mdev.testdir/dev | $FILTER_LS2" \
@@ -101,7 +101,7 @@ SKIP=
# continuing to use directory structure from prev test
rm -rf mdev.testdir/dev/*
echo "sda 0:0 444 >disk/" >mdev.testdir/etc/mdev.conf
-optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_LS_RECURSIVE
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
testing "mdev move/symlink rule '>bar/'" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -lnR mdev.testdir/dev | $FILTER_LS2" \
@@ -120,7 +120,7 @@ SKIP=
rm -rf mdev.testdir/dev/*
# here we complicate things by having non-matching group 1 and using %0
echo "s([0-9])*d([a-z]+) 0:0 644 >sd/%2_%0" >mdev.testdir/etc/mdev.conf
-optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_MDEV_RENAME_REGEXP FEATURE_LS_RECURSIVE
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_MDEV_RENAME_REGEXP FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
testing "mdev regexp substring match + replace" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -lnR mdev.testdir/dev | $FILTER_LS2" \
@@ -138,7 +138,7 @@ SKIP=
# continuing to use directory structure from prev test
rm -rf mdev.testdir/dev/*
echo "sda 0:0 644 @echo @echo TEST" >mdev.testdir/etc/mdev.conf
-optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_EXEC FEATURE_LS_RECURSIVE
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_EXEC FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
testing "mdev command" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -lnR mdev.testdir/dev | $FILTER_LS" \
@@ -153,7 +153,7 @@ SKIP=
# continuing to use directory structure from prev test
rm -rf mdev.testdir/dev/*
echo "sda 0:0 644 =block/ @echo @echo TEST:\$MDEV" >mdev.testdir/etc/mdev.conf
-optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_MDEV_EXEC FEATURE_LS_RECURSIVE
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_MDEV_EXEC FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
testing "mdev move and command" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -lnR mdev.testdir/dev | $FILTER_LS2" \
@@ -171,7 +171,7 @@ SKIP=
# continuing to use directory structure from prev test
rm -rf mdev.testdir/dev/*
echo "@8,0 0:1 644" >mdev.testdir/etc/mdev.conf
-optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_MDEV_RENAME_REGEXP FEATURE_LS_RECURSIVE
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_MDEV_RENAME_REGEXP FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
testing "mdev #maj,min and no explicit uid" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -lnR mdev.testdir/dev | $FILTER_LS" \
@@ -194,7 +194,7 @@ echo "capi 0:0 0660 =capi20" >mdev.testdir/etc/mdev.conf
echo "capi([0-9]) 0:0 0660 =capi20.0%1" >>mdev.testdir/etc/mdev.conf
echo "capi([0-9]*) 0:0 0660 =capi20.%1" >>mdev.testdir/etc/mdev.conf
# mdev invocation with DEVPATH=/class/tty/capi20 was deleting /dev/capi20
-optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_MDEV_RENAME_REGEXP FEATURE_LS_RECURSIVE
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_MDEV_RENAME_REGEXP FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
testing "move rule does not delete node with name == device_name" \
"\
env - PATH=$PATH ACTION=add DEVPATH=/class/tty/capi chroot mdev.testdir /mdev 2>&1;
diff --git a/testsuite/mount.tests b/testsuite/mount.tests
index 043586f..ee13ec2 100755
--- a/testsuite/mount.tests
+++ b/testsuite/mount.tests
@@ -4,16 +4,19 @@
. ./testing.sh
+test -f "$bindir/.config" && . "$bindir/.config"
+
test "`id -u`" = 0 || {
- echo "SKIPPED: must be root to test this"
+ echo "SKIPPED: mount (must be root to test this)"
exit 0
}
-optional MKFS_MINIX
-if [ -n "$SKIP" ]
-then
- echo "SKIPPED: mount"
- exit 0
+if test x"$CONFIG_MKFS_MINIX" != x"y" \
+|| test x"$CONFIG_FEATURE_MINIX2" != x"y" \
+|| test x"$CONFIG_FEATURE_DEVFS" = x"y" \
+; then
+ echo "SKIPPED: mount"
+ exit 0
fi
testdir=$PWD/testdir
diff --git a/testsuite/od.tests b/testsuite/od.tests
index 0bf1f4c..a2d015a 100755
--- a/testsuite/od.tests
+++ b/testsuite/od.tests
@@ -6,6 +6,7 @@
# testing "test name" "options" "expected result" "file input" "stdin"
+optional DESKTOP
testing "od -b" \
"od -b" \
"\
@@ -13,5 +14,6 @@ testing "od -b" \
0000005
" \
"" "HELLO"
+SKIP=
exit $FAILCOUNT
diff --git a/testsuite/patch.tests b/testsuite/patch.tests
index f3e6071..749d936 100755
--- a/testsuite/patch.tests
+++ b/testsuite/patch.tests
@@ -123,4 +123,6 @@ abc
+456
" \
+rm input.orig 2>/dev/null
+
exit $FAILCOUNT
diff --git a/testsuite/pidof.tests b/testsuite/pidof.tests
index 45df1a9..624b0a7 100755
--- a/testsuite/pidof.tests
+++ b/testsuite/pidof.tests
@@ -20,12 +20,14 @@ testing "pidof this" "pidof pidof.tests | grep -o -w $$" "$$\n" "" ""
optional FEATURE_PIDOF_SINGLE
testing "pidof -s" "pidof -s init" "1\n" "" ""
+SKIP=
-optional FEATURE_PIDOF_OMIT
+optional FEATURE_PIDOF_OMIT FEATURE_PIDOF_SINGLE
# This test fails now because process name matching logic has changed,
# but new logic is not "wrong" either... see find_pid_by_name.c comments
#testing "pidof -o %PPID" "pidof -o %PPID pidof.tests | grep -o -w $$" "" "" ""
testing "pidof -o %PPID NOP" "pidof -o %PPID -s init" "1\n" "" ""
testing "pidof -o init" "pidof -o 1 init | grep -o -w 1" "" "" ""
+SKIP=
exit $FAILCOUNT
diff --git a/testsuite/sort.tests b/testsuite/sort.tests
index 72df80b..8a810f8 100755
--- a/testsuite/sort.tests
+++ b/testsuite/sort.tests
@@ -118,7 +118,7 @@ testing "sort key doesn't strip leading blanks, disables fallback global sort" \
"sort -n -k2 -t ' '" " a \n 1 \n 2 \n" "" " 2 \n 1 \n a \n"
testing "sort file in place" \
-"strace -oZZZ sort -o input input && cat input" "\
+"sort -o input input && cat input" "\
111
222
" "\
diff --git a/testsuite/tail/tail-works b/testsuite/tail/tail-works
index f3434d1..50eca13 100644
--- a/testsuite/tail/tail-works
+++ b/testsuite/tail/tail-works
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_INCLUDE_SUSv2
+
$ECHO -ne "abc\ndef\n123\n" >input
$ECHO -ne "def\n123\n" >logfile.ok
busybox tail -2 input > logfile.bb
diff --git a/testsuite/tar.tests b/testsuite/tar.tests
index ecd212f..8599b79 100755
--- a/testsuite/tar.tests
+++ b/testsuite/tar.tests
@@ -9,7 +9,7 @@ mkdir tar.tempdir && cd tar.tempdir || exit 1
# testing "test name" "script" "expected result" "file input" "stdin"
-optional FEATURE_TAR_CREATE
+optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
testing "tar hardlinks and repeated files" '\
rm -rf input_* test.tar 2>/dev/null
>input_hard1
@@ -42,7 +42,7 @@ drwxr-xr-x input_dir
"" ""
SKIP=
-optional FEATURE_TAR_CREATE
+optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
testing "tar hardlinks mode" '\
rm -rf input_* test.tar 2>/dev/null
>input_hard1
@@ -73,7 +73,7 @@ dr-xr-x--- input_dir
"" ""
SKIP=
-optional FEATURE_TAR_CREATE
+optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
testing "tar symlinks mode" '\
rm -rf input_* test.tar 2>/dev/null
>input_file
diff --git a/testsuite/tar/tar_with_prefix_fields b/testsuite/tar/tar_with_prefix_fields
index 56dcac5..8c1fda7 100644
--- a/testsuite/tar/tar_with_prefix_fields
+++ b/testsuite/tar/tar_with_prefix_fields
@@ -1,4 +1,5 @@
# FEATURE: CONFIG_FEATURE_TAR_UNAME_GNAME
+# FEATURE: CONFIG_DESKTOP
tar1_bz2()
{
diff --git a/testsuite/tr.tests b/testsuite/tr.tests
index 9706056..a1f83bf 100755
--- a/testsuite/tr.tests
+++ b/testsuite/tr.tests
@@ -15,17 +15,23 @@ testing "tr understands 0-9A-F" \
"tr -cd '[0-9A-F]'" \
"19AF" "" "19AFH\n"
+optional CONFIG_FEATURE_TR_CLASSES
testing "tr understands [:xdigit:]" \
"tr -cd '[:xdigit:]'" \
"19AF" "" "19AFH\n"
+SKIP=
+optional CONFIG_FEATURE_TR_CLASSES
testing "tr does not stop after [:digit:]" \
"tr '[:digit:]y-z' 111111111123" \
"111abcx23\n" "" "789abcxyz\n"
+SKIP=
+optional CONFIG_FEATURE_TR_CLASSES
testing "tr has correct xdigit sequence" \
"tr '[:xdigit:]Gg' 1111111151242222333330xX" \
"#1111111151242222x333330X\n" "" \
"#0123456789ABCDEFGabcdefg\n"
+SKIP=
exit $FAILCOUNT
diff --git a/testsuite/tr/tr-d-alnum-works b/testsuite/tr/tr-d-alnum-works
index d440f8f..6540ea5 100644
--- a/testsuite/tr/tr-d-alnum-works
+++ b/testsuite/tr/tr-d-alnum-works
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_TR_CLASSES
+
echo testing | tr -d '[[:alnum:]]' > logfile.gnu
echo testing | busybox tr -d '[[:alnum:]]' > logfile.bb
diff --git a/testsuite/tr/tr-rejects-wrong-class b/testsuite/tr/tr-rejects-wrong-class
index 9753936..1d488a3 100644
--- a/testsuite/tr/tr-rejects-wrong-class
+++ b/testsuite/tr/tr-rejects-wrong-class
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_TR_CLASSES
+
echo t12esting | tr -d '[[:alpha:]]' > logfile.gnu
echo t12esting | tr -d '[:alpha:]' >> logfile.gnu
echo t12esting | tr -d '[[:alpha:]' >> logfile.gnu
diff --git a/testsuite/tr/tr-works b/testsuite/tr/tr-works
index 2c0a9d1..3783971 100644
--- a/testsuite/tr/tr-works
+++ b/testsuite/tr/tr-works
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_TR_CLASSES
+
run_tr ()
{
echo -n "echo '$1' | tr '$2' '$3': "