Skip to content

Commit b27f508

Browse files
committed
vtc: Stabilize r3996 and increase coverage
With varnishcache#3998 we need to ensure streams are not going to skip vcl_recv if reset faster than reaching this step for the request task. The alternative to prevent the vcl_req_reset feature from interfering is to simply disable it.
1 parent 6ecc9ec commit b27f508

1 file changed

Lines changed: 43 additions & 4 deletions

File tree

bin/varnishtest/tests/r03996.vtc

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
varnishtest "h2 rapid reset"
22

3-
barrier b1 sock 5
3+
barrier b1 sock 2 -cyclic
4+
barrier b2 sock 5 -cyclic
45

56
server s1 {
67
rxreq
@@ -16,7 +17,10 @@ varnish v1 -vcl+backend {
1617
import vtc;
1718

1819
sub vcl_recv {
19-
vtc.barrier_sync("${b1_sock}");
20+
if (req.http.barrier) {
21+
vtc.barrier_sync(req.http.barrier);
22+
}
23+
vtc.barrier_sync("${b2_sock}");
2024
}
2125

2226
} -start
@@ -27,6 +31,41 @@ client c1 {
2731
expect goaway.err == ENHANCE_YOUR_CALM
2832
} -start
2933

34+
stream 1 {
35+
txreq -hdr barrier ${b1_sock}
36+
barrier b1 sync
37+
txrst
38+
} -run
39+
stream 3 {
40+
txreq -hdr barrier ${b1_sock}
41+
barrier b1 sync
42+
txrst
43+
} -run
44+
stream 5 {
45+
txreq -hdr barrier ${b1_sock}
46+
barrier b1 sync
47+
txrst
48+
} -run
49+
stream 7 {
50+
txreq -hdr barrier ${b1_sock}
51+
barrier b1 sync
52+
txrst
53+
} -run
54+
55+
barrier b2 sync
56+
stream 0 -wait
57+
} -run
58+
59+
varnish v1 -expect sc_rapid_reset == 1
60+
61+
varnish v1 -cliok "param.set feature -vcl_req_reset"
62+
63+
client c2 {
64+
stream 0 {
65+
rxgoaway
66+
expect goaway.err == ENHANCE_YOUR_CALM
67+
} -start
68+
3069
stream 1 {
3170
txreq
3271
txrst
@@ -44,8 +83,8 @@ client c1 {
4483
txrst
4584
} -run
4685

47-
barrier b1 sync
86+
barrier b2 sync
4887
stream 0 -wait
4988
} -run
5089

51-
varnish v1 -expect sc_rapid_reset == 1
90+
varnish v1 -expect sc_rapid_reset == 2

0 commit comments

Comments
 (0)