From 358c8c20239a314b4684c54485c526deaf36dd3b Mon Sep 17 00:00:00 2001 From: "greg@kroah.com" Date: Mon, 22 Dec 2003 22:32:06 -0800 Subject: [PATCH] [PATCH] add tests for multi-file LABEL rules. --- test/label_test | 3 ++- test/udev-test.pl | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/test/label_test b/test/label_test index 2e056925..cf0d2eb0 100644 --- a/test/label_test +++ b/test/label_test @@ -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 diff --git a/test/udev-test.pl b/test/udev-test.pl index 7afbd0d6..4773954b 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 => <