X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=test%2Fudev-test.pl;h=97c009492124005ae641c5c38fe4bf56b4df56f1;hb=a05b77509e6e3723f3e969eefd1c2a34bad79675;hp=08b99f041ffc9b39c01c10f16a783f2e0aedbb74;hpb=d94df232423870641132b307d74281f692219730;p=elogind.git diff --git a/test/udev-test.pl b/test/udev-test.pl index 08b99f041..97c009492 100644 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -61,6 +61,26 @@ LABEL, BUS="scsi", SYSFS_vendor="?IBM-ESXS", NAME="boot_disk%n-1" LABEL, BUS="scsi", SYSFS_vendor="IBM-ESXS?", NAME="boot_disk%n-2" LABEL, BUS="scsi", SYSFS_vendor="IBM-ES??", NAME="boot_disk%n" LABEL, BUS="scsi", SYSFS_vendor="IBM-ESXSS", NAME="boot_disk%n-3" +EOF + }, + { + desc => "label test of multiple sysfs files", + subsys => "block", + devpath => "block/sda/sda1", + expected => "boot_disk1" , + conf => < "label test of max sysfs files", + subsys => "block", + devpath => "block/sda/sda1", + expected => "boot_disk1" , + conf => < "visor" , conf => < "Handle comment lines in config file (and replace kernel name)", + subsys => "tty", + devpath => "class/tty/ttyUSB0", + expected => "visor" , + conf => < "Handle comment lines in config file with whitespace (and replace kernel name)", + subsys => "tty", + devpath => "class/tty/ttyUSB0", + expected => "visor" , + conf => < "Handle empty lines in config file (and replace kernel name)", + subsys => "tty", + devpath => "class/tty/ttyUSB0", + expected => "visor" , + conf => < "link1" , conf => < "invalid callout for device with no bus", + subsys => "tty", + devpath => "class/tty/console", + expected => "TTY" , + conf => < "valid callout for device with no bus", + subsys => "tty", + devpath => "class/tty/console", + expected => "foo" , + conf => < "invalid label for device with no bus", + subsys => "tty", + devpath => "class/tty/console", + expected => "TTY" , + conf => < "valid label for device with no bus", + subsys => "tty", + devpath => "class/tty/console", + expected => "foo" , + conf => <{conf} =~ m/^([A-Z]*).*/; + $config->{conf} =~ m/([A-Z]+)\s*,/; my $method = $1; print "TEST: $config->{desc}\n";