[LTP] [PATCH V4 2/3] syscalls: select: Verify that data is available to read
Cyril Hrubis
chrubis@suse.cz
Thu Oct 22 12:13:36 CEST 2020
Hi!
> > I guess that we still need a test where select would clear the bits from
> > fd->set though, I supposes that the easiest solution would be to add
> > select04.c for that...
>
> I am not sure how to do that and why would that matter ? :)
So the tests we do have now are checking that the bits in the fdset are
not cleared when there are data ready to be read/written from/to the
filke descriptor, right?
What we need is a test where we ask for a data to be read from an empty
pipe, ask for data to be written to a pipe filled with data (write there
till we get EAGAIN in setup), etc. We can do this with a very short
timeout or even with a timeout set to zero (polling) and check that the
bits were cleared once we have returned from the call.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list