summaryrefslogtreecommitdiff
path: root/lib/tdb2/test/failtest_helper.c
AgeCommit message (Collapse)AuthorFilesLines
2012-03-07lib/tdb2: adapt unit tests to SAMBA environment.Rusty Russell1-1/+1
This means changing headers, implementing a simple tap-like wrapper, and also splitting out the helpers into those which are linked with the api* tests (which can't use non-public tdb2 functions) and those linked with the run* tests (which can). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-12-05tdb2: tlist: remove type arg from tlist_top(), tlist_tail()Rusty Russell1-1/+1
With the type canary, it's unnecessary. Though the implementation is a bit more awkward since they longer map directly through to list_top/tail. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit a6b5111fe6948e51114c33aa34785c9fd0d403e6) Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Mon Dec 5 12:13:08 CET 2011 on sn-devel-104
2011-12-05tdb2: suppress failtest more than once on mmap.Rusty Russell1-0/+5
Now we test failing mmap, ccanlint -v time has increased from 200 to 330 seconds. Worse, tests no time out on my laptop. Fix this, by preventing us from going down that particular rabbit hole. ccanlint -v now takes 201 seconds again. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit fbae37ba91ec230e34be564084099726cc3a9d47)
2011-12-05tdb2: simplify failtest helper.Rusty Russell1-30/+2
failtest now culls duplicates for itself (and more efficiently), so don't replicate the logic here. It changes things a bit, because failtest uses backtraces rather than a simple call point to find duplicates. Also, fix one case (in run-11-simple-fetch.c) where we simply exited rather than using failtest_exit(). We got away with it before, because we never hit that particular failure pattern. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 3d99c9334fe3067c88772547b9c06acec21616ea)
2011-12-05tdb2: failtest: use a linked list for history, not an array.Rusty Russell1-27/+24
This avoids a silly realloc, but more importantly it gets us closer to being runtime extensible, as each history element can be a different size. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 9571a41e8494f3135557e3ec50c2de856392173e)
2011-12-05tdb2: consolidate testing failtest suppression routines.Rusty Russell1-0/+5
Less cut & paste means less patching as failtest changes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 1819a36a3e69565bd7b853503fceb846558a45bd)
2011-06-20tdb2: add lib/tdb2 (from CCAN init-1161-g661d41f)Rusty Russell1-0/+117
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>