Current-Users archive

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

Re: test for interrupted stdio



Am 07.09.2021 um 22:40 schrieb RVP:
> On Tue, 7 Sep 2021, Roland Illig wrote:
>
>> I am running tests/lib/libc/stdio/t_intr on NetBSD 9.99.88/amd64 inside
>> VirtualBox. The test fails spuriously.
>>
>> I find this surprising since cat uses raw I/O. Or is it maybe h_intr
>> that exposes the bug?
>>
>
> It's a stdio fwrite()/fflush() bug. Try running h_intr with `-w'.

Oops, I completely misread the code of maxwrite.  I had thought that it
would not handle short reads, but it does exactly that, and its name
even says so.  No idea what I was thinking.

Now I agree that h_intr looks fine and the bug is probably in fwrite/fflush.


Home | Main Index | Thread Index | Old Index