From: Christoph Hellwig <hch@infradead.org>
To: fstests@vger.kernel.org
Subject: fstests: fix fsx fallocate error messages
Date: Sat, 12 Nov 2016 08:48:49 -0800 [thread overview]
Message-ID: <20161112164849.GB18127@infradead.org> (raw)
Many of the commands using fallocate had an extra % at the beggining
of the error messages, missed the 0x prefix for hex output and printed
the length where it should print the end of the region.
Signed-off-by: Christoph Hellwig <hch@lst.de>
diff --git a/ltp/fsx.c b/ltp/fsx.c
index ebe8ecf..74a3b74 100644
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -964,7 +964,7 @@ do_punch_hole(unsigned offset, unsigned length)
offset, offset+length, length);
}
if (fallocate(fd, mode, (loff_t)offset, (loff_t)length) == -1) {
- prt("%punch hole: %x to %x\n", offset, length);
+ prt("punch hole: 0x%x to 0x%x\n", offset, offset + length);
prterr("do_punch_hole: fallocate");
report_failure(161);
}
@@ -1026,7 +1026,7 @@ do_zero_range(unsigned offset, unsigned length, int keep_size)
offset, offset+length, length);
}
if (fallocate(fd, mode, (loff_t)offset, (loff_t)length) == -1) {
- prt("%pzero range: %x to %x\n", offset, length);
+ prt("zero range: 0x%x to 0x%x\n", offset, offset + length);
prterr("do_zero_range: fallocate");
report_failure(161);
}
@@ -1076,7 +1076,7 @@ do_collapse_range(unsigned offset, unsigned length)
offset, offset+length, length);
}
if (fallocate(fd, mode, (loff_t)offset, (loff_t)length) == -1) {
- prt("collapse range: %x to %x\n", offset, length);
+ prt("collapse range: 0x%x to 0x%x\n", offset, offset + length);
prterr("do_collapse_range: fallocate");
report_failure(161);
}
@@ -1128,7 +1128,7 @@ do_insert_range(unsigned offset, unsigned length)
offset, offset+length, length);
}
if (fallocate(fd, mode, (loff_t)offset, (loff_t)length) == -1) {
- prt("insert range: %x to %x\n", offset, length);
+ prt("insert range: 0x%x to 0x%x\n", offset, offset + length);
prterr("do_insert_range: fallocate");
report_failure(161);
}
@@ -1193,7 +1193,7 @@ do_preallocate(unsigned offset, unsigned length, int keep_size)
prt("%lu falloc\tfrom 0x%x to 0x%x (0x%x bytes)\n", testcalls,
offset, offset + length, length);
if (fallocate(fd, keep_size ? FALLOC_FL_KEEP_SIZE : 0, (loff_t)offset, (loff_t)length) == -1) {
- prt("fallocate: %x to %x\n", offset, length);
+ prt("fallocate: 0x%x to 0x%x\n", offset, offset + length);
prterr("do_preallocate: fallocate");
report_failure(161);
}
next reply other threads:[~2016-11-12 16:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-12 16:48 Christoph Hellwig [this message]
2016-11-13 23:13 ` fstests: fix fsx fallocate error messages Dave Chinner
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=20161112164849.GB18127@infradead.org \
--to=hch@infradead.org \
--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