]> xenbits.xensource.com Git - osstest.git/commitdiff
ts-livepatch-run: Treat (just) falseish from OutputCheck as fail
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 16 Jan 2019 11:28:49 +0000 (11:28 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Wed, 16 Jan 2019 11:36:03 +0000 (11:36 +0000)
This is more idiomatic.  All existing OutputChecks return booleans, so
no functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
ts-livepatch-run

index f11945863f1145f82be5895511183a86796c45c7..8fdb8004e69cef55e843e156abfd428b5b1baa43 100755 (executable)
@@ -147,8 +147,8 @@ sub livepatch_test () {
         }
         if (defined($test->{OutputCheck})) {
             $_ = $output;
-            $rc=$test->{OutputCheck}->();
-            if ($rc ne 1) {
+            my $ok = $test->{OutputCheck}->();
+            if (!$ok) {
                 die "FAILED! OutputCheck=$test->{OutputCheck}, input=$output\n";
             }
         }