summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko2013-01-21 01:22:12 +0100
committerDenys Vlasenko2013-01-21 01:22:12 +0100
commit4609f477c7e043a4f6147dfe6e86b775da2ef784 (patch)
treec4e51b6214438008026cd22744e57d3cb1cb27ba /testsuite
parent31dc8603eedc0140c798c9af3404a35ea190af2c (diff)
downloadbusybox-4609f477c7e043a4f6147dfe6e86b775da2ef784.zip
busybox-4609f477c7e043a4f6147dfe6e86b775da2ef784.tar.gz
mdev: fix mode of dir1 in =dir1/dir2/file rule
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/mdev.tests22
1 files changed, 21 insertions, 1 deletions
diff --git a/testsuite/mdev.tests b/testsuite/mdev.tests
index 7320e17..48d3dcc 100755
--- a/testsuite/mdev.tests
+++ b/testsuite/mdev.tests
@@ -11,7 +11,7 @@ FILTER_LS="grep -v '^total ' | sed -e 's/, */,/g' -e 's/ */ /g' | cut -d' ' -f
# cut: remove size+date
FILTER_LS2="grep -v '^total ' | sed -e 's/, */,/g' -e 's/ */ /g' | cut -d' ' -f 1-4,9-"
-# testing "test name" "options" "expected result" "file input" "stdin"
+# testing "test name" "commands" "expected result" "file input" "stdin"
rm -rf mdev.testdir
mkdir mdev.testdir
@@ -128,6 +128,26 @@ SKIP=
# continuing to use directory structure from prev test
rm -rf mdev.testdir/dev/*
+echo "sda 0:0 444 =disk/sd/a" >mdev.testdir/etc/mdev.conf
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
+testing "mdev move rule '=bar/baz/fname'" \
+ "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
+ ls -lnR mdev.testdir/dev | $FILTER_LS2" \
+"\
+mdev.testdir/dev:
+drwxr-xr-x 3 0 0 disk
+
+mdev.testdir/dev/disk:
+drwxr-xr-x 2 0 0 sd
+
+mdev.testdir/dev/disk/sd:
+br--r--r-- 1 0 0 a
+" \
+ "" ""
+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 STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_MDEV_RENAME_REGEXP FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME FEATURE_LS_SORTFILES