Skip to contentSkip to conversation

xfstests: fix error msg in aio-dio-subblock-eof-read.c

PATCH New Eric Sandeen 3 participants 3 messages Mar 4, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests: fix error msg in aio-dio-subblock-eof-read.c

io_getevents returns the number of events; printing its return as "bytes read" is ... wrong.

---

src/aio-dio-regress/aio-dio-subblock-eof-read.c +2 -2
index a48841d..8f74cec 100644
@@ -105,8 +107,8 @@ main(int argc, char **argv)
 	 *  are broken, we may very well see a result of 4k.
 	 */
 	if (ie.res != FILE_SIZE)
-		fail("AIO read of last block in file returned %d bytes, "
-		     "expected %d\n", ret, FILE_SIZE);
+		fail("AIO read of last block in file returned %lu bytes, "
+		     "expected %d\n", ie.res, FILE_SIZE);
 
 	printf("AIO read of last block in file succeeded.\n");
 	return 0;

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw

PATCH v2 1/1 xfstests: fix error msg in aio-dio-subblock-eof-read.c

io_getevents returns the number of events; printing its return as "bytes read" is ... wrong.

---

V2: print as signed so we can easily see errors returned

src/aio-dio-regress/aio-dio-subblock-eof-read.c +2 -2
index a48841d..8f74cec 100644
@@ -105,8 +107,8 @@ main(int argc, char **argv)
 	 *  are broken, we may very well see a result of 4k.
 	 */
 	if (ie.res != FILE_SIZE)
-		fail("AIO read of last block in file returned %d bytes, "
-		     "expected %d\n", ret, FILE_SIZE);
+		fail("AIO read of last block in file returned %ld bytes, "
+		     "expected %d\n", ie.res, FILE_SIZE);
 
 	printf("AIO read of last block in file succeeded.\n");
 	return 0;

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v2 1/1
#2 lore raw
Quoted 8 lines · Eric Sandeen

io_getevents returns the number of events; printing its return as "bytes read" is ... wrong.

---

V2: print as signed so we can easily see errors returned

Quoted 17 lines
src/aio-dio-regress/aio-dio-subblock-eof-read.c +2 -2
index a48841d..8f74cec 100644
@@ -105,8 +107,8 @@ main(int argc, char **argv)
 	 *  are broken, we may very well see a result of 4k.
 	 */
 	if (ie.res != FILE_SIZE)
-		fail("AIO read of last block in file returned %d bytes, "
-		     "expected %d\n", ret, FILE_SIZE);
+		fail("AIO read of last block in file returned %ld bytes, "
+		     "expected %d\n", ie.res, FILE_SIZE);
 
 	printf("AIO read of last block in file succeeded.\n");
 	return 0;
Quoted 4 lines

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs