aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-12-31 23:22:36 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-12-31 23:22:36 +0100
commit198b02f7dd61c6cb9fd4c379dc56edcf537a7ee1 (patch)
tree055b2ab0f2636e100781ddefdbf95417e44bb6df /testsuite
parent61be8e46a80749fe5bb16bc8f831c689d21a4e34 (diff)
downloadbusybox-198b02f7dd61c6cb9fd4c379dc56edcf537a7ee1.tar.gz
fix failures found by randomconfig builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/awk.tests6
-rwxr-xr-xtestsuite/tar.tests6
2 files changed, 9 insertions, 3 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 50b2a8328..132afc6a9 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -269,10 +269,12 @@ testing "awk FS assignment" "awk '{FS=\":\"; print \$1}'" \
"" \
"a:b c:d\ne:f g:h"
+optional FEATURE_AWK_LIBM
testing "awk large integer" \
"awk 'BEGIN{n=(2^31)-1; print n, int(n), n%1, ++n, int(n), n%1}'" \
"2147483647 2147483647 0 2147483648 2147483648 0\n" \
"" ""
+SKIP=
testing "awk length(array)" \
"awk 'BEGIN{ A[1]=2; A[\"qwe\"]=\"asd\"; print length(A)}'" \
@@ -285,11 +287,13 @@ testing "awk -f and ARGC" \
"do re mi\n" \
'{print $2; print ARGC;}' \
+optional FEATURE_AWK_GNU_EXTENSIONS
testing "awk -e and ARGC" \
"awk -e '{print \$2; print ARGC;}' input" \
"re\n2\n" \
"do re mi\n" \
- "" \
+ ""
+SKIP=
# testing "description" "command" "result" "infile" "stdin"
diff --git a/testsuite/tar.tests b/testsuite/tar.tests
index 93ba5f004..9ea89f15f 100755
--- a/testsuite/tar.tests
+++ b/testsuite/tar.tests
@@ -25,10 +25,12 @@ tar: short read
SKIP=
optional FEATURE_SEAMLESS_GZ
+# In NOMMU case, "invalid magic" message comes from gunzip child process.
+# Otherwise, it comes from tar.
+# Need to fix output up to avoid false positive.
testing "Empty file is not a tarball.tar.gz" '\
-tar xvzf - 2>&1; echo $?
+{ tar xvzf - 2>&1; echo $?; } | grep -Fv "invalid magic"
' "\
-tar: invalid magic
tar: short read
1
" \