Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Commit 3eeb8c4

Browse files
committed
vtc: Coverage for withdrawn bgfetch
This adds coverage for a non-delivery transition from vcl_hit, where the busy objcore would drop its sole reference in the event of a grace hit. The lack of coverage was visible in the gcov dashboard: 669 580 if (busy != NULL) { 670 0 (void)HSH_DerefObjCore(wrk, &busy, 0); 671 0 VRY_Clear(req); 672 0 } There should now be at least one pass inside this block. Refs #4032
1 parent 4741f40 commit 3eeb8c4

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

bin/varnishtest/tests/c00128.vtc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
varnishtest "Withdraw graced hit's busy objcore"
2+
3+
server s1 {
4+
rxreq
5+
txresp
6+
} -start
7+
8+
varnish v1 -vcl+backend {
9+
sub vcl_backend_response {
10+
set beresp.ttl = 1ms;
11+
}
12+
sub vcl_hit {
13+
if (obj.ttl < 0s) {
14+
return (fail);
15+
}
16+
}
17+
} -start
18+
19+
client c1 {
20+
txreq
21+
rxresp
22+
expect resp.status == 200
23+
24+
delay 0.01
25+
26+
txreq
27+
rxresp
28+
expect resp.status == 503
29+
} -run

0 commit comments

Comments
 (0)