bd1529
From 06e937177bf23d8ea8e5060a856cce02d5436eb4 Mon Sep 17 00:00:00 2001
bd1529
From: Martin Wilck <mwilck@suse.com>
bd1529
Date: Tue, 24 Apr 2018 18:30:09 +0200
bd1529
Subject: [PATCH] test/udev-test.pl: merge import parent tests into one
bd1529
bd1529
As we can test multiple devices and multiple links per device
bd1529
in one test now, these two tests can be merged into one.
bd1529
bd1529
(cherry picked from commit a96cd21d31cb7af211862768e133b50b085634e7)
bd1529
bd1529
Related: #1642728
bd1529
---
bd1529
 test/udev-test.pl | 17 +++++------------
bd1529
 1 file changed, 5 insertions(+), 12 deletions(-)
bd1529
bd1529
diff --git a/test/udev-test.pl b/test/udev-test.pl
bd1529
index 880a73b10b..0344d2e89c 100755
bd1529
--- a/test/udev-test.pl
bd1529
+++ b/test/udev-test.pl
bd1529
@@ -1781,28 +1781,21 @@ TAGS=="aaa||bbb||ccc", SYMLINK+="bad"
bd1529
 EOF
bd1529
         },
bd1529
         {
bd1529
-                desc            => "IMPORT parent test sequence 1/2 (keep)",
bd1529
+                desc            => "IMPORT parent test",
bd1529
                 devices => [
bd1529
                         {
bd1529
                                 devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
bd1529
                                 exp_links       => ["parent"],
bd1529
-                        }],
bd1529
-                option          => "keep",
bd1529
-                rules           => <
bd1529
-KERNEL=="sda", IMPORT{program}="/bin/echo -e \'PARENT_KEY=parent_right\\nWRONG_PARENT_KEY=parent_wrong'"
bd1529
-KERNEL=="sda", SYMLINK+="parent"
bd1529
-EOF
bd1529
-        },
bd1529
-        {
bd1529
-                desc            => "IMPORT parent test sequence 2/2 (keep)",
bd1529
-                devices => [
bd1529
+                        },
bd1529
                         {
bd1529
                                 devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
bd1529
                                 exp_links       => ["parentenv-parent_right"],
bd1529
                         }],
bd1529
-                option          => "clean",
bd1529
+                sleep_us        => 500000,  # Serialized! We need to sleep here after adding sda
bd1529
                 rules           => <
bd1529
 KERNEL=="sda1", IMPORT{parent}="PARENT*", SYMLINK+="parentenv-\$env{PARENT_KEY}\$env{WRONG_PARENT_KEY}"
bd1529
+KERNEL=="sda", IMPORT{program}="/bin/echo -e \'PARENT_KEY=parent_right\\nWRONG_PARENT_KEY=parent_wrong'"
bd1529
+KERNEL=="sda", SYMLINK+="parent"
bd1529
 EOF
bd1529
         },
bd1529
         {