randomconfig testsuite fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2010-05-10 05:53:16 +02:00
parent 1602a5cdb9
commit e3d90a90d4
10 changed files with 43 additions and 6 deletions

View File

@ -33,12 +33,14 @@ testing "awk long field sep" "awk -F-- '{ print NF, length(\$NF), \$NF }'" \
testing "awk gsub falls back to non-extended-regex" \
"awk 'gsub(\"@(samp|code|file)\{\",\"\");'; echo \$?" "0\n" "" "Hi\n"
tar xjf awk_t1.tar.bz2
optional FEATURE_SEAMLESS_BZ2
test x"$SKIP" != x"1" && tar xjf awk_t1.tar.bz2
testing "awk 'gcc build bug'" \
"awk -f awk_t1_opt-functions.awk -f awk_t1_opth-gen.awk <awk_t1_input | md5sum" \
"f842e256461a5ab1ec60b58d16f1114f -\n" \
"" ""
rm -rf awk_t1_*
rm -rf awk_t1_* 2>/dev/null
SKIP=
Q='":"'

View File

@ -10,12 +10,15 @@ testing "expand" \
"expand" \
" 12345678 12345678\n" \
"" \
"\t12345678\t12345678\n" \
"\t12345678\t12345678\n"
optional UNICODE_SUPPORT
testing "expand with unicode characher 0x394" \
"expand" \
"Δ 12345ΔΔΔ 12345678\n" \
"" \
"Δ\t12345ΔΔΔ\t12345678\n" \
"Δ\t12345ΔΔΔ\t12345678\n"
SKIP=
exit $FAILCOUNT

View File

@ -1,3 +1,5 @@
# FEATURE: CONFIG_UNEXPAND
rm -f foo bar
echo -e "\ty" | expand -t 3 ../../busybox > foo
echo -e "\ty" | busybox unexpand -t 3 ../../busybox > bar

View File

@ -28,6 +28,7 @@ be preserved
is here:>\0< - they must be preserved
" \
optional UNICODE_SUPPORT
# The text was taken from English and Ukrainian wikipedia pages
testing "fold -sw66 with unicode input" "fold -sw66" \
"\
@ -54,6 +55,7 @@ Way.
каталогом Мессьє та NGC224 за Новим загальним каталогом) — \
спіральна галактика, що знаходиться на відстані приблизно у 2,5 \
мільйони світлових років від нашої планети у сузір'ї Андромеди. \
На початку ХХІ ст. в центрі галактики виявлено чорну дірку." \
На початку ХХІ ст. в центрі галактики виявлено чорну дірку."
SKIP=
exit $FAILCOUNT

View File

@ -16,6 +16,7 @@ FILTER_LS2="sed -e 's/, */,/g' -e 's/ */ /g' | cut -d' ' -f 1-4,9-"
rm -rf makedevs.testdir
mkdir makedevs.testdir
optional FEATURE_LS_RECURSIVE
testing "makedevs -d ../makedevs.device_table.txt ." \
"(cd makedevs.testdir && makedevs -d ../makedevs.device_table.txt . 2>&1);
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
crw-rw-rw- 1 0 0 1,5 makedevs.testdir/dev/zero
" \
"" ""
SKIP=
# clean up
rm -rf makedevs.testdir

View File

