summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/tools/tdbtorture.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r16916: Implement metze's proposed changes to the tdb logging API.Andrew Bartlett1-1/+4
This clearly links the log function with its private pointer, and makes the argument list for tdb_open_ex a bit shorter. Andrew Bartlett (This used to be commit 5d5503e8d8a10ead3ef21a5ffda52cadb9a07727)
2007-10-10r16774: This patch modifies the tdb API to allow the logging function to be usedAndrew Bartlett1-3/+3
as part of ldb. This allows tdb failures to be passed all the way up to Samba's DEBUG system, which allowed easier debugging. Unfortunately I had to extend the tdb API, as the logging function didn't have a context pointer. I've worked over the 'debug levels' in TDB. Most of them were 0, which didn't seem right, as some were trace-like messages. We didn't see any of these previously, except when accessing TDB directly. Andrew Bartlett (This used to be commit 58898092c1ce043f6d698db5065f372b79109e22)
2007-10-10r15100: Port the bugfix for #3569 to Samba4Volker Lendecke1-1/+1
(This used to be commit 5f1d52f232051324082b840f29dd7719a9328bd5)
2007-10-10r10475: make sure we report failures in tdbtorture (ie. get the exit status ↵Andrew Tridgell1-1/+1
right) (This used to be commit a795fc0aa141c08af6e37af07c88164bad3db35b)
2007-10-10r10471: stratos doesn't have getpagesize(), so guess 8k on systems that don'tAndrew Tridgell1-1/+1
have it. Overestimating is harmless. (This used to be commit ab953c8c72060c496876b6f39d388ad2f7e3c7e0)
2007-10-10r10470: solaris8 has a problem with tdbtorture with 3 processes. To see ifAndrew Tridgell1-1/+1
this is just a solaris issue this patch changes the default to 3, and I'll see how many build farm boxes break (This used to be commit c85836bafc9c042deac2a02ef6fddbfeaa5f47f1)
2007-10-10r10468: - terminate tdbtorture quickly when an error is detectedAndrew Tridgell1-23/+41
- more workarounds for aix not handling malloc of size 0 (This used to be commit c2b1739c6389503854f55fa8407c55071781eff4)
2007-10-10r10463: consider it an error if tdbtorture produces any log messagesAndrew Tridgell1-1/+10
(This used to be commit d9ee0e8b59ee52ed1e41865cffe97e32b504e7e7)
2007-10-10r10459: fixed some portability problemsAndrew Tridgell1-0/+3
(This used to be commit 03942dd54b31e7a4cf9c6270b26ccf68a3234b40)
2007-10-10r10421: following on discussions with simo, I have worked out a way ofAndrew Tridgell1-1/+9
allowing searches to proceed while another process is in a transaction, then only upgrading the transaction lock to a write lock on commit. The solution is: - split tdb_traverse() into two calls, called tdb_traverse() and tdb_traverse_read(). The _read() version only gets read locks, and will fail any write operations made in the callback from the traverse. - the normal tdb_traverse() call allows for read or write operations in the callback, but gets the transaction lock, preventing transastions from starting inside the traverse In addition we enforce the following rule that you may not start a transaction within a traverse callback, although you can start a traverse within a transaction With these rules in place I believe all the deadlock possibilities are removed, and we can now allow for searches to happen in parallel with transactions (This used to be commit 7dd31288a701d772e45b1960ac4ce4cc1be782ed)
2007-10-10r10405: added transactions into tdb, and hook them into ldb. See myAndrew Tridgell1-35/+94
samba-technical posting for more details on the transactions design. This also adds a number of command line arguments to tdbtorture, making it more flexible, and fixes some lock deadlock conditions in the tdbtorture code. (This used to be commit 06bd8abba942ec9f1e23f5c5d546cbb71ca3a701)
2007-10-10r10253: a fairly large tdb cleanup and re-organise. Nearly all of this changeAndrew Tridgell1-8/+8
just involves splitting up the core tdb.c code into separate files on logical boundaries, but there are some minor functional changes as well: - move the 'struct tdb_context' into tdb_private.h, hiding it from users. This was done to allow the structure to change without breaking code that uses tdb. - added accessor functions tdb_fd(), tdb_name(), and tdb_log_fn() to access the elements of struct tdb_context that were used by external code but are no longer visible - simplied tdb_append() to use tdb_fetch()/tdb_store(), which is just as good due to the way tdb locks work - changed some of the types (such as tdb_off to tdb_off_t) to make syntax highlighting work better - removed the old optional spinlock code. It was a bad idea. - fixed a bug in tdb_reopen_all() that caused tdbtorture to sometimes fail or report nasty looking errors. This is the only real bug fixed in this commit. Jeremy/Jerry, you might like to pickup this change for Samba3, as that could definately affect smbd in Samba3. The aim of all of these changes is to make the tdb transactions/journaling code I am working on easier to write. I started to write it on top of the existing tdb.c code and it got very messy. Splitting up the code makes it much easier to follow. There are more cleanups we could do in tdb, such as using uint32_t instead of u32 (suggested by metze). I'll leave those for another day. (This used to be commit 4673cdd0d261614e707b72a7a348bb0e7dbb2482)
2007-10-10r8448: - added a test target for tdbAndrew Tridgell1-2/+4
- reduced the torture size so it doesn't kill the build farm hosts (This used to be commit 7a88a9f06cbe5c125edad0da7908b94bcedfe4fc)
2007-10-10r5298: - got rid of pstring.h from includes.h. This at least makes it a bitAndrew Tridgell1-0/+1
less likely that anyone will use pstring for new code - got rid of winbind_client.h from includes.h. This one triggered a huge change, as winbind_client.h was including system/filesys.h and defining the old uint32 and uint16 types, as well as its own pstring and fstring. (This used to be commit 9db6c79e902ec538108d6b7d3324039aabe1704f)
2007-10-10r5296: - only include the tdb headers where they are neededAndrew Tridgell1-0/+1
- removed the u32 hack in events.c as I think this was only needed as tdb.h defines u32. Metze, can you check that this hack is indeed no longer needed on your suse system? (This used to be commit 6f79432fe656164d4770dbce114a30dda5e7bf9a)
2007-10-10r4467: - tdb standalone build doesn't need -DSTANDALONE any moreAndrew Tridgell1-1/+1
- fixed standalone build (This used to be commit ade0b71e4194f99d807d26276592bc041d46df7b)
2007-10-10r4466: rather than defining "STANDALONE" for building tdb, ldb and tallocAndrew Tridgell1-1/+1
outside the tree, instead defined _SAMBA_BUILD_ inside the Samba build. This makes it easier to pull code out of Samba for external use. (This used to be commit 09e98c8745cca7ccb1ad7134c0c09b8e4c0f4f06)
2007-10-10r3461: another place where "open" was used as a structure elementAndrew Tridgell1-0/+1
(This used to be commit 1087ea830e7aead86d54a1836512e88554afc919)
2007-10-10r3447: more include/system/XXX.h include filesAndrew Tridgell1-0/+1
(This used to be commit 264ce9181089922547e8f6f67116f2d7277a5105)
2007-10-10r3445: made the gtk tooks use minimal includes. This approximately halves theAndrew Tridgell1-1/+1
total include lines in compiling C files in Samba (the .gch file is now 5M instead of 12M) This also gets rid of the silly gtk compile warning for non-gtk code (This used to be commit 8ebd20cf551c8c1fad98ec723d91873fa202b85a)
2007-10-10r2092: fix the build(don't catch main() by make proto)Stefan Metzmacher1-1/+1
metze (This used to be commit ecdb0b442659e80ca91d5ec5b505224c68a97c5a)
2007-10-10r2088: add tdbtorture tdbdump and tdbtest to the buildStefan Metzmacher1-4/+12
NOTE: tdbbackup and tdbtool seems to be broken... NOTE: I also added SMB_EXT_LIB(GDBM,...) because that is needed by tdbtest metze (This used to be commit e66630662d4203ccecbb20962e83dbf50a2c056f)
2007-10-10r848: convert lib/tdb into the same layout as lib/ldbStefan Metzmacher1-0/+227
metze (This used to be commit bacab322ce89979f0ad0811cd15b73d81eceb69d)