Message ID | 20220901093303.1974274-12-dylany@fb.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Defer taskrun changes | expand |
diff --git a/test/file-verify.c b/test/file-verify.c index 595dafd4bd8d..3a395f9dccda 100644 --- a/test/file-verify.c +++ b/test/file-verify.c @@ -430,6 +430,10 @@ static int test(struct io_uring *ring, const char *fname, int buffered, fprintf(stderr, "bad read %d, read %d\n", cqe->res, i); goto err; } + if (cqe->res < CHUNK_SIZE) { + fprintf(stderr, "short read %d, read %d\n", cqe->res, i); + goto err; + } if (cqe->flags & IORING_CQE_F_BUFFER) index = cqe->flags >> 16; else
This test assumes any success is a full read. If it was a short read the test would still fail (as verification would fail) but tracking down the reason can be annoying. For now we can just log if it's short and fail at that point. Signed-off-by: Dylan Yudaken <dylany@fb.com> --- test/file-verify.c | 4 ++++ 1 file changed, 4 insertions(+)