summaryrefslogtreecommitdiff
path: root/lib/tdb2/test/run-tdb1-no-lock-during-traverse.c
Commit message (Collapse)AuthorAgeFilesLines
* lib/tdb2: fix -Wcast-qual warnings.Rusty Russell2012-03-221-2/+1
| | | | | | | | | | | | | We use tdb_mkdata() to get rid of many of them from the tests, and explicit cast_const() in a few places. tlist_for_each() still causes a warning, but that needs to be fixed in CCAN. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Thu Mar 22 03:29:32 CET 2012 on sn-devel-104
* lib/tdb2: adapt unit tests to SAMBA environment.Rusty Russell2012-03-071-2/+2
| | | | | | | | | | 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>
* tdb2: unify tdb1_chainlock et al. into tdb_chainlockRusty Russell2011-09-141-7/+7
| | | | | | | Switch on the TDB_VERSION1 flag. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit ceb2f3eacbad917ee990afbc3dd800bfb0607887)
* tdb2: unify tdb1_traverse into tdb_traverseRusty Russell2011-09-141-3/+3
| | | | | | | | Switch on the TDB_VERSION1 flag; we now only do a tdb1_traverse_read on a read-only database, as there is no tdb2 equivalent. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit cc2d609dfca7192305ad477b8c2b52cfdc1aa9be)
* tdb2: unify tdb1_delete into tdb_delete.Rusty Russell2011-09-141-3/+3
| | | | | | | Switch on the TDB_VERSION1 flag. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit acb26c9c3ee054c8b2141db25c9bd7be064e425c)
* tdb2: unify tdb1_store into tdb_storeRusty Russell2011-09-141-1/+1
| | | | | | | Switch on the TDB_VERSION1 flag. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 98c754ffe65bc335f66161d6cc8705d4ea2710ec)
* tdb2: unify tdb1_open into tdb_openRusty Russell2011-09-141-4/+4
| | | | | | | | | | | | | | Finally, we gut tdb1_open() to the tdb1-specific parts, and call it from tdb_open if they specify the TDB_VERSION1 flag or the version is a TDB1. We also unify tdb_close(), based on the TDB_VERSION1 flag. Note that tdb_open(TDB_VERSION1) will fail on an existing tdb if it's a TDB2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit c8c3b3568677e8b0105f84e4ab068c580faf4591)
* tdb2: add TDB_ATTRIBUTE_TDB1_HASHSIZERusty Russell2011-09-141-2/+7
| | | | | | | | | This replaces the tdb1_open "hash_size" argument. It will only be valid when you call tdb_open() with O_CREAT in open_flags, and TDB_VERSION1 in tdb_flags. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 49475d68deecd0b31597ed6094229171d2699b11)
* tdb2: make tdb1_open use attributes for logging, hash function.Rusty Russell2011-09-141-4/+4
| | | | | | | This brings it closer to tdb_open(), so we can unify more easily. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit a446f1d4d161d66bbb19ba2551cf6429a4865964)
* tdb2: merge tdb1_context into tdb_context.Rusty Russell2011-09-141-5/+5
| | | | | | | | | | Finally, we split out the tdb2-specific parts of tdb_context, and put them into a "tdb2" sub-struct; the tdb1 parts go into a "tdb1" sub-struct. We get rido of tdb1_context and use tdb_context everywhere. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit bbeb528e74c0e234e1f724ac8d54be404cfc6f9a)
* tdb2: Make TDB1 code use TDB2's open flags.Rusty Russell2011-09-141-1/+1
| | | | | | | | | | | | This means getting rid of TDB_VOLATILE (perhaps we should use an attribute for that?), TDB_INCOMPATIBLE_HASH (use the tdb_attribute_hash for that) and TDB_CLEAR_IF_FIRST (use the tdb_attribute_openhook for that). We also get rid of TDB_DISALLOW_NESTING: that's the default for TDB2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 22d0e0dc59fc9d7e0046fec6971ef478c2d604fd)
* tdb2: Make tdb1 share tdb_store flags, struct tdb_data and TDB_MAGIC_FOOD.Rusty Russell2011-09-141-4/+4
| | | | | Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 8a47d50d72ea62e378dc92b150c92c1317c73fa3)
* tdb2: test: import tdb1's tests.Rusty Russell2011-09-141-0/+106
The main change is to s/tdb/tdb1_/ everywhere. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit fab544c24c1ad6523f95893abcaec4e6cce6c2b4)