]> err.no Git - varnish/commitdiff
Add a counter for esi parse errors and test it in all ESI related
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 3 Feb 2009 18:44:21 +0000 (18:44 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 3 Feb 2009 18:44:21 +0000 (18:44 +0000)
tests cases.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3573 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 files changed:
varnish-cache/bin/varnishd/cache_vrt_esi.c
varnish-cache/bin/varnishtest/tests/e00000.vtc
varnish-cache/bin/varnishtest/tests/e00001.vtc
varnish-cache/bin/varnishtest/tests/e00002.vtc
varnish-cache/bin/varnishtest/tests/e00003.vtc
varnish-cache/bin/varnishtest/tests/e00004.vtc
varnish-cache/bin/varnishtest/tests/e00005.vtc
varnish-cache/bin/varnishtest/tests/e00006.vtc
varnish-cache/bin/varnishtest/tests/e00007.vtc
varnish-cache/bin/varnishtest/tests/e00008.vtc
varnish-cache/bin/varnishtest/tests/e00009.vtc
varnish-cache/bin/varnishtest/tests/e00010.vtc
varnish-cache/bin/varnishtest/tests/e00011.vtc
varnish-cache/bin/varnishtest/tests/e00012.vtc
varnish-cache/bin/varnishtest/tests/e00013.vtc
varnish-cache/bin/varnishtest/tests/e00014.vtc
varnish-cache/include/stat_field.h

index 1030bc5bdc5b0bea92aa5d8c5b724f6e559123b6..fc78335994627cc34497e4c408f5a64ded4cc971 100644 (file)
@@ -95,6 +95,7 @@ esi_error(const struct esi_work *ew, const char *p, int i, const char *err)
        char buf[256], *q;
        txt t;
 
+       VSL_stats->esi_errors++;
        if (i == 0)
                i = p - ew->t.b;
        if (i > 20) {
index 4b7b1c918557f6dbe3ac8d3d4b65c2e7cbaa75ab..f18697675fa80db123d83d51b437f3537b54a51f 100644 (file)
@@ -24,3 +24,4 @@ client c1 {
 }
 
 client c1 -run
+varnish v1 -expect esi_errors == 0
index db84e6c2c0bed6c8fbcc6ca7f07e2e476e939fcb..b73ffa7641acc4f84ff0a202f820c680871e657d 100644 (file)
@@ -27,3 +27,4 @@ client c1 {
 }
 
 client c1 -run
+varnish v1 -expect esi_errors == 0
index eb688a3d7cdd1901b406855c17002f41aa471208..e07b67839645ce5398f3a67898370ee69ace43e6 100644 (file)
@@ -28,3 +28,4 @@ client c1 {
 }
 
 client c1 -run
+varnish v1 -expect esi_errors == 0
index b0d9b5407819b95667d97f8b0c370ba88faeca8e..935e14fb183faef801a491ee4f0cebdb6edbdb8d 100644 (file)
@@ -32,3 +32,4 @@ client c1 {
 }
 
 client c1 -run
+varnish v1 -expect esi_errors == 0
index 564a21ea9a68d99eb9884026c1d53cf96168eeff..272a863b018c4f4f6e42d4f7753d0dc927941de5 100644 (file)
@@ -32,3 +32,4 @@ client c1 {
 }
 
 client c1 -run
+varnish v1 -expect esi_errors == 0
index 361e48b13639ca2258618842170eac37d754ed9a..94cd12db592cb29fedef2aeeb70ba12e674e9a42 100644 (file)
@@ -33,3 +33,4 @@ client c1 {
 }
 
 client c1 -run
+varnish v1 -expect esi_errors == 0
index b63f045cce53b8e63fd5ca46a050658392dd7d05..10b7af66f5a896923505527dcbd5a8316e50e5bb 100644 (file)
@@ -44,3 +44,4 @@ client c1 {
 }
 
 client c1 -run
+varnish v1 -expect esi_errors == 0
index 5ab87c25b8c3eeaa528d1dd62d58695bf21b1c6b..3df52c0a0fc70b11a1b4b49451bfc1911c87905b 100644 (file)
@@ -47,3 +47,4 @@ client c1 {
 }
 
 client c1 -run
+varnish v1 -expect esi_errors == 0
index a95d0497fbfa40e03ee525c1553a4d5114ec8129..4581edbfeace1cd32e60bacc232284f1c5521175 100644 (file)
@@ -71,3 +71,4 @@ client c1 {
 }
 
 client c1 -run
+varnish v1 -expect esi_errors == 15
index 066edf877790340f3c9b615491fc99143b43bd70..5a2ae9889c4019ccd0ccd98af9a5bb823fdb5708 100644 (file)
@@ -44,3 +44,4 @@ client c1 {
        expect resp.bodylen == 37
        expect resp.http.transfer-encoding == "chunked"
 } -run
+varnish v1 -expect esi_errors == 1
index 22be6959fbdb5498bcf7b2da4854e507c6199080..08207ee7ffa31c561cfd722725545302f010456f 100644 (file)
@@ -25,3 +25,4 @@ client c1 {
        expect resp.status == 200
        expect resp.bodylen == 21
 } -run
+varnish v1 -expect esi_errors == 0
index b2584b09e923bcb3470001a44a3ea85c97cd1cde..ffa7bdd689fecf931ab86f67d876c2e9923066d1 100644 (file)
@@ -34,3 +34,4 @@ client c1 {
        expect resp.status == 200
        expect resp.bodylen == 31
 } -run
+varnish v1 -expect esi_errors == 0
index bea84628cb71b54972bf563dc6c17d5a5b2e3ebf..64fd962fad4664054c0088399b36e29e67a5bc0d 100644 (file)
@@ -44,3 +44,4 @@ client c1 {
         expect resp.status == 200
         expect resp.bodylen == 151
 } -run
+varnish v1 -expect esi_errors == 0
index d7212ef4ea04b9234d3731f5c780634d2e668b06..cfdee321c1eb87a6f888c0f9ccc6d5f7f2e18ba3 100644 (file)
@@ -23,3 +23,4 @@ client c1 {
 } -run
 
 varnish v1 -expect esi_parse == 0
+varnish v1 -expect esi_errors == 0
index 16af7f07325ccc810e2b2bb13f616bbb61f7081e..bc362b1167671cf5c3154cf1f0ff3925f5386483 100644 (file)
@@ -24,3 +24,4 @@ client c1 {
 } -run
 
 varnish v1 -expect esi_parse == 0
+varnish v1 -expect esi_errors == 0
index fa45391a8ea691e4a4be398017e46b944db9ac76..b7e4e311fb204833bd91593979810009bb038506 100644 (file)
@@ -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(esi_parse,            uint64_t, 'a', "Objects ESI parsed (unlock)")
+MAC_STAT(esi_errors,           uint64_t, 'a', "ESI parse errors (unlock)")