r4465 - trunk/varnish-cache/bin/varnishtest
phk at projects.linpro.no
phk at projects.linpro.no
Fri Jan 15 14:46:46 CET 2010
Author: phk
Date: 2010-01-15 14:46:46 +0100 (Fri, 15 Jan 2010)
New Revision: 4465
Modified:
trunk/varnish-cache/bin/varnishtest/vtc_varnish.c
Log:
Use proper tests instead of asserts.
Modified: trunk/varnish-cache/bin/varnishtest/vtc_varnish.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_varnish.c 2010-01-15 13:46:23 UTC (rev 4464)
+++ trunk/varnish-cache/bin/varnishtest/vtc_varnish.c 2010-01-15 13:46:46 UTC (rev 4465)
@@ -337,18 +337,25 @@
if (vtc_error)
return;
vtc_log(v->vl, 2, "Start");
- u = varnish_ask_cli(v, "start", NULL);
+ u = varnish_ask_cli(v, "start", &resp);
if (vtc_error)
return;
- assert(u == CLIS_OK);
- u = varnish_ask_cli(v, "debug.xid 1000", NULL);
+ if (u != CLIS_OK)
+ vtc_log(v->vl, 0, "CLI start command failed: %u %s", u, resp);
+ free(resp);
+ u = varnish_ask_cli(v, "debug.xid 1000", &resp);
if (vtc_error)
return;
- assert(u == CLIS_OK);
+ if (u != CLIS_OK)
+ vtc_log(v->vl, 0, "CLI debug.xid command failed: %u %s",
+ u, resp);
+ free(resp);
u = varnish_ask_cli(v, "debug.listen_address", &resp);
if (vtc_error)
return;
- assert(u == CLIS_OK);
+ if (u != CLIS_OK)
+ vtc_log(v->vl, 0,
+ "CLI debug.listen_address command failed: %u %s", u, resp);
h = resp;
p = strchr(h, ' ');
AN(p);
More information about the varnish-commit
mailing list