From c4edd0adb55ebf625a0f190071b930b469c58dd8 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 20 Aug 2006 19:11:32 +0200 Subject: [PATCH] use new key names in test programs --- test/udev-test.pl | 300 +++++++++++++++++++++++++++---------------------- test/udevstart-test.pl | 2 - 2 files changed, 163 insertions(+), 139 deletions(-) diff --git a/test/udev-test.pl b/test/udev-test.pl index c766232..1117ecb 100755 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -14,8 +14,8 @@ # After creation and removal the result is checked against the # expected value and the result is printed. # -# Kay Sievers , 2003 -# Leann Ogasawara , 2004 +# Copyright (C) 2004-2006 Kay Sievers +# Copyright (C) 2004 Leann Ogasawara use warnings; use strict; @@ -33,12 +33,32 @@ my $udev_rules = "udev-test.rules"; my @tests = ( { + desc => "label test of scsi disc (old key names)", + subsys => "block", + devpath => "/block/sda", + exp_name => "boot_disk" , + rules => < "label test of scsi disc (old key names)", + subsys => "block", + devpath => "/block/sda", + exp_name => "boot_disk" , + rules => < "label test of scsi disc", subsys => "block", devpath => "/block/sda", exp_name => "boot_disk" , rules => < "/block/sda/sda1", exp_name => "boot_disk1" , rules => < "/block/sda/sda1", exp_name => "boot_disk1" , rules => < "/block/sda/sda1", exp_name => "boot_disk1" , rules => < "/block/sda/sda1", exp_name => "boot_disk1" , rules => < "/block/sda/sda3", exp_name => "first_disk3" , rules => < "test substitution chars", + desc => "test substitution chars (old key names)", subsys => "block", devpath => "/block/sda/sda3", exp_name => "Major:8:minor:3:kernelnumber:3:id:0:0:0:0" , @@ -249,12 +269,21 @@ BUS=="scsi", ID=="0:0:0:0", NAME="Major:%M:minor:%m:kernelnumber:%n:id:%b" EOF }, { + desc => "test substitution chars", + subsys => "block", + devpath => "/block/sda/sda3", + 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-b0:0-sIBM" , rules => < "/block/sda", exp_name => "subdir/info/node" , rules => < "/block/sda", exp_name => "node12345678", rules => < "/block/sda", exp_name => "disk-IBM-ESXS-sda" , rules => < "/block/sda/sda3", exp_name => "special-device-3" , rules => < "/block/sda/sda3", exp_name => "newline_removed" , rules => < "/block/sda/sda3", exp_name => "test-0:0:0:0" , rules => < "/block/sda/sda3", exp_name => "escape-3" , rules => < "/block/sda/sda3", exp_name => "foo9" , rules => < "/block/sda/sda3", exp_name => "bar9" , rules => < "/block/sda/sda3", exp_name => "foo7" , rules => < "/block/sda/sda3", exp_name => "my-foo9" , rules => < "/block/sda/sda3", exp_name => "my-foo8" , rules => < "/block/sda/sda3", exp_name => "Major:8-minor:3-kernelnumber:3-id:0:0:0:0", rules => < "/block/sda/sda3", exp_name => "Major:8-minor:3-kernelnumber:3-id:0:0:0:0", rules => < "/block/sda/sda3", exp_name => "830:0:0:03" , rules => < "/block/sda/sda3", exp_name => "833" , rules => < "/block/sda/sda3", exp_name => "8330:0:0:0" , rules => < "non matching BUS for device with no parent", + desc => "non matching SUBSYSTEMS for device with no parent", subsys => "tty", devpath => "/class/tty/console", exp_name => "TTY", rules => < "non matching BUS", + desc => "non matching SUBSYSTEMS", subsys => "tty", devpath => "/class/tty/console", exp_name => "TTY" , rules => < "SYSFS match", + desc => "ATTRS match", subsys => "tty", devpath => "/class/tty/console", exp_name => "foo" , rules => < "/block/sda", exp_name => "scsi-0:0:0:0" , rules => < "boot_disk15" , exp_majorminor => "8:15", rules => < "/class/tty/ttyUSB0", exp_name => "visor" , rules => < "/block/rd!c0d0", exp_name => "rd/c0d0" , rules => < "/block/cciss!c0d0/cciss!c0d0p1", exp_name => "cciss/c0d0p1" , rules => < "ID rule", + desc => "KERNELS rule", subsys => "block", devpath => "/block/sda", exp_name => "scsi-0:0:0:0", rules => < "ID wildcard all", + desc => "KERNELS wildcard all", subsys => "block", devpath => "/block/sda", exp_name => "scsi-0:0:0:0", rules => < "ID wildcard partial", + desc => "KERNELS wildcard partial", subsys => "block", devpath => "/block/sda", exp_name => "scsi-0:0:0:0", rules => < "ID wildcard partial 2", + desc => "KERNELS wildcard partial 2", subsys => "block", devpath => "/block/sda", exp_name => "scsi-0:0:0:0", rules => < "ignore SYSFS attribute whitespace", + desc => "ignore ATTRS attribute whitespace", subsys => "block", devpath => "/block/sda", exp_name => "ignored", rules => < "do not ignore SYSFS attribute whitespace", + desc => "do not ignore ATTRS attribute whitespace", subsys => "block", devpath => "/block/sda", exp_name => "matched-with-space", rules => < "node", exp_perms => "5000::0660", rules => < "node", exp_perms => ":100:0660", rules => < "node", exp_perms => "nobody::0660", rules => < "node", exp_perms => ":daemon:0660", rules => < "node", exp_perms => "root:mail:0660", rules => < "node", exp_perms => "::0777", rules => < "node", exp_perms => "5000:100:0777", rules => < "node", exp_majorminor => "8:0", rules => < "1/2/symlink" , exp_target => "a/b/node", rules => < "1/2/c/d/symlink" , exp_target => "../../a/b/node", rules => < "symlink-only2", exp_target => "link", rules => < "yes", exp_rem_error => "yes", rules => < "symlink-0:0:0:0", exp_target => "node", rules => < "test", exp_target => "link", rules => < "link1", exp_target => "node", rules => < "link4", exp_target => "node", rules => < "node", exp_add_error => "yes", rules => < "node6", rules => < "yes", rules => < "node", exp_rem_error => "yes", rules => < "yes", option => "clean", rules => < "/block/sda", exp_name => "node", rules => < "/block/sda", exp_name => "node", rules => < "/block/sda", exp_name => "node", rules => < "/block/sda", exp_name => "sda", rules => < "main_device", option => "keep", rules => < "main_device-part-1", option => "clean", rules => < "/block/sda/sda1", exp_name => "start-udev-root-end", rules => < "/block/sda/sda1", exp_name => "last", rules => < "/block/sda/sda1", exp_name => "match", rules => < "/block/sda/sda1", exp_name => "not-anything", rules => < "nonzero-program", rules => < "true", rules => < "/block/sda/sda1", exp_name => "true", rules => < "/block/sda/sda1", exp_name => "true", rules => < "/block/sda/sda1", exp_name => "true", rules => < "/block/sda/sda1", exp_name => "sane", rules => < "/block/sda/sda1", exp_name => "uber", rules => < "/block/sda/sda1", exp_name => "replaced", rules => < "/block/sda", exp_name => "ok", rules => <