aboutsummaryrefslogtreecommitdiff
path: root/testsuite/mdev.tests
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 /testsuite/mdev.tests
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>
Diffstat (limited to 'testsuite/mdev.tests')
-rwxr-xr-xtestsuite/mdev.tests14
1 files changed, 14 insertions, 0 deletions
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