summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-01-17array: spelling fixes.Brad Hards
2011-01-17str: change example to match function being explained.Brad Hards
Looks like the example was copy-n-pasted from the previous entry.
2011-01-17ccanlint: check examples actually mention thing they are demonstrating.Rusty Russell
Brad suggested this after finding one such cut & paste in str: rusty@vivaldi:~/devel/cvs/ccan/ccan/str$ ../../tools/ccanlint/ccanlint Example: sections demonstrate appropriate function (examples_relevant): FAIL /home/rusty/devel/cvs/ccan/ccan/str/str.h:64:Example for strcount doesn't mention it Total score: 37/38
2011-01-17ccanlint: fix trailing / in -d.Rusty Russell
Before: $ tools/ccanlint/ccanlint -d ccan/talloc/ Module's source code has no trailing whitespace (no_trailing_whitespace): FAIL : Total score: 0/1 After: $ tools/ccanlint/ccanlint -d ccan/talloc/ Module's source code has no trailing whitespace (no_trailing_whitespace): FAIL talloc: Total score: 0/1
2011-01-17ccanlint: score_file_error() takes printf-formatRusty Russell
We simply build up the error string in score_file_error; a bit different but simpler than current behaviour. We keep around struct file_error because some tests need it.
2011-01-17ccanlint: fix score for info_summary_single_lineRusty Russell
My refactoring introduced a bug: we need to set score=1 for the success case.
2011-01-17ciniparser: Separate summary line and description text for metadataBrad Hards
2011-01-17block_pool: Change metadata layout so initial description is all on one line.Brad Hards
With the original layout, we got: Summary: An efficient allocator for blocks that don't need to be .... Description: resized or freed.
2011-01-17ccanlint: neaten info_summary_single_line with new doc_section info.Rusty Russell
2011-01-17ccanlint: keep mapping back to original source line for doc_extractRusty Russell
Makes reporting of documentation easier.
2011-01-17ccanlint: add test case for metadata summary line on a single separate line.Brad Hards
2011-01-13htable: fix type of cmpfn in htable_typeRusty Russell
It in fact takes an object and a key to compare, not two keys. The test case had the key as first element of the object, so it worked, but ccanlint lost track of module dependencies due to this bug, and thus would build submodules multiple times.
2011-01-10rbtree: fix allocation failre paths.Rusty Russell
2011-01-10rbtree: don't use temporary context to destroy rbtreeRusty Russell
It leads to a memory leak if the allocation fails (as we reparent onto NULL). Also, the extra allocation in the failure path increases test time for failtest (under valgrind) by a factor of 2.
2011-01-10rbtree: use failtest to check handling of allocation failures.Rusty Russell
Unfortunately this means we have to reduce run-many from 1000 nodes to 100 (as forking under valgrind is really slow: test takes about 2 minutes with 100 nodes).
2011-01-10rbtree: fix memory leak in testsRusty Russell
The data is not made a child of the tree: the nodes are made children of the data. So we must explicitly free the data objects.
2011-01-10rbtree: vary insert and delete orders in testRusty Russell
This covers more code than simply doing an ordered delete/insert.
2011-01-10talloc: allow replacement allocatorRusty Russell
This allows us to both allocators which handle failure themselves, and allocators which insert failures.
2011-01-10talloc: fixed a use after free errorRusty Russell
(Import from SAMBA commit 6f51a1f45bf4de062cce7a562477e8140630a53d): this is the minimal fix for the problem Rusty found. I previously thought that the best fix would be to change tc->parent to be valid for all pointers, but that is expensive for realloc with large numbers of child pointers, which is much more commmon than I expected it to be.
2011-01-10talloc: use failtest to test failure paths.Rusty Russell
2011-01-10failtest: new module.Rusty Russell
A module designed to help test "never fails" functions like malloc.
2011-01-10tap: add fail callbackRusty Russell
This is useful for failtest, so we can abort on first failure.
2011-01-09ccanlint: fix and simplify depends-accurate (with strreg)Rusty Russell
2011-01-08ccanlint: fix total score for running examplesRusty Russell
Don't count examples which didn't compile (expected, as we mangle them in various different ways).
2011-01-08ccanlint: fix uninitialized variableRusty Russell
2011-01-08ccanlint: use strreg for section extraction.Rusty Russell
Makes it simpler and clearer.
2011-01-08Makefile: append git revision to "make scores"Rusty Russell
Good for testing ccanlint changes.
2011-01-08str_talloc: strregRusty Russell
Useful wrapper for extended POSIX regular expressions.
2011-01-08str: strcountRusty Russell
Useful routine to count number of matches in a string.
2011-01-06str: clean up tests so ccanlint doesn't complain about memory leaking.Rusty Russell
2011-01-07ccanlint: use positive description for test_pass_valgrind_noleaksRusty Russell
A bit more awkward, but more consistent with everything else.
2011-01-07ccanlint: print keys in outputRusty Russell
Since test keys are used for --target=, this is useful.
2011-01-07ccanlint: rename files to match keysRusty Russell
2011-01-07ccanlint: rename structures to match keysRusty Russell
2011-01-07ccanlint: list dependencies by keyRusty Russell
Joey Adams also pointed out that we should use strings for the dependency lists. Moving them into the structure also somewhat simplifies it.
2011-01-07ccanlint: rename test keysRusty Russell
Joey Adams rightly points out that the current keys are a mess: ideally the filenames, test keys and structure names in ccanlint should be the same. First step is to make the test names all regular, of basic form <noun>_<verb> (eg "tests_exist" rather than "has-tests").
2011-01-07Add scores/ directory to .gitignore.Rusty Russell
2011-01-07ccanlint: added --test-dep-graph optionJoey Adams
This option prints the dependency graph of ccanlint's tests in Graphviz .dot format. Sample usage: ccanlint --test-dep-graph | dot -Tpng > out.png && eog out.png
2011-01-07ccanlint: fix segfault caused by tests not depending on the "info" test.Joey Adams
These tests: "depends-exist" (compulsory_tests/check_depends_exist.c) "info-documentation" (tests/has_info_documentation.c) used m->info_file without checking if it was NULL, leading to a segfault when no _info file was present. Some other tests also used m->info_file without depending on "info", but are taken care of indirectly by this patch.
2011-01-07opt: Fix warnings with gcc-4.5 (same approach as commit 6535bde)Joey Adams
&*ptr is used in some other macros, but at a glance, they look like cases where the pointer shouldn't be NULL . Didn't change those, and if we get more warnings, we'll cross that bridge when we get to it. For now, I suppose they are just free NULL checks.
2011-01-06daemonize: set stderr to /dev/null.Rusty Russell
2011-01-06daemonize: make valgrind happy.Rusty Russell
2011-01-06daemonize: use BSD-MIT as License: string in _infoRusty Russell
The parenthesized thing is confusing and ccanlint dislikes it.
2011-01-06ccanlint: allow BSD-MIT for MIT license.Rusty Russell
There are a large number of BSD variants out there, be explicit.
2011-01-06ccanlint: fix parsing bug which believes lines starting with - are a section ↵Rusty Russell
header.
2011-01-04ccanlint: have valgrind fail with an error, alwaysRusty Russell
The upcoming failtest module can only tell that a child failed when it exits with a non-zero error. So we need this, although it means for ccanlint it still needs to look at output to distinguish a memory leak from a real error.
2011-01-04ccanlint: compile modules required by examples.Rusty Russell
If an example #includes <ccan/foo/...> we assume it needs module foo, but we would fail instead of building it if it isn't built.
2011-01-04ccanlint: make get_manifest cache manifestsRusty Russell
As we start doing more building of dependencies, this saves us effort.
2011-01-04compiler: NORETURNRusty Russell
2011-01-01tlist: typesafe variant of list module.Rusty Russell
I chose not to do the "macro creates set of routines" approach, as we can be almost as safe with a struct containing a pointer to the member type.