randomtest fixes
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 11 May 2010 01:53:57 +0000 (03:53 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 11 May 2010 01:53:57 +0000 (03:53 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
31 files changed:
libbb/read.c
testsuite/ar.tests
testsuite/awk.tests
testsuite/busybox.tests
testsuite/cpio.tests
testsuite/diff.tests
testsuite/du/du-h-works
testsuite/du/du-l-works
testsuite/du/du-m-works
testsuite/du/du-s-works
testsuite/du/du-works
testsuite/echo/echo-does-not-print-newline
testsuite/echo/echo-prints-slash-zero
testsuite/find/find-supports-minus-xdev
testsuite/ls/ls-1-works
testsuite/ls/ls-h-works
testsuite/makedevs.tests
testsuite/md5sum/md5sum-verifies-non-binary-file
testsuite/mdev.tests
testsuite/mount.tests
testsuite/od.tests
testsuite/patch.tests
testsuite/pidof.tests
testsuite/sort.tests
testsuite/tail/tail-works
testsuite/tar.tests
testsuite/tar/tar_with_prefix_fields
testsuite/tr.tests
testsuite/tr/tr-d-alnum-works
testsuite/tr/tr-rejects-wrong-class
testsuite/tr/tr-works

index 21e005c6f02f910fde0579f20f9a4d14665cbf80..f3af144f0636533e5be82ea9296f7994abfaa2d2 100644 (file)
@@ -321,44 +321,45 @@ int FAST_FUNC setup_unzip_on_fd(int fd /*, int fail_if_not_detected*/)
        /* .gz and .bz2 both have 2-byte signature, and their
         * unpack_XXX_stream wants this header skipped. */
        xread(fd, &magic, 2);
-#if ENABLE_FEATURE_SEAMLESS_GZ
+       if (ENABLE_FEATURE_SEAMLESS_GZ
+        && magic[0] == 0x1f && magic[1] == 0x8b
+       ) {
 # if BB_MMU
-       xformer = unpack_gz_stream;
+               xformer = unpack_gz_stream;
 # else
-       xformer_prog = "gunzip";
+               xformer_prog = "gunzip";
 # endif
-#endif
-       if (!ENABLE_FEATURE_SEAMLESS_GZ
-        || magic[0] != 0x1f || magic[1] != 0x8b
+               goto found_magic;
+       }
+       if (ENABLE_FEATURE_SEAMLESS_BZ2
+        && magic[0] == 'B' && magic[1] == 'Z'
        ) {
-               if (!ENABLE_FEATURE_SEAMLESS_BZ2
-                || magic[0] != 'B' || magic[1] != 'Z'
-               ) {
-
+# if BB_MMU
+               xformer = unpack_bz2_stream;
+# else
+               xformer_prog = "bunzip2";
+# endif
+               goto found_magic;
+       }
 // TODO: xz format support. rpm adopted it, "rpm -i FILE.rpm" badly needs this.
 // Signature: 0xFD, '7', 'z', 'X', 'Z', 0x00
 // More info at: http://tukaani.org/xz/xz-file-format.txt
 
-                       if (fail_if_not_detected)
-                               bb_error_msg_and_die("no gzip"
-                                       IF_FEATURE_SEAMLESS_BZ2("/bzip2")
-                                       " magic");
-                       xlseek(fd, -2, SEEK_CUR);
-                       return fd;
-               }
-#if BB_MMU
-               xformer = unpack_bz2_stream;
-#else
-               xformer_prog = "bunzip2";
-#endif
-       } else {
-#if !BB_MMU
-               /* NOMMU version of open_transformer execs
-                * an external unzipper that wants
-                * file position at the start of the file */
-               xlseek(fd, -2, SEEK_CUR);
-#endif
-       }
+       /* No known magic seen */
+       if (fail_if_not_detected)
+               bb_error_msg_and_die("no gzip"
+                       IF_FEATURE_SEAMLESS_BZ2("/bzip2")
+                       " magic");
+       xlseek(fd, -2, SEEK_CUR);
+       return fd;
+
+ found_magic:
+# if !BB_MMU
+       /* NOMMU version of open_transformer execs
+        * an external unzipper that wants
+        * file position at the start of the file */
+       xlseek(fd, -2, SEEK_CUR);
+# endif
        open_transformer(fd, xformer, xformer_prog);
 
        return fd;
index f112eb64a13c35ddf840b4fd1a5bc9422401b51c..4630d08a454a4f747da94c6deaad1db8314d5101 100755 (executable)
@@ -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
index efa03a79a4be7f4a0c9815fffe85250d1bf51633..0691a7972c5685ddaa0cfc3092fcddf31be93bf3 100755 (executable)
@@ -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 }'" \
index 6eeb3251da2448008d503f602f717b5fa63a6c94..18ac36fc4321d5e2402b1ba0c75a8b05bba6d54b 100755 (executable)
@@ -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" "" ""
index b4c41dd9aa766a45f8ab970e5295e5f6a3979581..8cb8b787b91f132b902b465bcdea4eb252a5f3db 100755 (executable)
@@ -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"" && {
index 72ebb6c4c7a71d8d16ed1bde3d9ef517a92f9cee..06d5a4fd7923eaf70b4a775aa5750fcbcaa430dd 100755 (executable)
@@ -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
index 3f8ff3d0b503cedbc2bb2e6011b743503904b184..a1b4b4905cfed798d6dbb763f5ee42b93366f200 100644 (file)
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_HUMAN_READABLE
+
 d=/bin
 du -h "$d" > logfile.gnu
 busybox du -h "$d" > logfile.bb
index c3d2ec0c111160750c51b4cda210a12aa8ea9ae0..64dcf872668656e2c0bbed03e23308b63eef5c6a 100644 (file)
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
+
 d=/bin
 du -l "$d" > logfile.gnu
 busybox du -l "$d" > logfile.bb
index bf0a90e1b82858cf3ab9e71ec267b573a2b0f984..6e733c0160cfc06546375e3cf43361b1c4240b45 100644 (file)
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_HUMAN_READABLE
+
 d=/bin
 du -m "$d" > logfile.gnu
 busybox du -m "$d" > logfile.bb
index ae970772a0cc307692691bcd6ea6cd7a81e45d49..0c870ceb571f319dfaee992db826f8fc3c4eb44c 100644 (file)
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
+
 d=/bin
 du -s "$d" > logfile.gnu
 busybox du -s "$d" > logfile.bb
index 46a336dc3f14806bb6b47697cd75ef119be2daa7..4db684a9b569a29f17e02866dbfe4061f199e3ee 100644 (file)
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
+
 d=/bin
 du "$d" > logfile.gnu
 busybox du "$d" > logfile.bb
index 2ed03caf5cc8de47b892ded059c7cc249d50fc66..2857c0d1342f11d5bcbb60b5ae3187d3e4d35b35 100644 (file)
@@ -1 +1,3 @@
+# FEATURE: CONFIG_FEATURE_FANCY_ECHO
+
 test `busybox echo -n word | wc -c` -eq 4
index d2466326f1ccf144720d3af4eecccb6039de854a..d97ed8e661ad2a5bb3c9814d72d5f767c18bc914 100644 (file)
@@ -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"
index 4c559a1f4e06ccb207f9d22c575bb6fb29556d37..c807fc8f28813c460ee438aef9fd9eb2b57e5807 100644 (file)
@@ -1 +1,3 @@
+# FEATURE: CONFIG_FEATURE_FIND_XDEV
+
 busybox find . -xdev >/dev/null 2>&1
index 885694920d040071fa32a4c813d87f55aa3f225d..71ab9a66b378c3251b67bb5a798ebca4f4bc8fa5 100644 (file)
@@ -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
index 0c83f7cc5fe5fab8a83ed03d22a9533b25b6d400..60016bac1b7ef3fc9cfd8e8968824cfd42981864 100644 (file)
@@ -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
index 72fc933d3a98b42c57bea1dbfaa9718317cc7014..f69b4a6b136d1e15700b1b98d1b243c0f1cce215 100755 (executable)
@@ -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" \
index 8566a234d77ad68a5466f8bcc8ede26016de455f..1df818eb52b18b3b8bc79bb895b22e8324dd3ed1 100644 (file)
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
+
 touch foo
 md5sum foo > bar
 busybox md5sum -c bar
index 270f6292ec972acf9eeed29fdd95e20ecd69431f..0b452548395320ae5c168416a46b399a71bfc332 100755 (executable)
@@ -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;
index 043586f05943c2556cf36cd322d99e9332e3023e..ee13ec285e69bb843233ff57a0c065f800afd57b 100755 (executable)
@@ -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
index 0bf1f4c54903b0d11d72988e9f06c69eb7e1321c..a2d015ad723a861b5442235cd7045b9dfc722552 100755 (executable)
@@ -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
index f3e6071865e0a32ab905855f7de74e613242ffab..749d936eaedbfb7c918a243c0a776888296f516f 100755 (executable)
@@ -123,4 +123,6 @@ abc
 +456
 " \
 
+rm input.orig 2>/dev/null
+
 exit $FAILCOUNT
index 45df1a9584afecf86f9658195f80115adda35661..624b0a720642cd84fa4f54eceb05f5f3bcd899c2 100755 (executable)
@@ -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
index 72df80b1f3b61d06cf8e70e80f49f2ebeb937ba3..8a810f8d40322d761230201e800911111d248dbd 100755 (executable)
@@ -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
 " "\
index f3434d1a9eb84b65b457701a2b5006b5163db708..50eca136ef05106de8ec5a00aa461feb0d0b60e3 100644 (file)
@@ -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
index ecd212fbf78bdeb48e85c7567b16cd34d8d3f6e4..8599b79fcfe8174cdf9d3e5c3ab82f9709a93567 100755 (executable)
@@ -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
index 56dcac59def9266ba6a3d585546a0e4b402f59ee..8c1fda795c4d94667eeca6d613fd0e9b3a82fc34 100644 (file)
@@ -1,4 +1,5 @@
 # FEATURE: CONFIG_FEATURE_TAR_UNAME_GNAME
+# FEATURE: CONFIG_DESKTOP
 
 tar1_bz2()
 {
index 9706056c9b43192d05a0631d3eb4d044f15c7c9c..a1f83bfc60ec474cbe4494022c59bdc0d4855417 100755 (executable)
@@ -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
index d440f8f3bb47367b43d3d84c3185718bd289881d..6540ea527b02f26628f248aeee22cc44b9683fd9 100644 (file)
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_TR_CLASSES
+
 echo testing | tr -d '[[:alnum:]]' > logfile.gnu
 echo testing | busybox tr -d '[[:alnum:]]' > logfile.bb
 
index 97539360dc2b40134ce60644398a94c2e2856855..1d488a3dff707f33457d5aded8f39c21f588dd21 100644 (file)
@@ -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
index 2c0a9d196af217c3377e6e13a95c42f9038a5c24..3783971cef6cdaa8ddb81340be7de9e20bc5dbf0 100644 (file)
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_TR_CLASSES
+
 run_tr ()
 {
        echo -n "echo '$1' | tr '$2' '$3': "