Age | Commit message (Collapse) | Author |
|
|
|
eg. asort depends on order, but order testdepends on asort.
Probably not the greatest thing to do, but don't barf because of it.
Reported-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
It's a bit too powerful, if you just want to memdup one thing, it's
hard to remember what the extra args are for.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
In the case that the objects built but linking failed, module_builds.c
called score_file_error with a NULL ccan_file object and 0 for line
number.
score_file_error assumed that the ccan_file object it is passed was
not-NULL when appending file errors to the score's aggregate error
string. It attempted to dereference it to get "fullname".
score_error was factored out from score_file_error. It takes a
"source" parameter, which is the file's full name (and possibly line
number) in the score_file_error case, and the ccan module name in the
case of link failure.
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
pushpull module doesn't have examples in pushpull.h.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Seems like my local Ubuntu install is giving bogus warnings. Allow
local valgrind overrides.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
There are a couple of small problems with the includes used in most of
ccan's _info files.
* _info routinely uses printf(), and so should include <stdio.h>, but
only some of them do. We get away with it, because they do include
<string.h>, which apparently includes <stdio.h> indirectly, but we should
be explicit about it.
* Most _info files were including config.h after the system headers.
That _seems_ sensible, but actually causes problems. Because config.h
defines _GNU_SOURCE it can change the behaviour of the system headers.
More specifically it can make them behave differently to how the individual
module headers (which have included config.h) expects them to behave.
This patch adjusts all the existing _info files and, more importantly,
the template constructed by ccanlint.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Useful for bulk testing modules, where some might not have required
external (non-CCAN) dependencies.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
"engla" on IRC reported that ccanlint on linux/powerpc would loop
infinitely calling dep_failed after all tests are run and the score is
output.
Reproduced, and discovered that cannot_run() takes a container_of(),
except our top node is not a struct ccanlint. The result was harmless on
x86, but set dep_failed to the return address on powerpc, causing that
to be called repeatedly.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
We can't really tell if non-ccan dependencies are used, so don't try.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
We weren't using the compiler and cflags options in tools/compile.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
We can use tal_count.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
eg:
tal/str: Module's tests cover all the code (tests_coverage): PASS (+3/6)
tal/str: Total score: 55/58
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Slowly removing the talloc dependency.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
If we see an ccan include line in an example, we add that to the
dependencies to try to build the example, but we didn't handle nested
modules.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
ccanlint would abort with 'Malformed line 53' if there was a bad header.
That's very poor, and deeply unhelpful.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Removing this assumption should allow nested modules.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Firstly, we should always ask before altering files. Secondly, we are
not in the module directory: we need to use m->info_file->fullname.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
This allows us to separate dependencies only needed for testing.
This matters: they don't have the same impact on licensing, nor necessarily
on end-users.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
This means error messages come out in the right place.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Public domain for those who don't have it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
David Gibson reports a new format, meaning we didn't show the gcov files
with -vv.
|
|
|
|
If we do have it, and we redefine it, compilation breaks.
|
|
We intuit the dependencies of embedded examples by looking for #include.
But these extra dependencies may require extra libraries, so we need to
add those, too.
|
|
If a dependent module needs -l options, we don't notice. Fix that, now
we have one.
|
|
We let the get_deps() caller hand us the compiled _info filename, but what
about recursive dependencies? These we re-generate every time.
So fix this: hand a generator callback to get_deps(), expose the one
which simply compiles it, and add a ccanlint one which looks up the
manifest to see if we have one already.
Before:
$ ccanlint -vvvv ccan/failtest | grep -c 'Creating.*_info'
31
After:
$ ccanlint -vvvv ccan/failtest | grep -c 'Creating.*_info'
17
|
|
In particular, don't complain on conditional lines. That's less thorough,
but removes false negatives we have now.
|
|
Gcc doesn't include unused inline functions, even without -O, but Solaris CC
does, so fails to link block_pool where one inline function refers to a
non-inline function.
|
|
We only support gcc/gcov so far.
|
|
This only matters on non-gcc, where ilog functions are not just mapped to builtins.
|
|
Move ccan_dir determination out to its own function, rather than implying it
by the first time we get the manifest of a module.
|
|
Move ccan_dir determination out to its own function, rather than implying it
by the first time we get the manifest of a module.
|