X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=test%2Fudev-test.pl;h=992fc0019a9398a22da5b24107cf40195c099313;hp=578adc4df19646eda9875a65869f36a5edccc0b3;hb=f22e9686fd4f8e602e8dc11a4b06765206f26edf;hpb=e93901468c668f3dda6f57ee7f4b953e287b1622 diff --git a/test/udev-test.pl b/test/udev-test.pl index 578adc4df..992fc0019 100644 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -14,14 +14,8 @@ # After creation and removal the result is checked against the # expected value and the result is printed. # -# happy testing, # Kay Sievers , 2003 -# -# Modified April 9, 2004 by Leann Ogasawara -# - expanded @tests array to add more symlinks and permissions tests -# - some of the symlinks tests also test lack of node creation -# - added symlink_test() function -# - moved permissions and major_minor tests into their own functions +# Leann Ogasawara , 2004 use warnings; use strict; @@ -631,6 +625,34 @@ EOF KERNEL="ttyUSB[0-9]*", OWNER="5000", GROUP="100", MODE="0777" KERNEL="ttyUSX[0-9]*", OWNER="5001", GROUP="101", MODE="0444" KERNEL="ttyUSB[0-9]*", NAME="ttyUSB%n" +EOF + }, + { + desc => "multiple permissions only rule", + subsys => "tty", + devpath => "/class/tty/ttyUSB0", + exp_name => "ttyUSB0", + exp_perms => "3000:4000:0777", + conf => < "permissions only rule with override at NAME rule", + subsys => "tty", + devpath => "/class/tty/ttyUSB0", + exp_name => "ttyUSB0", + exp_perms => "3000:8000:0777", + conf => < "enumeration char test sequence (1/5 keep)", + desc => "enumeration char test sequence 1/5 (keep)", subsys => "block", devpath => "/block/sda", exp_name => "cdrom", @@ -1038,6 +1060,54 @@ EOF conf => < "temporary node creation test", + subsys => "block", + devpath => "/block/sda", + exp_name => "sda", + conf => < "devpath substitution test", + subsys => "block", + devpath => "/block/sda", + exp_name => "sda", + conf => < "parent node name substitution test sequence 1/2 (keep)", + subsys => "block", + devpath => "/block/sda", + exp_name => "main_device", + option => "keep", + conf => < "parent node name substitution test sequence 2/2 (clean)", + subsys => "block", + devpath => "/block/sda/sda1", + exp_name => "main_device-part-1", + option => "clean", + conf => < "udev_root substitution", + subsys => "block", + devpath => "/block/sda/sda1", + exp_name => "start-udev-root-end", + option => "clean", + conf => <$main_conf" || die "unable to create config file: $main_conf"; print CONF "udev_root=\"$udev_root\"\n"; print CONF "udev_db=\"$udev_db\"\n"; print CONF "udev_rules=\"$conf_tmp\"\n"; -print CONF "default_mode=\"0660\"\n"; -print CONF "default_owner=\"root\"\n"; -print CONF "default_group=\"root\"\n"; close CONF; my $test_num = 1;