summaryrefslogtreecommitdiff
path: root/test/udev-test.pl
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-03-13 11:40:32 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:53:18 -0700
commit3e5958dee5f24283eb5c6a2d2d95e1a39428a3b8 (patch)
treebaa33eae18ff92944084d140b3ff6049ce826b39 /test/udev-test.pl
parent79f651f4bd2fb395a705792eb8ce551a6021bcd6 (diff)
[PATCH] add ENV{} key to match agains environment variables
Diffstat (limited to 'test/udev-test.pl')
-rw-r--r--test/udev-test.pl32
1 files changed, 23 insertions, 9 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index ebceccecb2..2ece431735 100644
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -259,15 +259,6 @@ BUS=="scsi", ID=="0:0:0:0", NAME="M%M-m%m-n%n-b%3b-s%3s{vendor}"
EOF
},
{
- desc => "old style SYSFS_ attribute",
- subsys => "block",
- devpath => "/block/sda",
- exp_name => "good" ,
- conf => <<EOF
-BUS=="scsi", SYSFS_vendor=="IBM-ESXS", NAME="good"
-EOF
- },
- {
desc => "sustitution of sysfs value (%s{file})",
subsys => "block",
devpath => "/block/sda",
@@ -1171,6 +1162,29 @@ KERNEL == "sda1" , NAME = "true"
BUS=="scsi", KERNEL=="sda1", NAME="wrong"
EOF
},
+ {
+ desc => "ENV{} test",
+ subsys => "block",
+ devpath => "/block/sda/sda1",
+ exp_name => "true",
+ conf => <<EOF
+BUS=="scsi", KERNEL=="sda1", ENV{UDEV_TEST}=="go", NAME="wrong"
+BUS=="scsi", KERNEL=="sda1", ENV{UDEV_TEST}=="yes", NAME="true"
+BUS=="scsi", KERNEL=="sda1", ENV{UDEV_TEST}=="bad", NAME="bad"
+EOF
+ },
+ {
+ desc => "ENV{} test",
+ subsys => "block",
+ devpath => "/block/sda/sda1",
+ exp_name => "true",
+ conf => <<EOF
+BUS=="scsi", KERNEL=="sda1", ENV{UDEV_TEST}=="go", NAME="wrong"
+BUS=="scsi", KERNEL=="sda1", ENV{UDEV_TEST}=="yes", ENV{ACTION}=="add", ENV{DEVPATH}=="/block/sda/sdax1", NAME="no"
+BUS=="scsi", KERNEL=="sda1", ENV{UDEV_TEST}=="yes", ENV{ACTION}=="add", ENV{DEVPATH}=="/block/sda/sda1", NAME="true"
+BUS=="scsi", KERNEL=="sda1", ENV{UDEV_TEST}=="bad", NAME="bad"
+EOF
+ },
);
# set env