Re: [Qemu-devel] [PATCHv4 03/11] rewrite iov_* functions

2012-03-16 Thread Anthony Liguori
On 03/15/2012 04:00 PM, Michael Tokarev wrote: This changes implementations of all iov_* functions, completing the previous step. All iov_* functions now ensure that this offset argument is within the iovec (using assertion), but lets to specify `bytes' value larger than actual length of the

Re: [Qemu-devel] [PATCHv4 03/11] rewrite iov_* functions

2012-03-16 Thread Anthony Liguori
On 03/15/2012 04:00 PM, Michael Tokarev wrote: This changes implementations of all iov_* functions, completing the previous step. All iov_* functions now ensure that this offset argument is within the iovec (using assertion), but lets to specify `bytes' value larger than actual length of the

Re: [Qemu-devel] [PATCHv4 03/11] rewrite iov_* functions

2012-03-16 Thread Michael Tokarev
On 16.03.2012 20:17, Anthony Liguori wrote: It makes me nervous to make a change like this as it has wide impact on the rest of the code base. Could you include a unit test that tests the various boundary conditions of this code? Is the below code a good unit test? Thanks, /mjt

[Qemu-devel] [PATCHv4 03/11] rewrite iov_* functions

2012-03-15 Thread Michael Tokarev
This changes implementations of all iov_* functions, completing the previous step. All iov_* functions now ensure that this offset argument is within the iovec (using assertion), but lets to specify `bytes' value larger than actual length of the iovec - in this case they stops at the actual end