@ -75,6 +75,7 @@ br--r--r-- 1 2 2 8,0 sda
# continuing to use directory structure from prev test
rm -rf mdev.testdir/dev/*
echo "sda 0:0 444 >disk/scsiA" >mdev.testdir/etc/mdev.conf
optional FEATURE_LS_RECURSIVE
testing "mdev move/symlink rule '>bar/baz'" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -lnR mdev.testdir/dev | $FILTER_LS2" \
@ -87,10 +88,12 @@ mdev.testdir/dev/disk:
br--r--r-- 1 0 0 scsiA
" \
"" ""
SKIP=
# continuing to use directory structure from prev test
rm -rf mdev.testdir/dev/*
echo "sda 0:0 444 >disk/" >mdev.testdir/etc/mdev.conf
optional FEATURE_LS_RECURSIVE
testing "mdev move/symlink rule '>bar/'" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -lnR mdev.testdir/dev | $FILTER_LS2" \
@ -103,11 +106,13 @@ mdev.testdir/dev/disk:
br--r--r-- 1 0 0 sda
" \
"" ""
SKIP=
# continuing to use directory structure from prev test
rm -rf mdev.testdir/dev/*
# here we complicate things by having non-matching group 1 and using %0
echo "s([0-9])*d([a-z]+) 0:0 644 >sd/%2_%0" >mdev.testdir/etc/mdev.conf
optional FEATURE_LS_RECURSIVE
testing "mdev regexp substring match + replace" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -lnR mdev.testdir/dev | $FILTER_LS2" \
@ -120,10 +125,12 @@ mdev.testdir/dev/sd:
brw-r--r-- 1 0 0 a_sda
" \
"" ""
SKIP=
# continuing to use directory structure from prev test
rm -rf mdev.testdir/dev/*
echo "sda 0:0 644 @echo @echo TEST" >mdev.testdir/etc/mdev.conf
optional FEATURE_LS_RECURSIVE
testing "mdev command" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -lnR mdev.testdir/dev | $FILTER_LS" \
@ -133,10 +140,12 @@ mdev.testdir/dev:
brw-r--r-- 1 0 0 8,0 sda
" \
"" ""
SKIP=
# continuing to use directory structure from prev test
rm -rf mdev.testdir/dev/*
echo "sda 0:0 644 =block/ @echo @echo TEST:\$MDEV" >mdev.testdir/etc/mdev.conf
optional FEATURE_LS_RECURSIVE
testing "mdev move and command" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -lnR mdev.testdir/dev | $FILTER_LS2" \
@ -149,10 +158,12 @@ mdev.testdir/dev/block:
brw-r--r-- 1 0 0 sda
" \
"" ""
SKIP=
# continuing to use directory structure from prev test
rm -rf mdev.testdir/dev/*
echo "@8,0 0:1 644" >mdev.testdir/etc/mdev.conf
optional FEATURE_LS_RECURSIVE
testing "mdev #maj,min and no explicit uid" \
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
ls -lnR mdev.testdir/dev | $FILTER_LS" \
@ -161,6 +172,7 @@ mdev.testdir/dev:
brw-r--r-- 1 0 1 8,0 sda
" \
"" ""
SKIP=
# continuing to use directory structure from prev test
rm -rf mdev.testdir/dev/*
@ -174,6 +186,7 @@ echo "capi 0:0 0660 =capi20" >mdev.testdir/etc/mdev.conf
echo "capi([0-9]) 0:0 0660 =capi20.0%1" >>mdev.testdir/etc/mdev.conf
echo "capi([0-9]*) 0:0 0660 =capi20.%1" >>mdev.testdir/etc/mdev.conf
# mdev invocation with DEVPATH=/class/tty/capi20 was deleting /dev/capi20
optional FEATURE_LS_RECURSIVE
testing "move rule does not delete node with name == device_name" \
"\
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
crw-rw---- 1 0 0 191,20 capi20.20
" \
"" ""
SKIP=
# clean up
rm -rf mdev.testdir

View File

@ -9,6 +9,7 @@ mkdir tar.tempdir && cd tar.tempdir || exit 1
# testing "test name" "script" "expected result" "file input" "stdin"
optional FEATURE_TAR_CREATE
testing "tar hardlinks and repeated files" '\
rm -rf input_* test.tar 2>/dev/null
>input_hard1
@ -39,7 +40,9 @@ drwxr-xr-x input_dir
-rw-r--r-- input_hard2
" \
"" ""
SKIP=
optional FEATURE_TAR_CREATE
testing "tar hardlinks mode" '\
rm -rf input_* test.tar 2>/dev/null
>input_hard1
@ -68,7 +71,9 @@ dr-xr-x--- input_dir
-rwxr----x input_hard2
" \
"" ""
SKIP=
optional FEATURE_TAR_CREATE
testing "tar symlinks mode" '\
rm -rf input_* test.tar 2>/dev/null
>input_file
@ -97,6 +102,7 @@ dr-xr-x--- input_dir
lrwxrwxrwx input_file
" \
"" ""
SKIP=
optional FEATURE_TAR_LONG_OPTIONS
testing "tar --overwrite" "\

View File

@ -1,3 +1,5 @@
# FEATURE: CONFIG_FEATURE_TAR_UNAME_GNAME
# This tarball contains a softlink with size field != 0.
# If not ignored, it makes hext header to be skipped
# and data to be read as a header.

View File

@ -1,3 +1,5 @@
# FEATURE: CONFIG_FEATURE_TAR_UNAME_GNAME
tar1_bz2()
{
$ECHO -ne "\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\x12\xd1\x86\x30\x00\x0c"

View File

@ -30,7 +30,9 @@ testing "unexpand case 7" "unexpand" \
testing "unexpand case 8" "unexpand" \
"a b\n" "" "a b\n" \
optional UNICODE_SUPPORT
testing "unexpand with unicode characher 0x394" "unexpand" \
"1ΔΔΔ5\t99999\n" "" "1ΔΔΔ5 99999\n" \
"1ΔΔΔ5\t99999\n" "" "1ΔΔΔ5 99999\n"
SKIP=
exit $FAILCOUNT