summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-03-31 07:35:51 -0600
committerJens Axboe <axboe@kernel.dk>2021-03-31 07:35:51 -0600
commit2118351e6906c3f47723d2d31102bc2f1cd81b90 (patch)
tree3cc61776dcf36f1862343ead775444971335e022
parenta36a801cfb38b3ce0e97dac03696f5e5fc28b760 (diff)
downloadliburing-2118351e6906c3f47723d2d31102bc2f1cd81b90.tar.gz
liburing-2118351e6906c3f47723d2d31102bc2f1cd81b90.tar.bz2
test/pipe-reuse: ignore short read
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/pipe-reuse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/pipe-reuse.c b/test/pipe-reuse.c
index 9dc60ee..255bc2a 100644
--- a/test/pipe-reuse.c
+++ b/test/pipe-reuse.c
@@ -89,6 +89,9 @@ int main(int argc, char *argv[])
if (cqe->res < 0) {
fprintf(stderr, "Read error: %s\n", strerror(-cqe->res));
return 1;
+ } else if (cqe->res != sizeof(wbuf)) {
+ /* ignore short read, not a failure */
+ goto err;
}
io_uring_cqe_seen(&ring, cqe);