- 01 Mar, 2011 23 commits
-
-
Rusty Russell authored
Since failtest uses macros to override read and write, we need to avoid those names, even inside our ops structure.
-
Rusty Russell authored
On normal files, pwrite and write should never return short except on error. As we never create sparse files, so any short write is an I/O error.
-
Rusty Russell authored
Simply assume that any short read on a TDB in an I/O error.
-
Rusty Russell authored
Do it properly, with a printf-style interface.
-
Rusty Russell authored
Especially since they probably define _GNU_SOURCE.
-
Rusty Russell authored
-
Rusty Russell authored
Otherwise we don't get goodies like asprintf, and 64-bit offsets. Should be a harmless-define on non-glibc systems.
-
Rusty Russell authored
-
Rusty Russell authored
We run in a temporary directory now. Also, avoids warning and memory leak.
-
Andreas Schlick authored
-
Rusty Russell authored
And use those names, too.
-
Rusty Russell authored
-
Rusty Russell authored
Old habits die hard; it's better to use #if <FEATURE> than #ifdef <FEATURE>; they're similar, because undefined identifiers evaluate to zero, but with GCC's -Wundef flag you can detect mis-spelled or missing features with #if. autoconf-style config.h leave unset features undefined, so this works for those config.h too.
-
Rusty Russell authored
-
Rusty Russell authored
-
Rusty Russell authored
A common mistake is not to try compiling with features disabled in config.h. The ideal case would determine how features interact and test all combinations of them: this simply disables any features mentioned in the code which were previously enabled.
-
Rusty Russell authored
-
Rusty Russell authored
This means you don't have to recompile ccanlint to get the new flags; it's a small step towards making ccanlint useful outside the ccan repo.
-
Rusty Russell authored
David Gibson reports (and I confirmed) that running ccanlint in /tmp causes an very uninformative segv. Fix that, and add a more useful message, as well as delaying recursing until we're confident there's code around.
-
Rusty Russell authored
-
Rusty Russell authored
Andreas Schlick reports that PaX et. al. dislike trampolines, so open-code qsort from glibc. Interestingly, _quicksort from glibc seems to have a void * parameter, but I can't find any information on it.
-
Rusty Russell authored
We need to get the locks back *after* the child runs.
-
Rusty Russell authored
Aborts on a short write with --tracepath.
-
- 24 Feb, 2011 3 commits
-
-
Rusty Russell authored
This isn't a general requirement for CCAN modules, but Samba uses it, so make sure tdb2 doesn't upset it.
-
Rusty Russell authored
Samba (for example) uses a DEBUG() macro, which triggers these heuristics. Better to make it per-module anyway.
-
Rusty Russell authored
When I changed score_file_error() to printf-style, I didn't audit all the callers who were handing string literals. I've finally done that; I should have broken the compile by renaming it. Rusty fails refactoring 101. Reported-by: Andreas Schlick
-
- 22 Feb, 2011 2 commits
-
-
Joey Adams authored
-
Joey Adams authored
* Removed talloc support. * Added a synopsis and rearranged macro definitions. * Switched allocation strategy from increments of 64 to powers of 2. * Replaced array_for and array_rof with the more useful and portable macros array_foreach and array_foreach_reverse. * Added typedefs array_* for common types.
-
- 15 Feb, 2011 12 commits
-
-
Rusty Russell authored
If we need to clean up the children, they didn't exit cleanly. This takes a bit more care when writing tests, but found a leak in tdb2.
-
Rusty Russell authored
tdb2 has various places where it recovers from failure (eg. falling back when it can't open /dev/urandom, or allocation for error logging). We want to test those paths, but doing so thoroughly causes cominatorial explosion. Add FAIL_PROBE for such cases: in this case it goes only 3 more calls deep.
-
Rusty Russell authored
We trap them, might as well put them in history. This also makes tracking open file descriptors more robust.
-
Rusty Russell authored
-
Rusty Russell authored
ie. SIGUSR1 means it timed out.
-
Rusty Russell authored
If children and parents aren't isolated properly (ie. failtest is buggy) we really want to run gdb on a failing child. This hack allows that.
-
Rusty Russell authored
open fails in fairly normal cases; don't double execution time for this!
-
Rusty Russell authored
We insist they write the same things to pipes, since we can't "undo" them, but strictly speaking we don't care if they write different things into files. Note: it may indicate a bug if they do...
-
Rusty Russell authored
-
Rusty Russell authored
The idea of saving files as we do writes doesn't work with mmap: this just saves the entire contents of all open files before forking child, and restores them afterwards.
-
Rusty Russell authored
Use the same structure we use in the history.
-
Rusty Russell authored
Each function in the history stores a cleanup function, rather than storing extra structures. In particular, we save writes and file offsets using this.
-