ryantimwilson / rpms / systemd

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