dryang / rpms / systemd

Forked from rpms/systemd a year ago
Clone
21255d
From f44fcdde656036f0388fc8244b8960c1873a3a08 Mon Sep 17 00:00:00 2001
21255d
From: Alexey Bogdanenko <alexey@bogdanenko.com>
21255d
Date: Sat, 8 Dec 2018 11:02:30 +0300
21255d
Subject: [PATCH] udev-test: fix test skip condition
21255d
21255d
When there is a failure to setup the environment, the following happens:
21255d
21255d
1. Command "./test-udev check" exits with non-zero code.
21255d
2. Perl function "system" returns the code.
21255d
3. The code is evaluated as true by Perl.
21255d
21255d
Then we stop the test.
21255d
21255d
(cherry picked from commit 7935dae547caf164d807237f1009a9e9fa510337)
21255d
21255d
Related: #1642728
21255d
---
21255d
 test/udev-test.pl | 2 +-
21255d
 1 file changed, 1 insertion(+), 1 deletion(-)
21255d
21255d
diff --git a/test/udev-test.pl b/test/udev-test.pl
21255d
index aa38bae0b1..3517feab15 100755
21255d
--- a/test/udev-test.pl
21255d
+++ b/test/udev-test.pl
21255d
@@ -1661,7 +1661,7 @@ if (!udev_setup()) {
21255d
         exit($EXIT_TEST_SKIP);
21255d
 }
21255d
 
21255d
-if (!system($udev_bin, "check")) {
21255d
+if (system($udev_bin, "check")) {
21255d
         warn "$udev_bin failed to set up the environment, skipping the test";
21255d
         exit($EXIT_TEST_SKIP);
21255d
 }