ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
21255d
From 6fba8e9a94026ee7b8791844ed1e7c6d464f7666 Mon Sep 17 00:00:00 2001
21255d
From: Martin Wilck <mwilck@suse.com>
21255d
Date: Tue, 24 Apr 2018 22:24:43 +0200
21255d
Subject: [PATCH] test/udev-test.pl: add repeat count
21255d
21255d
for easier reproduction of sporadic test failures.
21255d
21255d
(cherry picked from commit 2ab0a8d00bc48d3531e953d938db889d8a932d65)
21255d
21255d
Related: #1642728
21255d
---
21255d
 test/udev-test.pl | 5 +++++
21255d
 1 file changed, 5 insertions(+)
21255d
21255d
diff --git a/test/udev-test.pl b/test/udev-test.pl
21255d
index d964c664b6..8b1ab3c06c 100755
21255d
--- a/test/udev-test.pl
21255d
+++ b/test/udev-test.pl
21255d
@@ -2125,6 +2125,7 @@ EOF
21255d
         },
21255d
         {
21255d
                 desc            => "multiple devices, same link name, positive prio",
21255d
+                repeat          => 100,
21255d
                 devices => [
21255d
                         {
21255d
                                 devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
21255d
@@ -2635,6 +2636,7 @@ sub run_test {
21255d
         print "TEST $number: $rules->{desc}\n";
21255d
         create_rules(\$rules->{rules});
21255d
 
21255d
+      REPEAT:
21255d
         fork_and_run_udev("add", $rules, $sema);
21255d
 
21255d
         foreach my $dev (@devices) {
21255d
@@ -2653,6 +2655,9 @@ sub run_test {
21255d
         }
21255d
 
21255d
         print "\n";
21255d
+        if (defined($rules->{repeat}) && --($rules->{repeat}) > 0) {
21255d
+                goto REPEAT;
21255d
+        }
21255d
 
21255d
         if (defined($rules->{option}) && $rules->{option} eq "clean") {
21255d
                 udev_setup();