aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-10-11 16:27:55 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-10-11 16:27:55 +0200
commit69c8c699aaa69e281e4a01be0f48a6498d3ac7cb (patch)
treed3357d2791f4d20ab75d2f45004f1ccf7928670d
parent005c492c40ff833a99abd251872ec60661344474 (diff)
downloadbusybox-w32-69c8c699aaa69e281e4a01be0f48a6498d3ac7cb.tar.gz
busybox-w32-69c8c699aaa69e281e4a01be0f48a6498d3ac7cb.tar.bz2
busybox-w32-69c8c699aaa69e281e4a01be0f48a6498d3ac7cb.zip
randconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-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
65 | grep -v CONFIG_BUILD_LIBBUSYBOX \ 65 | grep -v CONFIG_BUILD_LIBBUSYBOX \
66 | grep -v CONFIG_PIE \ 66 | grep -v CONFIG_PIE \
67 \ 67 \
68 | grep -v CONFIG_FEATURE_TOUCH_NODEREF \
69 | grep -v CONFIG_FEATURE_2_4_MODULES \ 68 | grep -v CONFIG_FEATURE_2_4_MODULES \
69 | grep -v CONFIG_FEATURE_SYNC_FANCY \
70 | grep -v CONFIG_FEATURE_TOUCH_NODEREF \
70 >.config.new 71 >.config.new
71 mv .config.new .config 72 mv .config.new .config
72 echo 'CONFIG_STATIC=y' >>.config 73 echo 'CONFIG_STATIC=y' >>.config
73 echo '# CONFIG_BUILD_LIBBUSYBOX is not set' >>.config 74 echo '# CONFIG_BUILD_LIBBUSYBOX is not set' >>.config
74 echo '# CONFIG_PIE is not set' >>.config 75 echo '# CONFIG_PIE is not set' >>.config
75 echo '# CONFIG_FEATURE_2_4_MODULES is not set' >>.config 76 echo '# CONFIG_FEATURE_2_4_MODULES is not set' >>.config
77 echo '# CONFIG_FEATURE_SYNC_FANCY is not set' >>.config
76 echo '# CONFIG_FEATURE_TOUCH_NODEREF is not set' >>.config 78 echo '# CONFIG_FEATURE_TOUCH_NODEREF is not set' >>.config
77fi 79fi
78 80
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() {
28 $ECHO -ne "\x17\x72\x45\x38\x50\x90\x5b\xb8\xe8\xa3" 28 $ECHO -ne "\x17\x72\x45\x38\x50\x90\x5b\xb8\xe8\xa3"
29} 29}
30 30
31for ext in gz bz2 Z 31for ext in \
32 `test x"$CONFIG_GUNZIP=y = x"y" && echo gz` \
33 `test x"$CONFIG_BUNZIP2=y = x"y" && echo bz2` \
34 `test x"$CONFIG_UNCOMPRESS" = x"y" && echo Z`
32do 35do
33 prep() { 36 prep() {
34 rm -f t1.$ext t2.$ext t_actual 37 rm -f t1.$ext t2.$ext t_actual
@@ -49,11 +52,12 @@ do
49 mkdir testdir 2>/dev/null 52 mkdir testdir 2>/dev/null
50 ( 53 (
51 cd testdir || { echo "cannot cd testdir!"; exit 1; } 54 cd testdir || { echo "cannot cd testdir!"; exit 1; }
52
53 expected="HELLO\nok\n" 55 expected="HELLO\nok\n"
54 prep; check "zcat: dont delete $ext src" "${bb}zcat t2.$ext; test -f t2.$ext && echo ok" 56 prep
55 57 check "zcat: dont delete $ext src" "${bb}zcat t2.$ext; test -f t2.$ext && echo ok"
58 exit $FAILCOUNT
56 ) 59 )
60 FAILCOUNT=$?
57 rm -rf testdir 61 rm -rf testdir
58done 62done
59 63
@@ -89,6 +93,7 @@ testing "bzcat can handle compressed zero-length bzip2 files" \
89## compress algorithm 93## compress algorithm
90 94
91# "input" file is compressed (.Z) file with "a\n" data 95# "input" file is compressed (.Z) file with "a\n" data
96test x"$CONFIG_UNCOMPRESS" = x"y" && \
92testing "zcat can print many files" \ 97testing "zcat can print many files" \
93"$ECHO -ne '$hexdump' | zcat input input; echo \$?" \ 98"$ECHO -ne '$hexdump' | zcat input input; echo \$?" \
94"\ 99"\
@@ -100,7 +105,8 @@ a
100" "" 105" ""
101 106
102# "input" file is compressed (.Z) zero byte file 107# "input" file is compressed (.Z) zero byte file
103testing "zcat can handle compressed zero-length compressed (.Z) files" \ 108test x"$CONFIG_UNCOMPRESS" = x"y" && \
109testing "zcat can handle compressed zero-length (.Z) files" \
104"$ECHO -ne '$hexdump' | zcat input input; echo \$?" \ 110"$ECHO -ne '$hexdump' | zcat input input; echo \$?" \
105"0\n" \ 111"0\n" \
106"\x1f\x9d\x90\x00" "" 112"\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 @@
1test $(pwd) = $(busybox pwd) 1# shell's $PWD may leave symlinks unresolved.
2# "pwd" may be a built-in and have the same problem.
3# External pwd _can't_ have that problem (current dir on Unix is physical).
4test $(`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" "" ""
21 21
22optional FEATURE_READLINK_FOLLOW 22optional FEATURE_READLINK_FOLLOW
23 23
24testing "readlink -f on a file" "readlink -f ./$TESTFILE" "$PWD/$TESTFILE\n" "" "" 24# shell's $PWD may leave symlinks unresolved.
25testing "readlink -f on a link" "readlink -f ./$TESTLINK" "$PWD/$TESTFILE\n" "" "" 25# "pwd" may be a built-in and have the same problem.
26# External pwd _can't_ have that problem (current dir on Unix is physical).
27pwd=`which pwd`
28pwd=`$pwd`
29testing "readlink -f on a file" "readlink -f ./$TESTFILE" "$pwd/$TESTFILE\n" "" ""
30testing "readlink -f on a link" "readlink -f ./$TESTLINK" "$pwd/$TESTFILE\n" "" ""
26testing "readlink -f on an invalid link" "readlink -f ./$FAILLINK" "" "" "" 31testing "readlink -f on an invalid link" "readlink -f ./$FAILLINK" "" "" ""
27testing "readlink -f on a wierd dir" "readlink -f $TESTDIR/../$TESTFILE" "$PWD/$TESTFILE\n" "" "" 32testing "readlink -f on a wierd dir" "readlink -f $TESTDIR/../$TESTFILE" "$pwd/$TESTFILE\n" "" ""
28 33
29 34
30# clean up 35# clean up