Permalink
Browse files

Fail tests if the process got a signal.

  • Loading branch information...
1 parent cddfbca commit 85b8250edecf74f35d9bcc34dfa19dd98c141595 @bsdphk bsdphk committed Jan 11, 2017
Showing with 3 additions and 7 deletions.
  1. +3 −7 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);

0 comments on commit 85b8250

Please sign in to comment.