[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
test for interrupted stdio
I am running tests/lib/libc/stdio/t_intr on NetBSD 9.99.88/amd64 inside
VirtualBox. The test fails spuriously.
Since I didn't want to dive into the internals of bin/dd, I modified
t_intr by replacing dd with cat. The test still fails spuriously.
I find this surprising since cat uses raw I/O. Or is it maybe h_intr
that exposes the bug? It took me some time to get the test to fail, but
then ktrace shows:
9535 9535 cat GIO fd 0 read 32 bytes
9535 9535 cat RET read 16384/0x4000
9535 9535 cat CALL read(0,0x7126f1f1a480,0x4000)
9535 9535 cat GIO fd 0 read 4088 bytes
Between these calls to read(0), there are no other reads. This looks to
me as if h_intr would contain a bug. If wr_fn(ofp, buf, n) is ever
interrupted, it does not try to resubmit the data but simply skips the
block. Due to that, cat receives only the partial input.
I think h_intr should be more robust when it comes to interrupted system
Main Index |
Thread Index |