diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/sys/devices/pci0000:00/0000:00:1e.0/0000:02:05.0/host0/0:0:0:0/whitespace_test | 1 | ||||
-rw-r--r-- | test/udev-test.pl | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/sys/devices/pci0000:00/0000:00:1e.0/0000:02:05.0/host0/0:0:0:0/whitespace_test b/test/sys/devices/pci0000:00/0000:00:1e.0/0000:02:05.0/host0/0:0:0:0/whitespace_test new file mode 100644 index 0000000000..e3d48f0fe0 --- /dev/null +++ b/test/sys/devices/pci0000:00/0000:00:1e.0/0000:02:05.0/host0/0:0:0:0/whitespace_test @@ -0,0 +1 @@ +WHITE SPACE diff --git a/test/udev-test.pl b/test/udev-test.pl index 60cf16901c..38ea0181f6 100644 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -467,6 +467,25 @@ BUS="scsi", ID="*:0:0:0", NAME="scsi-0:0:0:0" BUS="scsi", ID="0:0:0:0", NAME="bad" EOF }, + { + desc => "ignore SYSFS attribute whitespace", + subsys => "block", + devpath => "block/sda", + expected => "ignored", + conf => <<EOF +BUS="scsi", SYSFS{whitespace_test}="WHITE SPACE", NAME="ignored" +EOF + }, + { + desc => "do not ignore SYSFS attribute whitespace", + subsys => "block", + devpath => "block/sda", + expected => "matched-with-space", + conf => <<EOF +BUS="scsi", SYSFS{whitespace_test}="WHITE SPACE ", NAME="wrong-to-ignore" +BUS="scsi", SYSFS{whitespace_test}="WHITE SPACE ", NAME="matched-with-space" +EOF + }, ); # set env |