summaryrefslogtreecommitdiff
path: root/test/udev-test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'test/udev-test.pl')
-rw-r--r--test/udev-test.pl26
1 files changed, 24 insertions, 2 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 8af09a027b..47190f6e5d 100644
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -51,7 +51,7 @@ LABEL, BUS="scsi", vendor="IBM-ESXS", NAME="boot_disk%n"
EOF
},
{
- desc => "catch device by wildcard",
+ desc => "catch device by *",
subsys => "tty",
devpath => "class/tty/ttyUSB0",
expected => "visor/0" ,
@@ -60,6 +60,28 @@ REPLACE, KERNEL="ttyUSB*", NAME="visor/%n"
EOF
},
{
+ desc => "catch device by ?",
+ subsys => "tty",
+ devpath => "class/tty/ttyUSB0",
+ expected => "visor/0" ,
+ conf => <<EOF
+REPLACE, KERNEL="ttyUSB??*", NAME="visor/%n-1"
+REPLACE, KERNEL="ttyUSB??", NAME="visor/%n-2"
+REPLACE, KERNEL="ttyUSB?", NAME="visor/%n"
+EOF
+ },
+ {
+ desc => "catch device by character class",
+ subsys => "tty",
+ devpath => "class/tty/ttyUSB0",
+ expected => "visor/0" ,
+ conf => <<EOF
+REPLACE, KERNEL="ttyUSB[A-Z]*", NAME="visor/%n-1"
+REPLACE, KERNEL="ttyUSB?[0-9]", NAME="visor/%n-2"
+REPLACE, KERNEL="ttyUSB[0-9]*", NAME="visor/%n"
+EOF
+ },
+ {
desc => "replace kernel name",
subsys => "tty",
devpath => "class/tty/ttyUSB0",
@@ -96,7 +118,7 @@ TOPOLOGY, BUS="scsi", PLACE="0:0:0:0", NAME="Major:%M:minor:%m:kernelnumber:%n:b
EOF
},
{
- desc => "callout result substitution, only last should match",
+ desc => "callout result substitution",
subsys => "block",
devpath => "block/sda/sda3",
expected => "special-device-3" ,