src/aio-dio-eof-race: handle aio pwrite errors and short reads
authorOmar Sandoval <osandov@fb.com>
Thu, 12 Apr 2018 05:07:28 +0000 (22:07 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 22 Apr 2018 10:44:17 +0000 (18:44 +0800)
commitfdd096c9499ae91e10dab6e6444c560ca25d0a8f
tree4c8d28998377b9378cf14e4a0aa9055b5ea6cdc1
parent7ed53b9342ae89d0a9edb0105d6723840d7f40a5
src/aio-dio-eof-race: handle aio pwrite errors and short reads

generic/427 fails on Btrfs with a cryptic "pread: Success" message. This
is because an aio pwrite fails with ENOSPC, so the file isn't as long as
we expect it to be. Make sure we check the result of the aio writes and
also print a more explicit message for short reads (which are
technically valid but in practice shouldn't happen for this test case).
Now the test fails with a much more informative "pwrite: No space left
on device".

Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
src/aio-dio-regress/aio-dio-eof-race.c