qemu-e2k/tests/qemu-iotests
Stefan Hajnoczi 21794244d4 qemu-iotests: fix 203 migration completion race
There is a race between the test's 'query-migrate' QMP command after the
QMP 'STOP' event and completing the migration:

The test case invokes 'query-migrate' upon receiving 'STOP'.  At this
point the migration thread may still be in the process of completing.
Therefore 'query-migrate' can return 'status': 'active' for a brief
window of time instead of 'status': 'completed'.  This results in
qemu-iotests 203 hanging.

Solve the race by enabling the 'events' migration capability, which
causes QEMU to emit migration-specific QMP events that do not suffer
from this race condition.  Wait for the QMP 'MIGRATION' event with
'status': 'completed'.

Reported-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20180305155926.25858-1-stefanha@redhat.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-03-09 15:40:07 +01:00
..
sample_images iotests: Fix CID for VMDK afl image 2018-02-13 12:27:17 +01:00
.gitignore
001
001.out
002
002.out
003
003.out
004
004.out
005
005.out
007
007.out
008
008.out
009
009.out
010
010.out
011
011.out
012
012.out
013
013.out
014
014.out
015
015.out
017
017.out
018
018.out
019
019.out
020 iotests: Fix 020 for vmdk 2018-01-23 12:34:43 +01:00
020.out iotests: Fix 020 for vmdk 2018-01-23 12:34:43 +01:00
021
021.out
022
022.out
023
023.out
024
024.out
025
025.out
026
026.out
026.out.nocache
027
027.out
028
028.out
029
029.out
030 iotests: Tweak 030 in order to trigger a race condition with parallel jobs 2018-03-09 15:40:07 +01:00
030.out iotests: Tweak 030 in order to trigger a race condition with parallel jobs 2018-03-09 15:40:07 +01:00
031
031.out
032
032.out
033 iotest 033: add misaligned write-zeroes test via truncate 2018-03-02 18:39:07 +01:00
033.out iotest 033: add misaligned write-zeroes test via truncate 2018-03-02 18:39:07 +01:00
034
034.out
035
035.out
036
036.out
037
037.out
038
038.out
039
039.out qemu-iotests: limit non-_PROG-suffixed variables to common.rc 2017-10-06 16:28:58 +02:00
040 iotests: Add missing 'blkdebug::' in 040 2017-11-14 18:06:25 +01:00
040.out
041
041.out
042
042.out
043
043.out
044
044.out
045
045.out
046
046.out
047
047.out
048
048.out
049
049.out qcow2: Use visitor for options in qcow2_create() 2018-03-09 15:17:47 +01:00
050
050.out
051 scsi: Remove automatic creation of SCSI controllers with -drive if=scsi 2018-03-06 14:00:59 +01:00
051.out iotests: Fix 051 for compat=0.10 2018-01-23 12:34:43 +01:00
051.pc.out iotests: Fix 051 for compat=0.10 2018-01-23 12:34:43 +01:00
052
052.out
053
053.out
054
054.out
055 iotests: Make 055 less flaky 2017-11-14 18:06:25 +01:00
055.out
056
056.out
057
057.out
058 nbd-client: Refuse read-only client with BDRV_O_RDWR 2017-11-09 10:10:17 -06:00
058.out
059 iotests: Skip test for ENOMEM error 2018-03-09 15:40:07 +01:00
059.out iotests: Fix CID for VMDK afl image 2018-02-13 12:27:17 +01:00
060 qcow2: Repair unaligned preallocated zero clusters 2018-01-23 12:34:42 +01:00
060.out qcow2: Repair unaligned preallocated zero clusters 2018-01-23 12:34:42 +01:00
061 iotests: Test downgrading an image using a small L2 slice size 2018-02-13 17:00:00 +01:00
061.out iotests: Test downgrading an image using a small L2 slice size 2018-02-13 17:00:00 +01:00
062
062.out
063
063.out
064
064.out
065
065.out
066
066.out
067 iotests: Fix 067 for compat=0.10 2018-01-23 12:34:43 +01:00
067.out iotests: Fix 067 for compat=0.10 2018-01-23 12:34:43 +01:00
068
068.out
069
069.out
070
070.out
071
071.out
072
072.out
073
073.out
074
074.out qemu-img: Drop redundant error message in compare 2017-10-26 14:45:57 +02:00
075 iotests: fix 075 and 078 2017-11-27 11:25:41 +01:00
075.out
076
076.out
077 iotests: 077: Filter out 'resume' lines 2017-11-14 18:06:25 +01:00
077.out iotests: 077: Filter out 'resume' lines 2017-11-14 18:06:25 +01:00
078 iotests: fix 075 and 078 2017-11-27 11:25:41 +01:00
078.out
079
079.out
080 qcow2: Make qemu-img check detect corrupted L1 tables in snapshots 2018-03-09 15:17:47 +01:00
080.out qcow2: Make qemu-img check detect corrupted L1 tables in snapshots 2018-03-09 15:17:47 +01:00
081
081.out
082
082.out
083 iotests: Make 083 less flaky 2017-11-14 18:06:25 +01:00
083.out nbd: Minimal structured read for client 2017-10-30 21:48:41 +01:00
084
084.out
085
085.out
086
086.out
087 iotests: Make 087 pass without AIO enabled 2017-11-17 18:21:31 +01:00
087.out
088
088.out
089 iotests: Make 089 compatible with compat=0.10 2018-01-23 12:34:43 +01:00
089.out iotests: Make 089 compatible with compat=0.10 2018-01-23 12:34:43 +01:00
090
090.out
091
091.out
092
092.out
093 blockdev: Mark BD-{remove,insert}-medium stable 2018-01-23 12:34:42 +01:00
093.out qemu-iotests: Test I/O limits with removable media 2017-11-13 15:46:26 +00:00
094
094.out
095
095.out
096 iotests: Mark all tests executable 2018-03-09 15:40:07 +01:00
096.out
097
097.out
098
098.out
099
099.out
101
101.out
102 qemu-iotests: Fix locking issue in 102 2018-01-23 12:34:42 +01:00
102.out qemu-iotests: Fix locking issue in 102 2018-01-23 12:34:42 +01:00
103 iotests: Test valid values of l2-cache-entry-size 2018-02-13 17:00:00 +01:00
103.out iotests: Test valid values of l2-cache-entry-size 2018-02-13 17:00:00 +01:00
104
104.out
105
105.out
106 qemu-img: add --shrink flag for resize 2017-09-26 15:00:32 +02:00
106.out
107
107.out
108
108.out
109
109.out
110
110.out
111
111.out
112
112.out qcow2: Use visitor for options in qcow2_create() 2018-03-09 15:17:47 +01:00
113
113.out
114
114.out
115
115.out
116
116.out
117
117.out
118 blockdev: Mark BD-{remove,insert}-medium stable 2018-01-23 12:34:42 +01:00
118.out
119
119.out
120
120.out
121
121.out
122
122.out
123
123.out
124 iotests: Mark all tests executable 2018-03-09 15:40:07 +01:00
124.out
125 iotests: Add cluster_size=64k to 125 2017-10-26 15:01:14 +02:00
125.out iotests: Add cluster_size=64k to 125 2017-10-26 15:01:14 +02:00
126
126.out
127 iotests: Add test for dataplane mirroring 2017-10-26 15:01:13 +02:00
127.out iotests: Add test for dataplane mirroring 2017-10-26 15:01:13 +02:00
128
128.out
129 iotests: Mark all tests executable 2018-03-09 15:40:07 +01:00
129.out
130 iotests: Disable some tests for compat=0.10 2018-01-23 12:34:43 +01:00
130.out
131
131.out
132 iotests: Mark all tests executable 2018-03-09 15:40:07 +01:00
132.out
133 iotests: Add test for non-string option reopening 2017-11-17 18:21:30 +01:00
133.out iotests: Add test for non-string option reopening 2017-11-17 18:21:30 +01:00
134
134.out
135
135.out
136 iotests: Mark all tests executable 2018-03-09 15:40:07 +01:00
136.out
137 iotests: Add l2-cache-entry-size to iotest 137 2018-02-13 17:00:00 +01:00
137.out iotests: Add l2-cache-entry-size to iotest 137 2018-02-13 17:00:00 +01:00
138
138.out
139 iotests: Mark all tests executable 2018-03-09 15:40:07 +01:00
139.out
140 nbd-client: Refuse read-only client with BDRV_O_RDWR 2017-11-09 10:10:17 -06:00
140.out
141
141.out
142
142.out
143
143.out
144
144.out
145
145.out
146
146.out
147 iotest 147: add cases to test new @name parameter of nbd-server-add 2018-01-26 09:37:21 -06:00
147.out iotest 147: add cases to test new @name parameter of nbd-server-add 2018-01-26 09:37:21 -06:00
148 iotests: Mark all tests executable 2018-03-09 15:40:07 +01:00
148.out
149
149.out
150
150.out
152 iotests: Mark all tests executable 2018-03-09 15:40:07 +01:00
152.out
153 iotests: Test creating overlay when guest running 2018-03-09 15:40:07 +01:00
153.out iotests: Test creating overlay when guest running 2018-03-09 15:40:07 +01:00
154
154.out
155 iotests: Use virtio-blk in 155 2018-02-13 12:27:17 +01:00
155.out
156
156.out
157
157.out
158
158.out
159
159.out
160
160.out
162
162.out
163 iotests: Mark all tests executable 2018-03-09 15:40:07 +01:00
163.out qemu-iotests: add shrinking image test 2017-09-26 15:00:32 +02:00
165 block: maintain persistent disabled bitmaps 2018-02-13 16:59:58 +01:00
165.out
170
170.out
171
171.out
172 qemu-iotests: Add missing -machine accel=qtest 2017-09-26 14:46:23 +02:00
172.out hw/block/fdc: Convert to realize 2017-09-18 19:43:38 -04:00
173
173.out
174
174.out
175
175.out
176 block: maintain persistent disabled bitmaps 2018-02-13 16:59:58 +01:00
176.out iotests: Fix 176 on 32-bit host 2017-11-21 14:54:02 +01:00
177 iotests: Split 177 into two parts for compat=0.10 2018-01-23 12:34:43 +01:00
177.out iotests: Split 177 into two parts for compat=0.10 2018-01-23 12:34:43 +01:00
178
178.out.qcow2
178.out.raw
179
179.out
181 iotests: fix 181: enable postcopy-ram capability on target 2017-09-26 14:46:23 +02:00
181.out iotests: fix 181: enable postcopy-ram capability on target 2017-09-26 14:46:23 +02:00
182 qemu-iotests: Use -nographic in 182 2017-11-17 13:35:59 +01:00
182.out
183
183.out
184 iotests: Make 184 image-less 2018-01-23 12:34:43 +01:00
184.out iotests: Make 184 image-less 2018-01-23 12:34:43 +01:00
185
185.out
186 qemu-iotests: Add missing -machine accel=qtest 2017-09-26 14:46:23 +02:00
186.out
187
187.out qemu-io: Drop write permissions before read-only reopen 2017-09-26 14:46:23 +02:00
188
188.out
189
189.out
190
190.out
191 iotests: Make 191 work with qcow2 options 2018-01-23 12:34:43 +01:00
191.out iotests: Make 191 work with qcow2 options 2018-01-23 12:34:43 +01:00
192
192.out
194 qemu-iotests: update unsupported image formats in 194 2017-11-14 18:06:26 +01:00
194.out
195 iotests: Fix 195 if IMGFMT is part of TEST_DIR 2017-10-06 16:30:47 +02:00
195.out qemu-iotests: Test change-backing-file command 2017-09-26 14:46:23 +02:00
196 iotests: test clearing unknown autoclear_features by qcow2 2017-11-17 18:06:21 +01:00
196.out iotests: test clearing unknown autoclear_features by qcow2 2017-11-17 18:06:21 +01:00
197 iotests: fix 197 for vpc 2017-12-22 15:03:41 +01:00
197.out iotests: Add test 197 for covering copy-on-read 2017-10-06 16:28:58 +02:00
198 iotests: Filter compat-dependent info in 198 2018-01-23 12:34:43 +01:00
198.out iotests: Filter compat-dependent info in 198 2018-01-23 12:34:43 +01:00
200 iotests: Make 200 run on tmpfs 2018-01-31 22:37:00 -05:00
200.out qemu-iotest: add test for blockjob coroutine race condition 2017-11-21 11:58:12 -05:00
201 tests/qemu-iotests: adding savevm/loadvm with postcopy flag test 2018-01-23 12:33:07 +01:00
201.out tests/qemu-iotests: adding savevm/loadvm with postcopy flag test 2018-01-23 12:33:07 +01:00
202 qemu-iotests: add 202 external snapshots IOThread test 2017-12-19 10:25:09 +00:00
202.out qemu-iotests: add 202 external snapshots IOThread test 2017-12-19 10:25:09 +00:00
203 qemu-iotests: fix 203 migration completion race 2018-03-09 15:40:07 +01:00
203.out qemu-iotests: fix 203 migration completion race 2018-03-09 15:40:07 +01:00
204 iotests: Split 177 into two parts for compat=0.10 2018-01-23 12:34:43 +01:00
204.out iotests: Split 177 into two parts for compat=0.10 2018-01-23 12:34:43 +01:00
205 iotests: Mark all tests executable 2018-03-09 15:40:07 +01:00
205.out iotest 205: new test for qmp nbd-server-remove 2018-01-26 09:37:21 -06:00
206 qemu-iotests: Test qcow2 over file image creation with QMP 2018-03-09 15:17:48 +01:00
206.out qemu-iotests: Test qcow2 over file image creation with QMP 2018-03-09 15:17:48 +01:00
207 qemu-iotests: Test ssh image creation over QMP 2018-03-09 15:17:48 +01:00
207.out qemu-iotests: Test ssh image creation over QMP 2018-03-09 15:17:48 +01:00
check iotests: Restore stty settings on completion 2017-10-06 16:28:58 +02:00
common.config qemu-iotests: disintegrate more parts of common.config 2017-10-06 16:28:58 +02:00
common.filter iotests: Drop format-specific in _filter_img_info 2018-01-23 12:34:43 +01:00
common.pattern
common.qemu qemu-iotests: add option in common.qemu for mismatch only 2017-11-21 11:58:12 -05:00
common.rc iotests: Fix _img_info for backslashes 2018-01-23 12:34:43 +01:00
COPYING
group qemu-iotests: Test ssh image creation over QMP 2018-03-09 15:17:48 +01:00
iotests.py iotests: 205: support luks format 2018-02-09 12:32:44 -06:00
Makefile
nbd-fault-injector.py nbd: rename some simple-request related objects to be _simple_ 2017-10-12 16:27:34 -05:00
qcow2.py
qed.py
README
socket_scm_helper.c

=== This is the QEMU I/O test suite ===

* Intro

This package contains a simple test suite for the I/O layer of qemu.
It does not require a guest, but only the qemu, qemu-img and qemu-io
binaries.  This does limit it to exercise the low-level I/O path only
but no actual block drivers like ide, scsi or virtio.

* Usage

Just run ./check to run all tests for the raw image format, or ./check
-qcow2 to test the qcow2 image format.  The output of ./check -h explains
additional options to test further image formats or I/O methods.

* Feedback and patches

Please send improvements to the test suite, general feedback or just
reports of failing tests cases to qemu-devel@nongnu.org with a CC:
to qemu-block@nongnu.org.