aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-05-10 05:53:16 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-05-10 05:53:16 +0200
commite3d90a90d43b857a5305808560d485b030a15c0a (patch)
treec731624c6ac8755ae485f600235d4b29ff337582
parent1602a5cdb9b68aec34389961b1c1d134d8b59d07 (diff)
downloadbusybox-w32-e3d90a90d43b857a5305808560d485b030a15c0a.tar.gz
busybox-w32-e3d90a90d43b857a5305808560d485b030a15c0a.tar.bz2
busybox-w32-e3d90a90d43b857a5305808560d485b030a15c0a.zip
randomconfig testsuite fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-xtestsuite/awk.tests6
-rwxr-xr-xtestsuite/expand.tests7
-rw-r--r--testsuite/expand/expand-works-like-GNU2
-rwxr-xr-xtestsuite/fold.tests4
-rwxr-xr-xtestsuite/makedevs.tests2
-rwxr-xr-xtestsuite/mdev.tests14
-rwxr-xr-xtestsuite/tar.tests6
-rw-r--r--testsuite/tar/tar_with_link_with_size2
-rw-r--r--testsuite/tar/tar_with_prefix_fields2
-rwxr-xr-xtestsuite/unexpand.tests4
10 files changed, 43 insertions, 6 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 3a7c8f4d0..5dea2e983 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -33,12 +33,14 @@ testing "awk long field sep" "awk -F-- '{ print NF, length(\$NF), \$NF }'" \
33testing "awk gsub falls back to non-extended-regex" \ 33testing "awk gsub falls back to non-extended-regex" \
34 "awk 'gsub(\"@(samp|code|file)\{\",\"\");'; echo \$?" "0\n" "" "Hi\n" 34 "awk 'gsub(\"@(samp|code|file)\{\",\"\");'; echo \$?" "0\n" "" "Hi\n"
35 35
36tar xjf awk_t1.tar.bz2 36optional FEATURE_SEAMLESS_BZ2
37test x"$SKIP" != x"1" && tar xjf awk_t1.tar.bz2
37testing "awk 'gcc build bug'" \ 38testing "awk 'gcc build bug'" \
38 "awk -f awk_t1_opt-functions.awk -f awk_t1_opth-gen.awk <awk_t1_input | md5sum" \ 39 "awk -f awk_t1_opt-functions.awk -f awk_t1_opth-gen.awk <awk_t1_input | md5sum" \
39 "f842e256461a5ab1ec60b58d16f1114f -\n" \ 40 "f842e256461a5ab1ec60b58d16f1114f -\n" \
40 "" "" 41 "" ""
41rm -rf awk_t1_* 42rm -rf awk_t1_* 2>/dev/null
43SKIP=
42 44
43Q='":"' 45Q='":"'
44 46
diff --git a/testsuite/expand.tests b/testsuite/expand.tests
index 996631450..357a9ad6b 100755
--- a/testsuite/expand.tests
+++ b/testsuite/expand.tests
@@ -10,12 +10,15 @@ testing "expand" \
10 "expand" \ 10 "expand" \
11 " 12345678 12345678\n" \ 11 " 12345678 12345678\n" \
12 "" \ 12 "" \
13 "\t12345678\t12345678\n" \ 13 "\t12345678\t12345678\n"
14 14
15optional UNICODE_SUPPORT
15testing "expand with unicode characher 0x394" \ 16testing "expand with unicode characher 0x394" \
16 "expand" \ 17 "expand" \
17 "Δ 12345ΔΔΔ 12345678\n" \ 18 "Δ 12345ΔΔΔ 12345678\n" \
18 "" \ 19 "" \
19 "Δ\t12345ΔΔΔ\t12345678\n" \ 20 "Δ\t12345ΔΔΔ\t12345678\n"
21SKIP=
22
20 23
21exit $FAILCOUNT 24exit $FAILCOUNT
diff --git a/testsuite/expand/expand-works-like-GNU b/testsuite/expand/expand-works-like-GNU
index ee8c793ed..843111275 100644
--- a/testsuite/expand/expand-works-like-GNU
+++ b/testsuite/expand/expand-works-like-GNU
@@ -1,3 +1,5 @@
1# FEATURE: CONFIG_UNEXPAND
2
1rm -f foo bar 3rm -f foo bar
2echo -e "\ty" | expand -t 3 ../../busybox > foo 4echo -e "\ty" | expand -t 3 ../../busybox > foo
3echo -e "\ty" | busybox unexpand -t 3 ../../busybox > bar 5echo -e "\ty" | busybox unexpand -t 3 ../../busybox > bar
diff --git a/testsuite/fold.tests b/testsuite/fold.tests
index 17721a180..0197d024d 100755
--- a/testsuite/fold.tests
+++ b/testsuite/fold.tests
@@ -28,6 +28,7 @@ be preserved
28is here:>\0< - they must be preserved 28is here:>\0< - they must be preserved
29" \ 29" \
30 30
31optional UNICODE_SUPPORT
31# The text was taken from English and Ukrainian wikipedia pages 32# The text was taken from English and Ukrainian wikipedia pages
32testing "fold -sw66 with unicode input" "fold -sw66" \ 33testing "fold -sw66 with unicode input" "fold -sw66" \
33 "\ 34 "\
@@ -54,6 +55,7 @@ Way.
54каталогом Мессьє та NGC224 за Новим загальним каталогом) — \ 55каталогом Мессьє та NGC224 за Новим загальним каталогом) — \
55спіральна галактика, що знаходиться на відстані приблизно у 2,5 \ 56спіральна галактика, що знаходиться на відстані приблизно у 2,5 \
56мільйони світлових років від нашої планети у сузір'ї Андромеди. \ 57мільйони світлових років від нашої планети у сузір'ї Андромеди. \
57На початку ХХІ ст. в центрі галактики виявлено чорну дірку." \ 58На початку ХХІ ст. в центрі галактики виявлено чорну дірку."
59SKIP=
58 60
59exit $FAILCOUNT 61exit $FAILCOUNT
diff --git a/testsuite/makedevs.tests b/testsuite/makedevs.tests
index b41614f13..5d6b0f248 100755
--- a/testsuite/makedevs.tests
+++ b/testsuite/makedevs.tests
@@ -16,6 +16,7 @@ FILTER_LS2="sed -e 's/, */,/g' -e 's/ */ /g' | cut -d' ' -f 1-4,9-"
16rm -rf makedevs.testdir 16rm -rf makedevs.testdir
17mkdir makedevs.testdir 17mkdir makedevs.testdir
18 18
19optional FEATURE_LS_RECURSIVE
19testing "makedevs -d ../makedevs.device_table.txt ." \ 20testing "makedevs -d ../makedevs.device_table.txt ." \
20 "(cd makedevs.testdir && makedevs -d ../makedevs.device_table.txt . 2>&1); 21 "(cd makedevs.testdir && makedevs -d ../makedevs.device_table.txt . 2>&1);
21 find makedevs.testdir ! -type d | sort | xargs ls -lnR | $FILTER_LS" \ 22 find makedevs.testdir ! -type d | sort | xargs ls -lnR | $FILTER_LS" \
@@ -132,6 +133,7 @@ crw-rw-rw- 1 0 0 1,9 makedevs.testdir/dev/urandom
132crw-rw-rw- 1 0 0 1,5 makedevs.testdir/dev/zero 133crw-rw-rw- 1 0 0 1,5 makedevs.testdir/dev/zero
133" \ 134" \
134 "" "" 135 "" ""
136SKIP=
135 137
136# clean up 138# clean up
137rm -rf makedevs.testdir 139rm -rf makedevs.testdir
diff --git a/testsuite/mdev.tests b/testsuite/mdev.tests
index 036738e52..a21d9bd0c 100755
--- a/testsuite/mdev.tests
+++ b/testsuite/mdev.tests
@@ -75,6 +75,7 @@ br--r--r-- 1 2 2 8,0 sda
75# continuing to use directory structure from prev test 75# continuing to use directory structure from prev test
76rm -rf mdev.testdir/dev/* 76rm -rf mdev.testdir/dev/*
77echo "sda 0:0 444 >disk/scsiA" >mdev.testdir/etc/mdev.conf 77echo "sda 0:0 444 >disk/scsiA" >mdev.testdir/etc/mdev.conf
78optional FEATURE_LS_RECURSIVE
78testing "mdev move/symlink rule '>bar/baz'" \ 79testing "mdev move/symlink rule '>bar/baz'" \
79 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; 80 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
80 ls -lnR mdev.testdir/dev | $FILTER_LS2" \ 81 ls -lnR mdev.testdir/dev | $FILTER_LS2" \
@@ -87,10 +88,12 @@ mdev.testdir/dev/disk:
87br--r--r-- 1 0 0 scsiA 88br--r--r-- 1 0 0 scsiA
88" \ 89" \
89 "" "" 90 "" ""
91SKIP=
90 92
91# continuing to use directory structure from prev test 93# continuing to use directory structure from prev test
92rm -rf mdev.testdir/dev/* 94rm -rf mdev.testdir/dev/*
93echo "sda 0:0 444 >disk/" >mdev.testdir/etc/mdev.conf 95echo "sda 0:0 444 >disk/" >mdev.testdir/etc/mdev.conf
96optional FEATURE_LS_RECURSIVE
94testing "mdev move/symlink rule '>bar/'" \ 97testing "mdev move/symlink rule '>bar/'" \
95 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; 98 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
96 ls -lnR mdev.testdir/dev | $FILTER_LS2" \ 99 ls -lnR mdev.testdir/dev | $FILTER_LS2" \
@@ -103,11 +106,13 @@ mdev.testdir/dev/disk:
103br--r--r-- 1 0 0 sda 106br--r--r-- 1 0 0 sda
104" \ 107" \
105 "" "" 108 "" ""
109SKIP=
106 110
107# continuing to use directory structure from prev test 111# continuing to use directory structure from prev test
108rm -rf mdev.testdir/dev/* 112rm -rf mdev.testdir/dev/*
109# here we complicate things by having non-matching group 1 and using %0 113# here we complicate things by having non-matching group 1 and using %0
110echo "s([0-9])*d([a-z]+) 0:0 644 >sd/%2_%0" >mdev.testdir/etc/mdev.conf 114echo "s([0-9])*d([a-z]+) 0:0 644 >sd/%2_%0" >mdev.testdir/etc/mdev.conf
115optional FEATURE_LS_RECURSIVE
111testing "mdev regexp substring match + replace" \ 116testing "mdev regexp substring match + replace" \
112 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; 117 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
113 ls -lnR mdev.testdir/dev | $FILTER_LS2" \ 118 ls -lnR mdev.testdir/dev | $FILTER_LS2" \
@@ -120,10 +125,12 @@ mdev.testdir/dev/sd:
120brw-r--r-- 1 0 0 a_sda 125brw-r--r-- 1 0 0 a_sda
121" \ 126" \
122 "" "" 127 "" ""
128SKIP=
123 129
124# continuing to use directory structure from prev test 130# continuing to use directory structure from prev test
125rm -rf mdev.testdir/dev/* 131rm -rf mdev.testdir/dev/*
126echo "sda 0:0 644 @echo @echo TEST" >mdev.testdir/etc/mdev.conf 132echo "sda 0:0 644 @echo @echo TEST" >mdev.testdir/etc/mdev.conf
133optional FEATURE_LS_RECURSIVE
127testing "mdev command" \ 134testing "mdev command" \
128 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; 135 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
129 ls -lnR mdev.testdir/dev | $FILTER_LS" \ 136 ls -lnR mdev.testdir/dev | $FILTER_LS" \
@@ -133,10 +140,12 @@ mdev.testdir/dev:
133brw-r--r-- 1 0 0 8,0 sda 140brw-r--r-- 1 0 0 8,0 sda
134" \ 141" \
135 "" "" 142 "" ""
143SKIP=
136 144
137# continuing to use directory structure from prev test 145# continuing to use directory structure from prev test
138rm -rf mdev.testdir/dev/* 146rm -rf mdev.testdir/dev/*
139echo "sda 0:0 644 =block/ @echo @echo TEST:\$MDEV" >mdev.testdir/etc/mdev.conf 147echo "sda 0:0 644 =block/ @echo @echo TEST:\$MDEV" >mdev.testdir/etc/mdev.conf
148optional FEATURE_LS_RECURSIVE
140testing "mdev move and command" \ 149testing "mdev move and command" \
141 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; 150 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
142 ls -lnR mdev.testdir/dev | $FILTER_LS2" \ 151 ls -lnR mdev.testdir/dev | $FILTER_LS2" \
@@ -149,10 +158,12 @@ mdev.testdir/dev/block:
149brw-r--r-- 1 0 0 sda 158brw-r--r-- 1 0 0 sda
150" \ 159" \
151 "" "" 160 "" ""
161SKIP=
152 162
153# continuing to use directory structure from prev test 163# continuing to use directory structure from prev test
154rm -rf mdev.testdir/dev/* 164rm -rf mdev.testdir/dev/*
155echo "@8,0 0:1 644" >mdev.testdir/etc/mdev.conf 165echo "@8,0 0:1 644" >mdev.testdir/etc/mdev.conf
166optional FEATURE_LS_RECURSIVE
156testing "mdev #maj,min and no explicit uid" \ 167testing "mdev #maj,min and no explicit uid" \
157 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; 168 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
158 ls -lnR mdev.testdir/dev | $FILTER_LS" \ 169 ls -lnR mdev.testdir/dev | $FILTER_LS" \
@@ -161,6 +172,7 @@ mdev.testdir/dev:
161brw-r--r-- 1 0 1 8,0 sda 172brw-r--r-- 1 0 1 8,0 sda
162" \ 173" \
163 "" "" 174 "" ""
175SKIP=
164 176
165# continuing to use directory structure from prev test 177# continuing to use directory structure from prev test
166rm -rf mdev.testdir/dev/* 178rm -rf mdev.testdir/dev/*
@@ -174,6 +186,7 @@ echo "capi 0:0 0660 =capi20" >mdev.testdir/etc/mdev.conf
174echo "capi([0-9]) 0:0 0660 =capi20.0%1" >>mdev.testdir/etc/mdev.conf 186echo "capi([0-9]) 0:0 0660 =capi20.0%1" >>mdev.testdir/etc/mdev.conf
175echo "capi([0-9]*) 0:0 0660 =capi20.%1" >>mdev.testdir/etc/mdev.conf 187echo "capi([0-9]*) 0:0 0660 =capi20.%1" >>mdev.testdir/etc/mdev.conf
176# mdev invocation with DEVPATH=/class/tty/capi20 was deleting /dev/capi20 188# mdev invocation with DEVPATH=/class/tty/capi20 was deleting /dev/capi20
189optional FEATURE_LS_RECURSIVE
177testing "move rule does not delete node with name == device_name" \ 190testing "move rule does not delete node with name == device_name" \
178 "\ 191 "\
179 env - PATH=$PATH ACTION=add DEVPATH=/class/tty/capi chroot mdev.testdir /mdev 2>&1; 192 env - PATH=$PATH ACTION=add DEVPATH=/class/tty/capi chroot mdev.testdir /mdev 2>&1;
@@ -187,6 +200,7 @@ crw-rw---- 1 0 0 191,1 capi20.01
187crw-rw---- 1 0 0 191,20 capi20.20 200crw-rw---- 1 0 0 191,20 capi20.20
188" \ 201" \
189 "" "" 202 "" ""
203SKIP=
190 204
191# clean up 205# clean up
192rm -rf mdev.testdir 206rm -rf mdev.testdir
diff --git a/testsuite/tar.tests b/testsuite/tar.tests
index a96382932..ecd212fbf 100755
--- a/testsuite/tar.tests
+++ b/testsuite/tar.tests
@@ -9,6 +9,7 @@ mkdir tar.tempdir && cd tar.tempdir || exit 1
9 9
10# testing "test name" "script" "expected result" "file input" "stdin" 10# testing "test name" "script" "expected result" "file input" "stdin"
11 11
12optional FEATURE_TAR_CREATE
12testing "tar hardlinks and repeated files" '\ 13testing "tar hardlinks and repeated files" '\
13rm -rf input_* test.tar 2>/dev/null 14rm -rf input_* test.tar 2>/dev/null
14>input_hard1 15>input_hard1
@@ -39,7 +40,9 @@ drwxr-xr-x input_dir
39-rw-r--r-- input_hard2 40-rw-r--r-- input_hard2
40" \ 41" \
41"" "" 42"" ""
43SKIP=
42 44
45optional FEATURE_TAR_CREATE
43testing "tar hardlinks mode" '\ 46testing "tar hardlinks mode" '\
44rm -rf input_* test.tar 2>/dev/null 47rm -rf input_* test.tar 2>/dev/null
45>input_hard1 48>input_hard1
@@ -68,7 +71,9 @@ dr-xr-x--- input_dir
68-rwxr----x input_hard2 71-rwxr----x input_hard2
69" \ 72" \
70"" "" 73"" ""
74SKIP=
71 75
76optional FEATURE_TAR_CREATE
72testing "tar symlinks mode" '\ 77testing "tar symlinks mode" '\
73rm -rf input_* test.tar 2>/dev/null 78rm -rf input_* test.tar 2>/dev/null
74>input_file 79>input_file
@@ -97,6 +102,7 @@ dr-xr-x--- input_dir
97lrwxrwxrwx input_file 102lrwxrwxrwx input_file
98" \ 103" \
99"" "" 104"" ""
105SKIP=
100 106
101optional FEATURE_TAR_LONG_OPTIONS 107optional FEATURE_TAR_LONG_OPTIONS
102testing "tar --overwrite" "\ 108testing "tar --overwrite" "\
diff --git a/testsuite/tar/tar_with_link_with_size b/testsuite/tar/tar_with_link_with_size
index 5b61cc70b..774cd5698 100644
--- a/testsuite/tar/tar_with_link_with_size
+++ b/testsuite/tar/tar_with_link_with_size
@@ -1,3 +1,5 @@
1# FEATURE: CONFIG_FEATURE_TAR_UNAME_GNAME
2
1# This tarball contains a softlink with size field != 0. 3# This tarball contains a softlink with size field != 0.
2# If not ignored, it makes hext header to be skipped 4# If not ignored, it makes hext header to be skipped
3# and data to be read as a header. 5# and data to be read as a header.
diff --git a/testsuite/tar/tar_with_prefix_fields b/testsuite/tar/tar_with_prefix_fields
index 1c7124d52..56dcac59d 100644
--- a/testsuite/tar/tar_with_prefix_fields
+++ b/testsuite/tar/tar_with_prefix_fields
@@ -1,3 +1,5 @@
1# FEATURE: CONFIG_FEATURE_TAR_UNAME_GNAME
2
1tar1_bz2() 3tar1_bz2()
2{ 4{
3 $ECHO -ne "\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\x12\xd1\x86\x30\x00\x0c" 5 $ECHO -ne "\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\x12\xd1\x86\x30\x00\x0c"
diff --git a/testsuite/unexpand.tests b/testsuite/unexpand.tests
index 1af2fdc5f..a48e3214e 100755
--- a/testsuite/unexpand.tests
+++ b/testsuite/unexpand.tests
@@ -30,7 +30,9 @@ testing "unexpand case 7" "unexpand" \
30testing "unexpand case 8" "unexpand" \ 30testing "unexpand case 8" "unexpand" \
31 "a b\n" "" "a b\n" \ 31 "a b\n" "" "a b\n" \
32 32
33optional UNICODE_SUPPORT
33testing "unexpand with unicode characher 0x394" "unexpand" \ 34testing "unexpand with unicode characher 0x394" "unexpand" \
34 "1ΔΔΔ5\t99999\n" "" "1ΔΔΔ5 99999\n" \ 35 "1ΔΔΔ5\t99999\n" "" "1ΔΔΔ5 99999\n"
36SKIP=
35 37
36exit $FAILCOUNT 38exit $FAILCOUNT