From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>,
"Daniel P. Berrange" <berrange@redhat.com>
Subject: [Qemu-devel] [PATCH 1/6] iotests: throw away test timings if args change
Date: Mon, 19 Sep 2016 18:35:39 +0100 [thread overview]
Message-ID: <1474306544-24708-2-git-send-email-berrange@redhat.com> (raw)
In-Reply-To: <1474306544-24708-1-git-send-email-berrange@redhat.com>
The 'check' program records timings for each test that
is run. These timings are only valid, however, for a
particular format/protocol combination. So if frequently
running 'check' with a variety of different formats or
protocols, the times printed can be very misleading.
Record the protocol/format in the check.time file and
throw it away if it doesn't mach the current run args.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
tests/qemu-iotests/check | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 4cba215..1a9bbb7 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -142,6 +142,11 @@ _timestamp()
echo -n " [$now]"
}
+_timestamp_args()
+{
+ echo "# ARGS: protocol=$IMGPROTO, format=$IMGFMT"
+}
+
_wrapup()
{
# for hangcheck ...
@@ -158,13 +163,14 @@ _wrapup()
if [ -f check.time -a -f $tmp.time ]
then
cat check.time $tmp.time \
- | $AWK_PROG '
+ | grep -v '# ' | $AWK_PROG '
{ t[$1] = $2 }
END { if (NR > 0) {
for (i in t) print i " " t[i]
}
}' \
| sort -n >$tmp.out
+ _timestamp_args >> $tmp.out
mv $tmp.out check.time
fi
@@ -223,7 +229,18 @@ echo "preamble" > "${TEST_DIR}"/check.sts
# don't leave old full output behind on a clean run
rm -f check.full
-[ -f check.time ] || touch check.time
+# Check if previously recorded times were for the same
+# image format/protocol, otherwise discard them
+if test -f check.time
+then
+ OLDARGS=`grep ARGS check.time`
+ NEWARGS=`_timestamp_args`
+ if test "x$OLDARGS" != "x$NEWARGS"
+ then
+ rm -f check.time
+ fi
+fi
+touch check.time
FULL_IMGFMT_DETAILS=`_full_imgfmt_details`
FULL_IMGPROTO_DETAILS=`_full_imgproto_details`
--
2.7.4
next prev parent reply other threads:[~2016-09-19 17:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-19 17:35 [Qemu-devel] [PATCH 0/6] Improve I/O tests coverage of LUKS Daniel P. Berrange
2016-09-19 17:35 ` Daniel P. Berrange [this message]
2016-09-19 19:53 ` [Qemu-devel] [PATCH 1/6] iotests: throw away test timings if args change Eric Blake
2016-09-20 9:36 ` Daniel P. Berrange
2016-09-20 14:06 ` Eric Blake
2016-09-20 14:15 ` Daniel P. Berrange
2016-09-20 14:38 ` Eric Blake
2016-09-20 14:39 ` Daniel P. Berrange
2016-10-31 14:28 ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2016-10-31 14:34 ` Daniel P. Berrange
2016-09-19 17:35 ` [Qemu-devel] [PATCH 2/6] iotests: fix remainining tests to work with LUKS Daniel P. Berrange
2016-09-19 17:35 ` [Qemu-devel] [PATCH 3/6] iotests: reduce PBKDF iterations when testing LUKS Daniel P. Berrange
2016-09-19 17:35 ` [Qemu-devel] [PATCH 4/6] iotests: add more LUKS hash combination tests Daniel P. Berrange
2016-09-19 17:35 ` [Qemu-devel] [PATCH 5/6] iotests: chown LUKS device before qemu-io launches Daniel P. Berrange
2016-09-19 17:35 ` [Qemu-devel] [PATCH 6/6] iotests: use _filter_qemu with test 140 Daniel P. Berrange
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=1474306544-24708-2-git-send-email-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.