chiark / gitweb /
[PATCH] add tests for multi-file LABEL rules.
authorgreg@kroah.com <greg@kroah.com>
Tue, 23 Dec 2003 06:32:06 +0000 (22:32 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:13:10 +0000 (21:13 -0700)
test/label_test
test/udev-test.pl

index 2e05692..cf0d2eb 100644 (file)
@@ -8,7 +8,8 @@ export SYSFS_PATH=$PWD/sys/
 export UDEV_CONFIG_FILE=$PWD/$CONFIG
 
 cat > $RULES << EOF
-LABEL, BUS="scsi", SYSFS_vendor="IBM-ESXS", NAME="boot_disk%n"
+LABEL, BUS="scsi", SYSFS_vendor="IBM-ESXS", SYSFS_model="ST336605LW   !#", NAME="boot_diskX%n"
+LABEL, BUS="scsi", SYSFS_vendor="IBM-ESXS", SYSFS_model="ST336605LW    !#", NAME="boot_disk%n"
 EOF
 
 cat > $CONFIG << EOF
index 7afbd0d..4773954 100644 (file)
@@ -64,6 +64,26 @@ 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     => <<EOF
+LABEL, BUS="scsi", SYSFS_vendor="IBM-ESXS", SYSFS_model="ST336605LW   !#", NAME="boot_diskX%n"
+LABEL, BUS="scsi", SYSFS_vendor="IBM-ESXS", SYSFS_model="ST336605LW    !#", NAME="boot_disk%n"
+EOF
+       },
+       {
+               desc     => "label test of max sysfs files",
+               subsys   => "block",
+               devpath  => "block/sda/sda1",
+               expected => "boot_disk1" ,
+               conf     => <<EOF
+LABEL, BUS="scsi", SYSFS_vendor="IBM-ESXS", SYSFS_model="ST336605LW    !#", SYSFS_scsi_level="4", SYSFS_rev="B245", SYSFS_type="2", SYSFS_queue_depth="32", NAME="boot_diskXX%n"
+LABEL, BUS="scsi", SYSFS_vendor="IBM-ESXS", SYSFS_model="ST336605LW    !#", SYSFS_scsi_level="4", SYSFS_rev="B245", SYSFS_type="0", NAME="boot_disk%n"
+EOF
+       },
+       {
                desc     => "catch device by *",
                subsys   => "tty",
                devpath  => "class/tty/ttyUSB0",