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
f5ffd65d
Commit
f5ffd65d
authored
Sep 10, 2017
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fail the test if we panic when stopping the child
parent
07d4e752
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
17 deletions
+9
-17
c00057.vtc
bin/varnishtest/tests/c00057.vtc
+1
-1
p00007.vtc
bin/varnishtest/tests/p00007.vtc
+2
-0
t02004.vtc
bin/varnishtest/tests/t02004.vtc
+1
-1
vtc_varnish.c
bin/varnishtest/vtc_varnish.c
+5
-15
No files found.
bin/varnishtest/tests/c00057.vtc
View file @
f5ffd65d
...
@@ -38,4 +38,4 @@ client c1 {
...
@@ -38,4 +38,4 @@ client c1 {
expect_close
expect_close
} -run
} -run
varnish v1 -cliok "panic.
show
"
varnish v1 -cliok "panic.
clear
"
bin/varnishtest/tests/p00007.vtc
View file @
f5ffd65d
...
@@ -56,6 +56,8 @@ varnish v1 -cliok "debug.persistent s0 dump"
...
@@ -56,6 +56,8 @@ varnish v1 -cliok "debug.persistent s0 dump"
# Panic worker so second segment does not get closed
# Panic worker so second segment does not get closed
varnish v1 -clierr 400 "debug.panic.worker"
varnish v1 -clierr 400 "debug.panic.worker"
varnish v1 -cliok "panic.clear"
delay 0.5
delay 0.5
# start again
# start again
...
...
bin/varnishtest/tests/t02004.vtc
View file @
f5ffd65d
...
@@ -24,4 +24,4 @@ client c1 {
...
@@ -24,4 +24,4 @@ client c1 {
expect_close
expect_close
} -run
} -run
varnish v1 -
wait-stopped
varnish v1 -
cliok "panic.clear"
bin/varnishtest/vtc_varnish.c
View file @
f5ffd65d
...
@@ -137,8 +137,8 @@ wait_stopped(const struct varnish *v)
...
@@ -137,8 +137,8 @@ wait_stopped(const struct varnish *v)
char
*
r
=
NULL
;
char
*
r
=
NULL
;
enum
VCLI_status_e
st
;
enum
VCLI_status_e
st
;
vtc_log
(
v
->
vl
,
3
,
"wait-stopped"
);
while
(
1
)
{
while
(
1
)
{
vtc_log
(
v
->
vl
,
3
,
"wait-stopped"
);
st
=
varnish_ask_cli
(
v
,
"status"
,
&
r
);
st
=
varnish_ask_cli
(
v
,
"status"
,
&
r
);
if
(
st
!=
CLIS_OK
)
if
(
st
!=
CLIS_OK
)
vtc_fatal
(
v
->
vl
,
vtc_fatal
(
v
->
vl
,
...
@@ -600,26 +600,13 @@ varnish_start(struct varnish *v)
...
@@ -600,26 +600,13 @@ varnish_start(struct varnish *v)
static
void
static
void
varnish_stop
(
struct
varnish
*
v
)
varnish_stop
(
struct
varnish
*
v
)
{
{
char
*
r
=
NULL
;
if
(
v
->
cli_fd
<
0
)
if
(
v
->
cli_fd
<
0
)
varnish_launch
(
v
);
varnish_launch
(
v
);
if
(
vtc_error
)
if
(
vtc_error
)
return
;
return
;
vtc_log
(
v
->
vl
,
2
,
"Stop"
);
vtc_log
(
v
->
vl
,
2
,
"Stop"
);
(
void
)
varnish_ask_cli
(
v
,
"stop"
,
NULL
);
(
void
)
varnish_ask_cli
(
v
,
"stop"
,
NULL
);
while
(
1
)
{
wait_stopped
(
v
);
(
void
)
varnish_ask_cli
(
v
,
"status"
,
&
r
);
AN
(
r
);
if
(
!
strcmp
(
r
,
"Child in state stopped"
))
{
free
(
r
);
break
;
}
free
(
r
);
r
=
NULL
;
(
void
)
sleep
(
1
);
/* XXX: should fail eventually */
}
}
}
/**********************************************************************
/**********************************************************************
...
@@ -685,6 +672,9 @@ varnish_wait(struct varnish *v)
...
@@ -685,6 +672,9 @@ varnish_wait(struct varnish *v)
/* Then stop it */
/* Then stop it */
varnish_stop
(
v
);
varnish_stop
(
v
);
if
(
varnish_ask_cli
(
v
,
"panic.clear"
,
NULL
)
!=
CLIS_CANT
)
vtc_fatal
(
v
->
vl
,
"Unexpected panic"
);
varnish_cleanup
(
v
);
varnish_cleanup
(
v
);
}
}
...
...
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