daandemeyer / rpms / systemd

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