Rusty Russell [Tue, 30 Aug 2011 04:31:26 +0000 (14:01 +0930)]
Makefile: speed fastcheck
Rather than timeout, explicitly disable tests_pass_valgrind and
tests_compile_coverage. This is important now we run under valgrind
the first time we run the tests, thus would always time out and not
run most of the tests at all!
"make check" takes 7m57s, old "make fastcheck" takes 3m28s, and this takes
only 1m57s, but much more is run (as shown by the larger score total).
Rusty Russell [Tue, 30 Aug 2011 04:31:25 +0000 (14:01 +0930)]
ccanlint: clean up reduced feature handling.
Putting the reduced config.h in the current directory means that it's
actually being picked up by other tests, such as the string checks.
So move it to a sub-directory where we need an explicit -I.
We also fix the dependencies, so that "--target
tests_pass_without_features" works.
Rusty Russell [Tue, 30 Aug 2011 04:31:25 +0000 (14:01 +0930)]
ccanlint: handle duplicate dependencies in _info
We eliminate dependencies as we recurse, but if a single _info file
lists a dependency twice, we add it to the list twice and this skip
over the middle ones.
Rusty Russell [Tue, 30 Aug 2011 04:27:08 +0000 (13:57 +0930)]
ccanlint: keep separate array of compiled versions.
Rather than mug the old ->compiled version when we reduce features,
keep both in the structure. This makes it clear that we are using the
right version (we weren't in all cases, in particular we weren't
recompiling the test helpers correctly.
Rusty Russell [Wed, 24 Aug 2011 03:22:46 +0000 (12:52 +0930)]
ccanlint: allow per-file restrictions, so we don't have to remove all tests.
For example, valgrind can't handle some things, so we may need to
switch it off, but we don't want to do that for every test.
So, start a standard format for per-file restrictions, eg:
Ccanlint: tests_pass_valgrind test/foo.c:FAIL
For the moment, only tests_pass_valgrind takes options, so it has to
change: we now have a helper which returns the array of options
applicable to a given file.
Rusty Russell [Wed, 24 Aug 2011 03:22:24 +0000 (12:52 +0930)]
ccanlint: make valgrind understand child output.
We turned on --child-silent-after-fork=yes, because the output
confused our dumb parser. Now we split output by prefix ("==<pid>==")
and then we can sort out the leaks from the errors.
Rusty Russell [Mon, 22 Aug 2011 03:17:08 +0000 (12:47 +0930)]
tdb2: fix intermittant failure in run-50-multiple-freelists-fail.c
layout.c's TDB creation functions were incorrect in case of a hash
collision, causing occasional failure. Make it always use the
(previously-failing) seed value, and fix it.
Joey Adams [Mon, 15 Aug 2011 06:36:33 +0000 (02:36 -0400)]
btree: Changed license from BSD-3 to MIT, and set version to 0.2
NOTE: btree was originally copyright 2010, and has not been
touched by me since then. I don't know if changing the license
to something more permissive requires updating the copyright year
or not.
Joey Adams [Mon, 15 Aug 2011 06:06:17 +0000 (02:06 -0400)]
block_pool: Changed license from BSD-3 to MIT, and set version to 0.1
NOTE: block_pool was originally copyright 2009, and has not been
touched by me since then. I don't know if changing the license
to something more permissive requires updating the copyright year
or not.
Douglas Bagnall [Sat, 13 Aug 2011 12:19:59 +0000 (21:49 +0930)]
opt: incidental comment and whitespace repair
This comment occurred in a couple of places:
/* Set an integer value, various forms. Sets to 1 on arg == NULL. */
One instance was clearly spurious, while the other was misleading.
Another resolution to this mismatch would be to add
"if (arg == NULL){*l = 1; return NULL}" somewhere, but I suspect
it may have been left out/removed because someone thought better.
Douglas Bagnall [Sat, 13 Aug 2011 12:19:59 +0000 (21:49 +0930)]
opt: add integer helpers that accept k, M, G, T, P, E suffixes
These functions come in two flavours: those ending with "_si", which
have 1000-based interpretations of the suffixes; and those ending with
"_bi", which use base 1024. There are versions for signed and
unsigned int, long, and long long destinations, with tests for all 12
new functions. The tests get a bit repetitive, I am afraid.
As an example, if the -x option were using the opt_set_intval_bi
function, then all of these would do the same thing:
quite what that thing is depends on the size of your int -- people
with 16 bit ints would see an "out of range" error message.
The arithmetic for unsigned variations is actually done using signed
long long integers, so the maximum possible value is LLONG_MAX, not
ULLONG_MAX. This follows the practice of existing functions, and
avoids tedious work.
Rusty Russell [Fri, 22 Jul 2011 12:13:39 +0000 (21:43 +0930)]
cast: downgrade license from LGPL3+ to LGPLv2.1+
Kirill A. Shutemov asked for libgit. I would say they should upgrade their
license, but libhx on which these are based is also LGPLv2.1 or later, so
I prefer to match that.
Rusty Russell [Thu, 21 Jul 2011 05:20:00 +0000 (14:50 +0930)]
isaac, crcsync: acknowledge licensing issues.
The recently added ccanlint licensing checks revealed several cases
where the published license of a module is misleading: a dependency of
that module has a stricter license (eg. a public domain module which
depends on a GPL one).
Where these are my modules, I've fixed them. Otherwise I'm overriding
the checks for the moment, and asking the authors what they want to do.
Rusty Russell [Thu, 21 Jul 2011 05:14:49 +0000 (14:44 +0930)]
htable: relicense under LGPL
Various LGPL components depend on it, via ccan/likely. ccan/likely
really only needs it when CCAN_LIKELY_DEBUG is set, but making it a
conditional dependency is a bit nasty if defining that changes the
license.
So this is the simplest fix. I might relicense under PD or BSD later,
since the likely module should probably have an even more liberal
license.
Rusty Russell [Thu, 21 Jul 2011 04:59:06 +0000 (14:29 +0930)]
md4: fix license
As ccanlint now says:
Source files don't contain incompatible licenses (license_file_compat): FAIL
/home/rusty/devel/cvs/ccan/ccan/md4/md4.c:Found boilerplate for license 'GPLv2+' which is incompatible with 'LGPLv2+'
Rusty Russell [Thu, 21 Jul 2011 04:59:03 +0000 (14:29 +0930)]
ccanlint: check for incompatible license boilerplates within subfiles.
This checks to make sure you're not accidentally relicensing code;
eg. it's OK (though a bit impolite) to turn a BSD-licensed file into a
GPL module, but not the other way around.
Rusty Russell [Thu, 21 Jul 2011 03:32:27 +0000 (13:02 +0930)]
ccanlint: add simple check for comment referring to LICENSE file.
After discussion with various developers (particularly the Samba
team), there's a consensus that a reference to the license in each
source file is useful. Since CCAN modules are designed to be cut and
paste, this helps avoid any confusion should the LICENSE file go
missing.
We also detect standard boilerplates, in which case a one-line summary
isn't necessary.
Rusty Russell [Thu, 21 Jul 2011 03:32:04 +0000 (13:02 +0930)]
noerr: relicense to public domain.
We really want everyone to be using these; establishing conventions
helps all code, so make it the most liberal license possible. It's
all my code, so I can do this unilaterally.
Rusty Russell [Thu, 21 Jul 2011 03:31:45 +0000 (13:01 +0930)]
short_types: relicense to public domain.
We really want everyone to be using these; establishing conventions
helps all code, so make it the most liberal license possible. It's
all my code, so I can do this unilaterally.
Rusty Russell [Thu, 21 Jul 2011 03:31:39 +0000 (13:01 +0930)]
compiler: relicense to public domain.
We really want everyone to be using these; establishing conventions
helps all code, so make it the most liberal license possible. It's
all my code, so I can do this unilaterally.
Rusty Russell [Tue, 19 Jul 2011 08:02:40 +0000 (17:32 +0930)]
various: make the _info License: wording uniform for GPL variants.
GPL versions 2 and 3 both specifically mention "any later version" as
the phrase which allows the user to choose to upgrade the license.
Make sure we use that phrase, and make the format consistent across
modules.