Commit 92592583 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Merge r3573: Add a counter for esi parse errors and test it in all ESI related tests cases.



git-svn-id: http://www.varnish-cache.org/svn/branches/2.0@3742 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 69225212
...@@ -95,6 +95,7 @@ esi_error(const struct esi_work *ew, const char *p, int i, const char *err) ...@@ -95,6 +95,7 @@ esi_error(const struct esi_work *ew, const char *p, int i, const char *err)
char buf[256], *q; char buf[256], *q;
txt t; txt t;
VSL_stats->esi_errors++;
if (i == 0) if (i == 0)
i = p - ew->t.b; i = p - ew->t.b;
if (i > 20) { if (i > 20) {
......
...@@ -24,3 +24,4 @@ client c1 { ...@@ -24,3 +24,4 @@ client c1 {
} }
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0
...@@ -27,3 +27,4 @@ client c1 { ...@@ -27,3 +27,4 @@ client c1 {
} }
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0
...@@ -28,3 +28,4 @@ client c1 { ...@@ -28,3 +28,4 @@ client c1 {
} }
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0
...@@ -32,3 +32,4 @@ client c1 { ...@@ -32,3 +32,4 @@ client c1 {
} }
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0
...@@ -32,3 +32,4 @@ client c1 { ...@@ -32,3 +32,4 @@ client c1 {
} }
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0
...@@ -33,3 +33,4 @@ client c1 { ...@@ -33,3 +33,4 @@ client c1 {
} }
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0
...@@ -44,3 +44,4 @@ client c1 { ...@@ -44,3 +44,4 @@ client c1 {
} }
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0
...@@ -47,3 +47,4 @@ client c1 { ...@@ -47,3 +47,4 @@ client c1 {
} }
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0
...@@ -71,3 +71,4 @@ client c1 { ...@@ -71,3 +71,4 @@ client c1 {
} }
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 15
......
...@@ -44,3 +44,4 @@ client c1 { ...@@ -44,3 +44,4 @@ client c1 {
expect resp.bodylen == 37 expect resp.bodylen == 37
expect resp.http.transfer-encoding == "chunked" expect resp.http.transfer-encoding == "chunked"
} -run } -run
varnish v1 -expect esi_errors == 1
...@@ -25,3 +25,4 @@ client c1 { ...@@ -25,3 +25,4 @@ client c1 {
expect resp.status == 200 expect resp.status == 200
expect resp.bodylen == 21 expect resp.bodylen == 21
} -run } -run
varnish v1 -expect esi_errors == 0
...@@ -34,3 +34,4 @@ client c1 { ...@@ -34,3 +34,4 @@ client c1 {
expect resp.status == 200 expect resp.status == 200
expect resp.bodylen == 31 expect resp.bodylen == 31
} -run } -run
varnish v1 -expect esi_errors == 0
...@@ -44,3 +44,4 @@ client c1 { ...@@ -44,3 +44,4 @@ client c1 {
expect resp.status == 200 expect resp.status == 200
expect resp.bodylen == 151 expect resp.bodylen == 151
} -run } -run
varnish v1 -expect esi_errors == 0
...@@ -23,3 +23,4 @@ client c1 { ...@@ -23,3 +23,4 @@ client c1 {
} -run } -run
varnish v1 -expect esi_parse == 0 varnish v1 -expect esi_parse == 0
varnish v1 -expect esi_errors == 0
...@@ -24,3 +24,4 @@ client c1 { ...@@ -24,3 +24,4 @@ client c1 {
} -run } -run
varnish v1 -expect esi_parse == 0 varnish v1 -expect esi_parse == 0
varnish v1 -expect esi_errors == 0
...@@ -132,3 +132,4 @@ MAC_STAT(hcb_lock, uint64_t, 'a', "HCB Lookups with lock") ...@@ -132,3 +132,4 @@ MAC_STAT(hcb_lock, uint64_t, 'a', "HCB Lookups with lock")
MAC_STAT(hcb_insert, uint64_t, 'a', "HCB Inserts") MAC_STAT(hcb_insert, uint64_t, 'a', "HCB Inserts")
MAC_STAT(esi_parse, uint64_t, 'a', "Objects ESI parsed (unlock)") MAC_STAT(esi_parse, uint64_t, 'a', "Objects ESI parsed (unlock)")
MAC_STAT(esi_errors, uint64_t, 'a', "ESI parse errors (unlock)")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment