summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-02-10 09:03:55 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:31:03 -0700
commit69aa6dfb7081de376769cf712d1a8832f4346516 (patch)
treef16b036de774445577556e4005e48da3312bb464 /test
parent866bb54704e9d955318e0dd6089acfb67d36bfd2 (diff)
[PATCH] add %P modifier to query the node name of the parent device
Events for partition devies may want to read the main block device name to compose it's own name or read a disklabel from the main device. SUBSYSTEM="block", KERNEL="*[1-9]", NAME="%P-p%n" will append the partition number to the name of the main block device.
Diffstat (limited to 'test')
-rw-r--r--test/udev-test.pl32
1 files changed, 31 insertions, 1 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index fa1e4affc6..5a519ef13b 100644
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -968,7 +968,7 @@ KERNEL="sda", NAME="cdrom%e"
EOF
},
{
- desc => "enumeration char test sequence (1/5 keep)",
+ desc => "enumeration char test sequence 1/5 (keep)",
subsys => "block",
devpath => "/block/sda",
exp_name => "cdrom",
@@ -1086,6 +1086,36 @@ EOF
BUS="scsi", KERNEL="sda", PROGRAM="/bin/echo %p", RESULT="/block/sda" NAME="%k"
EOF
},
+ {
+ desc => "parent node name substitution test sequence 1/2 (keep)",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "main_device",
+ option => "keep",
+ conf => <<EOF
+BUS="scsi", KERNEL="sda", NAME="main_device"
+EOF
+ },
+ {
+ desc => "parent node name substitution test sequence 2/2 (clean)",
+ subsys => "block",
+ devpath => "/block/sda/sda1",
+ exp_name => "main_device-part-1",
+ option => "clean",
+ conf => <<EOF
+BUS="scsi", KERNEL="sda1", NAME="%P-part-1"
+EOF
+ },
+ {
+ desc => "udev_root substitution",
+ subsys => "block",
+ devpath => "/block/sda/sda1",
+ exp_name => "start-udev-root-end",
+ option => "clean",
+ conf => <<EOF
+BUS="scsi", KERNEL="sda1", NAME="start-%r-end"
+EOF
+ },
);
# set env