X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=test%2Fudev-test.pl;h=b44bd18af50c74a6290dfc02b4304e4114243f2a;hb=63645a3dfce22e865b96b519fafaa2fcb489f3be;hp=7ce920092fc05b0a99d888ca592ef84f62a01a5e;hpb=1aa1e24848903d11780db1ade355be73ad61a937;p=elogind.git diff --git a/test/udev-test.pl b/test/udev-test.pl index 7ce920092..b44bd18af 100755 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -231,7 +231,7 @@ KERNEL=="ttyUSB0", NAME="sub/direct/ory/visor" 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" , @@ -243,18 +243,18 @@ EOF desc => "test substitution chars", subsys => "block", devpath => "/block/sda/sda3", - exp_name => "Major:8:minor:3:kernelnumber:3" , + exp_name => "Major:8:minor:3:kernelnumber:3:id:0:0:0:0" , rules => < "test substitution chars (with length limit)", subsys => "block", devpath => "/block/sda/sda3", - exp_name => "M8-m3-n3-bsd-sIBM" , + exp_name => "M8-m3-n3-b0:0-sIBM" , rules => < "program result substitution (no argument should be subsystem)", - subsys => "block", - devpath => "/block/sda/sda3", - exp_name => "subsys_block" , - rules => < "program result substitution", subsys => "block", devpath => "/block/sda/sda3", - exp_name => "test-3" , + exp_name => "test-0:0:0:0" , rules => < "test substitution by variable name", subsys => "block", devpath => "/block/sda/sda3", - exp_name => "Major:8-minor:3-kernelnumber:3" , + exp_name => "Major:8-minor:3-kernelnumber:3-id:0:0:0:0", rules => < "test substitution by variable name 2", subsys => "block", devpath => "/block/sda/sda3", - exp_name => "Major:8-minor:3-kernelnumber:3-name:sda3" , + exp_name => "Major:8-minor:3-kernelnumber:3-id:0:0:0:0", rules => < "test substitution by variable name 3", subsys => "block", devpath => "/block/sda/sda3", - exp_name => "83sda33" , + exp_name => "830:0:0:03" , rules => < "test substitution by variable name 5", subsys => "block", devpath => "/block/sda/sda3", - exp_name => "833sda3" , + exp_name => "8330:0:0:0" , rules => < "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 => < "valid program for device with no bus", - subsys => "tty", - devpath => "/class/tty/console", - exp_name => "foo" , - rules => < "invalid label for device with no bus", + desc => "non matching BUS", subsys => "tty", devpath => "/class/tty/console", exp_name => "TTY" , @@ -457,7 +438,7 @@ KERNEL=="console", NAME="TTY" EOF }, { - desc => "valid label for device with no bus", + desc => "SYSFS match", subsys => "tty", devpath => "/class/tty/console", exp_name => "foo" , @@ -470,11 +451,11 @@ EOF desc => "program and bus type match", subsys => "block", devpath => "/block/sda", - exp_name => "scsi-sda" , + exp_name => "scsi-0:0:0:0" , rules => < "symlink2-ttyUSB0", exp_target => "ttyUSB0", rules => < "symlink %k substitution", + desc => "symlink %b substitution", subsys => "block", devpath => "/block/sda", - exp_name => "symlink-sda", + exp_name => "symlink-0:0:0:0", exp_target => "node", rules => <; - close $fd; - $dev =~ m/^(.+):(.+)$/; - $ENV{MAJOR} = $1; - $ENV{MINOR} = $2; - # create temporary rules open CONF, ">$udev_rules" || die "unable to create rules file: $udev_rules"; print CONF $$rules;