qemu/tests/qemu-iotests
John Snow 4897629173 iotests/040: Fix TestCommitWithFilters test
Without this change, asserting that qemu_io always returns 0 causes this
test to fail in a way we happened not to be catching previously:

 qemu.utils.VerboseProcessError: Command
  '('/home/jsnow/src/qemu/bin/git/tests/qemu-iotests/../../qemu-io',
  '--cache', 'writeback', '--aio', 'threads', '-f', 'qcow2', '-c',
  'read -P 4 3M 1M',
  '/home/jsnow/src/qemu/bin/git/tests/qemu-iotests/scratch/3.img')'
  returned non-zero exit status 1.
  ┏━ output ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  ┃ qemu-io: can't open device
  ┃ /home/jsnow/src/qemu/bin/git/tests/qemu-iotests/scratch/3.img:
  ┃ Could not open backing file: Could not open backing file: Throttle
  ┃ group 'tg' does not exist
  ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The commit jobs changes the backing file string stored in the image file
header belonging to the node above the commit’s top node to point to the
commit target (the base node).  QEMU tries to be as accurate as
possible, and so in these test cases will include the filter that is
part of the block graph in that backing file string (by virtue of making
it a json:{} description of the post-commit subgraph).  This makes
little sense outside of QEMU, though: Specifically, the throttle node in
that subgraph will dearly miss its supposedly associated throttle group
object.

When starting the commit job, we can specify a custom backing file
string to write into said image file, so let’s use that feature to write
the plain filename of the backing chain’s next actual image file there.

Explicitly provide the backing file so that opening the file outside of
QEMU (Where we will not have throttle groups) will succeed.

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20220418211504.943969-6-jsnow@redhat.com>
2022-04-25 14:30:09 +02:00
..
001
002
003
004
005
2021-05-12 17:42:23 +02:00
007
008
009
010
011
012
013
014
015
017
018
019
020
021
022
023
024
026
029
030
2022-03-29 16:30:55 +02:00
032
033
034
035
037
038
041
2022-03-29 16:30:55 +02:00
042
043
044
2022-02-01 10:51:39 +01:00
045
046
2021-03-29 18:06:14 +02:00
2021-03-29 18:06:14 +02:00
047
048
049
050
2021-10-15 16:06:23 +02:00
052
053
054
055
057
058
063
065
2022-04-20 10:14:05 +02:00
073
075
076
077
078
079
080
081
082
083
086
087
088
092
096
101
104
109
114
2021-07-09 13:18:32 +02:00
116
2021-03-29 14:13:55 +02:00
118
124
128
130
131
132
133
134
136
137
2022-02-01 10:51:39 +01:00
2021-12-28 15:18:59 +01:00
145
147
148
149
2022-03-22 10:14:37 +01:00
152
154
155
2021-07-09 13:19:11 +02:00
157
158
159
160
161
163
2022-04-25 14:30:03 +02:00
170
171
172
2021-03-19 15:18:43 +01:00
174
175
177
178
179
181
183
184
185
2022-03-04 18:14:40 +01:00
2022-03-04 18:14:40 +01:00
186
187
188
190
191
195
197
201
204
205
206
2021-11-23 15:39:12 +01:00
207
2022-03-22 10:50:10 +01:00
2022-03-22 10:50:10 +01:00
208
209
2022-02-01 10:51:39 +01:00
2021-11-23 15:39:12 +01:00
211
2022-03-22 10:14:34 +01:00
2022-03-22 10:14:34 +01:00
212
213
214
2022-02-01 10:51:39 +01:00
215
217
219
220
221
223
226
227
232
236
239
243
247
248
2021-07-09 13:19:11 +02:00
2021-07-09 13:19:11 +02:00
249
253
256
2021-03-24 14:25:48 +00:00
263
265
267
268
270
272
273
2022-01-14 12:03:16 +01:00
277
279
282
283
2021-12-28 15:18:59 +01:00
2021-12-28 15:18:59 +01:00
284
286
288
289
292
293
294
295
297
2021-11-01 11:54:59 -04:00
298
2021-07-09 13:19:11 +02:00
299
301
2021-07-09 13:18:32 +02:00
302
2022-02-01 10:51:39 +01:00
2022-02-01 10:51:39 +01:00
2022-02-01 10:51:39 +01:00
304
305
308
2022-01-14 12:03:16 +01:00
2022-01-14 12:03:16 +01:00
312
313

=== 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.