chiark / gitweb /
let $attr{symlink} return the last element of the path
[elogind.git] / test / udev-test.pl
index 464098fa65bdd6f24c633454349ec0ae36c8840a..54c33783928ac570a1216d80a2a03c9ada159476 100755 (executable)
@@ -579,6 +579,24 @@ EOF
                rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNELS=="*:0:0:0", NAME="scsi-0:0:0:0"
 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
        },
        {