[master] c7523b63e Tigthen #1637 testcase
Nils Goroll
nils.goroll at uplex.de
Fri Jan 22 18:01:08 UTC 2021
commit c7523b63ec5c9749a7f4e7cfa625a12d9e8cbc05
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Fri Jan 22 18:57:26 2021 +0100
Tigthen #1637 testcase
This is similar to #3502, but the out-of-storage condition happens after
the object has been created successfully.
Use a logexpect to ensure we test as intended.
diff --git a/bin/varnishtest/tests/r01637.vtc b/bin/varnishtest/tests/r01637.vtc
index ee0093b3a..117462eea 100644
--- a/bin/varnishtest/tests/r01637.vtc
+++ b/bin/varnishtest/tests/r01637.vtc
@@ -1,57 +1,53 @@
-varnishtest "do_esi + do_gzip + out of storage: #1637"
+varnishtest "do_esi + do_gzip + out of storage in VFP: #1637"
+
+# see also r03502 for failure case in vbf_beresp2obj()
server s1 {
# First consume (almost) all of the storage
rxreq
expect req.url == /url1
- txresp -bodylen 260000
-
- rxreq
- expect req.url == /url2
- txresp -bodylen 260000
-
- rxreq
- expect req.url == /url3
- txresp -bodylen 260000
+ txresp -bodylen 1040000
rxreq
- expect req.url == /url4
- txresp -bodylen 260000
-
- rxreq
- expect req.url == /url5
+ expect req.url == /
txresp -bodylen 9000
} -start
varnish v1 -arg "-sdefault,1M" -arg "-p nuke_limit=0 -p gzip_level=0" \
-vcl+backend {
sub vcl_backend_response {
- if (bereq.url == "/url5") {
+ set beresp.http.free = storage.s0.free_space;
+ if (bereq.url == "/") {
set beresp.do_esi = true;
set beresp.do_gzip = true;
}
}
} -start
+logexpect l1 -v v1 -g vxid -q "vxid == 1004" {
+ expect 25 1004 VCL_call {^BACKEND_RESPONSE}
+ expect 0 = BerespHeader {^free:}
+ expect 0 = VCL_return {^deliver}
+ expect 0 = Timestamp {^Process}
+ expect 0 = Filters {^ esi_gzip}
+ expect 0 = BerespUnset {^Content-Length:}
+ expect 0 = BerespHeader {^Content-Encoding: gzip}
+ expect 0 = BerespHeader {^Vary: Accept-Encoding}
+ expect 0 = Storage { s0$}
+ expect 0 = Fetch_Body
+ expect 0 = FetchError {^Could not get storage}
+ expect 0 = Gzip
+ expect 0 = BackendClose
+} -start
client c1 {
txreq -url /url1
rxresp
expect resp.status == 200
- txreq -url /url2
- rxresp
- expect resp.status == 200
-
- txreq -url /url3
- rxresp
- expect resp.status == 200
-
- txreq -url /url4
- rxresp
- expect resp.status == 200
-
- txreq -url /url5
+ txreq
rxresp
expect resp.status == 503
} -run
+
+logexpect l1 -wait
diff --git a/bin/varnishtest/tests/r03502.vtc b/bin/varnishtest/tests/r03502.vtc
index bde14a2ca..88b56e2ec 100644
--- a/bin/varnishtest/tests/r03502.vtc
+++ b/bin/varnishtest/tests/r03502.vtc
@@ -1,5 +1,7 @@
varnishtest "#3502 Panic in VEP_Finish() for out-of-storage in vbf_beresp2obj()"
+# see also r01637 for failure case in VFP
+
server s1 {
# First consume (almost) all of the storage - the value
# is brittle, see l1 fail
More information about the varnish-commit
mailing list