summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-06-20 00:29:38 +0200
committerKay Sievers <kay.sievers@suse.de>2005-06-20 00:29:38 +0200
commitbf5d2964730e63316861e310d1f24c165b11e961 (patch)
tree84354496e6fd65402068bc67b964f0752b2189ab /test
parent57663b364beda200ec189c889e7d9c9fede37c9a (diff)
prepare for module loading rules and add MODALIAS key
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'test')
-rwxr-xr-xtest/udev-test.pl51
1 files changed, 48 insertions, 3 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 884abf9e8b..9225352130 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -241,7 +241,7 @@ BUS=="scsi", ID=="0:0:0:0", NAME="first_disk%n"
EOF
},
{
- desc => "test NAME substitution chars",
+ desc => "test substitution chars",
subsys => "block",
devpath => "/block/sda/sda3",
exp_name => "Major:8:minor:3:kernelnumber:3:bus:0:0:0:0" ,
@@ -250,7 +250,7 @@ BUS=="scsi", ID=="0:0:0:0", NAME="Major:%M:minor:%m:kernelnumber:%n:bus:%b"
EOF
},
{
- desc => "test NAME substitution chars (with length limit)",
+ desc => "test substitution chars (with length limit)",
subsys => "block",
devpath => "/block/sda/sda3",
exp_name => "M8-m3-n3-b0:0-sIBM" ,
@@ -363,6 +363,51 @@ BUS=="scsi", PROGRAM=="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL=
EOF
},
{
+ desc => "test substitution by variable name",
+ subsys => "block",
+ devpath => "/block/sda/sda3",
+ exp_name => "Major:8-minor:3-kernelnumber:3-bus:0:0:0:0" ,
+ rules => <<EOF
+BUS=="scsi", ID=="0:0:0:0", NAME="Major:\$major-minor:\$minor-kernelnumber:\$number-bus:\$id"
+EOF
+ },
+ {
+ desc => "test substitution by variable name 2",
+ subsys => "block",
+ devpath => "/block/sda/sda3",
+ exp_name => "Major:8-minor:3-kernelnumber:3-bus:0:0:0:0" ,
+ rules => <<EOF
+BUS=="scsi", ID=="0:0:0:0", DEVPATH="*/sda/*", NAME="Major:\$major-minor:%m-kernelnumber:\$number-bus:%b"
+EOF
+ },
+ {
+ desc => "test substitution by variable name 3",
+ subsys => "block",
+ devpath => "/block/sda/sda3",
+ exp_name => "830:0:0:03" ,
+ rules => <<EOF
+BUS=="scsi", ID=="0:0:0:0", DEVPATH="*/sda/*", NAME="%M%m%b%n"
+EOF
+ },
+ {
+ desc => "test substitution by variable name 4",
+ subsys => "block",
+ devpath => "/block/sda/sda3",
+ exp_name => "833" ,
+ rules => <<EOF
+BUS=="scsi", ID=="0:0:0:0", DEVPATH="*/sda/*", NAME="\$major\$minor\$number"
+EOF
+ },
+ {
+ desc => "test substitution by variable name 5",
+ subsys => "block",
+ devpath => "/block/sda/sda3",
+ exp_name => "8330:0:0:0" ,
+ rules => <<EOF
+BUS=="scsi", ID=="0:0:0:0", DEVPATH="*/sda/*", NAME="\$major%m%n\$id"
+EOF
+ },
+ {
desc => "invalid program for device with no bus",
subsys => "tty",
devpath => "/class/tty/console",
@@ -1290,7 +1335,7 @@ EOF
exp_rem_error => "yes",
option => "clean",
rules => <<EOF
-KERNEL=="sda", NAME="ok", RUN+="/bin/sh -c 'ln -s `basename \$DEVNAME` %r/testsymlink'"
+KERNEL=="sda", NAME="ok", RUN+="/bin/sh -c 'ln -s `basename \$\$DEVNAME` %r/testsymlink'"
KERNEL=="sda", NAME="not-ok"
EOF
},