- 03 Dec, 2011 1 commit
-
-
Rusty Russell authored
-
- 02 Dec, 2011 8 commits
-
-
Rusty Russell authored
It's much easier to simply say "keep all", and it simplifies the code quite a bit.
-
Rusty Russell authored
I use --target far more than --timeout.
-
Rusty Russell authored
Rather than using a separate index of tetst to skip, make sure tests we don't want to run are removed from the graph of tests to start with. This means that the "skip" field is only set when we fail a test (and thus must be reset when we test the next module).
-
Rusty Russell authored
Rather than walking the list of tests manually, use dgraph_traverse_to() to run the tests.
-
Rusty Russell authored
Instead of a linked list of tests, we use dgraph and strmap.
-
Rusty Russell authored
Make info_exists() call add_info_options() directly, rather than detecting that we've found _info inside the loop of tests. It means targeting is now a global, which is a bit sucky.
-
Rusty Russell authored
-
Rusty Russell authored
This way, we can debug really early failures (eg. during option parsing).
-
- 01 Dec, 2011 9 commits
-
-
Rusty Russell authored
It's reduced to a flag which means we stop processing the module. We have to enhance our dependencies a bit, but they've always been quite good. This simplifies things quite a bit.
-
Rusty Russell authored
Parsing options like --verbose and --debug can be a pain. You need to have everything set up before invoking parse_args(), but that may be a significant amount of work, for which you may want verbose or debugging enabled. Thus the concept of "early" args: you can nominate arguments to be parse before anything else, using opt_early_parse().
-
Rusty Russell authored
Make a false return abort the iteration, not true. The old way makes sense for search functions (true == I found it), but other kinds of iteration are more common (brute force search is probably dumb).
-
Rusty Russell authored
strset_set -> strset_add strset_clear -> strset_del strset_test -> strset_get strset_destroy -> strset_clear
-
Rusty Russell authored
-
Rusty Russell authored
-
Rusty Russell authored
-
Rusty Russell authored
Testing code still using it.
-
Rusty Russell authored
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.
-
- 30 Nov, 2011 10 commits
-
-
Rusty Russell authored
-
Rusty Russell authored
Just like container_of() (with typechecking, etc), but return the offset to the enclosing structure.
-
Rusty Russell authored
-
Rusty Russell authored
This means we know they're there in future, and what restrictions they carry.
-
Rusty Russell authored
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.
-
Rusty Russell authored
Neater API.
-
Rusty Russell authored
This will be used shortly to indicate that a TDB2 file indicates it cannot be checked.
-
Rusty Russell authored
The current mix of writing to an fd doesn't mix as well with stderr/stdout. And writing to a FILE * is more portable.
-
Rusty Russell authored
This gives a much deeper insight into what failtest is doing; good for debugging failtest itself.
-
Rusty Russell authored
We currently save all files in the parent, and restore them once the child is gone. That doesn't work in a case where the child manipulates a file the parent doesn't currently have open, so switch to a model where the child cleans itself up, using the already-existing cleanup callbacks. This means that we need to undo much more, especially restoring file offsets. We also need to handle the case where we've already closed the file, and now we're cleaning up. As a bonus, we now handle open() with O_TRUNC properly. The cleanup function now has two modes: one simply frees (so valgrind doesn't complain about failtest leaking so the user can see real leaks in their programs), the other restores things so the parent sees no changes.
-
- 29 Nov, 2011 12 commits
-
-
Rusty Russell authored
-
Rusty Russell authored
The argument is wrong, so the return was -1. That currently works, but it will beak with the next patch. Fix the typo.
-
Rusty Russell authored
And separate out the code which follows --failpath so failtest_close() can use it too.
-
Rusty Russell authored
It was the wrong way around, and also it's better to show the whole remaining failpath rather than the current letter.
-
Rusty Russell authored
Don't continue when we report a leak: tell the parent it's a failure.
-
Rusty Russell authored
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.
-
Rusty Russell authored
mmap can also fail on out-of-memory, and for the coming change to the way we save and restore files we want to know about them anyway.
-
Rusty Russell authored
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.
-
Rusty Russell authored
Calling failpath_string() here leaves the final letter randomly upper or lower-cased, since call->fail is uninitialized. This means we sometimes don't match the debug string. 1) Initialize call->fail here so it will match the debug string. 2) If our calls don't match --debugpath, abort. 3) Don't match the final letter (which may be upper or lower case) when checking we're still on the path. We could do better, but this is only a sanity-check anyway.
-
Rusty Russell authored
If we can get a backtrace, we can automatically eliminate identical failures. Surprisingly backtrace() is quite fast, but the savings for the (naively-written) rbtree tests are impressive. ccanlint -v time drops from 43 seconds to 6 seconds.
-
Rusty Russell authored
-
Rusty Russell authored
When a failtest_hook returns fail_probe(), we start a counter to continue for a little way. Replace this hack with a simple flag, which disables further failures. Interestingly, this doesn't reduce coverage on the current modules which use failtest.
-