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
c888c08d
Commit
c888c08d
authored
Sep 30, 2011
by
Poul-Henning Kamp
Committed by
Tollef Fog Heen
Oct 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try harder to make v00036 deterministic
parent
ea964eb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
6 deletions
+32
-6
v00036.vtc
bin/varnishtest/tests/v00036.vtc
+10
-5
vtc_http.c
bin/varnishtest/vtc_http.c
+22
-1
No files found.
bin/varnishtest/tests/v00036.vtc
View file @
c888c08d
...
...
@@ -4,22 +4,25 @@ server s1 {
rxreq
expect req.url == "/"
txresp -body "slash"
accept
close
sema r1 sync 3
accept
rxreq
expect req.url == "/"
txresp -body "slash"
accept
close
accept
rxreq
expect req.url == "/"
txresp -body "slash"
close
sema r3 sync 2
accept
accept
rxreq
expect req.url == "/foo"
txresp -hdr "Foo: 1" -body "foobar"
...
...
@@ -30,17 +33,19 @@ server s2 {
rxreq
expect req.url == "/"
txresp -body "slash"
accept
close
sema r1 sync 3
accept
rxreq
expect req.url == "/"
txresp -body "slash"
close
sema r2 sync 2
accept
accept
rxreq
expect req.url == "/foo"
txresp -hdr "Foo: 2" -body "foobar"
...
...
bin/varnishtest/vtc_http.c
View file @
c888c08d
...
...
@@ -1058,6 +1058,25 @@ cmd_http_expect_close(CMD_ARGS)
vtc_log
(
vl
,
4
,
"fd=%d EOF, as expected"
,
hp
->
fd
);
}
/**********************************************************************
* close a new connection (server only)
*/
static
void
cmd_http_close
(
CMD_ARGS
)
{
struct
http
*
hp
;
(
void
)
cmd
;
(
void
)
vl
;
CAST_OBJ_NOTNULL
(
hp
,
priv
,
HTTP_MAGIC
);
AZ
(
av
[
1
]);
assert
(
hp
->
sfd
!=
NULL
);
assert
(
*
hp
->
sfd
>=
0
);
VTCP_close
(
&
hp
->
fd
);
vtc_log
(
vl
,
4
,
"Closed"
);
}
/**********************************************************************
* close and accept a new connection (server only)
*/
...
...
@@ -1073,7 +1092,8 @@ cmd_http_accept(CMD_ARGS)
AZ
(
av
[
1
]);
assert
(
hp
->
sfd
!=
NULL
);
assert
(
*
hp
->
sfd
>=
0
);
VTCP_close
(
&
hp
->
fd
);
if
(
hp
->
fd
>=
0
)
VTCP_close
(
&
hp
->
fd
);
vtc_log
(
vl
,
4
,
"Accepting"
);
hp
->
fd
=
accept
(
*
hp
->
sfd
,
NULL
,
NULL
);
if
(
hp
->
fd
<
0
)
...
...
@@ -1129,6 +1149,7 @@ static const struct cmds http_cmds[] = {
{
"delay"
,
cmd_delay
},
{
"sema"
,
cmd_sema
},
{
"expect_close"
,
cmd_http_expect_close
},
{
"close"
,
cmd_http_close
},
{
"accept"
,
cmd_http_accept
},
{
"loop"
,
cmd_http_loop
},
{
NULL
,
NULL
}
...
...
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