aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2017-08-03 22:21:03 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2017-08-03 22:21:03 +0300
commitc75a811a7734221003ac2628493832acf36b12d5 (patch)
tree8b5a28eaf975f19badf2f9722c15ff2164bff3fb /tests
parentf9f6ba70f7844321d90476be9bc0bd5ae3e11b45 (diff)
downloadvmod-dict-c75a811a7734221003ac2628493832acf36b12d5.tar.gz
vmod-dict-c75a811a7734221003ac2628493832acf36b12d5.tar.bz2
Serialize write access. Improve API.
* src/vmod_dict.c (entry): Link into a double-linked list. (entry_append, entry_remove): New functions. (max_coll): New static. (locker_t): New type. (locker_init,locker_rlock,locker_wlock) (locker_runlock,locker_wunlock): New functions. (load_entries): Use syslog for diagnostics. Abort if unable to open the file. Fix minor memory leak. (rehash,fill_table): New functions. (dict_event): Handle VCL_EVENT_DISCARD. (vmod_load): Change signature. (vmod_ci,vmod_collisions): New functions. (vmod_clear): New function. * src/vmod_dict.vcc: Update. * tests/ci.at: Accomodate the above changes. * tests/cs.at: Likewise.
Diffstat (limited to 'tests')
-rw-r--r--tests/ci.at4
-rw-r--r--tests/cs.at3
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/ci.at b/tests/ci.at
index 6554e53..d486188 100644
--- a/tests/ci.at
+++ b/tests/ci.at
@@ -4,3 +4,5 @@ AT_VARNISHTEST([dict],[
sub vcl_init {
- dict.load("\${vmod_topsrc}/tests/num.dict", true, 0);
+ dict.ci(true);
+ dict.collisions(0);
+ dict.load("\${vmod_topsrc}/tests/num.dict");
}
diff --git a/tests/cs.at b/tests/cs.at
index f847773..0333943 100644
--- a/tests/cs.at
+++ b/tests/cs.at
@@ -4,3 +4,4 @@ AT_VARNISHTEST([dict],[
sub vcl_init {
- dict.load("\${vmod_topsrc}/tests/num.dict", false, 0);
+ dict.collisions(0);
+ dict.load("\${vmod_topsrc}/tests/num.dict");
}

Return to:

Send suggestions and report system problems to the System administrator.