[ccan] ciniparser test failed on PowerPC

Rusty Russell rusty at rustcorp.com.au
Thu Jul 16 11:40:40 EST 2009


On Wed, 15 Jul 2009 03:13:11 pm Joseph Adams wrote:
> I did a make check on CCAN with my eMac G4 (PowerPC) under Fedora 10
> today.  Everything passed except ciniparser, which failed 8/12 tests,
> the first being:
>
> ok(itmp = ciniparser_getnsec(ini),
> 		"ciniparser_getnsec()   : %d entries in dictionary %s",
> 			itmp, ini_name);
>
> I found out that it only seems to happen when ciniparser is compiled
> with -O3 (-fstrict-aliasing doesn't seem to change matters).  Note
> that on PowerPC, GCC defaults to char being unsigned instead of
> signed.  When I add -fsigned-char, ciniparser passes the tests.
> However, when I try -O3 -funsigned-char on my x86, ciniparser still
> passes.

Debugging optimization-only problems is always fun, but the point of a test 
suite is to localize problems and this one doesn't succeed.

I can't see anything obvious, but my gut instinct is to remove all the casts 
from strstrip and strlwc; this failure suggests that ciniparser_line is not 
returning LINE_SECTION.

I don't have a ppc machine in convenient reach, unf :(  I'd sprinkle printfs 
at it...

Rusty.


More information about the ccan mailing list