Age | Commit message (Collapse) | Author | Files | Lines |
|
This was a relic from testing; it can interfere with compile.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Another PPC issue (endian?) revealed that the summary code did not handle
capabilities correctly: in fact, it went into an endless loop.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Wed Mar 14 06:51:43 CET 2012 on sn-devel-104
|
|
This caused a crash on PPC64 when we failed the mmap (found by failtest,
reported by Amitay)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Not used by default, since it slows down testing (on my laptop) from
22 seconds to 2 minutes 30 seconds.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Mar 7 04:57:21 CET 2012 on sn-devel-104
|
|
The tests are ccan-style, so the names tell how to link them. This
logic is generic, and could be moved to wafsamba, cleaned up, and used
elsewhere.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
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>
|
|
The library is called tdb, so the pc file must have the same name.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Feb 27 06:59:58 CET 2012 on sn-devel-104
|
|
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Tue Feb 21 07:43:55 CET 2012 on sn-devel-104
|
|
Adds a Makefile, configure script, and tdb2.pc.in.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Particularly fix the upcoming standalone build.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Like tdb1, it's the caller's responsibility to set up various config
options (eg. by #include "config.h") before including the public
header.
We use HAVE_CCAN for including the (private) CCAN headers, otherwise
dummy macros are used.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
The tdb2 tools should #include "config.h" before tdb2.h (about to
become a requirement) and use libreplace where available.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Feb 8 22:55:08 CET 2012 on sn-devel-104
|
|
I thought you could --disable-tdb2=false, apparently not! Thanks
Michael Adam...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Thu Feb 2 03:43:08 CET 2012 on sn-devel-104
|
|
We still use the tdb1 on-disk format, but we do so via the tdb2 library.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Jan 30 08:02:43 CET 2012 on sn-devel-104
|
|
(For now, -1 is the default).
|
|
TDB2 version of commit b83672b36c1ea8c35833c40c3919b63809f16624.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Otherwise, when we switch everyone's scripts will break (including our
own tests!).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Minor changes from tdb/tools/tdbbackup.c.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
TDB2 uses the same expansion logic as TDB1, which got factored out
recently. So update TDB2 to match.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit c438ec17d7b2efe76e56e5fc5ab88bd4a02735e8)
|
|
It's much harder to wrap a 64-bit tdb2 than a 32-bit tdb1, but we should still
take care against bugs.
Also, we should *not* cast the length to a size_t when comparing it to
the stat result, in case size_t is 32 bit.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 6f7cb26e589cea081e71c59801eae87178967861)
|
|
This avoids a tdb_fetch, thus a malloc/memcpy/free in the tdb_store path
|
|
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Dec 19 16:53:40 CET 2011 on sn-devel-104
|
|
|
|
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
|
|
This means we know they're there in future, and what restrictions they
carry.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit b3ca95351517e76b635347b39382b059a66f8388)
|
|
This allows even more extensibility in future: in particular, the top
bits of each capability tell us what to do if we don't understand it:
fail the open, fail to open for write, or don't try to check the
format.
tdb_check needs to understand the capability list so it can know to
skip over it: each element in the list is prefixed with the type tag
and the length.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 35f198de1851a7d57064546b7ced677b6fabee27)
|
|
Neater API.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 79d603a5f73dfbb655d8d08f67eecb5f2da542d5)
|
|
This will be used shortly to indicate that a TDB2 file indicates it
cannot be checked.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit e01d795c8964b791def1e9f68c386b350b3a2a84)
|
|
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)
|
|
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)
|
|
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)
|
|
Less cut & paste means less patching as failtest changes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 1819a36a3e69565bd7b853503fceb846558a45bd)
|
|
layout.c's TDB creation functions were incorrect in case of a hash
collision, causing occasional failure. Make it always use the
(previously-failing) seed value, and fix it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 60a487d57979e4364e70c837079f3cf083ddc9c7)
|
|
We currently insist that a tdb file be a version1 file if tdb_open() is
passed the TDB_VERSION1 flag; we fail if it's actually a tdb2.
But that makes generic wrappers harder, and is unlikely to be what the
user wants: if they do, they can check tdb_get_flags() & TDB_VERSION1
after opening.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 9691464a16ef22d6acadfef209666381dfe22b2f)
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Wed Nov 2 08:38:38 CET 2011 on sn-devel-104
|
|
This is what lib/tdb2 really wants: to know if it should use normal
headers or replace.h. It currently uses _SAMBA_BUILD_, which is wrong
for ldb, for example.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Tue Nov 1 03:19:58 CET 2011 on sn-devel-104
|
|
Since we no longer break compatibility, don't scare people.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Wed Sep 21 09:25:11 CEST 2011 on sn-devel-104
|
|
This happens in SAMBA with the TDB_VERSION1, presumably due to a
read-only traverse nested inside a normal traverse (since it doesn't
occur without TDB_VERSION1).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 24e5ddb143fb5e79112649472258f5da67cc7362)
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Tue Sep 20 09:35:10 CEST 2011 on sn-devel-104
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Wed Sep 14 06:06:41 CEST 2011 on sn-devel-104
|
|
Since enums and ints are compatible in C, the compiler didn't warn
that our prototypes for these functions disagreed with the
definitions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 6d3832ee613adeb9ae7ed6454996ffa39c32650f)
|
|
tdb_close() does genuinely return non-zero, not an error code, even in tdb2.
And tdb_exists() returns true or false, not an error code.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
This clarifies the code a little, but also provides a more explicit
mechanism which can be used to debug error handling (by introducing
tdb_err_t and making it a pointer type).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit afa6d57b7d93fe4675a952f556eb462951baa257)
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit feb36b14278b4230af70dab90369a345b6a027ef)
|
|
Lazy cut & paste of tdb names causes failure when we run in parallel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 380372e733416c2b348d5307f536d0a0807e95df)
|
|
tdb_repack() returns an enum TDB_ERROR, whereas
tdb1_transaction_commit is expected to return 0 or -1.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit b679512e4260b9847e2f846b07443e6907d8276f)
|
|
A left-over -1 return; should be returning ecode (probably TDB_ERR_IO).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 077bdae6877d26749987b26a1b5b28cdba5ebbdd)
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 9cbae0f976118472f0065eee674eacf6ab4b80c5)
|
|
These two tdb1-specific tests have been superceded by the TDB_VERSION1
flags used in the main tests.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit e42097b73f6cd509aa17a48487a707401a2d4bd0)
|