Closed finist0 closed 1 year ago
Just noted you prefer emails, so do i, i have sent: https://lists.linux.it/pipermail/ltp/2023-May/033915.html https://lists.linux.it/pipermail/ltp/2023-May/033916.html
Please, feel free to close this pull request.
Thank you.
Sometimes we got failures like:
Which looked strange as partial write is something usual and valid. It turned out that lio_write_buffer() has the code cycle writes in case of a partial write happens, but it anyway returns the amount of bytes written by the LAST write.
And upper growfile() consider the returned amount from lio_write_buffer() to be less than it tried to write and fails the testcase.
Fix lio_write_buffer() to always return total bytes written, even in case partial writes.
Similar for lio_read_buffer() , it needs to return total amount of read bytes in case of partial reads.
Signed-off-by: Konstantin Khorenko khorenko@virtuozzo.com