summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatmans@us.ibm.com <patmans@us.ibm.com>2004-02-16 22:00:38 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:32:28 -0700
commit93656247f3b398959a0b40ac352b9f6ac195e86b (patch)
tree0822918792315ec71fc180f0f25793774be04678
parentab2e5bd94631eb3fcc66ec0aaa031d83a2de1604 (diff)
[PATCH] udev add some ID tests
Patch against current udev bk to add a few ID rule tests.
-rw-r--r--test/udev-test.pl46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 258d5c9596..7459f8ff5c 100644
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -386,6 +386,52 @@ EOF
KERNEL="ttyUSB0", NAME="visor"
EOF
},
+ {
+ desc => "ID rule",
+ subsys => "block",
+ devpath => "block/sda",
+ expected => "scsi-0:0:0:0",
+ conf => <<EOF
+BUS="usb", ID="0:0:0:0", NAME="not-scsi"
+BUS="scsi", ID="0:0:0:1", NAME="no-match"
+BUS="scsi", ID=":0", NAME="short-id"
+BUS="scsi", ID="/0:0:0:0", NAME="no-match"
+BUS="scsi", ID="0:0:0:0", NAME="scsi-0:0:0:0"
+EOF
+ },
+ {
+ desc => "ID wildcard all",
+ subsys => "block",
+ devpath => "block/sda",
+ expected => "scsi-0:0:0:0",
+ conf => <<EOF
+BUS="scsi", ID="*:1", NAME="no-match"
+BUS="scsi", ID="*:0:1", NAME="no-match"
+BUS="scsi", ID="*:0:0:1", NAME="no-match"
+BUS="scsi", ID="*", NAME="scsi-0:0:0:0"
+BUS="scsi", ID="0:0:0:0", NAME="bad"
+EOF
+ },
+ {
+ desc => "ID wildcard partial",
+ subsys => "block",
+ devpath => "block/sda",
+ expected => "scsi-0:0:0:0",
+ conf => <<EOF
+BUS="scsi", ID="*:0", NAME="scsi-0:0:0:0"
+BUS="scsi", ID="0:0:0:0", NAME="bad"
+EOF
+ },
+ {
+ desc => "ID wildcard partial 2",
+ subsys => "block",
+ devpath => "block/sda",
+ expected => "scsi-0:0:0:0",
+ conf => <<EOF
+BUS="scsi", ID="*:0:0:0", NAME="scsi-0:0:0:0"
+BUS="scsi", ID="0:0:0:0", NAME="bad"
+EOF
+ },
);
# set env