summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-12-09 16:48:24 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-12-10 03:04:06 +0100
commit5f6dd9a608271948bb1d4a1fb975e889db70512c (patch)
tree3e1893f7e08d00145c70de0e98ea6a97d220a426 /selftest
parent680a2fb5173a74b65fa23ac0027f516ddd908e9b (diff)
downloadsamba-5f6dd9a608271948bb1d4a1fb975e889db70512c.tar.gz
samba-5f6dd9a608271948bb1d4a1fb975e889db70512c.tar.bz2
samba-5f6dd9a608271948bb1d4a1fb975e889db70512c.zip
selftest: Check exit code when listing tests.
Diffstat (limited to 'selftest')
-rwxr-xr-xselftest/selftest.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index d8640e0d1a..213954cfbf 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -959,6 +959,17 @@ $envvarstr
$cmd =~ s/\$LISTOPT/--list/;
system($cmd);
+
+ if ($? == -1) {
+ die("Unable to run $cmd: $!");
+ } elsif ($? & 127) {
+ die(snprintf("%s died with signal %d, %s coredump\n", $cmd, ($? & 127), ($? & 128) ? 'with' : 'without'));
+ }
+
+ my $exitcode = $? >> 8;
+ if ($exitcode != 0) {
+ die("$cmd exited with exit code $exitcode");
+ }
}
} else {
foreach (@todo) {