Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-ece
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-ece
Commits
82f56ed7
Commit
82f56ed7
authored
Sep 19, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the errs counter.
parent
d778ddf5
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
43 additions
and
0 deletions
+43
-0
ece.vsc
src/ece.vsc
+6
-0
decrypt.vtc
src/tests/decrypt.vtc
+11
-0
decrypter.vtc
src/tests/decrypter.vtc
+8
-0
encrypt.vtc
src/tests/encrypt.vtc
+2
-0
encrypt_err.vtc
src/tests/encrypt_err.vtc
+3
-0
encrypter.vtc
src/tests/encrypter.vtc
+3
-0
keys.vtc
src/tests/keys.vtc
+2
-0
roundtrip.vtc
src/tests/roundtrip.vtc
+6
-0
vfp_common.c
src/vfp_common.c
+2
-0
No files found.
src/ece.vsc
View file @
82f56ed7
...
...
@@ -36,4 +36,10 @@
Total number of input bytes processed by the en-/decrypter
.. varnish_vsc:: errs
:type: counter
:oneliner: Errors
Total number of errors encoutered by the en-/decrypter
.. varnish_vsc_end:: ece
src/tests/decrypt.vtc
View file @
82f56ed7
...
...
@@ -72,6 +72,7 @@ logexpect l1 -v v1 -d 1 -g vxid -q "VfpAcct" {
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 2
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 2
varnish v1 -expect ECE.vfp.ece_decrypt.errs == 0
varnish v1 -expect ECE.vfp.ece_decrypt.in == 126
varnish v1 -expect ECE.vfp.ece_decrypt.out == 30
...
...
@@ -134,6 +135,7 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 3
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 3
varnish v1 -expect ECE.vfp.ece_decrypt.errs == 0
## Errors
...
...
@@ -179,6 +181,7 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 4
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 4
varnish v1 -expect ECE.vfp.ece_decrypt.errs == 1
server s1 -wait
server s1 {
...
...
@@ -197,6 +200,7 @@ client c1 {
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 5
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 5
varnish v1 -expect ECE.vfp.ece_decrypt.errs == 2
server s1 -wait
server s1 {
...
...
@@ -225,6 +229,7 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 6
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 6
varnish v1 -expect ECE.vfp.ece_decrypt.errs == 3
server s1 -wait
server s1 {
...
...
@@ -245,6 +250,7 @@ client c1 {
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 7
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 7
varnish v1 -expect ECE.vfp.ece_decrypt.errs == 4
server s1 -wait
server s1 {
...
...
@@ -273,6 +279,7 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 8
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 8
varnish v1 -expect ECE.vfp.ece_decrypt.errs == 5
server s1 -wait
server s1 {
...
...
@@ -301,6 +308,7 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 9
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 9
varnish v1 -expect ECE.vfp.ece_decrypt.errs == 6
server s1 -wait
server s1 {
...
...
@@ -329,6 +337,7 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 10
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 10
varnish v1 -expect ECE.vfp.ece_decrypt.errs == 7
server s1 -wait
server s1 {
...
...
@@ -359,6 +368,7 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 11
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 11
varnish v1 -expect ECE.vfp.ece_decrypt.errs == 8
server s1 -wait
server s1 -start
...
...
@@ -396,3 +406,4 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 12
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 12
varnish v1 -expect ECE.vfp.ece_decrypt.errs == 9
src/tests/decrypter.vtc
View file @
82f56ed7
...
...
@@ -79,6 +79,7 @@ logexpect l1 -v v1 -d 1 -g vxid -q "VfpAcct" {
varnish v1 -expect ECE.vfp.vcl1.default_dup.ops == 2
varnish v1 -expect ECE.vfp.vcl1.default_dup.calls >= 2
varnish v1 -expect ECE.vfp.vcl1.default_dup.errs == 0
varnish v1 -expect ECE.vfp.vcl1.default_dup.in == 126
varnish v1 -expect ECE.vfp.vcl1.default_dup.out == 30
...
...
@@ -123,6 +124,7 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.vcl2.chunk4k.ops == 2
varnish v1 -expect ECE.vfp.vcl2.chunk4k.calls >= 2
varnish v1 -expect ECE.vfp.vcl2.chunk4k.errs == 0
varnish v1 -expect ECE.vfp.vcl2.chunk4k.in == 126
varnish v1 -expect ECE.vfp.vcl2.chunk4k.out == 30
...
...
@@ -167,6 +169,7 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.vcl3.maxrs0.ops == 2
varnish v1 -expect ECE.vfp.vcl3.maxrs0.calls >= 2
varnish v1 -expect ECE.vfp.vcl3.maxrs0.errs == 0
varnish v1 -expect ECE.vfp.vcl3.maxrs0.in == 126
varnish v1 -expect ECE.vfp.vcl3.maxrs0.out == 30
...
...
@@ -188,6 +191,7 @@ varnish v1 -vcl+backend {
# Set a max rs that is smaller than the record size
# specified by the response.
new rs1k = ece.decrypter("rs1k", max_rs=1k);
rs1k.create_stats();
}
sub vcl_backend_response {
...
...
@@ -210,6 +214,10 @@ client c1 {
expect resp.reason == "Backend fetch failed"
} -run
logexpect l1 -wait
varnish v1 -expect ECE.vfp.vcl4.rs1k.errs == 1
varnish v1 -errvcl {vmod ece failure: new d: filter name must be non-empty} {
import ${vmod_ece};
backend b { .host = "${bad_ip}"; }
...
...
src/tests/encrypt.vtc
View file @
82f56ed7
...
...
@@ -62,6 +62,7 @@ logexpect l1 -v v1 -d 1 -g vxid -q "VfpAcct" {
varnish v1 -expect ECE.vfp.ece_encrypt.ops == 1
varnish v1 -expect ECE.vfp.ece_encrypt.calls >= 1
varnish v1 -expect ECE.vfp.ece_encrypt.errs == 0
varnish v1 -expect ECE.vfp.ece_encrypt.in == 15
varnish v1 -expect ECE.vfp.ece_encrypt.out == 53
...
...
@@ -93,3 +94,4 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_encrypt.ops == 2
varnish v1 -expect ECE.vfp.ece_encrypt.calls >= 2
varnish v1 -expect ECE.vfp.ece_encrypt.errs == 1
src/tests/encrypt_err.vtc
View file @
82f56ed7
...
...
@@ -73,6 +73,7 @@ logexpect l1 -v v1 -d 1 -g vxid -q "VfpAcct" {
# VFP declines due to Content-Encoding
varnish v1 -expect ECE.vfp.ece_encrypt.ops == 1
varnish v1 -expect ECE.vfp.ece_encrypt.calls == 0
varnish v1 -expect ECE.vfp.ece_encrypt.errs == 1
server s1 -wait
server s1 {
...
...
@@ -97,6 +98,7 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_encrypt.ops == 2
varnish v1 -expect ECE.vfp.ece_encrypt.calls == 0
varnish v1 -expect ECE.vfp.ece_encrypt.errs == 2
server s1 -wait
server s1 {
...
...
@@ -115,6 +117,7 @@ client c1 {
varnish v1 -expect ECE.vfp.ece_encrypt.ops == 2
varnish v1 -expect ECE.vfp.ece_encrypt.calls == 0
varnish v1 -expect ECE.vfp.ece_encrypt.errs == 2
# Errors for custom VFPs
...
...
src/tests/encrypter.vtc
View file @
82f56ed7
...
...
@@ -47,6 +47,7 @@ client c1 {
varnish v1 -expect ECE.vfp.vcl1.default_dup.ops == 1
varnish v1 -expect ECE.vfp.vcl1.default_dup.calls >= 1
varnish v1 -expect ECE.vfp.vcl1.default_dup.errs == 0
varnish v1 -expect ECE.vfp.vcl1.default_dup.in == 15
varnish v1 -expect ECE.vfp.vcl1.default_dup.out == 53
...
...
@@ -95,6 +96,7 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.vcl2.hdr.ops == 1
varnish v1 -expect ECE.vfp.vcl2.hdr.calls >= 1
varnish v1 -expect ECE.vfp.vcl2.hdr.errs == 0
varnish v1 -expect ECE.vfp.vcl2.hdr.in == 15
varnish v1 -expect ECE.vfp.vcl2.hdr.out == 53
...
...
@@ -116,6 +118,7 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.vcl2.hdr.ops == 2
varnish v1 -expect ECE.vfp.vcl2.hdr.calls >= 2
varnish v1 -expect ECE.vfp.vcl2.hdr.errs == 1
varnish v1 -expect ECE.vfp.vcl2.hdr.in == 15
varnish v1 -expect ECE.vfp.vcl2.hdr.out == 53
...
...
src/tests/keys.vtc
View file @
82f56ed7
...
...
@@ -51,6 +51,8 @@ logexpect l1 -v v1 -d 1 -g vxid -q "FetchError" {
expect * = End
} -run
varnish v1 -expect ECE.vfp.ece_encrypt.errs == 1
server s1 -wait
server s1 {
rxreq
...
...
src/tests/roundtrip.vtc
View file @
82f56ed7
...
...
@@ -154,11 +154,13 @@ logexpect l1 -v v1 -d 1 -g vxid -q "VfpAcct" {
# encrypt.out == decrypt.in, confirm in the log
varnish v1 -expect ECE.vfp.ece_encrypt.ops == 6
varnish v1 -expect ECE.vfp.ece_encrypt.calls >= 6
varnish v1 -expect ECE.vfp.ece_encrypt.errs == 0
varnish v1 -expect ECE.vfp.ece_encrypt.in == 199975
varnish v1 -expect ECE.vfp.ece_encrypt.out > 199975
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 6
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 6
varnish v1 -expect ECE.vfp.ece_decrypt.errs == 0
varnish v1 -expect ECE.vfp.ece_decrypt.in > 199975
varnish v1 -expect ECE.vfp.ece_decrypt.out == 199975
...
...
@@ -232,11 +234,13 @@ logexpect l1 -wait
# Verify in the logs for the custom VFPs that encrypter.out == decrypter.in
varnish v1 -expect ECE.vfp.vcl2.rs128.ops == 6
varnish v1 -expect ECE.vfp.vcl2.rs128.calls >= 6
varnish v1 -expect ECE.vfp.vcl2.rs128.errs == 0
varnish v1 -expect ECE.vfp.vcl2.rs128.in == 199975
varnish v1 -expect ECE.vfp.vcl2.rs128.out > 199975
varnish v1 -expect ECE.vfp.vcl2.chunk8k.ops == 6
varnish v1 -expect ECE.vfp.vcl2.chunk8k.calls >= 6
varnish v1 -expect ECE.vfp.vcl2.chunk8k.errs == 0
varnish v1 -expect ECE.vfp.vcl2.chunk8k.in > 199975
varnish v1 -expect ECE.vfp.vcl2.chunk8k.out == 199975
...
...
@@ -306,11 +310,13 @@ logexpect l1 -wait
varnish v1 -expect ECE.vfp.vcl3.rs815.ops == 6
varnish v1 -expect ECE.vfp.vcl3.rs815.calls >= 6
varnish v1 -expect ECE.vfp.vcl3.rs815.errs == 0
varnish v1 -expect ECE.vfp.vcl3.rs815.in == 199975
varnish v1 -expect ECE.vfp.vcl3.rs815.out > 199975
varnish v1 -expect ECE.vfp.vcl3.chunk4711.ops == 6
varnish v1 -expect ECE.vfp.vcl3.chunk4711.calls >= 6
varnish v1 -expect ECE.vfp.vcl3.chunk4711.errs == 0
varnish v1 -expect ECE.vfp.vcl3.chunk4711.in > 199975
varnish v1 -expect ECE.vfp.vcl3.chunk4711.out == 199975
...
...
src/vfp_common.c
View file @
82f56ed7
...
...
@@ -169,6 +169,8 @@ vfp_common_fini(struct vfp_ctx *ctx, struct vfp_entry *ent)
if
(
cfg
->
stats
!=
NULL
)
{
cfg
->
stats
->
out
+=
ent
->
bytes_out
;
cfg
->
stats
->
calls
+=
ent
->
calls
;
if
(
ent
->
closed
==
VFP_ERROR
)
cfg
->
stats
->
errs
++
;
}
if
(
ent
->
priv1
==
NULL
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment