Skip to content

Commit

Permalink
vtc: Stabilize r3996 and increase coverage
Browse files Browse the repository at this point in the history
With #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.
  • Loading branch information
dridi committed Oct 24, 2023
1 parent 1174a04 commit af6fc08
Showing 1 changed file with 43 additions and 4 deletions.
47 changes: 43 additions & 4 deletions bin/varnishtest/tests/r03996.vtc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
varnishtest "h2 rapid reset"

barrier b1 sock 5
barrier b1 sock 2 -cyclic
barrier b2 sock 5 -cyclic

server s1 {
rxreq
Expand All @@ -16,7 +17,10 @@ varnish v1 -vcl+backend {
import vtc;

sub vcl_recv {
vtc.barrier_sync("${b1_sock}");
if (req.http.barrier) {
vtc.barrier_sync(req.http.barrier);
}
vtc.barrier_sync("${b2_sock}");
}

} -start
Expand All @@ -27,6 +31,41 @@ client c1 {
expect goaway.err == ENHANCE_YOUR_CALM
} -start

stream 1 {
txreq -hdr barrier ${b1_sock}
barrier b1 sync
txrst
} -run
stream 3 {
txreq -hdr barrier ${b1_sock}
barrier b1 sync
txrst
} -run
stream 5 {
txreq -hdr barrier ${b1_sock}
barrier b1 sync
txrst
} -run
stream 7 {
txreq -hdr barrier ${b1_sock}
barrier b1 sync
txrst
} -run

barrier b2 sync
stream 0 -wait
} -run

varnish v1 -expect sc_rapid_reset == 1

varnish v1 -cliok "param.set feature -vcl_req_reset"

client c2 {
stream 0 {
rxgoaway
expect goaway.err == ENHANCE_YOUR_CALM
} -start

stream 1 {
txreq
txrst
Expand All @@ -44,8 +83,8 @@ client c1 {
txrst
} -run

barrier b1 sync
barrier b2 sync
stream 0 -wait
} -run

varnish v1 -expect sc_rapid_reset == 1
varnish v1 -expect sc_rapid_reset == 2

0 comments on commit af6fc08

Please sign in to comment.