chiark / gitweb /
[PATCH] udev-test.pl: add test for DEVNAME export to RUN environment
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Mon, 4 Apr 2005 13:20:48 +0000 (15:20 +0200)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 06:55:00 +0000 (23:55 -0700)
test/udev-test.pl

index 91e91bb..c1dc8b2 100644 (file)
@@ -1281,6 +1281,19 @@ KERNEL=="sda", NAME="not-ok"
 EOF
        },
        {
+               desc            => "test RUN key and DEVNAME",
+               subsys          => "block",
+               devpath         => "/block/sda",
+               exp_name        => "testsymlink",
+               exp_target      => "ok",
+               exp_rem_error   => "yes",
+               option          => "clean",
+               rules           => <<EOF
+KERNEL=="sda", NAME="ok", RUN+="/bin/sh -c 'ln -s `basename \$DEVNAME` %r/testsymlink'"
+KERNEL=="sda", NAME="not-ok"
+EOF
+       },
+       {
                desc            => "test RUN key remove",
                subsys          => "block",
                devpath         => "/block/sda",