From: Naohiro Aota Date: Tue, 22 Aug 2023 07:28:51 +0000 (+0900) Subject: aio-dio-write-verify: print more info on the error case X-Git-Tag: v2023.09.03~17 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c5e4bff3a8a4e88c75c72f387ac94cf910cc725a;p=xfstests-dev.git aio-dio-write-verify: print more info on the error case When short read or corruption happened, it is difficult to locate which IO event failed. Print the address to make it identifiable. Signed-off-by: Naohiro Aota Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- diff --git a/src/aio-dio-regress/aio-dio-write-verify.c b/src/aio-dio-regress/aio-dio-write-verify.c index 90e41b39..dabbfacd 100644 --- a/src/aio-dio-regress/aio-dio-write-verify.c +++ b/src/aio-dio-regress/aio-dio-write-verify.c @@ -267,13 +267,14 @@ static int io_verify(int fd) perror("pread"); return 1; } else if (sret != p->param->buf_size) { - fprintf(stderr, "short read %zd was less than %zu\n", - sret, p->param->buf_size); + fprintf(stderr, "short read %zd was less than %zu at %zu\n", + sret, p->param->buf_size, p->param->offset); return 1; } if (memcmp(p->param->buf, p->param->cmp_buf, p->param->buf_size)) { - printf("Find corruption\n"); + printf("Find corruption at %zu length %zu\n", p->param->offset, + p->param->buf_size); dump_buffer(p->param->buf, p->param->offset, p->param->buf_size); corrupted++;