Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
0887a4f9
Commit
0887a4f9
authored
Oct 06, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to firm up v00010 even more, by explicitly waiting for the
crashing child to do so, and then explicitly start it again.
parent
91280b2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
7 deletions
+34
-7
v00010.vtc
bin/varnishtest/tests/v00010.vtc
+5
-7
vtc_varnish.c
bin/varnishtest/vtc_varnish.c
+29
-0
No files found.
bin/varnishtest/tests/v00010.vtc
View file @
0887a4f9
...
...
@@ -27,9 +27,6 @@ varnish v1 -cliok "param.set diag_bitmap 0x00001000"
# Force the (random) port selected to be used again after restart.
varnish v1 -cliok "param.set listen_address ${v1_addr}:${v1_port}"
# varnishtest defaults to auto_restart off, to avoid masking bugs.
varnish v1 -cliok "param.set auto_restart on"
client c1 {
txreq -url "/"
rxresp
...
...
@@ -37,6 +34,11 @@ client c1 {
# Don't expect answer, the server crashed.
} -run
varnish v1 -wait-stopped
varnish v1 -cliok "panic.show"
varnish v1 -cliok "panic.clear"
varnish v1 -clierr 300 "panic.clear"
varnish v1 -cliok "start"
varnish v1 -wait-running
sema r1 sync 2
...
...
@@ -45,7 +47,3 @@ client c1 {
rxresp
expect resp.http.foo == "foo"
} -run
varnish v1 -cliok "panic.show"
varnish v1 -cliok "panic.clear"
varnish v1 -clierr 300 "panic.clear"
bin/varnishtest/vtc_varnish.c
View file @
0887a4f9
...
...
@@ -119,6 +119,30 @@ varnish_ask_cli(const struct varnish *v, const char *cmd, char **repl)
return
((
enum
VCLI_status_e
)
retval
);
}
/**********************************************************************
*
*/
static
void
wait_stopped
(
const
struct
varnish
*
v
)
{
char
*
r
;
enum
VCLI_status_e
st
;
while
(
1
)
{
vtc_log
(
v
->
vl
,
3
,
"wait-stopped"
);
st
=
varnish_ask_cli
(
v
,
"status"
,
&
r
);
if
(
st
!=
CLIS_OK
)
vtc_log
(
v
->
vl
,
0
,
"CLI status command failed: %u %s"
,
st
,
r
);
if
(
!
strcmp
(
r
,
"Child in state stopped"
))
{
free
(
r
);
break
;
}
free
(
r
);
(
void
)
usleep
(
200000
);
}
}
/**********************************************************************
*
*/
...
...
@@ -130,6 +154,7 @@ wait_running(const struct varnish *v)
enum
VCLI_status_e
st
;
while
(
1
)
{
vtc_log
(
v
->
vl
,
3
,
"wait-running"
);
st
=
varnish_ask_cli
(
v
,
"status"
,
&
r
);
if
(
st
!=
CLIS_OK
)
vtc_log
(
v
->
vl
,
0
,
...
...
@@ -848,6 +873,10 @@ cmd_varnish(CMD_ARGS)
varnish_stop
(
v
);
continue
;
}
if
(
!
strcmp
(
*
av
,
"-wait-stopped"
))
{
wait_stopped
(
v
);
continue
;
}
if
(
!
strcmp
(
*
av
,
"-wait-running"
))
{
wait_running
(
v
);
continue
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment