Update test-case
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3055
d4fa192b-c00b-0410-8231-
f00ffab90ce4
varnish v1 -vcl+backend { }
+varnish v1 -start
+varnish v1 -stop
+
+varnish v1 -start
+varnish v1 -stop
+
+varnish v1 -start
+varnish v1 -stop
+
varnish v1 -cliok start
varnish v1 -clierr 300 start
varnish v1 -clierr 300 start
varnish v1 -clierr 300 stop
varnish v1 -clierr 300 stop
-varnish v1 -cliok start
-varnish v1 -cliok stop
-
-varnish v1 -cliok start
-varnish v1 -cliok stop
-
-varnish v1 -cliok start
-varnish v1 -cliok stop
-
varnish v1 -wait
static void
varnish_stop(struct varnish *v)
{
+ char *r;
if (v->cli_fd < 0)
varnish_launch(v);
vtc_log(v->vl, 2, "Stop");
(void)varnish_ask_cli(v, "stop", NULL);
+ while (1) {
+ (void)varnish_ask_cli(v, "status", &r);
+ if (!strcmp(r, "Child in state stopped"))
+ break;
+ free(r);
+ sleep (1);
+ }
}
/**********************************************************************