[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#834511: libexplain: FTBFS on hppa - FAILED test of eventfd EINVAL



Source: libexplain
Version: 1.4.D001-4
Severity: important

Putting my comments on this here so they're not forgotten:

> On 15/08/16 17:07, Helge Deller wrote:
>> libexplain FTBFS on hppa, because of a testcase which doesn't take care of HP PARISC:
>>
>> PATH=`pwd`/bin:$PATH /bin/sh test/04/t0472a.sh
>> 1,2c1,3
>> < eventfd(initval = 0, flags = 0) failed, Invalid argument (EINVAL) because
>> < the flags argument was incorrectly specified, it contained undefined bits
>> ---
>>> eventfd(initval = 0, flags = 0x10005) failed, Invalid argument (EINVAL)
>>> because the flags argument was incorrectly specified, it contained
>>> undefined bits
>> FAILED test of eventfd EINVAL
>> Makefile:42022: recipe for target 't0467a' failed
>> make[1]: *** [t0467a] Error 1
>> make[1]: *** Waiting for unfinished jobs....
>>
>> The flags = 0x10005 are actually correct on hppa.
>> We have in  /usr/include/hppa-linux-gnu/bits/eventfd.h:
>> #define EFD_CLOEXEC EFD_CLOEXEC
>>     EFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
>>
>> Any idea how we can make the package build successfully on hppa ?
> 
> It looks like the eventfd flags are defined here:
> https://sources.debian.net/src/libexplain/1.4.D001-4/libexplain/buffer/eventfd_flags.c/
> 
> That function then calls explain_parse_bits_print to actually parse the
> bits:
> http://sources.debian.net/src/libexplain/1.4.D001-4/libexplain/parse_bits/print.c/
> 
> But explain_parse_bits_print only handles flag tables containing single 
> bit values. The correct fix would be to teach explain_parse_bits_print 
> how to handle these tables. I think the best way would be to iterate 
> over the entire flag table, and calculate (value & flag) == flag. If 
> that's true, we output the flag name and remove those bits from the 
> value.

James

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: