Commit cc8fb90e authored by Federico G. Schwindt's avatar Federico G. Schwindt

Polish somewhat

parent 206ae064
...@@ -159,7 +159,7 @@ tst_cb(const struct vev *ve, int what) ...@@ -159,7 +159,7 @@ tst_cb(const struct vev *ve, int what)
{ {
struct vtc_job *jp; struct vtc_job *jp;
char buf[BUFSIZ]; char buf[BUFSIZ];
int ecode, signo; int ecode;
int i, stx; int i, stx;
pid_t px; pid_t px;
double t; double t;
...@@ -186,12 +186,10 @@ tst_cb(const struct vev *ve, int what) ...@@ -186,12 +186,10 @@ tst_cb(const struct vev *ve, int what)
t = VTIM_mono() - jp->t0; t = VTIM_mono() - jp->t0;
AZ(close(ve->fd)); AZ(close(ve->fd));
ecode = 2; if (stx)
signo = 0;
if (WIFEXITED(stx))
ecode = WEXITSTATUS(stx); ecode = WEXITSTATUS(stx);
if (WIFSIGNALED(stx)) else
signo = WTERMSIG(stx); ecode = 0;
if (ecode > 1 && vtc_verbosity) if (ecode > 1 && vtc_verbosity)
printf("%s\n", jp->buf); printf("%s\n", jp->buf);
...@@ -220,8 +218,8 @@ tst_cb(const struct vev *ve, int what) ...@@ -220,8 +218,8 @@ tst_cb(const struct vev *ve, int what)
if (ecode > 1) { if (ecode > 1) {
printf("# top TEST %s FAILED (%.3f)", printf("# top TEST %s FAILED (%.3f)",
jp->tst->filename, t); jp->tst->filename, t);
if (signo) if (WIFSIGNALED(stx))
printf(" signal=%d", signo); printf(" signal=%d", WTERMSIG(stx));
printf(" exit=%d\n", ecode); printf(" exit=%d\n", ecode);
if (!vtc_continue) { if (!vtc_continue) {
/* XXX kill -9 other jobs ? */ /* XXX kill -9 other jobs ? */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment