From 4991d9f6e40f381d058a83fc21ceed90e34a822e Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Wed, 18 Oct 2023 11:02:48 +0200 Subject: [PATCH] vtc: Stabilize r3996 and increase coverage 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. --- bin/varnishtest/tests/r03996.vtc | 47 +++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/bin/varnishtest/tests/r03996.vtc b/bin/varnishtest/tests/r03996.vtc index 3fee3706c35..7faf78316d5 100644 --- a/bin/varnishtest/tests/r03996.vtc +++ b/bin/varnishtest/tests/r03996.vtc @@ -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 @@ -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 @@ -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 @@ -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