fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] src/append_reader.c: print more info when it reads bad data
@ 2020-11-05 15:05 Jeff Layton
  0 siblings, 0 replies; only message in thread
From: Jeff Layton @ 2020-11-05 15:05 UTC (permalink / raw)
  To: fstests

When append_reader gets bad data, print the actual and expected values.
This was helpful to me when hunting a failure in generic/069 on ceph
recently.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 src/append_reader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/append_reader.c b/src/append_reader.c
index 6b9e4f68e572..4660268f2f52 100644
--- a/src/append_reader.c
+++ b/src/append_reader.c
@@ -34,7 +34,7 @@ int main(int argc, char **argv)
 		}
 
 		if (d != i) {
-			fprintf(stderr, "bad data, offset = %u", i * 4);
+			fprintf(stderr, "bad data, offset = %u, got %d wanted %d\n", i * 4, d, i);
 			exit(1);
 		}
 	}
-- 
2.28.0


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

only message in thread, other threads:[~2020-11-05 15:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-05 15:05 [PATCH] src/append_reader.c: print more info when it reads bad data Jeff Layton

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).