[master] fbb7c198c add a test for task_priv allocation in the function prologue
Nils Goroll
nils.goroll at uplex.de
Wed Aug 29 06:14:09 UTC 2018
commit fbb7c198c906bb4a54f15a46caeabe88e5cc04b8
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Wed Aug 22 14:02:54 2018 +0200
add a test for task_priv allocation in the function prologue
diff --git a/bin/varnishtest/tests/m00000.vtc b/bin/varnishtest/tests/m00000.vtc
index 5c0fa7536..355bb3c56 100644
--- a/bin/varnishtest/tests/m00000.vtc
+++ b/bin/varnishtest/tests/m00000.vtc
@@ -20,7 +20,17 @@ varnish v1 -vcl+backend {
set req.http.overwrite = "the workspace " +
"to ensure we notice any unfinished privs";
}
+
+ sub priv_task {
+ debug.test_priv_task("foo");
+ }
+
sub vcl_recv {
+ if (req.url == "/priv-task-no-mem") {
+ vtc.workspace_alloc(client, -4);
+ call priv_task;
+ return (fail);
+ }
if (req.url == "/fail") {
debug.test_priv_task("foo");
return (fail);
@@ -65,6 +75,12 @@ client c1 {
expect resp.status == 503
} -run
+client c1 {
+ txreq -url "/priv-task-no-mem"
+ rxresp
+ expect resp.status == 503
+} -run
+
varnish v1 -expect DEBUG.count == 1
logexpect l1 -v v1 -g raw -d 1 {
More information about the varnish-commit
mailing list