[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/17] qemu-iotests: Reduce racy output in 028
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 04/17] qemu-iotests: Reduce racy output in 028 |
Date: |
Wed, 20 Jan 2016 17:24:53 +0100 |
From: Eric Blake <address@hidden>
On my machine, './check -qcow2 028' was failing about 80% of the
time, due to a race in how many times the repeated attempts
to run 'info block-jobs' could occur before the job was done,
showing up as a failure of fewer '(qemu) ' prompts than in the
expected output. Silence the output during the repetitions, then
add a final clean command to keep the expected output useful;
once patched, I was finally able to run the test 20 times in a
row with no failures.
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
tests/qemu-iotests/028 | 6 ++++--
tests/qemu-iotests/028.out | 3 ---
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/tests/qemu-iotests/028 b/tests/qemu-iotests/028
index 009510d..4909b9b 100755
--- a/tests/qemu-iotests/028
+++ b/tests/qemu-iotests/028
@@ -114,10 +114,12 @@ h=$QEMU_HANDLE
QEMU_COMM_TIMEOUT=1
# Silence output since it contains the disk image path and QEMU's readline
-# character echoing makes it very hard to filter the output
+# character echoing makes it very hard to filter the output. Plus, there
+# is no telling how many times the command will repeat before succeeding.
_send_qemu_cmd $h "drive_backup disk ${TEST_IMG}.copy" "(qemu)" >/dev/null
_send_qemu_cmd $h "" "Formatting" | _filter_img_create
-qemu_cmd_repeat=20 _send_qemu_cmd $h "info block-jobs" "No active jobs"
+qemu_cmd_repeat=20 _send_qemu_cmd $h "info block-jobs" "No active jobs"
>/dev/null
+_send_qemu_cmd $h "info block-jobs" "No active jobs"
_send_qemu_cmd $h 'quit' ""
# Base image sectors
diff --git a/tests/qemu-iotests/028.out b/tests/qemu-iotests/028.out
index 279029d..acd2870 100644
--- a/tests/qemu-iotests/028.out
+++ b/tests/qemu-iotests/028.out
@@ -469,10 +469,7 @@ No errors were found on the image.
block-backup
Formatting 'TEST_DIR/t.IMGFMT.copy', fmt=IMGFMT size=4294968832
backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
-(qemu)
(qemu) i[K[Din[K[D[Dinf[K[D[D[Dinfo[K[D[D[D[Dinfo
[K[D[D[D[D[Dinfo b[K[D[D[D[D[D[Dinfo
bl[K[D[D[D[D[D[D[Dinfo blo[K[D[D[D[D[D[D[D[Dinfo
bloc[K[D[D[D[D[D[D[D[D[Dinfo
block[K[D[D[D[D[D[D[D[D[D[Dinfo
block-[K[D[D[D[D[D[D[D[D[D[D[Dinfo
block-j[K[D[D[D[D[D[D[D[D[D[D[D[Dinfo
block-jo[K[D[D[D[D[D[D[D[D[D[D[D[D[Dinfo
block-job[K[D[D[D[D[D[D[D[D[D[D[D[D[D[Dinfo block-jobs[K
-Type backup, device disk: Completed 0 of 4294968832 bytes, speed limit 0
bytes/s
-i[K[Din[K[D[Dinf[K[D[D[Dinfo[K[D[D[D[Dinfo
[K[D[D[D[D[Dinfo b[K[D[D[D[D[D[Dinfo
bl[K[D[D[D[D[D[D[Dinfo blo[K[D[D[D[D[D[D[D[Dinfo
bloc[K[D[D[D[D[D[D[D[D[Dinfo
block[K[D[D[D[D[D[D[D[D[D[Dinfo
block-[K[D[D[D[D[D[D[D[D[D[D[Dinfo
block-j[K[D[D[D[D[D[D[D[D[D[D[D[Dinfo
block-jo[K[D[D[D[D[D[D[D[D[D[D[D[D[Dinfo
block-job[K[D[D[D[D[D[D[D[D[D[D[D[D[D[Dinfo block-jobs[K
No active jobs
=== IO: pattern 195
read 512/512 bytes at offset 3221194240
--
1.8.3.1
- [Qemu-devel] [PULL 00/17] Block patches, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 03/17] qemu-img: Speed up comparing empty/zero images, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 02/17] block/raw-posix: avoid bogus fixup for cylinders on DASD disks, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 01/17] block: Fix .bdrv_open flags, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 07/17] qcow2: Write full header on image creation, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 08/17] block: Assert no write requests under BDRV_O_INCOMING, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 04/17] qemu-iotests: Reduce racy output in 028,
Kevin Wolf <=
- [Qemu-devel] [PULL 09/17] block: Fix error path in bdrv_invalidate_cache(), Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 06/17] qcow2: Write feature table only for v3 images, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 10/17] block: Rename BDRV_O_INCOMING to BDRV_O_INACTIVE, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 13/17] qcow2: Fix BDRV_O_INACTIVE handling in qcow2_invalidate_cache(), Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 12/17] qcow2: Implement .bdrv_inactivate, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 15/17] vmdk: Create streamOptimized as version 3, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 14/17] qcow2: Make image inaccessible after failed qcow2_invalidate_cache(), Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 17/17] iotests: Test that throttle values ranges, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 16/17] blockdev: Error out on negative throttling option values, Kevin Wolf, 2016/01/20