aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-08-10 00:51:29 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-08-10 00:51:29 +0200
commitb47b3ce1bd651c689fae3cac2760f43f453e2b6e (patch)
tree792a1710799fbf57c66fa51a642ae6d5074640c5 /testsuite
parentb347df91317ca05910e930c94fdba30baf9e2de8 (diff)
downloadbusybox-b47b3ce1bd651c689fae3cac2760f43f453e2b6e.tar.gz
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/date/date-R-works15
-rwxr-xr-xtestsuite/ls.tests3
-rwxr-xr-xtestsuite/mount.tests2
-rwxr-xr-xtestsuite/od.tests4
-rwxr-xr-xtestsuite/tar.tests4
5 files changed, 24 insertions, 4 deletions
diff --git a/testsuite/date/date-R-works b/testsuite/date/date-R-works
index d05634456..12f9b96ed 100644
--- a/testsuite/date/date-R-works
+++ b/testsuite/date/date-R-works
@@ -5,4 +5,17 @@ while test x"$dt" = x"$dt1"; do
dt="`date -R`"
done
-test x"$dt" = x"`busybox date -R`"
+bdt=`busybox date -R`
+bdt=`busybox date -R`
+bdt=`busybox date -R`
+bdt=`busybox date -R`
+bdt=`busybox date -R`
+
+# Wtih !FEATURE_DATE_NANO, that is, with time()
+# instead of clock_gettime(), seconds transition
+# may not happen at _exactly_ the same moment,
+# but can be delayed. Several busybox date -R
+# invocations above are meant to deal with this.
+# (two were enough for me, but I added more just in case).
+
+test x"$dt" = x"$bdt"
diff --git a/testsuite/ls.tests b/testsuite/ls.tests
index e2284658d..9309d366b 100755
--- a/testsuite/ls.tests
+++ b/testsuite/ls.tests
@@ -256,7 +256,8 @@ mkdir ls.testdir || exit 1
# testing "test name" "command" "expected result" "file input" "stdin"
-testing "ls symlink_to_dir" \
+test x"$CONFIG_FEATURE_LS_SORTFILES" = x"y" \
+&& testing "ls symlink_to_dir" \
"touch ls.testdir/A ls.testdir/B; ln -s ls.testdir ls.link; ls ls.link; ls -1 ls.link/; ls -1 ls.link; rm -f ls.link" \
"A\nB\nA\nB\nA\nB\n" \
"" ""
diff --git a/testsuite/mount.tests b/testsuite/mount.tests
index 58eeb2ec5..9ddd58795 100755
--- a/testsuite/mount.tests
+++ b/testsuite/mount.tests
@@ -46,6 +46,7 @@ rm mount.image1m
# Bug: mount.shared1 directory shows no files (has to show files a and b)
+optional FEATURE_LS_RECURSIVE
testing "mount bind+rshared" "\
mkdir -p mount.dir mount.shared1 mount.shared2
touch mount.dir/a mount.dir/b
@@ -80,5 +81,6 @@ a
b
" \
"" ""
+SKIP=
exit $FAILCOUNT
diff --git a/testsuite/od.tests b/testsuite/od.tests
index fa47b4790..7a9da3e97 100755
--- a/testsuite/od.tests
+++ b/testsuite/od.tests
@@ -16,7 +16,7 @@ testing "od -b" \
"" "HELLO"
SKIP=
-optional DESKTOP
+optional DESKTOP LONG_OPTS
testing "od -b --traditional" \
"od -b --traditional" \
"\
@@ -26,7 +26,7 @@ testing "od -b --traditional" \
"" "HELLO"
SKIP=
-optional DESKTOP
+optional DESKTOP LONG_OPTS
testing "od -b --traditional FILE" \
"od -b --traditional input" \
"\
diff --git a/testsuite/tar.tests b/testsuite/tar.tests
index 534135df8..39ece5feb 100755
--- a/testsuite/tar.tests
+++ b/testsuite/tar.tests
@@ -156,6 +156,7 @@ SKIP=
# Had a bug where on extract autodetect first "switched off" -z
# and then failed to recognize .tgz extension
+optional FEATURE_TAR_CREATE FEATURE_SEAMLESS_GZ
testing "tar extract tgz" "\
dd count=1 bs=1M if=/dev/zero of=F0 2>/dev/null
tar -czf F0.tgz F0
@@ -167,8 +168,10 @@ F0
Ok
" \
"" ""
+SKIP=
# On extract, everything up to and including last ".." component is stripped
+optional FEATURE_TAR_CREATE
testing "tar strips /../ on extract" "\
rm -rf input_* test.tar 2>/dev/null
mkdir input_dir
@@ -184,6 +187,7 @@ input_dir/file
Ok
" \
"" ""
+SKIP=
cd .. && rm -rf tar.tempdir || exit 1