summaryrefslogtreecommitdiff
path: root/test/udev-test.pl
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-09-05 02:18:06 +0200
committerKay Sievers <kay.sievers@suse.de>2006-09-05 02:18:06 +0200
commiteef5447934a07279bc76f3f65b0302ddea8556ab (patch)
tree83787f593db778e5471e03b441a5852e99618bca /test/udev-test.pl
parentac528431dd60c6b7f6b664ba430b937a11a32230 (diff)
let $attr{symlink} return the last element of the path
Example for /block/sda: SUBSYSTEMS="scsi", ENV{COMMENT}="$attr{driver}" sets COMMENT=sd SUBSYSTEMS="pci", ENV{COMMENT}="$attr{driver}" sets COMMENT=ata_piix
Diffstat (limited to 'test/udev-test.pl')
-rwxr-xr-xtest/udev-test.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 464098fa65..54c3378392 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -582,6 +582,24 @@ SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", NAME="bad"
EOF
},
{
+ desc => "substitute attr with link target value (first match)",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "driver-is-sd",
+ rules => <<EOF
+SUBSYSTEMS=="scsi", NAME="driver-is-\$attr{driver}"
+EOF
+ },
+ {
+ desc => "substitute attr with link target value (currently selected device)",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "driver-is-aic7xxx",
+ rules => <<EOF
+SUBSYSTEMS=="pci", NAME="driver-is-\$attr{driver}"
+EOF
+ },
+ {
desc => "ignore ATTRS attribute whitespace",
subsys => "block",
devpath => "/block/sda",