diff options
author | Denys Vlasenko | 2009-06-22 01:31:12 +0200 |
---|---|---|
committer | Denys Vlasenko | 2009-06-22 01:31:12 +0200 |
commit | 2f86ca135069e457bb16ab9e062a10e0775717a6 (patch) | |
tree | 876df9ba3cf6ac39403cc0f210c0ffab05672049 /testsuite | |
parent | b0bee2b0da4b3270ee5ae6d556c71a6b5ff844bf (diff) | |
download | busybox-2f86ca135069e457bb16ab9e062a10e0775717a6.zip busybox-2f86ca135069e457bb16ab9e062a10e0775717a6.tar.gz |
mdev: fix the case when move rule deletes node with name == device_name
Signed-off-by: Jean Wolter <jw5@os.inf.tu-dresden.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/mdev.tests | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/mdev.tests b/testsuite/mdev.tests index a175007..912785e 100755 --- a/testsuite/mdev.tests +++ b/testsuite/mdev.tests @@ -162,6 +162,32 @@ brw-r--r-- 1 0 1 8,0 sda " \ "" "" +# continuing to use directory structure from prev test +rm -rf mdev.testdir/dev/* +mkdir -p mdev.testdir/sys/class/tty/capi +echo "191:0" >mdev.testdir/sys/class/tty/capi/dev +mkdir -p mdev.testdir/sys/class/tty/capi1 +echo "191:1" >mdev.testdir/sys/class/tty/capi1/dev +mkdir -p mdev.testdir/sys/class/tty/capi20 +echo "191:20" >mdev.testdir/sys/class/tty/capi20/dev +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 +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; + env - PATH=$PATH ACTION=add DEVPATH=/class/tty/capi1 chroot mdev.testdir /mdev 2>&1; + env - PATH=$PATH ACTION=add DEVPATH=/class/tty/capi20 chroot mdev.testdir /mdev 2>&1; + ls -lnR mdev.testdir/dev | $FILTER_LS" \ +"\ +mdev.testdir/dev: +crw-rw---- 1 0 0 191,0 capi20 +crw-rw---- 1 0 0 191,1 capi20.01 +crw-rw---- 1 0 0 191,20 capi20.20 +" \ + "" "" + # clean up rm -rf mdev.testdir |