Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
f697e673
Commit
f697e673
authored
Oct 06, 2011
by
Poul-Henning Kamp
Committed by
Tollef Fog Heen
Feb 24, 2012
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
98f1c8c7
Changes
2
Show 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 @
f697e673
...
@@ -27,9 +27,6 @@ varnish v1 -cliok "param.set diag_bitmap 0x00001000"
...
@@ -27,9 +27,6 @@ varnish v1 -cliok "param.set diag_bitmap 0x00001000"
# Force the (random) port selected to be used again after restart.
# Force the (random) port selected to be used again after restart.
varnish v1 -cliok "param.set listen_address ${v1_addr}:${v1_port}"
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 {
client c1 {
txreq -url "/"
txreq -url "/"
rxresp
rxresp
...
@@ -37,6 +34,11 @@ client c1 {
...
@@ -37,6 +34,11 @@ client c1 {
# Don't expect answer, the server crashed.
# Don't expect answer, the server crashed.
} -run
} -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
varnish v1 -wait-running
sema r1 sync 2
sema r1 sync 2
...
@@ -45,7 +47,3 @@ client c1 {
...
@@ -45,7 +47,3 @@ client c1 {
rxresp
rxresp
expect resp.http.foo == "foo"
expect resp.http.foo == "foo"
} -run
} -run
varnish v1 -cliok "panic.show"
varnish v1 -cliok "panic.clear"
varnish v1 -clierr 300 "panic.clear"
bin/varnishtest/vtc_varnish.c
View file @
f697e673
...
@@ -119,6 +119,30 @@ varnish_ask_cli(const struct varnish *v, const char *cmd, char **repl)
...
@@ -119,6 +119,30 @@ varnish_ask_cli(const struct varnish *v, const char *cmd, char **repl)
return
((
enum
VCLI_status_e
)
retval
);
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)
...
@@ -130,6 +154,7 @@ wait_running(const struct varnish *v)
enum
VCLI_status_e
st
;
enum
VCLI_status_e
st
;
while
(
1
)
{
while
(
1
)
{
vtc_log
(
v
->
vl
,
3
,
"wait-running"
);
st
=
varnish_ask_cli
(
v
,
"status"
,
&
r
);
st
=
varnish_ask_cli
(
v
,
"status"
,
&
r
);
if
(
st
!=
CLIS_OK
)
if
(
st
!=
CLIS_OK
)
vtc_log
(
v
->
vl
,
0
,
vtc_log
(
v
->
vl
,
0
,
...
@@ -840,6 +865,10 @@ cmd_varnish(CMD_ARGS)
...
@@ -840,6 +865,10 @@ cmd_varnish(CMD_ARGS)
varnish_stop
(
v
);
varnish_stop
(
v
);
continue
;
continue
;
}
}
if
(
!
strcmp
(
*
av
,
"-wait-stopped"
))
{
wait_stopped
(
v
);
continue
;
}
if
(
!
strcmp
(
*
av
,
"-wait-running"
))
{
if
(
!
strcmp
(
*
av
,
"-wait-running"
))
{
wait_running
(
v
);
wait_running
(
v
);
continue
;
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