1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-25 17:57:42 +03:00

selftest: Check exit code when listing tests.

This commit is contained in:
Jelmer Vernooij 2010-12-09 16:48:24 +01:00
parent 680a2fb517
commit 5f6dd9a608

View File

@ -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) {