On 2012年03月08日 19:54, Cyril Hrubis wrote: > Hi! >> aio_read/8-1.c "fills in an aiocb with a NULL aio_buf" and then expect >> that the operation is not succesfully queued. >> It fails that aio_read() always return 0. And I checked the posix spec >> and didn't find that an aiocb with NULL aio_buf will cause enqueue fails. >> So is this case valid?
Hi Cyril, > The testcase passes here. However looking at the sources it tries to > read zero bytes to NULL buffer, which is wrong as the behavior in such > case is undefied by POSIX. I guess this is just another case where the > testcase was coded with "It works so it must be right" attitude. > > And out of curiosity, which libc library makes the testcase fail? Yes, aio_read() return 0, and the case fails. In posix spec Line 19887: RETURN VALUE The aio_read( ) function shall return the value zero if the I/O operation is successfully queued; otherwise, the function shall return the value −1 and set errno to indicate the error. So when the I/O operation enqueued, aio_read() return 0, then that the I/O operation will be processing. I still doubt the case is invalid. What do you think? Thanks. Regards, Kai > ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
