fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] aio-dio-regress: code clarification
@ 2019-08-05 22:49 Andreas Gruenbacher
  0 siblings, 0 replies; only message in thread
From: Andreas Gruenbacher @ 2019-08-05 22:49 UTC (permalink / raw)
  To: fstests; +Cc: Andreas Gruenbacher

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-08-05 22:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05 22:49 [PATCH] aio-dio-regress: code clarification Andreas Gruenbacher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).