summaryrefslogtreecommitdiff
path: root/test/udev-test.pl
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-08-05 02:00:30 +0200
committerKay Sievers <kay.sievers@vrfy.org>2011-08-05 02:00:30 +0200
commitd7867b31836173d1a943ecb1cab6484536126411 (patch)
tree2ad9da94abfa9b5d12dc47a623601b8ea8640c7f /test/udev-test.pl
parent617746e09795575c6258dd075ee7f0a44ce61e1e (diff)
implement path_id, usb_id, input_id as built-in command
Diffstat (limited to 'test/udev-test.pl')
-rwxr-xr-xtest/udev-test.pl14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 4322da5ecd..b7592efcbd 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -292,7 +292,7 @@ EOF
devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
exp_name => "node12345678",
rules => <<EOF
-SUBSYSTEMS=="scsi", IMPORT="/bin/echo -e \' TEST_KEY=12345678\\n TEST_key2=98765\'", SYMLINK+="node\$env{TEST_KEY}"
+SUBSYSTEMS=="scsi", IMPORT{program}="/bin/echo -e \' TEST_KEY=12345678\\n TEST_key2=98765\'", SYMLINK+="node\$env{TEST_KEY}"
KERNEL=="ttyACM0", SYMLINK+="modem"
EOF
},
@@ -1330,7 +1330,7 @@ EOF
exp_name => "parent",
option => "keep",
rules => <<EOF
-KERNEL=="sda", IMPORT="/bin/echo -e \'PARENT_KEY=parent_right\\nWRONG_PARENT_KEY=parent_wrong'"
+KERNEL=="sda", IMPORT{program}="/bin/echo -e \'PARENT_KEY=parent_right\\nWRONG_PARENT_KEY=parent_wrong'"
KERNEL=="sda", SYMLINK+="parent"
EOF
},
@@ -1506,6 +1506,16 @@ KERNEL=="sda", ENV{TESTENV}="change-envp"
KERNEL=="sda", SYMLINK+="%k-%s{[dmi/id]product_name}-end", RUN+="socket:@/org/kernel/udev/monitor"
EOF
},
+ {
+ desc => "builtin path_id",
+ subsys => "block",
+ devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+ exp_name => "disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0",
+ rules => <<EOF
+KERNEL=="sda", IMPORT{builtin}="path_id"
+KERNEL=="sda", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/\$env{ID_PATH}"
+EOF
+ },
);
# set env