aio_read/8-1.c fails
Hi All,
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?
Thanks,
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
Quoted 7 lines · Kang Kai
Hi All,
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 thataio_read()always return 0. And I checked the posix spec and didn't find that an aiocb with NULLaio_bufwill cause enqueue fails. So is this case valid?
So does the case aio_write/6-1.c.
Quoted 4 lines
Thanks,
Kai
Quoted 9 lines
------------------------------------------------------------------------------
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
------------------------------------------------------------------------------
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
Hi!
Quoted 5 lines
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 thataio_read()always return 0. And I checked the posix spec and didn't find that an aiocb with NULLaio_bufwill cause enqueue fails. So is this case valid?
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?
Signature · 12 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ 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
Hi!
Quoted 15 lines
Quoted 6 lines
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
Theaio_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.
Quoted 3 lines
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.
Well, the POSIX explicitly says that if the pointer to the buffer becames illegal prior the I/O completion the behavior is undefined. So strictly speaking when you pass NULL buffer to aio_read() the behavior is undefined to begin with. At least that is how I understand the standard.
Signature · 12 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ 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