]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev-test: fix test skip condition 11098/head
authorAlexey Bogdanenko <alexey@bogdanenko.com>
Sat, 8 Dec 2018 08:02:30 +0000 (11:02 +0300)
committerAlexey Bogdanenko <alexey@bogdanenko.com>
Sun, 9 Dec 2018 16:22:47 +0000 (19:22 +0300)
When there is a failure to setup the environment, the following happens:

1. Command "./test-udev check" exits with non-zero code.
2. Perl function "system" returns the code.
3. The code is evaluated as true by Perl.

Then we stop the test.

test/udev-test.pl

index aa38bae0b1cd1fc4346b03140adf01aba31d1608..3517feab155ed71fd1a2dc95e39a37138ce08f50 100755 (executable)
@@ -1661,7 +1661,7 @@ if (!udev_setup()) {
         exit($EXIT_TEST_SKIP);
 }
 
-if (!system($udev_bin, "check")) {
+if (system($udev_bin, "check")) {
         warn "$udev_bin failed to set up the environment, skipping the test";
         exit($EXIT_TEST_SKIP);
 }