[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 05/21] iotests: record separate timings per format, p
From: |
Max Reitz |
Subject: |
[Qemu-block] [PULL 05/21] iotests: record separate timings per format, protocol pair |
Date: |
Sun, 12 Feb 2017 02:36:48 +0100 |
From: "Daniel P. Berrange" <address@hidden>
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.
Instead of having a single 'check.time' file, maintain
multiple 'check.time-$IMGPROTO-$IMGFMT' files.
Signed-off-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/Makefile | 2 +-
tests/qemu-iotests/.gitignore | 2 +-
tests/qemu-iotests/check | 12 +++++++-----
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/tests/qemu-iotests/Makefile b/tests/qemu-iotests/Makefile
index 2fb527c5b5..27380e60c1 100644
--- a/tests/qemu-iotests/Makefile
+++ b/tests/qemu-iotests/Makefile
@@ -1,5 +1,5 @@
-CLEANFILES= *.out.bad *.notrun check.log check.time
+CLEANFILES= *.out.bad *.notrun check.log check.time*
# no default target
default:
diff --git a/tests/qemu-iotests/.gitignore b/tests/qemu-iotests/.gitignore
index 0711cbdbf3..da62054000 100644
--- a/tests/qemu-iotests/.gitignore
+++ b/tests/qemu-iotests/.gitignore
@@ -1,5 +1,5 @@
check.log
-check.time
+check.time*
common.env
*.out.bad
*.notrun
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 4cba2151e4..4b1c6749b7 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -129,6 +129,8 @@ fi
# exit 1
#fi
+TIMESTAMP_FILE=check.time-$IMGPROTO-$IMGFMT
+
tmp="${TEST_DIR}"/$$
_wallclock()
@@ -155,9 +157,9 @@ _wrapup()
:
elif $needwrap
then
- if [ -f check.time -a -f $tmp.time ]
+ if [ -f $TIMESTAMP_FILE -a -f $tmp.time ]
then
- cat check.time $tmp.time \
+ cat $TIMESTAMP_FILE $tmp.time \
| $AWK_PROG '
{ t[$1] = $2 }
END { if (NR > 0) {
@@ -165,7 +167,7 @@ END { if (NR > 0) {
}
}' \
| sort -n >$tmp.out
- mv $tmp.out check.time
+ mv $tmp.out $TIMESTAMP_FILE
fi
if [ -f $tmp.expunged ]
@@ -223,7 +225,7 @@ 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
+[ -f $TIMESTAMP_FILE ] || touch $TIMESTAMP_FILE
FULL_IMGFMT_DETAILS=`_full_imgfmt_details`
FULL_IMGPROTO_DETAILS=`_full_imgproto_details`
@@ -277,7 +279,7 @@ do
# really going to try and run this one
#
rm -f $seq.out.bad
- lasttime=`sed -n -e "/^$seq /s/.* //p" <check.time`
+ lasttime=`sed -n -e "/^$seq /s/.* //p" <$TIMESTAMP_FILE`
if [ "X$lasttime" != X ]; then
echo -n " ${lasttime}s ..."
else
--
2.11.0
- [Qemu-block] [PULL 00/21] Block patches, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 01/21] iotests: Fix a problem in common.filter, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 02/21] qemu-img: Improve commit invalid base message, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 03/21] qapi: Tweak error message of bdrv_query_image_info, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 04/21] iotests: Fix reference output for 059, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 05/21] iotests: record separate timings per format, protocol pair,
Max Reitz <=
- [Qemu-block] [PULL 06/21] block/vmdk: Fix the endian problem of buf_len and lba, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 07/21] block: check full backing filename when searching protocol filenames, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 08/21] qemu-iotests: Don't create fifos / pidfiles with protocol paths, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 09/21] qemu-iotest: test to lookup protocol-based image with relative backing, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 11/21] block/qapi: reduce the execution time of qmp_query_blockstats, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 10/21] block/qapi: reduce the coupling between the bdrv_query_stats and bdrv_query_bds_stats, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 12/21] block: bdrv_invalidate_cache: invalidate children first, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 13/21] block/nfs: fix NULL pointer dereference in URI parsing, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 14/21] block/nfs: fix naming of runtime opts, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 16/21] qemu-iotests: Add _unsupported_fmt helper, Max Reitz, 2017/02/11