diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-29 04:12:44 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-29 04:12:44 +0200 |
commit | c7fcba1bf4d0da13b66396c08c0b5f62b25d0405 (patch) | |
tree | f85741e12b958c1430750355fb4f463e4f299df3 /test/udev-test.pl | |
parent | 438d4c3cd4b89381348f84ef9f8b8937814f8362 (diff) |
test: replace ancient sysfs tree with recent one
Diffstat (limited to 'test/udev-test.pl')
-rwxr-xr-x | test/udev-test.pl | 619 |
1 files changed, 300 insertions, 319 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl index d7357d713d..26337cb840 100755 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -33,157 +33,157 @@ my @tests = ( { desc => "label test of scsi disc (old key names)", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "boot_disk" , rules => <<EOF -SUBSYSTEMS=="scsi", SYSFS{vendor}=="IBM-ESXS", NAME="boot_disk%n" -KERNEL=="ttyUSB0", NAME="visor" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", NAME="boot_disk%n" +KERNEL=="ttyACM0", NAME="modem" EOF }, { desc => "label test of scsi disc (old key names)", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "boot_disk" , rules => <<EOF -SUBSYSTEMS=="scsi", SYSFS{vendor}=="IBM-ESXS", NAME="boot_disk%n" -KERNEL=="ttyUSB0", NAME="visor" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", NAME="boot_disk%n" +KERNEL=="ttyACM0", NAME="modem" EOF }, { desc => "label test of scsi disc", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "boot_disk" , rules => <<EOF -SUBSYSTEMS=="scsi", ATTRS{vendor}=="IBM-ESXS", NAME="boot_disk%n" -KERNEL=="ttyUSB0", NAME="visor" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", NAME="boot_disk%n" +KERNEL=="ttyACM0", NAME="modem" EOF }, { desc => "label test of scsi partition", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "boot_disk1" , rules => <<EOF -SUBSYSTEMS=="scsi", ATTRS{vendor}=="IBM-ESXS", NAME="boot_disk%n" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", NAME="boot_disk%n" EOF }, { desc => "label test of pattern match", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "boot_disk1" , rules => <<EOF -SUBSYSTEMS=="scsi", ATTRS{vendor}=="?IBM-ESXS", NAME="boot_disk%n-1" -SUBSYSTEMS=="scsi", ATTRS{vendor}=="IBM-ESXS?", NAME="boot_disk%n-2" -SUBSYSTEMS=="scsi", ATTRS{vendor}=="IBM-ES??", NAME="boot_disk%n" -SUBSYSTEMS=="scsi", ATTRS{vendor}=="IBM-ESXSS", NAME="boot_disk%n-3" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="?ATA", NAME="boot_disk%n-1" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA?", NAME="boot_disk%n-2" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="A??", NAME="boot_disk%n" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATAS", NAME="boot_disk%n-3" EOF }, { desc => "label test of multiple sysfs files", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "boot_disk1" , rules => <<EOF -SUBSYSTEMS=="scsi", ATTRS{vendor}=="IBM-ESXS", ATTRS{model}=="ST336605LW !#", NAME="boot_diskX%n" -SUBSYSTEMS=="scsi", ATTRS{vendor}=="IBM-ESXS", ATTRS{model}=="ST336605LW !#", NAME="boot_disk%n" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", ATTRS{model}=="ST910021AS X ", NAME="boot_diskX%n" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", ATTRS{model}=="ST910021AS", NAME="boot_disk%n" EOF }, { desc => "label test of max sysfs files", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "boot_disk1" , rules => <<EOF -SUBSYSTEMS=="scsi", ATTRS{vendor}=="IBM-ESXS", ATTRS{model}=="ST336605LW !#", ATTRS{scsi_level}=="4", ATTRS{rev}=="B245", ATTRS{type}=="0", ATTRS{queue_depth}=="32", NAME="boot_diskXX%n" -SUBSYSTEMS=="scsi", ATTRS{vendor}=="IBM-ESXS", ATTRS{model}=="ST336605LW !#", ATTRS{scsi_level}=="4", ATTRS{rev}=="B245", ATTRS{type}=="0", NAME="boot_disk%n" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", ATTRS{model}=="ST910021AS", ATTRS{scsi_level}=="6", ATTRS{rev}=="4.06", ATTRS{type}=="0", ATTRS{queue_depth}=="32", NAME="boot_diskXX%n" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", ATTRS{model}=="ST910021AS", ATTRS{scsi_level}=="6", ATTRS{rev}=="4.06", ATTRS{type}=="0", NAME="boot_disk%n" EOF }, { desc => "catch device by *", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "visor/0" , + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "modem/0" , rules => <<EOF -KERNEL=="ttyUSB*", NAME="visor/%n" +KERNEL=="ttyACM*", NAME="modem/%n" EOF }, { desc => "catch device by * - take 2", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "visor/0" , + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "modem/0" , rules => <<EOF -KERNEL=="*USB1", NAME="bad" -KERNEL=="*USB0", NAME="visor/%n" +KERNEL=="*ACM1", NAME="bad" +KERNEL=="*ACM0", NAME="modem/%n" EOF }, { desc => "catch device by ?", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "visor/0" , + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "modem/0" , rules => <<EOF -KERNEL=="ttyUSB??*", NAME="visor/%n-1" -KERNEL=="ttyUSB??", NAME="visor/%n-2" -KERNEL=="ttyUSB?", NAME="visor/%n" +KERNEL=="ttyACM??*", NAME="modem/%n-1" +KERNEL=="ttyACM??", NAME="modem/%n-2" +KERNEL=="ttyACM?", NAME="modem/%n" EOF }, { desc => "catch device by character class", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "visor/0" , + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "modem/0" , rules => <<EOF -KERNEL=="ttyUSB[A-Z]*", NAME="visor/%n-1" -KERNEL=="ttyUSB?[0-9]", NAME="visor/%n-2" -KERNEL=="ttyUSB[0-9]*", NAME="visor/%n" +KERNEL=="ttyACM[A-Z]*", NAME="modem/%n-1" +KERNEL=="ttyACM?[0-9]", NAME="modem/%n-2" +KERNEL=="ttyACM[0-9]*", NAME="modem/%n" EOF }, { desc => "replace kernel name", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "visor" , + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "modem" , rules => <<EOF -KERNEL=="ttyUSB0", NAME="visor" +KERNEL=="ttyACM0", NAME="modem" EOF }, { desc => "Handle comment lines in config file (and replace kernel name)", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "visor" , + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "modem" , rules => <<EOF # this is a comment -KERNEL=="ttyUSB0", NAME="visor" +KERNEL=="ttyACM0", NAME="modem" EOF }, { desc => "Handle comment lines in config file with whitespace (and replace kernel name)", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "visor" , + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "modem" , rules => <<EOF # this is a comment with whitespace before the comment -KERNEL=="ttyUSB0", NAME="visor" +KERNEL=="ttyACM0", NAME="modem" EOF }, { desc => "Handle whitespace only lines (and replace kernel name)", subsys => "tty", - devpath => "/class/tty/ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", exp_name => "whitespace" , rules => <<EOF # this is a comment with whitespace before the comment -KERNEL=="ttyUSB0", NAME="whitespace" +KERNEL=="ttyACM0", NAME="whitespace" @@ -192,39 +192,39 @@ EOF { desc => "Handle empty lines in config file (and replace kernel name)", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "visor" , + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "modem" , rules => <<EOF -KERNEL=="ttyUSB0", NAME="visor" +KERNEL=="ttyACM0", NAME="modem" EOF }, { desc => "Handle backslashed multi lines in config file (and replace kernel name)", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "visor" , + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "modem" , rules => <<EOF -KERNEL=="ttyUSB0", \\ -NAME="visor" +KERNEL=="ttyACM0", \\ +NAME="modem" EOF }, { desc => "preserve backslashes, if they are not for a newline", subsys => "tty", - devpath => "/class/tty/ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", exp_name => "aaa", rules => <<EOF -KERNEL=="ttyUSB0", PROGRAM=="/bin/echo -e \\101", RESULT=="A", NAME="aaa" +KERNEL=="ttyACM0", PROGRAM=="/bin/echo -e \\101", RESULT=="A", NAME="aaa" EOF }, { desc => "Handle stupid backslashed multi lines in config file (and replace kernel name)", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "visor" , + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "modem" , rules => <<EOF # @@ -234,25 +234,25 @@ EOF #\\ -KERNEL=="ttyUSB0", \\ - NAME="visor" +KERNEL=="ttyACM0", \\ + NAME="modem" EOF }, { desc => "subdirectory handling", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "sub/direct/ory/visor" , + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "sub/direct/ory/modem" , rules => <<EOF -KERNEL=="ttyUSB0", NAME="sub/direct/ory/visor" +KERNEL=="ttyACM0", NAME="sub/direct/ory/modem" EOF }, { desc => "parent device name match of scsi partition", subsys => "block", - devpath => "/block/sda/sda3", - exp_name => "first_disk3" , + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", + exp_name => "first_disk5" , rules => <<EOF SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", NAME="first_disk%n" EOF @@ -260,8 +260,8 @@ EOF { desc => "test substitution chars (old key names)", subsys => "block", - devpath => "/block/sda/sda3", - exp_name => "Major:8:minor:3:kernelnumber:3:id:0:0:0:0" , + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", + exp_name => "Major:8:minor:5:kernelnumber:5:id:0:0:0:0" , rules => <<EOF BUS=="scsi", ID=="0:0:0:0", NAME="Major:%M:minor:%m:kernelnumber:%n:id:%b" EOF @@ -269,8 +269,8 @@ EOF { desc => "test substitution chars", subsys => "block", - devpath => "/block/sda/sda3", - exp_name => "Major:8:minor:3:kernelnumber:3:id:0:0:0:0" , + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", + exp_name => "Major:8:minor:5:kernelnumber:5:id:0:0:0:0" , rules => <<EOF SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", NAME="Major:%M:minor:%m:kernelnumber:%n:id:%b" EOF @@ -278,47 +278,47 @@ EOF { desc => "test substitution chars (with length limit)", subsys => "block", - devpath => "/block/sda/sda3", - exp_name => "M8-m3-n3-b0:0-sIBM" , + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", + exp_name => "M8-m5-n5-b0:0-xAT" , rules => <<EOF -SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", NAME="M%M-m%m-n%n-b%3b-s%3s{vendor}" +SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", NAME="M%M-m%m-n%n-b%3b-x%2s{vendor}" EOF }, { desc => "import of shell-value file", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "subdir/err/node" , rules => <<EOF SUBSYSTEMS=="scsi", IMPORT{file}="udev-test.conf", NAME="subdir/%E{udev_log}/node" -KERNEL=="ttyUSB0", NAME="visor" +KERNEL=="ttyACM0", NAME="modem" EOF }, { desc => "import of shell-value returned from program", subsys => "block", - devpath => "/block/sda", + 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\'", NAME="node\$env{TEST_KEY}" -KERNEL=="ttyUSB0", NAME="visor" +KERNEL=="ttyACM0", NAME="modem" EOF }, { desc => "sustitution of sysfs value (%s{file})", subsys => "block", - devpath => "/block/sda", - exp_name => "disk-IBM-ESXS-sda" , + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", + exp_name => "disk-ATA-sda" , rules => <<EOF -SUBSYSTEMS=="scsi", ATTRS{vendor}=="IBM-ESXS", NAME="disk-%s{vendor}-%k" -KERNEL=="ttyUSB0", NAME="visor" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", NAME="disk-%s{vendor}-%k" +KERNEL=="ttyACM0", NAME="modem" EOF }, { desc => "program result substitution", subsys => "block", - devpath => "/block/sda/sda3", - exp_name => "special-device-3" , + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", + exp_name => "special-device-5" , rules => <<EOF SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n special-device", RESULT=="-special-*", NAME="%c-1-%n" SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n special-device", RESULT=="special--*", NAME="%c-2-%n" @@ -330,7 +330,7 @@ EOF { desc => "program result substitution (newline removal)", subsys => "block", - devpath => "/block/sda/sda3", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", exp_name => "newline_removed" , rules => <<EOF SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo test", RESULT=="test", NAME="newline_removed" @@ -339,7 +339,7 @@ EOF { desc => "program result substitution", subsys => "block", - devpath => "/block/sda/sda3", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", exp_name => "test-0:0:0:0" , rules => <<EOF SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n test-%b", RESULT=="test-0:0*", NAME="%c" @@ -348,62 +348,62 @@ EOF { desc => "program with escaped format char (tricky: callout returns format char!)", subsys => "block", - devpath => "/block/sda/sda3", - exp_name => "escape-3" , + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", + exp_name => "escape-5" , rules => <<EOF -SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n escape-%%n", KERNEL=="sda3", NAME="%c" +SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n escape-%%n", KERNEL=="sda5", NAME="%c" EOF }, { desc => "program with lots of arguments", subsys => "block", - devpath => "/block/sda/sda3", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", exp_name => "foo9" , rules => <<EOF -SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL=="sda3", NAME="%c{7}" +SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL=="sda5", NAME="%c{7}" EOF }, { desc => "program with subshell", subsys => "block", - devpath => "/block/sda/sda3", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", exp_name => "bar9" , rules => <<EOF -SUBSYSTEMS=="scsi", PROGRAM=="/bin/sh -c 'echo foo3 foo4 foo5 foo6 foo7 foo8 foo9 | sed s/foo9/bar9/'", KERNEL=="sda3", NAME="%c{7}" +SUBSYSTEMS=="scsi", PROGRAM=="/bin/sh -c 'echo foo3 foo4 foo5 foo6 foo7 foo8 foo9 | sed s/foo9/bar9/'", KERNEL=="sda5", NAME="%c{7}" EOF }, { desc => "program arguments combined with apostrophes", subsys => "block", - devpath => "/block/sda/sda3", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", exp_name => "foo7" , rules => <<EOF -SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n 'foo3 foo4' 'foo5 foo6 foo7 foo8'", KERNEL=="sda3", NAME="%c{5}" +SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n 'foo3 foo4' 'foo5 foo6 foo7 foo8'", KERNEL=="sda5", NAME="%c{5}" EOF }, { desc => "characters before the %c{N} substitution", subsys => "block", - devpath => "/block/sda/sda3", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", exp_name => "my-foo9" , rules => <<EOF -SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL=="sda3", NAME="my-%c{7}" +SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL=="sda5", NAME="my-%c{7}" EOF }, { desc => "substitute the second to last argument", subsys => "block", - devpath => "/block/sda/sda3", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", exp_name => "my-foo8" , rules => <<EOF -SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL=="sda3", NAME="my-%c{6}" +SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL=="sda5", NAME="my-%c{6}" EOF }, { desc => "test substitution by variable name", subsys => "block", - devpath => "/block/sda/sda3", - exp_name => "Major:8-minor:3-kernelnumber:3-id:0:0:0:0", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", + exp_name => "Major:8-minor:5-kernelnumber:5-id:0:0:0:0", rules => <<EOF SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", NAME="Major:\$major-minor:\$minor-kernelnumber:\$number-id:\$id" EOF @@ -411,8 +411,8 @@ EOF { desc => "test substitution by variable name 2", subsys => "block", - devpath => "/block/sda/sda3", - exp_name => "Major:8-minor:3-kernelnumber:3-id:0:0:0:0", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", + exp_name => "Major:8-minor:5-kernelnumber:5-id:0:0:0:0", rules => <<EOF SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", DEVPATH=="*/sda/*", NAME="Major:\$major-minor:%m-kernelnumber:\$number-id:\$id" EOF @@ -420,8 +420,8 @@ EOF { desc => "test substitution by variable name 3", subsys => "block", - devpath => "/block/sda/sda3", - exp_name => "830:0:0:03" , + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", + exp_name => "850:0:0:05" , rules => <<EOF SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", DEVPATH=="*/sda/*", NAME="%M%m%b%n" EOF @@ -429,8 +429,8 @@ EOF { desc => "test substitution by variable name 4", subsys => "block", - devpath => "/block/sda/sda3", - exp_name => "833" , + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", + exp_name => "855" , rules => <<EOF SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", DEVPATH=="*/sda/*", NAME="\$major\$minor\$number" EOF @@ -438,8 +438,8 @@ EOF { desc => "test substitution by variable name 5", subsys => "block", - devpath => "/block/sda/sda3", - exp_name => "8330:0:0:0" , + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", + exp_name => "8550:0:0:0" , rules => <<EOF SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", DEVPATH=="*/sda/*", NAME="\$major%m%n\$id" EOF @@ -447,7 +447,7 @@ EOF { desc => "non matching SUBSYSTEMS for device with no parent", subsys => "tty", - devpath => "/class/tty/console", + devpath => "/devices/virtual/tty/console", exp_name => "TTY", rules => <<EOF SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n foo", RESULT=="foo", NAME="foo" @@ -457,7 +457,7 @@ EOF { desc => "non matching SUBSYSTEMS", subsys => "tty", - devpath => "/class/tty/console", + devpath => "/devices/virtual/tty/console", exp_name => "TTY" , rules => <<EOF SUBSYSTEMS=="foo", ATTRS{dev}=="5:1", NAME="foo" @@ -467,7 +467,7 @@ EOF { desc => "ATTRS match", subsys => "tty", - devpath => "/class/tty/console", + devpath => "/devices/virtual/tty/console", exp_name => "foo" , rules => <<EOF ATTRS{dev}=="5:1", NAME="foo" @@ -477,7 +477,7 @@ EOF { desc => "program and bus type match", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "scsi-0:0:0:0" , rules => <<EOF SUBSYSTEMS=="usb", PROGRAM=="/bin/echo -n usb-%b", NAME="%c" @@ -488,55 +488,46 @@ EOF { desc => "create all possible partitions", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "boot_disk15" , exp_majorminor => "8:15", rules => <<EOF -SUBSYSTEMS=="scsi", ATTRS{vendor}=="IBM-ESXS", NAME{all_partitions}="boot_disk" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", NAME{all_partitions}="boot_disk" EOF }, { desc => "sysfs parent hierarchy", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "visor" , + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "modem" , rules => <<EOF -ATTRS{idProduct}=="2008", NAME="visor" +ATTRS{idProduct}=="007b", NAME="modem" EOF }, { desc => "name test with ! in the name", subsys => "block", - devpath => "/block/rd!c0d0", - exp_name => "rd/c0d0" , + devpath => "/devices/virtual/block/fake!blockdev0", + exp_name => "is/a/fake/blockdev0" , rules => <<EOF -SUBSYSTEMS=="scsi", NAME="%k" -KERNEL=="ttyUSB0", NAME="visor" +SUBSYSTEMS=="scsi", NAME="is/not/a/%k" +SUBSYSTEM=="block", NAME="is/a/%k" +KERNEL=="ttyACM0", NAME="modem" EOF }, { desc => "name test with ! in the name, but no matching rule", subsys => "block", - devpath => "/block/rd!c0d0", - exp_name => "rd/c0d0" , + devpath => "/devices/virtual/block/fake!blockdev0", + exp_name => "fake/blockdev0" , rules => <<EOF -KERNEL=="ttyUSB0", NAME="visor" -EOF - }, - { - desc => "name test with ! in the name for a partition", - subsys => "block", - devpath => "/block/cciss!c0d0/cciss!c0d0p1", - exp_name => "cciss/c0d0p1" , - rules => <<EOF -SUBSYSTEMS=="scsi", NAME="%k" -KERNEL=="ttyUSB0", NAME="visor" +KERNEL=="ttyACM0", NAME="modem" EOF }, { desc => "KERNELS rule", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "scsi-0:0:0:0", rules => <<EOF SUBSYSTEMS=="usb", KERNELS=="0:0:0:0", NAME="not-scsi" @@ -549,7 +540,7 @@ EOF { desc => "KERNELS wildcard all", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "scsi-0:0:0:0", rules => <<EOF SUBSYSTEMS=="scsi", KERNELS=="*:1", NAME="no-match" @@ -562,7 +553,7 @@ EOF { desc => "KERNELS wildcard partial", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "scsi-0:0:0:0", rules => <<EOF SUBSYSTEMS=="scsi", KERNELS=="*:0", NAME="scsi-0:0:0:0" @@ -572,7 +563,7 @@ EOF { desc => "KERNELS wildcard partial 2", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "scsi-0:0:0:0", rules => <<EOF SUBSYSTEMS=="scsi", KERNELS=="*:0:0:0", NAME="scsi-0:0:0:0" @@ -582,7 +573,7 @@ EOF { desc => "substitute attr with link target value (first match)", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "driver-is-sd", rules => <<EOF SUBSYSTEMS=="scsi", NAME="driver-is-\$attr{driver}" @@ -591,8 +582,8 @@ EOF { desc => "substitute attr with link target value (currently selected device)", subsys => "block", - devpath => "/block/sda", - exp_name => "driver-is-aic7xxx", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", + exp_name => "driver-is-ahci", rules => <<EOF SUBSYSTEMS=="pci", NAME="driver-is-\$attr{driver}" EOF @@ -600,7 +591,7 @@ EOF { desc => "ignore ATTRS attribute whitespace", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "ignored", rules => <<EOF SUBSYSTEMS=="scsi", ATTRS{whitespace_test}=="WHITE SPACE", NAME="ignored" @@ -609,7 +600,7 @@ EOF { desc => "do not ignore ATTRS attribute whitespace", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "matched-with-space", rules => <<EOF SUBSYSTEMS=="scsi", ATTRS{whitespace_test}=="WHITE SPACE ", NAME="wrong-to-ignore" @@ -629,7 +620,7 @@ EOF { desc => "permissions OWNER=5000", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node", exp_perms => "5000::0660", rules => <<EOF @@ -639,7 +630,7 @@ EOF { desc => "permissions GROUP=100", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node", exp_perms => ":100:0660", rules => <<EOF @@ -649,7 +640,7 @@ EOF { desc => "textual user id", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node", exp_perms => "nobody::0660", rules => <<EOF @@ -659,7 +650,7 @@ EOF { desc => "textual group id", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node", exp_perms => ":daemon:0660", rules => <<EOF @@ -669,7 +660,7 @@ EOF { desc => "textual user/group id", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node", exp_perms => "root:mail:0660", rules => <<EOF @@ -679,7 +670,7 @@ EOF { desc => "permissions MODE=0777", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node", exp_perms => "::0777", rules => <<EOF @@ -689,7 +680,7 @@ EOF { desc => "permissions OWNER=5000 GROUP=100 MODE=0777", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node", exp_perms => "5000:100:0777", rules => <<EOF @@ -699,87 +690,87 @@ EOF { desc => "permissions OWNER to 5000", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "ttyACM0", exp_perms => "5000::", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n", OWNER="5000" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n", OWNER="5000" EOF }, { desc => "permissions GROUP to 100", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "ttyACM0", exp_perms => ":100:0660", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n", GROUP="100" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n", GROUP="100" EOF }, { desc => "permissions MODE to 0060", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "ttyACM0", exp_perms => "::0060", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n", MODE="0060" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n", MODE="0060" EOF }, { desc => "permissions OWNER, GROUP, MODE", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "ttyACM0", exp_perms => "5000:100:0777", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n", OWNER="5000", GROUP="100", MODE="0777" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n", OWNER="5000", GROUP="100", MODE="0777" EOF }, { desc => "permissions only rule", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "ttyACM0", exp_perms => "5000:100:0777", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", OWNER="5000", GROUP="100", MODE="0777" +KERNEL=="ttyACM[0-9]*", OWNER="5000", GROUP="100", MODE="0777" KERNEL=="ttyUSX[0-9]*", OWNER="5001", GROUP="101", MODE="0444" -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n" EOF }, { desc => "multiple permissions only rule", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "ttyACM0", exp_perms => "3000:4000:0777", rules => <<EOF SUBSYSTEM=="tty", OWNER="3000" SUBSYSTEM=="tty", GROUP="4000" SUBSYSTEM=="tty", MODE="0777" KERNEL=="ttyUSX[0-9]*", OWNER="5001", GROUP="101", MODE="0444" -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n" EOF }, { desc => "permissions only rule with override at NAME rule", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "ttyACM0", exp_perms => "3000:8000:0777", rules => <<EOF SUBSYSTEM=="tty", OWNER="3000" SUBSYSTEM=="tty", GROUP="4000" SUBSYSTEM=="tty", MODE="0777" KERNEL=="ttyUSX[0-9]*", OWNER="5001", GROUP="101", MODE="0444" -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n", GROUP="8000" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n", GROUP="8000" EOF }, { desc => "major/minor number test", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node", exp_majorminor => "8:0", rules => <<EOF @@ -787,100 +778,90 @@ SUBSYSTEMS=="scsi", KERNEL=="sda", NAME="node" EOF }, { - desc => "big minor number test", - subsys => "i2c-dev", - devpath => "/class/i2c-dev/i2c-300", - exp_name => "node", - exp_majorminor => "89:300", - rules => <<EOF -KERNEL=="i2c-300", NAME="node" -EOF - }, - { desc => "big major number test", - subsys => "i2c-dev", - devpath => "/class/i2c-dev/i2c-fake1", + subsys => "misc", + devpath => "/devices/virtual/misc/misc-fake1", exp_name => "node", exp_majorminor => "4095:1", rules => <<EOF -KERNEL=="i2c-fake1", NAME="node" +KERNEL=="misc-fake1", NAME="node" EOF }, { desc => "big major and big minor number test", - subsys => "i2c-dev", - devpath => "/class/i2c-dev/i2c-fake2", + subsys => "misc", + devpath => "/devices/virtual/misc/misc-fake89999", exp_name => "node", - exp_majorminor => "4094:89999", + exp_majorminor => "4095:89999", rules => <<EOF -KERNEL=="i2c-fake2", NAME="node" +KERNEL=="misc-fake89999", NAME="node" EOF }, { desc => "multiple symlinks with format char", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "symlink2-ttyUSB0", - exp_target => "ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "symlink2-ttyACM0", + exp_target => "ttyACM0", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n", SYMLINK="symlink1-%n symlink2-%k symlink3-%b" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n", SYMLINK="symlink1-%n symlink2-%k symlink3-%b" EOF }, { desc => "multiple symlinks with a lot of s p a c e s", subsys => "tty", - devpath => "/class/tty/ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", exp_name => "one", not_exp_name => " ", - exp_target => "ttyUSB0", + exp_target => "ttyACM0", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n", SYMLINK=" one two " +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n", SYMLINK=" one two " EOF }, { desc => "symlink creation (same directory)", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "visor0", - exp_target => "ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "modem0", + exp_target => "ttyACM0", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n", SYMLINK="visor%n" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n", SYMLINK="modem%n" EOF }, { desc => "symlink creation (relative link forward)", subsys => "block", - devpath => "/block/sda/sda2", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6", exp_name => "1/2/symlink" , exp_target => "a/b/node", rules => <<EOF -SUBSYSTEMS=="scsi", ATTRS{vendor}=="IBM-ESXS", NAME="1/2/a/b/node", SYMLINK="1/2/symlink" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", NAME="1/2/a/b/node", SYMLINK="1/2/symlink" EOF }, { desc => "symlink creation (relative link back and forward)", subsys => "block", - devpath => "/block/sda/sda2", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6", exp_name => "1/2/c/d/symlink" , exp_target => "../../a/b/node", rules => <<EOF -SUBSYSTEMS=="scsi", ATTRS{vendor}=="IBM-ESXS", NAME="1/2/a/b/node", SYMLINK="1/2/c/d/symlink" +SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", NAME="1/2/a/b/node", SYMLINK="1/2/c/d/symlink" EOF }, { desc => "multiple symlinks", subsys => "tty", - devpath => "/class/tty/ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", exp_name => "second-0" , - exp_target => "visor" , + exp_target => "modem" , rules => <<EOF -KERNEL=="ttyUSB0", NAME="visor", SYMLINK="first-%n second-%n third-%n" +KERNEL=="ttyACM0", NAME="modem", SYMLINK="first-%n second-%n third-%n" EOF }, { desc => "symlink only rule", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "symlink-only2", exp_target => "link", rules => <<EOF @@ -892,7 +873,7 @@ EOF { desc => "symlink name '.'", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => ".", exp_target => "link", exp_add_error => "yes", @@ -917,37 +898,37 @@ EOF { desc => "symlink %n substitution", subsys => "tty", - devpath => "/class/tty/ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", exp_name => "symlink0", - exp_target => "ttyUSB0", + exp_target => "ttyACM0", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n", SYMLINK+="symlink%n" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n", SYMLINK+="symlink%n" EOF }, { desc => "symlink %k substitution", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "symlink-ttyUSB0", - exp_target => "ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "symlink-ttyACM0", + exp_target => "ttyACM0", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n", SYMLINK+="symlink-%k" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n", SYMLINK+="symlink-%k" EOF }, { desc => "symlink %M:%m substitution", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "major-188:0", - exp_target => "ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "major-166:0", + exp_target => "ttyACM0", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n", SYMLINK+="major-%M:%m" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n", SYMLINK+="major-%M:%m" EOF }, { desc => "symlink %b substitution", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "symlink-0:0:0:0", exp_target => "node", rules => <<EOF @@ -957,37 +938,37 @@ EOF { desc => "symlink %c substitution", subsys => "tty", - devpath => "/class/tty/ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", exp_name => "test", - exp_target => "ttyUSB0", + exp_target => "ttyACM0", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", PROGRAM=="/bin/echo test" NAME="ttyUSB%n", SYMLINK+="%c" +KERNEL=="ttyACM[0-9]*", PROGRAM=="/bin/echo test" NAME="ttyACM%n", SYMLINK+="%c" EOF }, { desc => "symlink %c{N} substitution", subsys => "tty", - devpath => "/class/tty/ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", exp_name => "test", - exp_target => "ttyUSB0", + exp_target => "ttyACM0", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", PROGRAM=="/bin/echo symlink test this" NAME="ttyUSB%n", SYMLINK+="%c{2}" +KERNEL=="ttyACM[0-9]*", PROGRAM=="/bin/echo symlink test this" NAME="ttyACM%n", SYMLINK+="%c{2}" EOF }, { desc => "symlink %c{N+} substitution", subsys => "tty", - devpath => "/class/tty/ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", exp_name => "this", - exp_target => "ttyUSB0", + exp_target => "ttyACM0", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", PROGRAM=="/bin/echo symlink test this" NAME="ttyUSB%n", SYMLINK+="%c{2+}" +KERNEL=="ttyACM[0-9]*", PROGRAM=="/bin/echo symlink test this" NAME="ttyACM%n", SYMLINK+="%c{2+}" EOF }, { desc => "symlink only rule with %c{N+}", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "test", exp_target => "link", rules => <<EOF @@ -998,27 +979,27 @@ EOF { desc => "symlink %s{filename} substitution", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "188:0", - exp_target => "ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "166:0", + exp_target => "ttyACM0", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n", SYMLINK+="%s{dev}" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n", SYMLINK+="%s{dev}" EOF }, { desc => "symlink %Ns{filename} substitution", subsys => "tty", - devpath => "/class/tty/ttyUSB0", - exp_name => "188", - exp_target => "ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "166", + exp_target => "ttyACM0", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="ttyUSB%n", SYMLINK+="%3s{dev}" +KERNEL=="ttyACM[0-9]*", NAME="ttyACM%n", SYMLINK+="%3s{dev}" EOF }, { desc => "program result substitution (numbered part of)", subsys => "block", - devpath => "/block/sda/sda3", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", exp_name => "link1", exp_target => "node", rules => <<EOF @@ -1028,7 +1009,7 @@ EOF { desc => "program result substitution (numbered part of+)", subsys => "block", - devpath => "/block/sda/sda3", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5", exp_name => "link4", exp_target => "node", rules => <<EOF @@ -1038,7 +1019,7 @@ EOF { desc => "ignore rule test", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "nothing", not_exp_name => "node", exp_add_error => "yes", @@ -1049,7 +1030,7 @@ EOF { desc => "all_partitions, option-only rule", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node6", rules => <<EOF SUBSYSTEM=="block", OPTIONS="all_partitions" @@ -1059,7 +1040,7 @@ EOF { desc => "all_partitions, option-only rule (fail on partition)", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "node6", exp_add_error => "yes", rules => <<EOF @@ -1070,7 +1051,7 @@ EOF { desc => "ignore remove event test", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node", exp_rem_error => "yes", rules => <<EOF @@ -1080,7 +1061,7 @@ EOF { desc => "ignore remove event test (with all partitions)", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node14", exp_rem_error => "yes", option => "clean", @@ -1091,7 +1072,7 @@ EOF { desc => "SUBSYSTEM match test", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node", rules => <<EOF SUBSYSTEMS=="scsi", KERNEL=="sda", NAME="should_not_match", SUBSYSTEM=="vc" @@ -1102,7 +1083,7 @@ EOF { desc => "DRIVERS match test", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node", rules => <<EOF SUBSYSTEMS=="scsi", KERNEL=="sda", NAME="should_not_match", DRIVERS=="sd-wrong" @@ -1112,7 +1093,7 @@ EOF { desc => "temporary node creation test", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node", rules => <<EOF SUBSYSTEMS=="scsi", KERNEL=="sda", PROGRAM=="/usr/bin/test -b %N" NAME="node" @@ -1121,16 +1102,16 @@ EOF { desc => "devpath substitution test", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "sda", rules => <<EOF -SUBSYSTEMS=="scsi", KERNEL=="sda", PROGRAM=="/bin/echo %p", RESULT=="/block/sda" NAME="%k" +SUBSYSTEMS=="scsi", KERNEL=="sda", PROGRAM=="/bin/echo %p", RESULT=="/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda" NAME="%k" EOF }, { desc => "parent node name substitution test sequence 1/2 (keep)", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "main_device", option => "keep", rules => <<EOF @@ -1140,7 +1121,7 @@ EOF { desc => "parent node name substitution test sequence 2/2 (clean)", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "main_device-part-1", option => "clean", rules => <<EOF @@ -1150,7 +1131,7 @@ EOF { desc => "udev_root substitution", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "start-udev-root-end", rules => <<EOF SUBSYSTEMS=="scsi", KERNEL=="sda1", NAME="start-%r-end" @@ -1159,7 +1140,7 @@ EOF { desc => "last_rule option", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "last", rules => <<EOF SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="last", OPTIONS="last_rule" @@ -1169,7 +1150,7 @@ EOF { desc => "negation KERNEL!=", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "match", rules => <<EOF SUBSYSTEMS=="scsi", KERNEL!="sda1", NAME="matches-but-is-negated" @@ -1180,7 +1161,7 @@ EOF { desc => "negation SUBSYSTEM!=", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "not-anything", rules => <<EOF SUBSYSTEMS=="scsi", SUBSYSTEM=="block", KERNEL!="sda1", NAME="matches-but-is-negated" @@ -1191,7 +1172,7 @@ EOF { desc => "negation PROGRAM!= exit code", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "nonzero-program", rules => <<EOF KERNEL=="sda1", PROGRAM!="/bin/false", NAME="nonzero-program" @@ -1201,7 +1182,7 @@ EOF { desc => "test for whitespace between the operator", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "true", rules => <<EOF KERNEL == "sda1" , NAME = "true" @@ -1211,7 +1192,7 @@ EOF { desc => "ENV{} test", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "true", rules => <<EOF SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ENV_KEY_TEST}=="go", NAME="wrong" @@ -1222,19 +1203,19 @@ EOF { desc => "ENV{} test", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "true", rules => <<EOF SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ENV_KEY_TEST}=="go", NAME="wrong" -SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ENV_KEY_TEST}=="yes", ENV{ACTION}=="add", ENV{DEVPATH}=="/block/sda/sdax1", NAME="no" -SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ENV_KEY_TEST}=="test", ENV{ACTION}=="add", ENV{DEVPATH}=="/block/sda/sda1", NAME="true" +SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ENV_KEY_TEST}=="yes", ENV{ACTION}=="add", ENV{DEVPATH}=="/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sdax1", NAME="no" +SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ENV_KEY_TEST}=="test", ENV{ACTION}=="add", ENV{DEVPATH}=="/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", NAME="true" SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ENV_KEY_TEST}=="bad", NAME="bad" EOF }, { desc => "ENV{} test (assign)", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "true", rules => <<EOF SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}="true" @@ -1246,7 +1227,7 @@ EOF { desc => "ENV{} test (assign 2 times)", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "true", rules => <<EOF SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}="true" @@ -1259,7 +1240,7 @@ EOF { desc => "ENV{} test (assign2)", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "part", rules => <<EOF SUBSYSTEM=="block", KERNEL=="*[0-9]", ENV{PARTITION}="true", ENV{MAINDEVICE}="false" @@ -1272,7 +1253,7 @@ EOF { desc => "untrusted string sanitize", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "sane", rules => <<EOF SUBSYSTEMS=="scsi", KERNEL=="sda1", PROGRAM=="/bin/echo -e name; (/sbin/badprogram)", RESULT=="name_ _/sbin/badprogram_", NAME="sane" @@ -1281,7 +1262,7 @@ EOF { desc => "untrusted string sanitize (don't replace utf8)", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "uber", rules => <<EOF SUBSYSTEMS=="scsi", KERNEL=="sda1", PROGRAM=="/bin/echo -e \\xc3\\xbcber" RESULT=="\xc3\xbcber", NAME="uber" @@ -1290,7 +1271,7 @@ EOF { desc => "untrusted string sanitize (replace invalid utf8)", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "replaced", rules => <<EOF SUBSYSTEMS=="scsi", KERNEL=="sda1", PROGRAM=="/bin/echo -e \\xef\\xe8garbage", RESULT=="__garbage", NAME="replaced" @@ -1299,16 +1280,16 @@ EOF { desc => "read sysfs value from device down in the chain", subsys => "block", - devpath => "/class/tty/ttyUSB0", - exp_name => "serial-0000:00:09.0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", + exp_name => "serial-354172020305000", rules => <<EOF -KERNEL=="ttyUSB*", NAME="serial-%s{serial}" +KERNEL=="ttyACM*", NAME="serial-%s{serial}" EOF }, { desc => "match against empty key string", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "ok", rules => <<EOF KERNEL=="sda", ATTRS{nothing}!="", NAME="not-1-ok" @@ -1320,7 +1301,7 @@ EOF { desc => "check ACTION value", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "ok", rules => <<EOF ACTION=="unknown", KERNEL=="sda", NAME="unknown-not-ok" @@ -1330,7 +1311,7 @@ EOF { desc => "apply NAME only once", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "link", exp_target => "ok", rules => <<EOF @@ -1342,7 +1323,7 @@ EOF { desc => "test RUN key", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "testsymlink", exp_target => "ok", exp_rem_error => "yes", @@ -1355,7 +1336,7 @@ EOF { desc => "test RUN key and DEVNAME", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "testsymlink", exp_target => "ok", exp_rem_error => "yes", @@ -1368,7 +1349,7 @@ EOF { desc => "test RUN key remove", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "testsymlink2", exp_target => "ok2", rules => <<EOF @@ -1380,7 +1361,7 @@ EOF { desc => "final assignment", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "ok", exp_perms => "root:nobody:0640", rules => <<EOF @@ -1391,7 +1372,7 @@ EOF { desc => "final assignment", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "ok", exp_perms => "root:nobody:0640", rules => <<EOF @@ -1403,7 +1384,7 @@ EOF { desc => "env substitution", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node-add-me", rules => <<EOF KERNEL=="sda", MODE="0666", NAME="node-\$env{ACTION}-me" @@ -1412,65 +1393,65 @@ EOF { desc => "reset list to current value", subsys => "tty", - devpath => "/class/tty/ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", exp_name => "three", not_exp_name => "two", exp_target => "node", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", SYMLINK+="one" -KERNEL=="ttyUSB[0-9]*", SYMLINK+="two" -KERNEL=="ttyUSB[0-9]*", SYMLINK="three" -KERNEL=="ttyUSB[0-9]*", NAME="node" +KERNEL=="ttyACM[0-9]*", SYMLINK+="one" +KERNEL=="ttyACM[0-9]*", SYMLINK+="two" +KERNEL=="ttyACM[0-9]*", SYMLINK="three" +KERNEL=="ttyACM[0-9]*", NAME="node" EOF }, { desc => "test empty NAME", subsys => "tty", - devpath => "/class/tty/ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", exp_name => "node", not_exp_name => "wrong", exp_add_error => "yes", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="" -KERNEL=="ttyUSB[0-9]*", NAME="wrong" +KERNEL=="ttyACM[0-9]*", NAME="" +KERNEL=="ttyACM[0-9]*", NAME="wrong" EOF }, { desc => "test empty NAME 2", subsys => "tty", - devpath => "/class/tty/ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", exp_name => "right", rules => <<EOF -KERNEL=="ttyUSB[0-9]*", NAME="right" -KERNEL=="ttyUSB[0-9]*", NAME="" -KERNEL=="ttyUSB[0-9]*", NAME="wrong" +KERNEL=="ttyACM[0-9]*", NAME="right" +KERNEL=="ttyACM[0-9]*", NAME="" +KERNEL=="ttyACM[0-9]*", NAME="wrong" EOF }, { desc => "test multi matches", subsys => "tty", - devpath => "/class/tty/ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", exp_name => "right", rules => <<EOF -KERNEL=="ttyUSB*|nothing", NAME="right" -KERNEL=="ttyUSB*", NAME="wrong" +KERNEL=="ttyACM*|nothing", NAME="right" +KERNEL=="ttyACM*", NAME="wrong" EOF }, { desc => "test multi matches 2", subsys => "tty", - devpath => "/class/tty/ttyUSB0", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/tty/ttyACM0", exp_name => "right", rules => <<EOF KERNEL=="dontknow*|*nothing", NAME="nomatch" -KERNEL=="dontknow*|ttyUSB*|nothing*", NAME="right" -KERNEL=="ttyUSB*", NAME="wrong" +KERNEL=="dontknow*|ttyACM*|nothing*", NAME="right" +KERNEL=="ttyACM*", NAME="wrong" EOF }, { desc => "IMPORT parent test sequence 1/2 (keep)", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "parent", option => "keep", rules => <<EOF @@ -1481,7 +1462,7 @@ EOF { desc => "IMPORT parent test sequence 2/2 (keep)", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "parentenv-parent_right", option => "clean", rules => <<EOF @@ -1491,7 +1472,7 @@ EOF { desc => "GOTO test", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "right", rules => <<EOF KERNEL=="sda1", GOTO="TEST" @@ -1504,7 +1485,7 @@ EOF { desc => "NAME compare test", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "link", exp_target => "node", not_exp_name => "wronglink", @@ -1519,7 +1500,7 @@ EOF { desc => "NAME compare test 2", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "link2", exp_target => "sda1", not_exp_name => "link", @@ -1531,7 +1512,7 @@ EOF { desc => "invalid key operation", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "yes", rules => <<EOF KERNEL="sda1", NAME="no" @@ -1541,7 +1522,7 @@ EOF { desc => "operator chars in attribute", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "yes", rules => <<EOF KERNEL=="sda", ATTR{test:colon+plus}=="?*", NAME="yes" @@ -1550,7 +1531,7 @@ EOF { desc => "overlong comment line", subsys => "block", - devpath => "/block/sda/sda1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", exp_name => "yes", rules => <<EOF # 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 @@ -1562,8 +1543,8 @@ EOF { desc => "magic subsys/kernel lookup", subsys => "block", - devpath => "/block/sda", - exp_name => "00:e0:00:fb:04:e1", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", + exp_name => "00:16:41:e2:8d:ff", rules => <<EOF KERNEL=="sda", NAME="\$attr{[net/eth0]address}" EOF @@ -1571,7 +1552,7 @@ EOF { desc => "TEST absolute path", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "there", rules => <<EOF TEST=="/etc/hosts", NAME="there" @@ -1581,7 +1562,7 @@ EOF { desc => "TEST subsys/kernel lookup", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "yes", rules => <<EOF KERNEL=="sda", TEST=="[net/eth0]", NAME="yes" @@ -1590,7 +1571,7 @@ EOF { desc => "TEST relative path", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "relative", rules => <<EOF KERNEL=="sda", TEST=="size", NAME="relative" @@ -1599,7 +1580,7 @@ EOF { desc => "TEST wildcard substitution (find queue/nr_requests)", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "found-subdir", rules => <<EOF KERNEL=="sda", TEST=="*/nr_requests", NAME="found-subdir" @@ -1608,7 +1589,7 @@ EOF { desc => "TEST MODE=0000", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "sda", exp_perms => "0:0:0000", rules => <<EOF @@ -1618,7 +1599,7 @@ EOF { desc => "TEST PROGRAM feeds MODE", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "sda", exp_perms => "0:0:0400", rules => <<EOF @@ -1628,7 +1609,7 @@ EOF { desc => "TEST PROGRAM feeds MODE with overflow", subsys => "block", - devpath => "/block/sda", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "sda", exp_perms => "0:0:0400", rules => <<EOF |