[master] e3ef3cf Make sure the VSM overflow code has at least been executed once.

Poul-Henning Kamp phk at FreeBSD.org
Tue Mar 14 09:00:08 CET 2017


commit e3ef3cf0a931874062307569e46bc0082f86254e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Mar 14 07:59:15 2017 +0000

    Make sure the VSM overflow code has at least been executed once.

diff --git a/bin/varnishtest/tests/c00083.vtc b/bin/varnishtest/tests/c00083.vtc
new file mode 100644
index 0000000..9b80321
--- /dev/null
+++ b/bin/varnishtest/tests/c00083.vtc
@@ -0,0 +1,30 @@
+varnishtest "VSM overflow allocation"
+
+server s1 {
+	rxreq
+	txresp
+} -start
+
+varnish v1 -arg "-pvcc_allow_inline_c=true" -vcl+backend {
+
+	C{
+	void *VSM_Alloc(unsigned size, const char *class, const char *type,
+	    const char *ident);
+	void VSM_Free(void *ptr);
+	}C
+
+	sub vcl_recv {
+		C{
+		void *p;
+		p = VSM_Alloc(3 * 1024 * 1024, "TEST", "TYPE", "0");
+		VSM_Free(p);
+		}C
+	}
+
+} -start
+
+client c1 {
+	txreq
+	rxresp
+} -run
+



More information about the varnish-commit mailing list