grep testsuite: test-fwrite fails with git glibc
Andreas Jaeger
aj@suse.com
Sun Nov 25 09:20:00 GMT 2012
On 11/25/2012 09:53 AM, Siddhesh Poyarekar wrote:
> On Sun, Nov 25, 2012 at 07:17:06AM +0100, Andreas Jaeger wrote:
>> With glibc git, I get a test failure in building grep:
>>
>> grep-2.14/gnulib-tests> ./test-fwrite
>> test-fwrite.c:53: assertion failed
>> Aborted
>>
>> This does not seem to occur with glibc 2.16.
>> Siddhesh, could you check the grep testsuite with your patch for
>> BZ#11741, please?
>
> My patch seems to have exposed what I think is a bug in fwrite
> implementation. The current assumption in fwrite is that even if
> _IO_sputn returns EOF, the data is in the buffer and only a flush
> failed. That assumption is wrong since the flush could have happened
> in the middle of writing data, which resulted in an EOF. The
> following patch to fwrite should fix this. The glibc testsuite is
> still clean with this change. Is this OK for master?
So, this patch fixes the grep testsuite? Great! Could you add a testcase
for glibc so that we don't regress again?
thanks a lot for your quick investigation and fix, I'd like somebody
else to review it,
Andreas
>
> Siddhesh
>
> ChangeLog:
>
> [BZ #11741]
> * libio/iofwrite (_IO_fwrite): Return 0 on EOF.
> * libio/iofwrite_u.c (fwrite_unlocked): Likewise.
>
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
More information about the Libc-alpha
mailing list