1
The following changes since commit ba49d760eb04630e7b15f423ebecf6c871b8f77b:
1
The following changes since commit 825b96dbcee23d134b691fc75618b59c5f53da32:
2
2
3
Merge tag 'pull-maintainer-final-130324-1' of https://gitlab.com/stsquad/qemu into staging (2024-03-13 15:12:14 +0000)
3
Merge tag 'migration-20250310-pull-request' of https://gitlab.com/farosas/qemu into staging (2025-03-11 09:32:07 +0800)
4
4
5
are available in the Git repository at:
5
are available in the Git repository at:
6
6
7
https://repo.or.cz/qemu/kevin.git tags/for-upstream
7
https://repo.or.cz/qemu/kevin.git tags/for-upstream
8
8
9
for you to fetch changes up to 39a94d7c34ce9d222fa9c0c99a14e20a567456d7:
9
for you to fetch changes up to df957115c46845e2c0ccc29ac0a75eb9700a9a0d:
10
10
11
iotests: adapt to output change for recently introduced 'detached header' field (2024-03-18 13:33:54 +0100)
11
scripts/qcow2-to-stdout.py: Add script to write qcow2 images to stdout (2025-03-13 17:57:23 +0100)
12
12
13
----------------------------------------------------------------
13
----------------------------------------------------------------
14
Block layer patches
14
Block layer patches
15
15
16
- mirror: Fix deadlock
16
- virtio-scsi: add iothread-vq-mapping parameter
17
- nbd/server: Fix race in draining the export
17
- Improve writethrough performance
18
- qemu-img snapshot: Fix formatting with large values
18
- Fix missing zero init in bdrv_snapshot_goto()
19
- Fix blockdev-snapshot-sync error reporting for no medium
19
- Added scripts/qcow2-to-stdout.py
20
- iotests fixes
20
- Code cleanup and iotests fixes
21
21
22
----------------------------------------------------------------
22
----------------------------------------------------------------
23
Abhiram Tilak (1):
23
Alberto Garcia (1):
24
qemu-img: Fix Column Width and Improve Formatting in snapshot list
24
scripts/qcow2-to-stdout.py: Add script to write qcow2 images to stdout
25
25
26
Fiona Ebner (1):
26
Kevin Wolf (8):
27
iotests: adapt to output change for recently introduced 'detached header' field
27
block: Remove unused blk_op_is_blocked()
28
block: Zero block driver state before reopening
29
file-posix: Support FUA writes
30
block/io: Ignore FUA with cache.no-flush=on
31
aio: Create AioPolledEvent
32
aio-posix: Factor out adjust_polling_time()
33
aio-posix: Separate AioPolledEvent per AioHandler
34
aio-posix: Adjust polling time also for new handlers
28
35
29
Kevin Wolf (3):
36
Stefan Hajnoczi (13):
30
mirror: Don't call job_pause_point() under graph lock
37
scsi-disk: drop unused SCSIDiskState->bh field
31
nbd/server: Fix race in draining the export
38
dma: use current AioContext for dma_blk_io()
32
iotests: Add test for reset/AioContext switches with NBD exports
39
scsi: track per-SCSIRequest AioContext
40
scsi: introduce requests_lock
41
virtio-scsi: introduce event and ctrl virtqueue locks
42
virtio-scsi: protect events_dropped field
43
virtio-scsi: perform TMFs in appropriate AioContexts
44
virtio-blk: extract cleanup_iothread_vq_mapping() function
45
virtio-blk: tidy up iothread_vq_mapping functions
46
virtio: extract iothread-vq-mapping.h API
47
virtio-scsi: add iothread-vq-mapping parameter
48
virtio-scsi: handle ctrl virtqueue in main loop
49
virtio-scsi: only expose cmd vqs via iothread-vq-mapping
33
50
34
Markus Armbruster (1):
51
Thomas Huth (1):
35
blockdev: Fix blockdev-snapshot-sync error reporting for no medium
52
iotests: Limit qsd-migrate to working formats
36
53
37
Thomas Huth (9):
54
include/block/aio.h | 5 +-
38
tests/qemu-iotests: Fix test 033 for running with non-file protocols
55
include/block/raw-aio.h | 19 +-
39
tests/qemu-iotests: Restrict test 066 to the 'file' protocol
56
include/hw/scsi/scsi.h | 8 +-
40
tests/qemu-iotests: Restrict test 114 to the 'file' protocol
57
include/hw/virtio/iothread-vq-mapping.h | 45 +++
41
tests/qemu-iotests: Restrict test 130 to the 'file' protocol
58
include/hw/virtio/virtio-scsi.h | 15 +-
42
tests/qemu-iotests: Restrict test 134 and 158 to the 'file' protocol
59
include/system/block-backend-global-state.h | 1 -
43
tests/qemu-iotests: Restrict test 156 to the 'file' protocol
60
include/system/dma.h | 3 +-
44
tests/qemu-iotests: Restrict tests that use --image-opts to the 'file' protocol
61
util/aio-posix.h | 1 +
45
tests/qemu-iotests: Fix some tests that use --image-opts for other protocols
62
block/block-backend.c | 12 -
46
tests/qemu-iotests: Restrict tests using "--blockdev file" to the file protocol
63
block/file-posix.c | 29 +-
47
64
block/io.c | 4 +
48
include/qemu/job.h | 2 +-
65
block/io_uring.c | 25 +-
49
block/mirror.c | 10 ++--
66
block/linux-aio.c | 25 +-
50
block/qapi.c | 10 ++--
67
block/snapshot.c | 1 +
51
blockdev.c | 3 +-
68
hw/block/virtio-blk.c | 132 +-------
52
nbd/server.c | 15 +++--
69
hw/ide/core.c | 3 +-
53
tests/qemu-iotests/033 | 6 +-
70
hw/ide/macio.c | 3 +-
54
tests/qemu-iotests/066 | 2 +-
71
hw/scsi/scsi-bus.c | 121 +++++--
55
tests/qemu-iotests/114 | 2 +-
72
hw/scsi/scsi-disk.c | 24 +-
56
tests/qemu-iotests/130 | 2 +-
73
hw/scsi/virtio-scsi-dataplane.c | 103 ++++--
57
tests/qemu-iotests/134 | 2 +-
74
hw/scsi/virtio-scsi.c | 502 ++++++++++++++++------------
58
tests/qemu-iotests/156 | 2 +-
75
hw/virtio/iothread-vq-mapping.c | 131 ++++++++
59
tests/qemu-iotests/158 | 2 +-
76
system/dma-helpers.c | 8 +-
60
tests/qemu-iotests/176.out | 16 +++---
77
util/aio-posix.c | 114 ++++---
61
tests/qemu-iotests/188 | 2 +-
78
util/async.c | 1 -
62
tests/qemu-iotests/189 | 2 +-
79
scripts/qcow2-to-stdout.py | 449 +++++++++++++++++++++++++
63
tests/qemu-iotests/198 | 2 +-
80
hw/virtio/meson.build | 1 +
64
tests/qemu-iotests/198.out | 2 +
81
meson.build | 8 +
65
tests/qemu-iotests/206.out | 1 +
82
tests/qemu-iotests/051.pc.out | 2 +-
66
tests/qemu-iotests/261 | 4 +-
83
tests/qemu-iotests/tests/qsd-migrate | 2 +-
67
tests/qemu-iotests/263 | 6 +-
84
30 files changed, 1286 insertions(+), 511 deletions(-)
68
tests/qemu-iotests/267.out | 48 ++++++++--------
85
create mode 100644 include/hw/virtio/iothread-vq-mapping.h
69
tests/qemu-iotests/284 | 7 +--
86
create mode 100644 hw/virtio/iothread-vq-mapping.c
70
tests/qemu-iotests/286 | 3 +-
87
create mode 100755 scripts/qcow2-to-stdout.py
71
tests/qemu-iotests/286.out | 2 +-
72
.../tests/detect-zeroes-registered-buf | 4 +-
73
tests/qemu-iotests/tests/iothreads-nbd-export | 66 ++++++++++++++++++++++
74
tests/qemu-iotests/tests/iothreads-nbd-export.out | 19 +++++++
75
tests/qemu-iotests/tests/qcow2-internal-snapshots | 2 +-
76
.../tests/qcow2-internal-snapshots.out | 14 ++---
77
tests/qemu-iotests/tests/qsd-jobs | 2 +-
78
30 files changed, 178 insertions(+), 82 deletions(-)
79
create mode 100755 tests/qemu-iotests/tests/iothreads-nbd-export
80
create mode 100644 tests/qemu-iotests/tests/iothreads-nbd-export.out
diff view generated by jsdifflib
Deleted patch
1
Calling job_pause_point() while holding the graph reader lock
2
potentially results in a deadlock: bdrv_graph_wrlock() first drains
3
everything, including the mirror job, which pauses it. The job is only
4
unpaused at the end of the drain section, which is when the graph writer
5
lock has been successfully taken. However, if the job happens to be
6
paused at a pause point where it still holds the reader lock, the writer
7
lock can't be taken as long as the job is still paused.
8
1
9
Mark job_pause_point() as GRAPH_UNLOCKED and fix mirror accordingly.
10
11
Cc: qemu-stable@nongnu.org
12
Buglink: https://issues.redhat.com/browse/RHEL-28125
13
Fixes: 004915a96a7a ("block: Protect bs->backing with graph_lock")
14
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
15
Message-ID: <20240313153000.33121-1-kwolf@redhat.com>
16
Reviewed-by: Eric Blake <eblake@redhat.com>
17
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
18
---
19
include/qemu/job.h | 2 +-
20
block/mirror.c | 10 ++++++----
21
2 files changed, 7 insertions(+), 5 deletions(-)
22
23
diff --git a/include/qemu/job.h b/include/qemu/job.h
24
index XXXXXXX..XXXXXXX 100644
25
--- a/include/qemu/job.h
26
+++ b/include/qemu/job.h
27
@@ -XXX,XX +XXX,XX @@ void job_enter(Job *job);
28
*
29
* Called with job_mutex *not* held.
30
*/
31
-void coroutine_fn job_pause_point(Job *job);
32
+void coroutine_fn GRAPH_UNLOCKED job_pause_point(Job *job);
33
34
/**
35
* @job: The job that calls the function.
36
diff --git a/block/mirror.c b/block/mirror.c
37
index XXXXXXX..XXXXXXX 100644
38
--- a/block/mirror.c
39
+++ b/block/mirror.c
40
@@ -XXX,XX +XXX,XX @@ static unsigned mirror_perform(MirrorBlockJob *s, int64_t offset,
41
return bytes_handled;
42
}
43
44
-static void coroutine_fn GRAPH_RDLOCK mirror_iteration(MirrorBlockJob *s)
45
+static void coroutine_fn GRAPH_UNLOCKED mirror_iteration(MirrorBlockJob *s)
46
{
47
- BlockDriverState *source = s->mirror_top_bs->backing->bs;
48
+ BlockDriverState *source;
49
MirrorOp *pseudo_op;
50
int64_t offset;
51
/* At least the first dirty chunk is mirrored in one iteration. */
52
@@ -XXX,XX +XXX,XX @@ static void coroutine_fn GRAPH_RDLOCK mirror_iteration(MirrorBlockJob *s)
53
bool write_zeroes_ok = bdrv_can_write_zeroes_with_unmap(blk_bs(s->target));
54
int max_io_bytes = MAX(s->buf_size / MAX_IN_FLIGHT, MAX_IO_BYTES);
55
56
+ bdrv_graph_co_rdlock();
57
+ source = s->mirror_top_bs->backing->bs;
58
+ bdrv_graph_co_rdunlock();
59
+
60
bdrv_dirty_bitmap_lock(s->dirty_bitmap);
61
offset = bdrv_dirty_iter_next(s->dbi);
62
if (offset < 0) {
63
@@ -XXX,XX +XXX,XX @@ static int coroutine_fn mirror_run(Job *job, Error **errp)
64
mirror_wait_for_free_in_flight_slot(s);
65
continue;
66
} else if (cnt != 0) {
67
- bdrv_graph_co_rdlock();
68
mirror_iteration(s);
69
- bdrv_graph_co_rdunlock();
70
}
71
}
72
73
--
74
2.44.0
diff view generated by jsdifflib
Deleted patch
1
When draining an NBD export, nbd_drained_begin() first sets
2
client->quiescing so that nbd_client_receive_next_request() won't start
3
any new request coroutines. Then nbd_drained_poll() tries to makes sure
4
that we wait for any existing request coroutines by checking that
5
client->nb_requests has become 0.
6
1
7
However, there is a small window between creating a new request
8
coroutine and increasing client->nb_requests. If a coroutine is in this
9
state, it won't be waited for and drain returns too early.
10
11
In the context of switching to a different AioContext, this means that
12
blk_aio_attached() will see client->recv_coroutine != NULL and fail its
13
assertion.
14
15
Fix this by increasing client->nb_requests immediately when starting the
16
coroutine. Doing this after the checks if we should create a new
17
coroutine is okay because client->lock is held.
18
19
Cc: qemu-stable@nongnu.org
20
Fixes: fd6afc501a01 ("nbd/server: Use drained block ops to quiesce the server")
21
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
22
Message-ID: <20240314165825.40261-2-kwolf@redhat.com>
23
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
24
---
25
nbd/server.c | 15 +++++++--------
26
1 file changed, 7 insertions(+), 8 deletions(-)
27
28
diff --git a/nbd/server.c b/nbd/server.c
29
index XXXXXXX..XXXXXXX 100644
30
--- a/nbd/server.c
31
+++ b/nbd/server.c
32
@@ -XXX,XX +XXX,XX @@ static coroutine_fn int nbd_handle_request(NBDClient *client,
33
/* Owns a reference to the NBDClient passed as opaque. */
34
static coroutine_fn void nbd_trip(void *opaque)
35
{
36
- NBDClient *client = opaque;
37
- NBDRequestData *req = NULL;
38
+ NBDRequestData *req = opaque;
39
+ NBDClient *client = req->client;
40
NBDRequest request = { 0 }; /* GCC thinks it can be used uninitialized */
41
int ret;
42
Error *local_err = NULL;
43
@@ -XXX,XX +XXX,XX @@ static coroutine_fn void nbd_trip(void *opaque)
44
goto done;
45
}
46
47
- req = nbd_request_get(client);
48
-
49
/*
50
* nbd_co_receive_request() returns -EAGAIN when nbd_drained_begin() has
51
* set client->quiescing but by the time we get back nbd_drained_end() may
52
@@ -XXX,XX +XXX,XX @@ static coroutine_fn void nbd_trip(void *opaque)
53
}
54
55
done:
56
- if (req) {
57
- nbd_request_put(req);
58
- }
59
+ nbd_request_put(req);
60
61
qemu_mutex_unlock(&client->lock);
62
63
@@ -XXX,XX +XXX,XX @@ disconnect:
64
*/
65
static void nbd_client_receive_next_request(NBDClient *client)
66
{
67
+ NBDRequestData *req;
68
+
69
if (!client->recv_coroutine && client->nb_requests < MAX_NBD_REQUESTS &&
70
!client->quiescing) {
71
nbd_client_get(client);
72
- client->recv_coroutine = qemu_coroutine_create(nbd_trip, client);
73
+ req = nbd_request_get(client);
74
+ client->recv_coroutine = qemu_coroutine_create(nbd_trip, req);
75
aio_co_schedule(client->exp->common.ctx, client->recv_coroutine);
76
}
77
}
78
--
79
2.44.0
diff view generated by jsdifflib
Deleted patch
1
This replicates the scenario in which the bug was reported.
2
Unfortunately this relies on actually executing a guest (so that the
3
firmware initialises the virtio-blk device and moves it to its
4
configured iothread), so this can't make use of the qtest accelerator
5
like most other test cases. I tried to find a different easy way to
6
trigger the bug, but couldn't find one.
7
1
8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9
Message-ID: <20240314165825.40261-3-kwolf@redhat.com>
10
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11
---
12
tests/qemu-iotests/tests/iothreads-nbd-export | 66 +++++++++++++++++++
13
.../tests/iothreads-nbd-export.out | 19 ++++++
14
2 files changed, 85 insertions(+)
15
create mode 100755 tests/qemu-iotests/tests/iothreads-nbd-export
16
create mode 100644 tests/qemu-iotests/tests/iothreads-nbd-export.out
17
18
diff --git a/tests/qemu-iotests/tests/iothreads-nbd-export b/tests/qemu-iotests/tests/iothreads-nbd-export
19
new file mode 100755
20
index XXXXXXX..XXXXXXX
21
--- /dev/null
22
+++ b/tests/qemu-iotests/tests/iothreads-nbd-export
23
@@ -XXX,XX +XXX,XX @@
24
+#!/usr/bin/env python3
25
+# group: rw quick
26
+#
27
+# Copyright (C) 2024 Red Hat, Inc.
28
+#
29
+# This program is free software; you can redistribute it and/or modify
30
+# it under the terms of the GNU General Public License as published by
31
+# the Free Software Foundation; either version 2 of the License, or
32
+# (at your option) any later version.
33
+#
34
+# This program is distributed in the hope that it will be useful,
35
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
36
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37
+# GNU General Public License for more details.
38
+#
39
+# You should have received a copy of the GNU General Public License
40
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
41
+#
42
+# Creator/Owner: Kevin Wolf <kwolf@redhat.com>
43
+
44
+import time
45
+import qemu
46
+import iotests
47
+
48
+iotests.script_initialize(supported_fmts=['qcow2'],
49
+ supported_platforms=['linux'])
50
+
51
+with iotests.FilePath('disk1.img') as path, \
52
+ iotests.FilePath('nbd.sock', base_dir=iotests.sock_dir) as nbd_sock, \
53
+ qemu.machine.QEMUMachine(iotests.qemu_prog) as vm:
54
+
55
+ img_size = '10M'
56
+
57
+ iotests.log('Preparing disk...')
58
+ iotests.qemu_img_create('-f', iotests.imgfmt, path, img_size)
59
+ vm.add_args('-blockdev', f'file,node-name=disk-file,filename={path}')
60
+ vm.add_args('-blockdev', 'qcow2,node-name=disk,file=disk-file')
61
+ vm.add_args('-object', 'iothread,id=iothread0')
62
+ vm.add_args('-device',
63
+ 'virtio-blk,drive=disk,iothread=iothread0,share-rw=on')
64
+
65
+ iotests.log('Launching VM...')
66
+ vm.add_args('-accel', 'kvm', '-accel', 'tcg')
67
+ #vm.add_args('-accel', 'qtest')
68
+ vm.launch()
69
+
70
+ iotests.log('Exporting to NBD...')
71
+ iotests.log(vm.qmp('nbd-server-start',
72
+ addr={'type': 'unix', 'data': {'path': nbd_sock}}))
73
+ iotests.log(vm.qmp('block-export-add', type='nbd', id='exp0',
74
+ node_name='disk', writable=True))
75
+
76
+ iotests.log('Connecting qemu-img...')
77
+ qemu_io = iotests.QemuIoInteractive('-f', 'raw',
78
+ f'nbd+unix:///disk?socket={nbd_sock}')
79
+
80
+ iotests.log('Moving the NBD export to a different iothread...')
81
+ for i in range(0, 10):
82
+ iotests.log(vm.qmp('system_reset'))
83
+ time.sleep(0.1)
84
+
85
+ iotests.log('Checking that it is still alive...')
86
+ iotests.log(vm.qmp('query-status'))
87
+
88
+ qemu_io.close()
89
+ vm.shutdown()
90
diff --git a/tests/qemu-iotests/tests/iothreads-nbd-export.out b/tests/qemu-iotests/tests/iothreads-nbd-export.out
91
new file mode 100644
92
index XXXXXXX..XXXXXXX
93
--- /dev/null
94
+++ b/tests/qemu-iotests/tests/iothreads-nbd-export.out
95
@@ -XXX,XX +XXX,XX @@
96
+Preparing disk...
97
+Launching VM...
98
+Exporting to NBD...
99
+{"return": {}}
100
+{"return": {}}
101
+Connecting qemu-img...
102
+Moving the NBD export to a different iothread...
103
+{"return": {}}
104
+{"return": {}}
105
+{"return": {}}
106
+{"return": {}}
107
+{"return": {}}
108
+{"return": {}}
109
+{"return": {}}
110
+{"return": {}}
111
+{"return": {}}
112
+{"return": {}}
113
+Checking that it is still alive...
114
+{"return": {"running": true, "status": "running"}}
115
--
116
2.44.0
diff view generated by jsdifflib
Deleted patch
1
From: Markus Armbruster <armbru@redhat.com>
2
1
3
When external_snapshot_abort() rejects a BlockDriverState without a
4
medium, it creates an error like this:
5
6
error_setg(errp, "Device '%s' has no medium", device);
7
8
Trouble is @device can be null. My system formats null as "(null)",
9
but other systems might crash. Reproducer:
10
11
1. Create a block device without a medium
12
13
-> {"execute": "blockdev-add", "arguments": {"driver": "host_cdrom", "node-name": "blk0", "filename": "/dev/sr0"}}
14
<- {"return": {}}
15
16
3. Attempt to snapshot it
17
18
-> {"execute":"blockdev-snapshot-sync", "arguments": { "node-name": "blk0", "snapshot-file":"/tmp/foo.qcow2","format":"qcow2"}}
19
<- {"error": {"class": "GenericError", "desc": "Device '(null)' has no medium"}}
20
21
Broken when commit 0901f67ecdb made @device optional.
22
23
Use bdrv_get_device_or_node_name() instead. Now it fails as it
24
should:
25
26
<- {"error": {"class": "GenericError", "desc": "Device 'blk0' has no medium"}}
27
28
Fixes: 0901f67ecdb7 ("qmp: Allow to take external snapshots on bs graphs node.")
29
Signed-off-by: Markus Armbruster <armbru@redhat.com>
30
Message-ID: <20240306142831.2514431-1-armbru@redhat.com>
31
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
32
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
33
---
34
blockdev.c | 3 ++-
35
1 file changed, 2 insertions(+), 1 deletion(-)
36
37
diff --git a/blockdev.c b/blockdev.c
38
index XXXXXXX..XXXXXXX 100644
39
--- a/blockdev.c
40
+++ b/blockdev.c
41
@@ -XXX,XX +XXX,XX @@ static void external_snapshot_action(TransactionAction *action,
42
bdrv_drained_begin(state->old_bs);
43
44
if (!bdrv_is_inserted(state->old_bs)) {
45
- error_setg(errp, QERR_DEVICE_HAS_NO_MEDIUM, device);
46
+ error_setg(errp, QERR_DEVICE_HAS_NO_MEDIUM,
47
+ bdrv_get_device_or_node_name(state->old_bs));
48
return;
49
}
50
51
--
52
2.44.0
diff view generated by jsdifflib
Deleted patch
1
From: Abhiram Tilak <atp.exp@gmail.com>
2
1
3
When running the command `qemu-img snapshot -l SNAPSHOT` the output of
4
VM_CLOCK (measures the offset between host and VM clock) cannot to
5
accommodate values in the order of thousands (4-digit).
6
7
This line [1] hints on the problem. Additionally, the column width for
8
the VM_CLOCK field was reduced from 15 to 13 spaces in commit b39847a5
9
in line [2], resulting in a shortage of space.
10
11
[1]:
12
https://gitlab.com/qemu-project/qemu/-/blob/master/block/qapi.c?ref_type=heads#L753
13
[2]:
14
https://gitlab.com/qemu-project/qemu/-/blob/master/block/qapi.c?ref_type=heads#L763
15
16
This patch restores the column width to 15 spaces and makes adjustments
17
to the affected iotests accordingly. Furthermore, addresses a potential
18
source
19
of confusion by removing whitespace in column headers. Example, VM CLOCK
20
is modified to VM_CLOCK. Additionally a '--' symbol is introduced when
21
ICOUNT returns no output for clarity.
22
23
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2062
24
Fixes: b39847a50553 ("migration: introduce icount field for snapshots")
25
Signed-off-by: Abhiram Tilak <atp.exp@gmail.com>
26
Message-ID: <20240123050354.22152-2-atp.exp@gmail.com>
27
[kwolf: Fixed up qemu-iotests 261 and 286]
28
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
29
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
30
---
31
block/qapi.c | 10 ++--
32
tests/qemu-iotests/176.out | 16 +++----
33
tests/qemu-iotests/261 | 4 +-
34
tests/qemu-iotests/267.out | 48 +++++++++----------
35
tests/qemu-iotests/286 | 3 +-
36
tests/qemu-iotests/286.out | 2 +-
37
.../tests/qcow2-internal-snapshots.out | 14 +++---
38
7 files changed, 50 insertions(+), 47 deletions(-)
39
40
diff --git a/block/qapi.c b/block/qapi.c
41
index XXXXXXX..XXXXXXX 100644
42
--- a/block/qapi.c
43
+++ b/block/qapi.c
44
@@ -XXX,XX +XXX,XX @@ void bdrv_snapshot_dump(QEMUSnapshotInfo *sn)
45
char *sizing = NULL;
46
47
if (!sn) {
48
- qemu_printf("%-10s%-17s%8s%20s%13s%11s",
49
- "ID", "TAG", "VM SIZE", "DATE", "VM CLOCK", "ICOUNT");
50
+ qemu_printf("%-7s %-16s %8s %19s %15s %10s",
51
+ "ID", "TAG", "VM_SIZE", "DATE", "VM_CLOCK", "ICOUNT");
52
} else {
53
g_autoptr(GDateTime) date = g_date_time_new_from_unix_local(sn->date_sec);
54
g_autofree char *date_buf = g_date_time_format(date, "%Y-%m-%d %H:%M:%S");
55
56
secs = sn->vm_clock_nsec / 1000000000;
57
snprintf(clock_buf, sizeof(clock_buf),
58
- "%02d:%02d:%02d.%03d",
59
+ "%04d:%02d:%02d.%03d",
60
(int)(secs / 3600),
61
(int)((secs / 60) % 60),
62
(int)(secs % 60),
63
@@ -XXX,XX +XXX,XX @@ void bdrv_snapshot_dump(QEMUSnapshotInfo *sn)
64
if (sn->icount != -1ULL) {
65
snprintf(icount_buf, sizeof(icount_buf),
66
"%"PRId64, sn->icount);
67
+ } else {
68
+ snprintf(icount_buf, sizeof(icount_buf), "--");
69
}
70
- qemu_printf("%-9s %-16s %8s%20s%13s%11s",
71
+ qemu_printf("%-7s %-16s %8s %19s %15s %10s",
72
sn->id_str, sn->name,
73
sizing,
74
date_buf,
75
diff --git a/tests/qemu-iotests/176.out b/tests/qemu-iotests/176.out
76
index XXXXXXX..XXXXXXX 100644
77
--- a/tests/qemu-iotests/176.out
78
+++ b/tests/qemu-iotests/176.out
79
@@ -XXX,XX +XXX,XX @@ Offset Length File
80
0x7ffe0000 0x20000 TEST_DIR/t.IMGFMT.itmd
81
0x83400000 0x200 TEST_DIR/t.IMGFMT.itmd
82
Snapshot list:
83
-ID TAG
84
-1 snap
85
+ID TAG
86
+1 snap
87
88
=== Test pass snapshot.1 ===
89
90
@@ -XXX,XX +XXX,XX @@ Offset Length File
91
0x7fff0000 0x10000 TEST_DIR/t.IMGFMT
92
0x83400000 0x200 TEST_DIR/t.IMGFMT
93
Snapshot list:
94
-ID TAG
95
-1 snap
96
+ID TAG
97
+1 snap
98
99
=== Test pass snapshot.2 ===
100
101
@@ -XXX,XX +XXX,XX @@ Offset Length File
102
0x7fff0000 0x10000 TEST_DIR/t.IMGFMT
103
0x83400000 0x200 TEST_DIR/t.IMGFMT
104
Snapshot list:
105
-ID TAG
106
-1 snap
107
+ID TAG
108
+1 snap
109
110
=== Test pass snapshot.3 ===
111
112
@@ -XXX,XX +XXX,XX @@ Offset Length File
113
0x7fff0000 0x10000 TEST_DIR/t.IMGFMT
114
0x83400000 0x200 TEST_DIR/t.IMGFMT
115
Snapshot list:
116
-ID TAG
117
-1 snap
118
+ID TAG
119
+1 snap
120
121
=== Test pass bitmap.0 ===
122
123
diff --git a/tests/qemu-iotests/261 b/tests/qemu-iotests/261
124
index XXXXXXX..XXXXXXX 100755
125
--- a/tests/qemu-iotests/261
126
+++ b/tests/qemu-iotests/261
127
@@ -XXX,XX +XXX,XX @@ _check_test_img -r all
128
129
echo
130
echo "$((sn_count - 1)) snapshots should remain:"
131
-echo " qemu-img info reports $(_img_info | grep -c '^ \{32\}') snapshots"
132
+echo " qemu-img info reports $(_img_info | grep -c '^ \{30\}') snapshots"
133
echo " Image header reports $(peek_file_be "$TEST_IMG" 60 4) snapshots"
134
135
echo
136
@@ -XXX,XX +XXX,XX @@ _check_test_img -r all
137
138
echo
139
echo '65536 snapshots should remain:'
140
-echo " qemu-img info reports $(_img_info | grep -c '^ \{32\}') snapshots"
141
+echo " qemu-img info reports $(_img_info | grep -c '^ \{30\}') snapshots"
142
echo " Image header reports $(peek_file_be "$TEST_IMG" 60 4) snapshots"
143
144
# success, all done
145
diff --git a/tests/qemu-iotests/267.out b/tests/qemu-iotests/267.out
146
index XXXXXXX..XXXXXXX 100644
147
--- a/tests/qemu-iotests/267.out
148
+++ b/tests/qemu-iotests/267.out
149
@@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information
150
(qemu) savevm snap0
151
(qemu) info snapshots
152
List of snapshots present on all disks:
153
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
154
--- snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
155
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
156
+-- snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
157
(qemu) loadvm snap0
158
(qemu) quit
159
160
@@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information
161
(qemu) savevm snap0
162
(qemu) info snapshots
163
List of snapshots present on all disks:
164
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
165
--- snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
166
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
167
+-- snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
168
(qemu) loadvm snap0
169
(qemu) quit
170
171
@@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information
172
(qemu) savevm snap0
173
(qemu) info snapshots
174
List of snapshots present on all disks:
175
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
176
--- snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
177
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
178
+-- snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
179
(qemu) loadvm snap0
180
(qemu) quit
181
182
@@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information
183
(qemu) savevm snap0
184
(qemu) info snapshots
185
List of snapshots present on all disks:
186
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
187
--- snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
188
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
189
+-- snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
190
(qemu) loadvm snap0
191
(qemu) quit
192
193
@@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information
194
(qemu) savevm snap0
195
(qemu) info snapshots
196
List of snapshots present on all disks:
197
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
198
--- snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
199
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
200
+-- snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
201
(qemu) loadvm snap0
202
(qemu) quit
203
204
@@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information
205
(qemu) savevm snap0
206
(qemu) info snapshots
207
List of snapshots present on all disks:
208
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
209
--- snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
210
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
211
+-- snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
212
(qemu) loadvm snap0
213
(qemu) quit
214
215
@@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information
216
(qemu) savevm snap0
217
(qemu) info snapshots
218
List of snapshots present on all disks:
219
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
220
--- snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
221
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
222
+-- snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
223
(qemu) loadvm snap0
224
(qemu) quit
225
226
@@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information
227
(qemu) savevm snap0
228
(qemu) info snapshots
229
List of snapshots present on all disks:
230
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
231
--- snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
232
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
233
+-- snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
234
(qemu) loadvm snap0
235
(qemu) quit
236
237
Internal snapshots on overlay:
238
Snapshot list:
239
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
240
-1 snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
241
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
242
+1 snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
243
Internal snapshots on backing file:
244
245
=== -blockdev with NBD server on the backing file ===
246
@@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information
247
(qemu) savevm snap0
248
(qemu) info snapshots
249
List of snapshots present on all disks:
250
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
251
--- snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
252
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
253
+-- snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
254
(qemu) loadvm snap0
255
(qemu) quit
256
257
Internal snapshots on overlay:
258
Snapshot list:
259
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
260
-1 snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
261
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
262
+1 snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
263
Internal snapshots on backing file:
264
Snapshot list:
265
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
266
-1 snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
267
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
268
+1 snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
269
*** done
270
diff --git a/tests/qemu-iotests/286 b/tests/qemu-iotests/286
271
index XXXXXXX..XXXXXXX 100755
272
--- a/tests/qemu-iotests/286
273
+++ b/tests/qemu-iotests/286
274
@@ -XXX,XX +XXX,XX @@ $QEMU_IMG snapshot -l "$TEST_IMG" | tail -n 1 | tr -s ' ' \
275
-e 's/\./(VM state size unit)/' \
276
-e 's/\./(snapshot date)/' \
277
-e 's/\./(snapshot time)/' \
278
- -e 's/\./(VM clock)/'
279
+ -e 's/\./(VM clock)/' \
280
+ -e 's/\./(icount)/'
281
282
# success, all done
283
echo "*** done"
284
diff --git a/tests/qemu-iotests/286.out b/tests/qemu-iotests/286.out
285
index XXXXXXX..XXXXXXX 100644
286
--- a/tests/qemu-iotests/286.out
287
+++ b/tests/qemu-iotests/286.out
288
@@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information
289
(qemu) savevm abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
290
(qemu) quit
291
Output structure:
292
-(snapshot ID) (snapshot name) (VM state size value) (VM state size unit) (snapshot date) (snapshot time) (VM clock)
293
+(snapshot ID) (snapshot name) (VM state size value) (VM state size unit) (snapshot date) (snapshot time) (VM clock) (icount)
294
*** done
295
diff --git a/tests/qemu-iotests/tests/qcow2-internal-snapshots.out b/tests/qemu-iotests/tests/qcow2-internal-snapshots.out
296
index XXXXXXX..XXXXXXX 100644
297
--- a/tests/qemu-iotests/tests/qcow2-internal-snapshots.out
298
+++ b/tests/qemu-iotests/tests/qcow2-internal-snapshots.out
299
@@ -XXX,XX +XXX,XX @@ wrote 524288/524288 bytes at offset 0
300
(qemu) quit
301
302
Snapshot list:
303
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
304
-1 snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
305
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
306
+1 snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
307
No errors were found on the image.
308
309
=== Verify that loading the snapshot reverts to the old content ===
310
@@ -XXX,XX +XXX,XX @@ read 64512/64512 bytes at offset 66560
311
(qemu) quit
312
313
Snapshot list:
314
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
315
-1 snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
316
-2 snap1 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
317
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
318
+1 snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
319
+2 snap1 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
320
No errors were found on the image.
321
322
=== qemu-img snapshot can revert to snapshots ===
323
@@ -XXX,XX +XXX,XX @@ read 64512/64512 bytes at offset 66560
324
(qemu) quit
325
326
Snapshot list:
327
-ID TAG VM SIZE DATE VM CLOCK ICOUNT
328
-1 snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
329
+ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
330
+1 snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
331
No errors were found on the image.
332
333
=== Error cases ===
334
--
335
2.44.0
diff view generated by jsdifflib
Deleted patch
1
From: Thomas Huth <thuth@redhat.com>
2
1
3
When running iotest 033 with the ssh protocol, it fails with:
4
5
033 fail [14:48:31] [14:48:41] 10.2s output mismatch
6
--- /.../tests/qemu-iotests/033.out
7
+++ /.../tests/qemu-iotests/scratch/qcow2-ssh-033/033.out.bad
8
@@ -174,6 +174,7 @@
9
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
10
wrote 512/512 bytes at offset 2097152
11
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
12
+qemu-io: warning: Failed to truncate the tail of the image: ssh driver does not support shrinking files
13
read 512/512 bytes at offset 0
14
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
15
16
We already check for the qcow2 format here, so let's simply also
17
add a check for the protocol here, too, to only test the truncation
18
with the file protocol.
19
20
Signed-off-by: Thomas Huth <thuth@redhat.com>
21
Message-ID: <20240315111108.153201-2-thuth@redhat.com>
22
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
23
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
24
---
25
tests/qemu-iotests/033 | 6 +++---
26
1 file changed, 3 insertions(+), 3 deletions(-)
27
28
diff --git a/tests/qemu-iotests/033 b/tests/qemu-iotests/033
29
index XXXXXXX..XXXXXXX 100755
30
--- a/tests/qemu-iotests/033
31
+++ b/tests/qemu-iotests/033
32
@@ -XXX,XX +XXX,XX @@ do_test 512 "write -P 1 0 0x200" "$TEST_IMG" | _filter_qemu_io
33
# next L2 table
34
do_test 512 "write -P 1 $L2_COVERAGE 0x200" "$TEST_IMG" | _filter_qemu_io
35
36
-# only interested in qcow2 here; also other formats might respond with
37
-# "not supported" error message
38
-if [ $IMGFMT = "qcow2" ]; then
39
+# only interested in qcow2 with file protocol here; also other formats
40
+# might respond with "not supported" error message
41
+if [ $IMGFMT = "qcow2" ] && [ $IMGPROTO = "file" ]; then
42
do_test 512 "truncate $L2_COVERAGE" "$TEST_IMG" | _filter_qemu_io
43
fi
44
45
--
46
2.44.0
diff view generated by jsdifflib
Deleted patch
1
From: Thomas Huth <thuth@redhat.com>
2
1
3
The hand-crafted json statement in this test only works if the test
4
is run with the "file" protocol, so mark this test accordingly.
5
6
Signed-off-by: Thomas Huth <thuth@redhat.com>
7
Message-ID: <20240315111108.153201-3-thuth@redhat.com>
8
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
9
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10
---
11
tests/qemu-iotests/066 | 2 +-
12
1 file changed, 1 insertion(+), 1 deletion(-)
13
14
diff --git a/tests/qemu-iotests/066 b/tests/qemu-iotests/066
15
index XXXXXXX..XXXXXXX 100755
16
--- a/tests/qemu-iotests/066
17
+++ b/tests/qemu-iotests/066
18
@@ -XXX,XX +XXX,XX @@ trap "_cleanup; exit \$status" 0 1 2 3 15
19
20
# This tests qcow2-specific low-level functionality
21
_supported_fmt qcow2
22
-_supported_proto generic
23
+_supported_proto file
24
# We need zero clusters and snapshots
25
# (TODO: Consider splitting the snapshot part into a separate test
26
# file, so this one runs with refcount_bits=1 and data_file)
27
--
28
2.44.0
diff view generated by jsdifflib
Deleted patch
1
From: Thomas Huth <thuth@redhat.com>
2
1
3
iotest 114 uses "truncate" and the qcow2.py script on the destination file,
4
which both cannot deal with URIs. Thus this test needs the "file" protocol,
5
otherwise it fails with an error message like this:
6
7
truncate: cannot open 'ssh://127.0.0.1/tmp/qemu-build/tests/qemu-iotests/scratch/qcow2-ssh-114/t.qcow2.orig'
8
for writing: No such file or directory
9
10
Thus mark this test for "file protocol only" accordingly.
11
12
Signed-off-by: Thomas Huth <thuth@redhat.com>
13
Message-ID: <20240315111108.153201-4-thuth@redhat.com>
14
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
15
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
16
---
17
tests/qemu-iotests/114 | 2 +-
18
1 file changed, 1 insertion(+), 1 deletion(-)
19
20
diff --git a/tests/qemu-iotests/114 b/tests/qemu-iotests/114
21
index XXXXXXX..XXXXXXX 100755
22
--- a/tests/qemu-iotests/114
23
+++ b/tests/qemu-iotests/114
24
@@ -XXX,XX +XXX,XX @@ trap "_cleanup; exit \$status" 0 1 2 3 15
25
. ./common.filter
26
27
_supported_fmt qcow2
28
-_supported_proto generic
29
+_supported_proto file
30
# At least OpenBSD doesn't seem to have truncate
31
_supported_os Linux
32
# qcow2.py does not work too well with external data files
33
--
34
2.44.0
diff view generated by jsdifflib
Deleted patch
1
From: Thomas Huth <thuth@redhat.com>
2
1
3
Using "-drive ...,backing.file.filename=..." only works with the
4
file protocol, but not with URIs, so mark this test accordingly.
5
6
Signed-off-by: Thomas Huth <thuth@redhat.com>
7
Message-ID: <20240315111108.153201-5-thuth@redhat.com>
8
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
9
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10
---
11
tests/qemu-iotests/130 | 2 +-
12
1 file changed, 1 insertion(+), 1 deletion(-)
13
14
diff --git a/tests/qemu-iotests/130 b/tests/qemu-iotests/130
15
index XXXXXXX..XXXXXXX 100755
16
--- a/tests/qemu-iotests/130
17
+++ b/tests/qemu-iotests/130
18
@@ -XXX,XX +XXX,XX @@ trap "_cleanup; exit \$status" 0 1 2 3 15
19
. ./common.qemu
20
21
_supported_fmt qcow2
22
-_supported_proto generic
23
+_supported_proto file
24
_supported_os Linux
25
# We are going to use lazy-refcounts
26
_unsupported_imgopts 'compat=0.10'
27
--
28
2.44.0
diff view generated by jsdifflib
Deleted patch
1
From: Thomas Huth <thuth@redhat.com>
2
1
3
Commit b25b387fa592 updated the iotests 134 and 158 to use the --image-opts
4
parameter for qemu-io with file protocol related options, but forgot to
5
update the _supported_proto line accordingly. So let's do that now.
6
7
Fixes: b25b387fa5 ("qcow2: convert QCow2 to use QCryptoBlock for encryption")
8
Signed-off-by: Thomas Huth <thuth@redhat.com>
9
Message-ID: <20240315111108.153201-6-thuth@redhat.com>
10
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
11
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12
---
13
tests/qemu-iotests/134 | 2 +-
14
tests/qemu-iotests/158 | 2 +-
15
2 files changed, 2 insertions(+), 2 deletions(-)
16
17
diff --git a/tests/qemu-iotests/134 b/tests/qemu-iotests/134
18
index XXXXXXX..XXXXXXX 100755
19
--- a/tests/qemu-iotests/134
20
+++ b/tests/qemu-iotests/134
21
@@ -XXX,XX +XXX,XX @@ trap "_cleanup; exit \$status" 0 1 2 3 15
22
. ./common.filter
23
24
_supported_fmt qcow qcow2
25
-_supported_proto generic
26
+_supported_proto file
27
28
29
size=128M
30
diff --git a/tests/qemu-iotests/158 b/tests/qemu-iotests/158
31
index XXXXXXX..XXXXXXX 100755
32
--- a/tests/qemu-iotests/158
33
+++ b/tests/qemu-iotests/158
34
@@ -XXX,XX +XXX,XX @@ trap "_cleanup; exit \$status" 0 1 2 3 15
35
. ./common.filter
36
37
_supported_fmt qcow qcow2
38
-_supported_proto generic
39
+_supported_proto file
40
41
42
size=128M
43
--
44
2.44.0
diff view generated by jsdifflib
Deleted patch
1
From: Thomas Huth <thuth@redhat.com>
2
1
3
The test fails completely when you try to use it with a different
4
protocol, e.g. with "./check -ssh -qcow2 156".
5
The test uses some hand-crafted JSON statements which cannot work with other
6
protocols, thus let's change this test to only support the 'file' protocol.
7
8
Signed-off-by: Thomas Huth <thuth@redhat.com>
9
Message-ID: <20240315111108.153201-7-thuth@redhat.com>
10
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
11
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12
---
13
tests/qemu-iotests/156 | 2 +-
14
1 file changed, 1 insertion(+), 1 deletion(-)
15
16
diff --git a/tests/qemu-iotests/156 b/tests/qemu-iotests/156
17
index XXXXXXX..XXXXXXX 100755
18
--- a/tests/qemu-iotests/156
19
+++ b/tests/qemu-iotests/156
20
@@ -XXX,XX +XXX,XX @@ trap "_cleanup; exit \$status" 0 1 2 3 15
21
. ./common.qemu
22
23
_supported_fmt qcow2 qed
24
-_supported_proto generic
25
+_supported_proto file
26
# Copying files around with cp does not work with external data files
27
_unsupported_imgopts data_file
28
29
--
30
2.44.0
diff view generated by jsdifflib
Deleted patch
1
From: Thomas Huth <thuth@redhat.com>
2
1
3
These tests 188, 189 and 198 use qemu-io with --image-opts with additional
4
hard-coded parameters for the file protocol, so they cannot work for other
5
protocols. Thus we have to limit these tests to the file protocol only.
6
7
Signed-off-by: Thomas Huth <thuth@redhat.com>
8
Message-ID: <20240315111108.153201-8-thuth@redhat.com>
9
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
10
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11
---
12
tests/qemu-iotests/188 | 2 +-
13
tests/qemu-iotests/189 | 2 +-
14
tests/qemu-iotests/198 | 2 +-
15
3 files changed, 3 insertions(+), 3 deletions(-)
16
17
diff --git a/tests/qemu-iotests/188 b/tests/qemu-iotests/188
18
index XXXXXXX..XXXXXXX 100755
19
--- a/tests/qemu-iotests/188
20
+++ b/tests/qemu-iotests/188
21
@@ -XXX,XX +XXX,XX @@ trap "_cleanup; exit \$status" 0 1 2 3 15
22
. ./common.filter
23
24
_supported_fmt qcow2
25
-_supported_proto generic
26
+_supported_proto file
27
_supported_os Linux
28
_require_working_luks
29
30
diff --git a/tests/qemu-iotests/189 b/tests/qemu-iotests/189
31
index XXXXXXX..XXXXXXX 100755
32
--- a/tests/qemu-iotests/189
33
+++ b/tests/qemu-iotests/189
34
@@ -XXX,XX +XXX,XX @@ trap "_cleanup; exit \$status" 0 1 2 3 15
35
. ./common.filter
36
37
_supported_fmt qcow2
38
-_supported_proto generic
39
+_supported_proto file
40
_supported_os Linux
41
_require_working_luks
42
43
diff --git a/tests/qemu-iotests/198 b/tests/qemu-iotests/198
44
index XXXXXXX..XXXXXXX 100755
45
--- a/tests/qemu-iotests/198
46
+++ b/tests/qemu-iotests/198
47
@@ -XXX,XX +XXX,XX @@ trap "_cleanup; exit \$status" 0 1 2 3 15
48
. ./common.filter
49
50
_supported_fmt qcow2
51
-_supported_proto generic
52
+_supported_proto file
53
_supported_os Linux
54
_require_working_luks
55
56
--
57
2.44.0
diff view generated by jsdifflib
Deleted patch
1
From: Thomas Huth <thuth@redhat.com>
2
1
3
Tests 263, 284 and detect-zeroes-registered-buf use qemu-io
4
with --image-opts so we have to enforce IMGOPTSSYNTAX=true here
5
to get $TEST_IMG in shape for other protocols than "file".
6
7
Signed-off-by: Thomas Huth <thuth@redhat.com>
8
Message-ID: <20240315111108.153201-9-thuth@redhat.com>
9
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
10
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11
---
12
tests/qemu-iotests/263 | 6 ++++--
13
tests/qemu-iotests/284 | 7 +++----
14
tests/qemu-iotests/tests/detect-zeroes-registered-buf | 4 +++-
15
3 files changed, 10 insertions(+), 7 deletions(-)
16
17
diff --git a/tests/qemu-iotests/263 b/tests/qemu-iotests/263
18
index XXXXXXX..XXXXXXX 100755
19
--- a/tests/qemu-iotests/263
20
+++ b/tests/qemu-iotests/263
21
@@ -XXX,XX +XXX,XX @@ _cleanup()
22
}
23
trap "_cleanup; exit \$status" 0 1 2 3 15
24
25
+IMGOPTSSYNTAX=true
26
+
27
# get standard environment, filters and checks
28
. ./common.rc
29
. ./common.filter
30
@@ -XXX,XX +XXX,XX @@ echo "testing LUKS qcow2 encryption"
31
echo
32
33
_make_test_img --object $SECRET -o "encrypt.format=luks,encrypt.key-secret=sec0,encrypt.iter-time=10,cluster_size=64K" $size
34
-_run_test "driver=$IMGFMT,encrypt.key-secret=sec0,file.filename=$TEST_IMG"
35
+_run_test "$TEST_IMG,encrypt.key-secret=sec0"
36
_cleanup_test_img
37
38
echo
39
@@ -XXX,XX +XXX,XX @@ echo
40
41
42
_make_test_img --object $SECRET -o "encrypt.format=aes,encrypt.key-secret=sec0,cluster_size=64K" $size
43
-_run_test "driver=$IMGFMT,encrypt.key-secret=sec0,file.filename=$TEST_IMG"
44
+_run_test "$TEST_IMG,encrypt.key-secret=sec0"
45
_cleanup_test_img
46
47
48
diff --git a/tests/qemu-iotests/284 b/tests/qemu-iotests/284
49
index XXXXXXX..XXXXXXX 100755
50
--- a/tests/qemu-iotests/284
51
+++ b/tests/qemu-iotests/284
52
@@ -XXX,XX +XXX,XX @@ _cleanup()
53
}
54
trap "_cleanup; exit \$status" 0 1 2 3 15
55
56
+IMGOPTSSYNTAX=true
57
+
58
# get standard environment, filters and checks
59
. ./common.rc
60
. ./common.filter
61
@@ -XXX,XX +XXX,XX @@ size=1M
62
63
SECRET="secret,id=sec0,data=astrochicken"
64
65
-IMGSPEC="driver=$IMGFMT,file.filename=$TEST_IMG,encrypt.key-secret=sec0"
66
QEMU_IO_OPTIONS=$QEMU_IO_OPTIONS_NO_FMT
67
68
_run_test()
69
{
70
- IMGOPTSSYNTAX=true
71
OLD_TEST_IMG="$TEST_IMG"
72
- TEST_IMG="driver=$IMGFMT,file.filename=$TEST_IMG,encrypt.key-secret=sec0"
73
+ TEST_IMG="$TEST_IMG,encrypt.key-secret=sec0"
74
QEMU_IMG_EXTRA_ARGS="--image-opts --object $SECRET"
75
76
echo
77
@@ -XXX,XX +XXX,XX @@ _run_test()
78
79
TEST_IMG="$OLD_TEST_IMG"
80
QEMU_IMG_EXTRA_ARGS=
81
- IMGOPTSSYNTAX=
82
}
83
84
85
diff --git a/tests/qemu-iotests/tests/detect-zeroes-registered-buf b/tests/qemu-iotests/tests/detect-zeroes-registered-buf
86
index XXXXXXX..XXXXXXX 100755
87
--- a/tests/qemu-iotests/tests/detect-zeroes-registered-buf
88
+++ b/tests/qemu-iotests/tests/detect-zeroes-registered-buf
89
@@ -XXX,XX +XXX,XX @@ _cleanup()
90
}
91
trap "_cleanup; exit \$status" 0 1 2 3 15
92
93
+IMGOPTSSYNTAX=true
94
+
95
# get standard environment, filters and checks
96
cd ..
97
. ./common.rc
98
@@ -XXX,XX +XXX,XX @@ _supported_proto generic
99
100
size=128M
101
_make_test_img $size
102
-IMGSPEC="driver=$IMGFMT,file.filename=$TEST_IMG,discard=unmap,detect-zeroes=unmap"
103
+IMGSPEC="$TEST_IMG,discard=unmap,detect-zeroes=unmap"
104
105
echo
106
echo "== writing zero buffer to image =="
107
--
108
2.44.0
diff view generated by jsdifflib
Deleted patch
1
From: Thomas Huth <thuth@redhat.com>
2
1
3
Tests that use "--blockdev" with the "file" driver cannot work with
4
other protocols, so we should mark them accordingly.
5
6
Signed-off-by: Thomas Huth <thuth@redhat.com>
7
Message-ID: <20240315111108.153201-10-thuth@redhat.com>
8
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
9
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10
---
11
tests/qemu-iotests/tests/qcow2-internal-snapshots | 2 +-
12
tests/qemu-iotests/tests/qsd-jobs | 2 +-
13
2 files changed, 2 insertions(+), 2 deletions(-)
14
15
diff --git a/tests/qemu-iotests/tests/qcow2-internal-snapshots b/tests/qemu-iotests/tests/qcow2-internal-snapshots
16
index XXXXXXX..XXXXXXX 100755
17
--- a/tests/qemu-iotests/tests/qcow2-internal-snapshots
18
+++ b/tests/qemu-iotests/tests/qcow2-internal-snapshots
19
@@ -XXX,XX +XXX,XX @@ trap "_cleanup; exit \$status" 0 1 2 3 15
20
21
# This tests qcow2-specific low-level functionality
22
_supported_fmt qcow2
23
-_supported_proto generic
24
+_supported_proto file
25
# Internal snapshots are (currently) impossible with refcount_bits=1,
26
# and generally impossible with external data files
27
_unsupported_imgopts 'compat=0.10' 'refcount_bits=1[^0-9]' data_file
28
diff --git a/tests/qemu-iotests/tests/qsd-jobs b/tests/qemu-iotests/tests/qsd-jobs
29
index XXXXXXX..XXXXXXX 100755
30
--- a/tests/qemu-iotests/tests/qsd-jobs
31
+++ b/tests/qemu-iotests/tests/qsd-jobs
32
@@ -XXX,XX +XXX,XX @@ cd ..
33
. ./common.filter
34
35
_supported_fmt qcow2
36
-_supported_proto generic
37
+_supported_proto file
38
39
size=128M
40
41
--
42
2.44.0
diff view generated by jsdifflib
Deleted patch
1
From: Fiona Ebner <f.ebner@proxmox.com>
2
1
3
Failure was noticed when running the tests for the qcow2 image format.
4
5
Fixes: 0bd779e27e ("crypto: Introduce 'detached-header' field in QCryptoBlockInfoLUKS")
6
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
7
Message-ID: <20240216101415.293769-1-f.ebner@proxmox.com>
8
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
9
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
10
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11
---
12
tests/qemu-iotests/198.out | 2 ++
13
tests/qemu-iotests/206.out | 1 +
14
2 files changed, 3 insertions(+)
15
16
diff --git a/tests/qemu-iotests/198.out b/tests/qemu-iotests/198.out
17
index XXXXXXX..XXXXXXX 100644
18
--- a/tests/qemu-iotests/198.out
19
+++ b/tests/qemu-iotests/198.out
20
@@ -XXX,XX +XXX,XX @@ Format specific information:
21
compression type: COMPRESSION_TYPE
22
encrypt:
23
ivgen alg: plain64
24
+ detached header: false
25
hash alg: sha256
26
cipher alg: aes-256
27
uuid: 00000000-0000-0000-0000-000000000000
28
@@ -XXX,XX +XXX,XX @@ Format specific information:
29
compression type: COMPRESSION_TYPE
30
encrypt:
31
ivgen alg: plain64
32
+ detached header: false
33
hash alg: sha256
34
cipher alg: aes-256
35
uuid: 00000000-0000-0000-0000-000000000000
36
diff --git a/tests/qemu-iotests/206.out b/tests/qemu-iotests/206.out
37
index XXXXXXX..XXXXXXX 100644
38
--- a/tests/qemu-iotests/206.out
39
+++ b/tests/qemu-iotests/206.out
40
@@ -XXX,XX +XXX,XX @@ Format specific information:
41
refcount bits: 16
42
encrypt:
43
ivgen alg: plain64
44
+ detached header: false
45
hash alg: sha1
46
cipher alg: aes-128
47
uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
48
--
49
2.44.0
50
51
diff view generated by jsdifflib