EOF
},
{
- desc => "place on bus of scsi partition",
+ desc => "parent device name match of scsi partition",
subsys => "block",
devpath => "/block/sda/sda3",
exp_name => "first_disk3" ,
desc => "test substitution chars",
subsys => "block",
devpath => "/block/sda/sda3",
- exp_name => "Major:8:minor:3:kernelnumber:3:bus:0:0:0:0" ,
+ exp_name => "Major:8:minor:3:kernelnumber:3:id:0:0:0:0" ,
rules => <<EOF
-BUS=="scsi", ID=="0:0:0:0", NAME="Major:%M:minor:%m:kernelnumber:%n:bus:%b"
+BUS=="scsi", ID=="0:0:0:0", NAME="Major:%M:minor:%m:kernelnumber:%n:id:%b"
EOF
},
{
BUS=="scsi", PROGRAM=="/bin/echo -n special-device", RESULT=="special-device-", NAME="%c-3-%n"
BUS=="scsi", PROGRAM=="/bin/echo -n special-device", RESULT=="special-devic", NAME="%c-4-%n"
BUS=="scsi", PROGRAM=="/bin/echo -n special-device", RESULT=="special-*", NAME="%c-%n"
-EOF
- },
- {
- desc => "program result substitution (no argument should be subsystem)",
- subsys => "block",
- devpath => "/block/sda/sda3",
- exp_name => "subsys_block" ,
- rules => <<EOF
-BUS=="scsi", PROGRAM=="/bin/echo", RESULT=="block", NAME="subsys_block"
EOF
},
{
desc => "test substitution by variable name",
subsys => "block",
devpath => "/block/sda/sda3",
- exp_name => "Major:8-minor:3-kernelnumber:3-bus:0:0:0:0" ,
+ exp_name => "Major:8-minor:3-kernelnumber:3-id:0:0:0:0",
rules => <<EOF
-BUS=="scsi", ID=="0:0:0:0", NAME="Major:\$major-minor:\$minor-kernelnumber:\$number-bus:\$id"
+BUS=="scsi", ID=="0:0:0:0", NAME="Major:\$major-minor:\$minor-kernelnumber:\$number-id:\$id"
EOF
},
{
desc => "test substitution by variable name 2",
subsys => "block",
devpath => "/block/sda/sda3",
- exp_name => "Major:8-minor:3-kernelnumber:3-bus:0:0:0:0" ,
+ exp_name => "Major:8-minor:3-kernelnumber:3-id:0:0:0:0",
rules => <<EOF
-BUS=="scsi", ID=="0:0:0:0", DEVPATH="*/sda/*", NAME="Major:\$major-minor:%m-kernelnumber:\$number-bus:%b"
+BUS=="scsi", ID=="0:0:0:0", DEVPATH="*/sda/*", NAME="Major:\$major-minor:%m-kernelnumber:\$number-id:\$id"
EOF
},
{
EOF
},
{
- desc => "invalid program for device with no bus",
+ desc => "non matching BUS for device with no parent",
subsys => "tty",
devpath => "/class/tty/console",
- exp_name => "TTY" ,
+ exp_name => "TTY",
rules => <<EOF
BUS=="scsi", PROGRAM=="/bin/echo -n foo", RESULT=="foo", NAME="foo"
KERNEL=="console", NAME="TTY"
EOF
},
{
- desc => "valid program for device with no bus",
- subsys => "tty",
- devpath => "/class/tty/console",
- exp_name => "foo" ,
- rules => <<EOF
-PROGRAM=="/bin/echo -n foo", RESULT=="foo", NAME="foo"
-KERNEL=="console", NAME="TTY"
-EOF
- },
- {
- desc => "invalid label for device with no bus",
+ desc => "non matching BUS",
subsys => "tty",
devpath => "/class/tty/console",
exp_name => "TTY" ,
EOF
},
{
- desc => "valid label for device with no bus",
+ desc => "SYSFS match",
subsys => "tty",
devpath => "/class/tty/console",
exp_name => "foo" ,