[master] 85b8250 Fail tests if the process got a signal.
Poul-Henning Kamp
phk at FreeBSD.org
Wed Jan 11 11:30:05 CET 2017
commit 85b8250edecf74f35d9bcc34dfa19dd98c141595
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Jan 11 10:27:46 2017 +0000
Fail tests if the process got a signal.
diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index 8f9284a..1ca41f4 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -57,9 +57,6 @@
#include "vtim.h"
#include "vct.h"
-#define MAX_FILESIZE (1024 * 1024)
-
-
struct vtc_tst {
unsigned magic;
#define TST_MAGIC 0x618d8b88
@@ -167,7 +164,7 @@ tst_cb(const struct vev *ve, int what)
CAST_OBJ_NOTNULL(jp, ve->priv, JOB_MAGIC);
- // printf("%p %s %d\n", ve, jp->tst->filename, what);
+ // printf("CB %p %s %d\n", ve, jp->tst->filename, what);
if (what == 0)
AZ(kill(jp->child, SIGKILL)); /* XXX: Timeout */
else
@@ -186,10 +183,9 @@ tst_cb(const struct vev *ve, int what)
t = VTIM_mono() - jp->t0;
AZ(close(ve->fd));
- if (stx)
+ ecode = WTERMSIG(stx);
+ if (ecode == 0)
ecode = WEXITSTATUS(stx);
- else
- ecode = 0;
if (ecode > 1 && vtc_verbosity)
printf("%s\n", jp->buf);
More information about the varnish-commit
mailing list