From: Andreas Gruenbacher <agruenba@redhat.com>
To: fstests@vger.kernel.org
Cc: Andreas Gruenbacher <agruenba@redhat.com>
Subject: [PATCH] aio-dio-regress: code clarification
Date: Tue, 6 Aug 2019 00:49:29 +0200 [thread overview]
Message-ID: <20190805224929.25005-1-agruenba@redhat.com> (raw)
In this test, FILE_SIZE is defined as 300 but that definition isn't used
consistently. Make the code more obvious.
(Used by generic/210.)
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
src/aio-dio-regress/aio-dio-subblock-eof-read.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/aio-dio-regress/aio-dio-subblock-eof-read.c b/src/aio-dio-regress/aio-dio-subblock-eof-read.c
index 6f35b0e8..894965ea 100644
--- a/src/aio-dio-regress/aio-dio-subblock-eof-read.c
+++ b/src/aio-dio-regress/aio-dio-subblock-eof-read.c
@@ -63,7 +63,7 @@ main(int argc, char **argv)
/* <1> use normal disk read, this should be ok */
ret = read(fd, buffer, 4096);
if (ret != FILE_SIZE)
- fail("buffered read returned %d, should be 300\n", ret);
+ fail("buffered read returned %d, should be %d\n", ret, FILE_SIZE);
/* <2> use AIO disk read, it sees error. */
memset(&myiocb, 0, sizeof(myiocb));
@@ -89,7 +89,7 @@ main(int argc, char **argv)
fail("io_getevents returned %d\n", ret);
/*
- * If all goes well, we should see 300 bytes read. If things
+ * If all goes well, we should see FILE_SIZE bytes read. If things
* are broken, we may very well see a result of 4k.
*/
if (ie.res != FILE_SIZE)
--
2.20.1
reply other threads:[~2019-08-05 22:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190805224929.25005-1-agruenba@redhat.com \
--to=agruenba@redhat.com \
--cc=fstests@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox