[master] e300b98 Assume an error when terminated by a signal

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Sat Feb 4 09:50:05 CET 2017


commit e300b9816a264ada1304ecc57a6b2a252951ada5
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Sat Feb 4 00:30:28 2017 +0100

    Assume an error when terminated by a signal
    
    While working on libvarnishapi I couldn't get the VUTs to fail on
    an INCOMPL() statement, this was caused by the recent changes to
    the `shell` command.

diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c
index 64ed594..483acff 100644
--- a/bin/varnishtest/vtc.c
+++ b/bin/varnishtest/vtc.c
@@ -503,7 +503,8 @@ cmd_shell_engine(struct vtclog *vl, int ok, const char *cmd,
 	vtc_log(vl, 4, "shell_status = 0x%04x", WEXITSTATUS(r));
 	if (WIFSIGNALED(r))
 		vtc_log(vl, 4, "shell_signal = %d", WTERMSIG(r));
-	if (ok < 0 && !WEXITSTATUS(r))
+
+	if (ok < 0 && !WEXITSTATUS(r) && !WIFSIGNALED(r))
 		vtc_fatal(vl, "shell did not fail as expected");
 	else if (ok >= 0 && WEXITSTATUS(r) != ok) {
 		vtc_fatal(vl,



More information about the varnish-commit mailing list