diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-29 15:11:07 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-29 15:11:07 +0000 |
commit | cae11b51aac9f52d35f2446a26acafbe7be8e9bd (patch) | |
tree | 6284f6c5979f6a001f7086fcfdbfe656a14382e9 /testsuite | |
parent | 4461564c77260351fe3d82386eebf81085347b34 (diff) | |
download | busybox-cae11b51aac9f52d35f2446a26acafbe7be8e9bd.tar.gz |
mdev: fix "foo 0:0 444 >bar/baz" rule handling. make_device() +23 bytes
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/mdev.tests | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/testsuite/mdev.tests b/testsuite/mdev.tests index 1ee762828..777c5c540 100755 --- a/testsuite/mdev.tests +++ b/testsuite/mdev.tests @@ -8,6 +8,8 @@ # sed: (1) "maj, min" -> "maj,min" (2) coalesce spaces # cut: remove date FILTER_LS="sed -e 's/, */,/g' -e 's/ */ /g' | cut -d' ' -f 1-5,9-" +# cut: remove size+date +FILTER_LS2="sed -e 's/, */,/g' -e 's/ */ /g' | cut -d' ' -f 1-4,9-" # testing "test name" "options" "expected result" "file input" "stdin" @@ -31,7 +33,7 @@ brw-rw---- 1 0 0 8,0 sda "" "" # continuing to use directory structure from prev test -rm mdev.testdir/dev/sda +rm -rf mdev.testdir/dev/* echo ".* 1:1 666" >mdev.testdir/etc/mdev.conf echo "sda 2:2 444" >>mdev.testdir/etc/mdev.conf testing "mdev stops on first rule" \ @@ -42,6 +44,38 @@ brw-rw-rw- 1 1 1 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 +testing "mdev move/symlink rule '>bar/baz'" \ + "env - ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; + ls -lnR mdev.testdir/dev | $FILTER_LS2" \ +"\ +mdev.testdir/dev: +drwxr-xr-x 2 0 0 disk +lrwxrwxrwx 1 0 0 sda -> disk/scsiA + +mdev.testdir/dev/disk: +br--r--r-- 1 0 0 scsiA +" \ + "" "" + +# continuing to use directory structure from prev test +rm -rf mdev.testdir/dev/* +echo "sda 0:0 444 >disk/" >mdev.testdir/etc/mdev.conf +testing "mdev move/symlink rule '>bar/'" \ + "env - ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; + ls -lnR mdev.testdir/dev | $FILTER_LS2" \ +"\ +mdev.testdir/dev: +drwxr-xr-x 2 0 0 disk +lrwxrwxrwx 1 0 0 sda -> disk/sda + +mdev.testdir/dev/disk: +br--r--r-- 1 0 0 sda +" \ + "" "" + # clean up rm -rf mdev.testdir |