]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test/udev-test.pl: merge import parent tests into one
authorMartin Wilck <mwilck@suse.com>
Tue, 24 Apr 2018 16:30:09 +0000 (18:30 +0200)
committerMichal Sekletár <msekleta@redhat.com>
Mon, 2 Nov 2020 10:43:15 +0000 (11:43 +0100)
As we can test multiple devices and multiple links per device
in one test now, these two tests can be merged into one.

test/udev-test.pl

index 097b9e20b7aaa4c4448b34d9b9b6b6a9a7ecf53c..3228614ebefdcbfe660c7397e5a90617f52d930d 100755 (executable)
@@ -1781,28 +1781,21 @@ TAGS=="aaa||bbb||ccc", SYMLINK+="bad"
 EOF
         },
         {
-                desc            => "IMPORT parent test sequence 1/2 (keep)",
+                desc            => "IMPORT parent test",
                 devices => [
                         {
                                 devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
                                 exp_links       => ["parent"],
-                        }],
-                option          => "keep",
-                rules           => <<EOF
-KERNEL=="sda", IMPORT{program}="/bin/echo -e \'PARENT_KEY=parent_right\\nWRONG_PARENT_KEY=parent_wrong'"
-KERNEL=="sda", SYMLINK+="parent"
-EOF
-        },
-        {
-                desc            => "IMPORT parent test sequence 2/2 (keep)",
-                devices => [
+                        },
                         {
                                 devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
                                 exp_links       => ["parentenv-parent_right"],
                         }],
-                option          => "clean",
+                sleep_us        => 500000,  # Serialized! We need to sleep here after adding sda
                 rules           => <<EOF
 KERNEL=="sda1", IMPORT{parent}="PARENT*", SYMLINK+="parentenv-\$env{PARENT_KEY}\$env{WRONG_PARENT_KEY}"
+KERNEL=="sda", IMPORT{program}="/bin/echo -e \'PARENT_KEY=parent_right\\nWRONG_PARENT_KEY=parent_wrong'"
+KERNEL=="sda", SYMLINK+="parent"
 EOF
         },
         {