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