Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
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
varnishevent3
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
Show 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 {
...
@@ -4,22 +4,25 @@ server s1 {
rxreq
rxreq
expect req.url == "/"
expect req.url == "/"
txresp -body "slash"
txresp -body "slash"
accept
close
sema r1 sync 3
sema r1 sync 3
accept
rxreq
rxreq
expect req.url == "/"
expect req.url == "/"
txresp -body "slash"
txresp -body "slash"
accept
close
accept
rxreq
rxreq
expect req.url == "/"
expect req.url == "/"
txresp -body "slash"
txresp -body "slash"
close
sema r3 sync 2
sema r3 sync 2
accept
accept
rxreq
rxreq
expect req.url == "/foo"
expect req.url == "/foo"
txresp -hdr "Foo: 1" -body "foobar"
txresp -hdr "Foo: 1" -body "foobar"
...
@@ -30,17 +33,19 @@ server s2 {
...
@@ -30,17 +33,19 @@ server s2 {
rxreq
rxreq
expect req.url == "/"
expect req.url == "/"
txresp -body "slash"
txresp -body "slash"
accept
close
sema r1 sync 3
sema r1 sync 3
accept
rxreq
rxreq
expect req.url == "/"
expect req.url == "/"
txresp -body "slash"
txresp -body "slash"
close
sema r2 sync 2
sema r2 sync 2
accept
accept
rxreq
rxreq
expect req.url == "/foo"
expect req.url == "/foo"
txresp -hdr "Foo: 2" -body "foobar"
txresp -hdr "Foo: 2" -body "foobar"
...
...
bin/varnishtest/vtc_http.c
View file @
c888c08d
...
@@ -1058,6 +1058,25 @@ cmd_http_expect_close(CMD_ARGS)
...
@@ -1058,6 +1058,25 @@ cmd_http_expect_close(CMD_ARGS)
vtc_log
(
vl
,
4
,
"fd=%d EOF, as expected"
,
hp
->
fd
);
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)
* close and accept a new connection (server only)
*/
*/
...
@@ -1073,6 +1092,7 @@ cmd_http_accept(CMD_ARGS)
...
@@ -1073,6 +1092,7 @@ cmd_http_accept(CMD_ARGS)
AZ
(
av
[
1
]);
AZ
(
av
[
1
]);
assert
(
hp
->
sfd
!=
NULL
);
assert
(
hp
->
sfd
!=
NULL
);
assert
(
*
hp
->
sfd
>=
0
);
assert
(
*
hp
->
sfd
>=
0
);
if
(
hp
->
fd
>=
0
)
VTCP_close
(
&
hp
->
fd
);
VTCP_close
(
&
hp
->
fd
);
vtc_log
(
vl
,
4
,
"Accepting"
);
vtc_log
(
vl
,
4
,
"Accepting"
);
hp
->
fd
=
accept
(
*
hp
->
sfd
,
NULL
,
NULL
);
hp
->
fd
=
accept
(
*
hp
->
sfd
,
NULL
,
NULL
);
...
@@ -1129,6 +1149,7 @@ static const struct cmds http_cmds[] = {
...
@@ -1129,6 +1149,7 @@ static const struct cmds http_cmds[] = {
{
"delay"
,
cmd_delay
},
{
"delay"
,
cmd_delay
},
{
"sema"
,
cmd_sema
},
{
"sema"
,
cmd_sema
},
{
"expect_close"
,
cmd_http_expect_close
},
{
"expect_close"
,
cmd_http_expect_close
},
{
"close"
,
cmd_http_close
},
{
"accept"
,
cmd_http_accept
},
{
"accept"
,
cmd_http_accept
},
{
"loop"
,
cmd_http_loop
},
{
"loop"
,
cmd_http_loop
},
{
NULL
,
NULL
}
{
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