summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xscripts/randomtest4
-rwxr-xr-xtestsuite/bzcat.tests16
-rw-r--r--testsuite/pwd/pwd-prints-working-directory5
-rwxr-xr-xtestsuite/readlink.tests11
4 files changed, 26 insertions, 10 deletions
diff --git a/scripts/randomtest b/scripts/randomtest
index d2b26bc76..e2513d058 100755
--- a/scripts/randomtest
+++ b/scripts/randomtest
@@ -65,14 +65,16 @@ if test x"$LIBC" = x"uclibc"; then
| grep -v CONFIG_BUILD_LIBBUSYBOX \
| grep -v CONFIG_PIE \
\
- | grep -v CONFIG_FEATURE_TOUCH_NODEREF \
| grep -v CONFIG_FEATURE_2_4_MODULES \
+ | grep -v CONFIG_FEATURE_SYNC_FANCY \
+ | grep -v CONFIG_FEATURE_TOUCH_NODEREF \
>.config.new
mv .config.new .config
echo 'CONFIG_STATIC=y' >>.config
echo '# CONFIG_BUILD_LIBBUSYBOX is not set' >>.config
echo '# CONFIG_PIE is not set' >>.config
echo '# CONFIG_FEATURE_2_4_MODULES is not set' >>.config
+ echo '# CONFIG_FEATURE_SYNC_FANCY is not set' >>.config
echo '# CONFIG_FEATURE_TOUCH_NODEREF is not set' >>.config
fi
diff --git a/testsuite/bzcat.tests b/testsuite/bzcat.tests
index 9a1c28425..2b38472ee 100755
--- a/testsuite/bzcat.tests
+++ b/testsuite/bzcat.tests
@@ -28,7 +28,10 @@ hello_bz2() {
$ECHO -ne "\x17\x72\x45\x38\x50\x90\x5b\xb8\xe8\xa3"
}
-for ext in gz bz2 Z
+for ext in \
+ `test x"$CONFIG_GUNZIP=y = x"y" && echo gz` \
+ `test x"$CONFIG_BUNZIP2=y = x"y" && echo bz2` \
+ `test x"$CONFIG_UNCOMPRESS" = x"y" && echo Z`
do
prep() {
rm -f t1.$ext t2.$ext t_actual
@@ -49,11 +52,12 @@ do
mkdir testdir 2>/dev/null
(
cd testdir || { echo "cannot cd testdir!"; exit 1; }
-
expected="HELLO\nok\n"
- prep; check "zcat: dont delete $ext src" "${bb}zcat t2.$ext; test -f t2.$ext && echo ok"
-
+ prep
+ check "zcat: dont delete $ext src" "${bb}zcat t2.$ext; test -f t2.$ext && echo ok"
+ exit $FAILCOUNT
)
+ FAILCOUNT=$?
rm -rf testdir
done
@@ -89,6 +93,7 @@ testing "bzcat can handle compressed zero-length bzip2 files" \
## compress algorithm
# "input" file is compressed (.Z) file with "a\n" data
+test x"$CONFIG_UNCOMPRESS" = x"y" && \
testing "zcat can print many files" \
"$ECHO -ne '$hexdump' | zcat input input; echo \$?" \
"\
@@ -100,7 +105,8 @@ a
" ""
# "input" file is compressed (.Z) zero byte file
-testing "zcat can handle compressed zero-length compressed (.Z) files" \
+test x"$CONFIG_UNCOMPRESS" = x"y" && \
+testing "zcat can handle compressed zero-length (.Z) files" \
"$ECHO -ne '$hexdump' | zcat input input; echo \$?" \
"0\n" \
"\x1f\x9d\x90\x00" ""
diff --git a/testsuite/pwd/pwd-prints-working-directory b/testsuite/pwd/pwd-prints-working-directory
index 8575347d6..971adb5a6 100644
--- a/testsuite/pwd/pwd-prints-working-directory
+++ b/testsuite/pwd/pwd-prints-working-directory
@@ -1 +1,4 @@
-test $(pwd) = $(busybox pwd)
+# shell's $PWD may leave symlinks unresolved.
+# "pwd" may be a built-in and have the same problem.
+# External pwd _can't_ have that problem (current dir on Unix is physical).
+test $(`which pwd`) = $(busybox pwd)
diff --git a/testsuite/readlink.tests b/testsuite/readlink.tests
index c7fc8adf0..e9d8da0fc 100755
--- a/testsuite/readlink.tests
+++ b/testsuite/readlink.tests
@@ -21,10 +21,15 @@ testing "readlink on a link" "readlink ./$TESTLINK" "./$TESTFILE\n" "" ""
optional FEATURE_READLINK_FOLLOW
-testing "readlink -f on a file" "readlink -f ./$TESTFILE" "$PWD/$TESTFILE\n" "" ""
-testing "readlink -f on a link" "readlink -f ./$TESTLINK" "$PWD/$TESTFILE\n" "" ""
+# shell's $PWD may leave symlinks unresolved.
+# "pwd" may be a built-in and have the same problem.
+# External pwd _can't_ have that problem (current dir on Unix is physical).
+pwd=`which pwd`
+pwd=`$pwd`
+testing "readlink -f on a file" "readlink -f ./$TESTFILE" "$pwd/$TESTFILE\n" "" ""
+testing "readlink -f on a link" "readlink -f ./$TESTLINK" "$pwd/$TESTFILE\n" "" ""
testing "readlink -f on an invalid link" "readlink -f ./$FAILLINK" "" "" ""
-testing "readlink -f on a wierd dir" "readlink -f $TESTDIR/../$TESTFILE" "$PWD/$TESTFILE\n" "" ""
+testing "readlink -f on a wierd dir" "readlink -f $TESTDIR/../$TESTFILE" "$pwd/$TESTFILE\n" "" ""
# clean up