[master] cc8fb90 Polish somewhat
Federico G. Schwindt
fgsch at lodoss.net
Wed Nov 30 21:16:05 CET 2016
commit cc8fb90e55601d53879433ee02c3205592c9ee41
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Wed Nov 30 20:06:50 2016 +0000
Polish somewhat
diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index 3ca934c..2f44f4a 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -159,7 +159,7 @@ tst_cb(const struct vev *ve, int what)
{
struct vtc_job *jp;
char buf[BUFSIZ];
- int ecode, signo;
+ int ecode;
int i, stx;
pid_t px;
double t;
@@ -186,12 +186,10 @@ tst_cb(const struct vev *ve, int what)
t = VTIM_mono() - jp->t0;
AZ(close(ve->fd));
- ecode = 2;
- signo = 0;
- if (WIFEXITED(stx))
+ if (stx)
ecode = WEXITSTATUS(stx);
- if (WIFSIGNALED(stx))
- signo = WTERMSIG(stx);
+ else
+ ecode = 0;
if (ecode > 1 && vtc_verbosity)
printf("%s\n", jp->buf);
@@ -220,8 +218,8 @@ tst_cb(const struct vev *ve, int what)
if (ecode > 1) {
printf("# top TEST %s FAILED (%.3f)",
jp->tst->filename, t);
- if (signo)
- printf(" signal=%d", signo);
+ if (WIFSIGNALED(stx))
+ printf(" signal=%d", WTERMSIG(stx));
printf(" exit=%d\n", ecode);
if (!vtc_continue) {
/* XXX kill -9 other jobs ? */
More information about the varnish-commit
mailing list