aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-02-14 06:03:06 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:36:12 -0700
commitfd9efc00a2e477423185c993b8ec4570ef3ee07d (patch)
tree08f7ddb6e135ef5101bf058cb91cdf293076a976 /test
parente57e7bc10811fa87e5775012da9e9b2fb67099c3 (diff)
downloadudev-fd9efc00a2e477423185c993b8ec4570ef3ee07d.tar.gz
[PATCH] introduce OPTIONS=ignore_device, ignore_remove, all_partitions" key
Here we move all possible options into a own key to make it possible to have options-only rules. The options on the NAME key are removed from the man page and will be removed from a future version of udev. For ignore rules, OPTIONS="ignore" should be used. The rule: SUBSYSTEM="block", SYSFS{removable}="1", OPTIONS="all_partitions" will create all partitions for a block device which is known to have removable media (a check for cdrom drives would be needed too).
Diffstat (limited to 'test')
-rw-r--r--test/udev-test.pl35
1 files changed, 33 insertions, 2 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index fc0e89ee..5f9c0cb9 100644
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -1021,13 +1021,44 @@ KERNEL="sda", NAME="cdrom%e"
EOF
},
{
+ desc => "ignore rule test",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "node",
+ exp_error => "yes",
+ conf => <<EOF
+BUS="scsi", KERNEL="sda", NAME="node", OPTIONS="ignore"
+EOF
+ },
+ {
+ desc => "all_partitions, option-only rule",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "node6",
+ conf => <<EOF
+SUBSYSTEM="block", OPTIONS="all_partitions"
+BUS="scsi", KERNEL="sda", NAME="node"
+EOF
+ },
+ {
+ desc => "all_partitions, option-only rule (fail on partition)",
+ subsys => "block",
+ devpath => "/block/sda/sda1",
+ exp_name => "node6",
+ exp_error => "yes",
+ conf => <<EOF
+SUBSYSTEM="block", OPTIONS="all_partitions"
+BUS="scsi", KERNEL="sda", NAME="node"
+EOF
+ },
+ {
desc => "ignore remove event test",
subsys => "block",
devpath => "/block/sda",
exp_name => "node",
exp_error => "yes",
conf => <<EOF
-BUS="scsi", KERNEL="sda", NAME{ignore_remove}="node"
+BUS="scsi", KERNEL="sda", NAME="node", OPTIONS="ignore_remove"
EOF
},
{
@@ -1038,7 +1069,7 @@ EOF
exp_error => "yes",
option => "clear",
conf => <<EOF
-BUS="scsi", KERNEL="sda", NAME{ignore_remove, all_partitions}="node"
+BUS="scsi", KERNEL="sda", NAME="node", OPTIONS="ignore_remove, all_partitions"
EOF
},
{