udev-test: fix test skip condition
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 aa38bae..3517fea 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);
 }