1 | The following changes since commit 64f0ad8ad8e13257e7c912df470d46784b55c3fd: | 1 | The following changes since commit e1e44a9916b4318e943aecd669e096222cb3eaeb: |
---|---|---|---|
2 | 2 | ||
3 | Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2020-07-02' into staging (2020-07-02 15:54:09 +0100) | 3 | Merge remote-tracking branch 'remotes/xtensa/tags/20180316-xtensa' into staging (2018-03-17 14:15:03 +0000) |
4 | 4 | ||
5 | are available in the Git repository at: | 5 | are available in the git repository at: |
6 | 6 | ||
7 | git://repo.or.cz/qemu/kevin.git tags/for-upstream | 7 | git://repo.or.cz/qemu/kevin.git tags/for-upstream |
8 | 8 | ||
9 | for you to fetch changes up to 4f071a9460886667fde061c05b79dc786cc22e3c: | 9 | for you to fetch changes up to 63ca8406beac44aa59c389ed8578d0c7b3da3402: |
10 | 10 | ||
11 | iotests: Fix 051 output after qdev_init_nofail() removal (2020-07-03 10:06:29 +0200) | 11 | iotests: Avoid realpath, for CentOS 6 (2018-03-19 12:01:39 +0100) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | Block layer patches: | 14 | Block layer patches |
15 | |||
16 | - qemu-img convert: Don't pre-zero images (removes nowadays | ||
17 | counterproductive optimisation) | ||
18 | - qemu-storage-daemon: Fix object-del, cleaner shutdown | ||
19 | - vvfat: Check that the guest doesn't escape the given host directory | ||
20 | with read-write vvfat drives | ||
21 | - vvfat: Fix crash by out-of-bounds array writes for read-write drives | ||
22 | - iotests fixes | ||
23 | 15 | ||
24 | ---------------------------------------------------------------- | 16 | ---------------------------------------------------------------- |
25 | Kevin Wolf (3): | 17 | Eric Blake (1): |
26 | qemu-img convert: Don't pre-zero images | 18 | iotests: Avoid realpath, for CentOS 6 |
27 | vvfat: Check that updated filenames are valid | ||
28 | vvfat: Fix array_remove_slice() | ||
29 | 19 | ||
30 | Max Reitz (1): | 20 | Fam Zheng (4): |
31 | iotests.py: Do not wait() before communicate() | 21 | block: Fix flags in reopen queue |
22 | iotests: Add regression test for commit base locking | ||
23 | vvfat: Fix inherit_options flags | ||
24 | block: Fix leak of ignore_children in error path | ||
32 | 25 | ||
33 | Philippe Mathieu-Daudé (1): | 26 | Jeff Cody (1): |
34 | iotests: Fix 051 output after qdev_init_nofail() removal | 27 | block: fix iotest 146 output expectations |
35 | 28 | ||
36 | Stefan Hajnoczi (2): | 29 | John Snow (21): |
37 | qemu-storage-daemon: remember to add qemu_object_opts | 30 | blockjobs: fix set-speed kick |
38 | qemu-storage-daemon: add missing cleanup calls | 31 | blockjobs: model single jobs as transactions |
32 | Blockjobs: documentation touchup | ||
33 | blockjobs: add status enum | ||
34 | blockjobs: add state transition table | ||
35 | iotests: add pause_wait | ||
36 | blockjobs: add block_job_verb permission table | ||
37 | blockjobs: add ABORTING state | ||
38 | blockjobs: add CONCLUDED state | ||
39 | blockjobs: add NULL state | ||
40 | blockjobs: add block_job_dismiss | ||
41 | blockjobs: ensure abort is called for cancelled jobs | ||
42 | blockjobs: add commit, abort, clean helpers | ||
43 | blockjobs: add block_job_txn_apply function | ||
44 | blockjobs: add prepare callback | ||
45 | blockjobs: add waiting status | ||
46 | blockjobs: add PENDING status and event | ||
47 | blockjobs: add block-job-finalize | ||
48 | blockjobs: Expose manual property | ||
49 | iotests: test manual job dismissal | ||
50 | tests/test-blockjob: test cancellations | ||
39 | 51 | ||
40 | block/vvfat.c | 67 +++++++++++++++++++------------------------ | 52 | Kevin Wolf (14): |
41 | qemu-img.c | 9 ------ | 53 | luks: Separate image file creation from formatting |
42 | qemu-storage-daemon.c | 5 ++++ | 54 | luks: Create block_crypto_co_create_generic() |
43 | tests/qemu-iotests/iotests.py | 34 +++++++++++----------- | 55 | luks: Support .bdrv_co_create |
44 | tests/qemu-iotests/051.pc.out | 4 +-- | 56 | luks: Turn invalid assertion into check |
45 | 5 files changed, 53 insertions(+), 66 deletions(-) | 57 | luks: Catch integer overflow for huge sizes |
58 | qemu-iotests: Test luks QMP image creation | ||
59 | parallels: Support .bdrv_co_create | ||
60 | qemu-iotests: Enable write tests for parallels | ||
61 | qcow: Support .bdrv_co_create | ||
62 | qed: Support .bdrv_co_create | ||
63 | vdi: Make comments consistent with other drivers | ||
64 | vhdx: Support .bdrv_co_create | ||
65 | vpc: Support .bdrv_co_create | ||
66 | vpc: Require aligned size in .bdrv_co_create | ||
46 | 67 | ||
68 | Liang Li (1): | ||
69 | block/mirror: change the semantic of 'force' of block-job-cancel | ||
47 | 70 | ||
71 | Max Reitz (3): | ||
72 | vdi: Pull option parsing from vdi_co_create | ||
73 | vdi: Move file creation to vdi_co_create_opts | ||
74 | vdi: Implement .bdrv_co_create | ||
75 | |||
76 | Paolo Bonzini (1): | ||
77 | iscsi: fix iSER compilation | ||
78 | |||
79 | qapi/block-core.json | 363 ++++++++++++++++++++++++++++++++++++++++-- | ||
80 | include/block/blockjob.h | 71 ++++++++- | ||
81 | include/block/blockjob_int.h | 17 +- | ||
82 | block.c | 10 +- | ||
83 | block/backup.c | 5 +- | ||
84 | block/commit.c | 2 +- | ||
85 | block/crypto.c | 150 ++++++++++++----- | ||
86 | block/iscsi.c | 2 +- | ||
87 | block/mirror.c | 12 +- | ||
88 | block/parallels.c | 199 +++++++++++++++++------ | ||
89 | block/qcow.c | 196 +++++++++++++++-------- | ||
90 | block/qed.c | 204 ++++++++++++++++-------- | ||
91 | block/stream.c | 2 +- | ||
92 | block/vdi.c | 147 +++++++++++++---- | ||
93 | block/vhdx.c | 216 +++++++++++++++++++------ | ||
94 | block/vpc.c | 241 +++++++++++++++++++++------- | ||
95 | block/vvfat.c | 2 +- | ||
96 | blockdev.c | 71 +++++++-- | ||
97 | blockjob.c | 358 +++++++++++++++++++++++++++++++++++------ | ||
98 | tests/test-bdrv-drain.c | 5 +- | ||
99 | tests/test-blockjob-txn.c | 27 ++-- | ||
100 | tests/test-blockjob.c | 233 ++++++++++++++++++++++++++- | ||
101 | block/trace-events | 7 + | ||
102 | hmp-commands.hx | 3 +- | ||
103 | tests/qemu-iotests/030 | 6 +- | ||
104 | tests/qemu-iotests/055 | 17 +- | ||
105 | tests/qemu-iotests/056 | 187 ++++++++++++++++++++++ | ||
106 | tests/qemu-iotests/056.out | 4 +- | ||
107 | tests/qemu-iotests/109.out | 24 +-- | ||
108 | tests/qemu-iotests/146.out | 2 +- | ||
109 | tests/qemu-iotests/153 | 12 ++ | ||
110 | tests/qemu-iotests/153.out | 5 + | ||
111 | tests/qemu-iotests/181 | 2 +- | ||
112 | tests/qemu-iotests/210 | 210 ++++++++++++++++++++++++ | ||
113 | tests/qemu-iotests/210.out | 136 ++++++++++++++++ | ||
114 | tests/qemu-iotests/check | 13 +- | ||
115 | tests/qemu-iotests/common.rc | 2 +- | ||
116 | tests/qemu-iotests/group | 1 + | ||
117 | tests/qemu-iotests/iotests.py | 12 +- | ||
118 | 39 files changed, 2652 insertions(+), 524 deletions(-) | ||
119 | create mode 100755 tests/qemu-iotests/210 | ||
120 | create mode 100644 tests/qemu-iotests/210.out | ||
121 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | Since commit 5a37b60a61c, qemu-img create will pre-zero the target image | ||
2 | if it isn't already zero-initialised (most importantly, for host block | ||
3 | devices, but also iscsi etc.), so that writing explicit zeros wouldn't | ||
4 | be necessary later. | ||
5 | 1 | ||
6 | This could speed up the operation significantly, in particular when the | ||
7 | source image file was only sparsely populated. However, it also means | ||
8 | that some block are written twice: Once when pre-zeroing them, and then | ||
9 | when they are overwritten with actual data. On a full image, the | ||
10 | pre-zeroing is wasted work because everything will be overwritten. | ||
11 | |||
12 | In practice, write_zeroes typically turns out faster than writing | ||
13 | explicit zero buffers, but slow enough that first zeroing everything and | ||
14 | then overwriting parts can be a significant net loss. | ||
15 | |||
16 | Meanwhile, qemu-img convert was rewritten in 690c7301600 and zero blocks | ||
17 | are now written to the target using bdrv_co_pwrite_zeroes() if the | ||
18 | target could be pre-zeroed. This way we already make use of the faster | ||
19 | write_zeroes operation, but avoid writing any blocks twice. | ||
20 | |||
21 | Remove the pre-zeroing because these days this former optimisation has | ||
22 | actually turned into a pessimisation in the common case. | ||
23 | |||
24 | Reported-by: Nir Soffer <nsoffer@redhat.com> | ||
25 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
26 | Message-Id: <20200622151203.35624-1-kwolf@redhat.com> | ||
27 | Tested-by: Nir Soffer <nsoffer@redhat.com> | ||
28 | Reviewed-by: Eric Blake <eblake@redhat.com> | ||
29 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
30 | --- | ||
31 | qemu-img.c | 9 --------- | ||
32 | 1 file changed, 9 deletions(-) | ||
33 | |||
34 | diff --git a/qemu-img.c b/qemu-img.c | ||
35 | index XXXXXXX..XXXXXXX 100644 | ||
36 | --- a/qemu-img.c | ||
37 | +++ b/qemu-img.c | ||
38 | @@ -XXX,XX +XXX,XX @@ static int convert_do_copy(ImgConvertState *s) | ||
39 | s->has_zero_init = bdrv_has_zero_init(blk_bs(s->target)); | ||
40 | } | ||
41 | |||
42 | - if (!s->has_zero_init && !s->target_has_backing && | ||
43 | - bdrv_can_write_zeroes_with_unmap(blk_bs(s->target))) | ||
44 | - { | ||
45 | - ret = blk_make_zero(s->target, BDRV_REQ_MAY_UNMAP | BDRV_REQ_NO_FALLBACK); | ||
46 | - if (ret == 0) { | ||
47 | - s->has_zero_init = true; | ||
48 | - } | ||
49 | - } | ||
50 | - | ||
51 | /* Allocate buffer for copied data. For compressed images, only one cluster | ||
52 | * can be copied at a time. */ | ||
53 | if (s->compressed) { | ||
54 | -- | ||
55 | 2.25.4 | ||
56 | |||
57 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Stefan Hajnoczi <stefanha@redhat.com> | ||
2 | 1 | ||
3 | The --object option is supported by qemu-storage-daemon but the | ||
4 | qemu_object_opts QemuOptsList wasn't being added. As a result calls to | ||
5 | qemu_find_opts("object") failed with "There is no option group | ||
6 | 'object'". | ||
7 | |||
8 | This patch fixes the object-del QMP command. | ||
9 | |||
10 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
11 | Message-Id: <20200619101132.2401756-2-stefanha@redhat.com> | ||
12 | Reviewed-by: Eric Blake <eblake@redhat.com> | ||
13 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
14 | --- | ||
15 | qemu-storage-daemon.c | 1 + | ||
16 | 1 file changed, 1 insertion(+) | ||
17 | |||
18 | diff --git a/qemu-storage-daemon.c b/qemu-storage-daemon.c | ||
19 | index XXXXXXX..XXXXXXX 100644 | ||
20 | --- a/qemu-storage-daemon.c | ||
21 | +++ b/qemu-storage-daemon.c | ||
22 | @@ -XXX,XX +XXX,XX @@ int main(int argc, char *argv[]) | ||
23 | |||
24 | module_call_init(MODULE_INIT_QOM); | ||
25 | module_call_init(MODULE_INIT_TRACE); | ||
26 | + qemu_add_opts(&qemu_object_opts); | ||
27 | qemu_add_opts(&qemu_trace_opts); | ||
28 | qcrypto_init(&error_fatal); | ||
29 | bdrv_init(); | ||
30 | -- | ||
31 | 2.25.4 | ||
32 | |||
33 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Stefan Hajnoczi <stefanha@redhat.com> | ||
2 | 1 | ||
3 | Several components used by qemu-storage-daemon have cleanup functions | ||
4 | that aren't called. Keep the "valgrind --leak-check=full" as clean as | ||
5 | possible by invoking the necessary cleanup functions. | ||
6 | |||
7 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
8 | Message-Id: <20200619101132.2401756-3-stefanha@redhat.com> | ||
9 | Reviewed-by: Eric Blake <eblake@redhat.com> | ||
10 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
11 | --- | ||
12 | qemu-storage-daemon.c | 4 ++++ | ||
13 | 1 file changed, 4 insertions(+) | ||
14 | |||
15 | diff --git a/qemu-storage-daemon.c b/qemu-storage-daemon.c | ||
16 | index XXXXXXX..XXXXXXX 100644 | ||
17 | --- a/qemu-storage-daemon.c | ||
18 | +++ b/qemu-storage-daemon.c | ||
19 | @@ -XXX,XX +XXX,XX @@ int main(int argc, char *argv[]) | ||
20 | main_loop_wait(false); | ||
21 | } | ||
22 | |||
23 | + monitor_cleanup(); | ||
24 | + qemu_chr_cleanup(); | ||
25 | + user_creatable_cleanup(); | ||
26 | + | ||
27 | return EXIT_SUCCESS; | ||
28 | } | ||
29 | -- | ||
30 | 2.25.4 | ||
31 | |||
32 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | FAT allows only a restricted set of characters in file names, and for | ||
2 | some of the illegal characters, it's actually important that we catch | ||
3 | them: If filenames can contain '/', the guest can construct filenames | ||
4 | containing "../" and escape from the assigned vvfat directory. The same | ||
5 | problem could arise if ".." was ever accepted as a literal filename. | ||
6 | 1 | ||
7 | Fix this by adding a check that all filenames are valid in | ||
8 | check_directory_consistency(). | ||
9 | |||
10 | Reported-by: Nathan Huckleberry <nhuck15@gmail.com> | ||
11 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
12 | Message-Id: <20200623175534.38286-2-kwolf@redhat.com> | ||
13 | Reviewed-by: Eric Blake <eblake@redhat.com> | ||
14 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
15 | --- | ||
16 | block/vvfat.c | 25 ++++++++++++++++++++++++- | ||
17 | 1 file changed, 24 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/block/vvfat.c b/block/vvfat.c | ||
20 | index XXXXXXX..XXXXXXX 100644 | ||
21 | --- a/block/vvfat.c | ||
22 | +++ b/block/vvfat.c | ||
23 | @@ -XXX,XX +XXX,XX @@ static void set_begin_of_direntry(direntry_t* direntry, uint32_t begin) | ||
24 | direntry->begin_hi = cpu_to_le16((begin >> 16) & 0xffff); | ||
25 | } | ||
26 | |||
27 | +static bool valid_filename(const unsigned char *name) | ||
28 | +{ | ||
29 | + unsigned char c; | ||
30 | + if (!strcmp((const char*)name, ".") || !strcmp((const char*)name, "..")) { | ||
31 | + return false; | ||
32 | + } | ||
33 | + for (; (c = *name); name++) { | ||
34 | + if (!((c >= '0' && c <= '9') || | ||
35 | + (c >= 'A' && c <= 'Z') || | ||
36 | + (c >= 'a' && c <= 'z') || | ||
37 | + c > 127 || | ||
38 | + strchr("$%'-_@~`!(){}^#&.+,;=[]", c) != NULL)) | ||
39 | + { | ||
40 | + return false; | ||
41 | + } | ||
42 | + } | ||
43 | + return true; | ||
44 | +} | ||
45 | + | ||
46 | static uint8_t to_valid_short_char(gunichar c) | ||
47 | { | ||
48 | c = g_unichar_toupper(c); | ||
49 | if ((c >= '0' && c <= '9') || | ||
50 | (c >= 'A' && c <= 'Z') || | ||
51 | - strchr("$%'-_@~`!(){}^#&", c) != 0) { | ||
52 | + strchr("$%'-_@~`!(){}^#&", c) != NULL) { | ||
53 | return c; | ||
54 | } else { | ||
55 | return 0; | ||
56 | @@ -XXX,XX +XXX,XX @@ DLOG(fprintf(stderr, "check direntry %d:\n", i); print_direntry(direntries + i)) | ||
57 | } | ||
58 | lfn.checksum = 0x100; /* cannot use long name twice */ | ||
59 | |||
60 | + if (!valid_filename(lfn.name)) { | ||
61 | + fprintf(stderr, "Invalid file name\n"); | ||
62 | + goto fail; | ||
63 | + } | ||
64 | if (path_len + 1 + lfn.len >= PATH_MAX) { | ||
65 | fprintf(stderr, "Name too long: %s/%s\n", path, lfn.name); | ||
66 | goto fail; | ||
67 | -- | ||
68 | 2.25.4 | ||
69 | |||
70 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | array_remove_slice() calls array_roll() with array->next - 1 as the | ||
2 | destination index. This is only correct for count == 1, otherwise we're | ||
3 | writing past the end of the array. array->next - count would be correct. | ||
4 | 1 | ||
5 | However, this is the only place ever calling array_roll(), so this | ||
6 | rather complicated operation isn't even necessary. | ||
7 | |||
8 | Fix the problem and simplify the code by replacing it with a single | ||
9 | memmove() call. array_roll() can now be removed. | ||
10 | |||
11 | Reported-by: Nathan Huckleberry <nhuck15@gmail.com> | ||
12 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
13 | Message-Id: <20200623175534.38286-3-kwolf@redhat.com> | ||
14 | Reviewed-by: Eric Blake <eblake@redhat.com> | ||
15 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
16 | --- | ||
17 | block/vvfat.c | 42 +++++------------------------------------- | ||
18 | 1 file changed, 5 insertions(+), 37 deletions(-) | ||
19 | |||
20 | diff --git a/block/vvfat.c b/block/vvfat.c | ||
21 | index XXXXXXX..XXXXXXX 100644 | ||
22 | --- a/block/vvfat.c | ||
23 | +++ b/block/vvfat.c | ||
24 | @@ -XXX,XX +XXX,XX @@ static inline void* array_insert(array_t* array,unsigned int index,unsigned int | ||
25 | return array->pointer+index*array->item_size; | ||
26 | } | ||
27 | |||
28 | -/* this performs a "roll", so that the element which was at index_from becomes | ||
29 | - * index_to, but the order of all other elements is preserved. */ | ||
30 | -static inline int array_roll(array_t* array,int index_to,int index_from,int count) | ||
31 | -{ | ||
32 | - char* buf; | ||
33 | - char* from; | ||
34 | - char* to; | ||
35 | - int is; | ||
36 | - | ||
37 | - if(!array || | ||
38 | - index_to<0 || index_to>=array->next || | ||
39 | - index_from<0 || index_from>=array->next) | ||
40 | - return -1; | ||
41 | - | ||
42 | - if(index_to==index_from) | ||
43 | - return 0; | ||
44 | - | ||
45 | - is=array->item_size; | ||
46 | - from=array->pointer+index_from*is; | ||
47 | - to=array->pointer+index_to*is; | ||
48 | - buf=g_malloc(is*count); | ||
49 | - memcpy(buf,from,is*count); | ||
50 | - | ||
51 | - if(index_to<index_from) | ||
52 | - memmove(to+is*count,to,from-to); | ||
53 | - else | ||
54 | - memmove(from,from+is*count,to-from); | ||
55 | - | ||
56 | - memcpy(to,buf,is*count); | ||
57 | - | ||
58 | - g_free(buf); | ||
59 | - | ||
60 | - return 0; | ||
61 | -} | ||
62 | - | ||
63 | static inline int array_remove_slice(array_t* array,int index, int count) | ||
64 | { | ||
65 | assert(index >=0); | ||
66 | assert(count > 0); | ||
67 | assert(index + count <= array->next); | ||
68 | - if(array_roll(array,array->next-1,index,count)) | ||
69 | - return -1; | ||
70 | + | ||
71 | + memmove(array->pointer + index * array->item_size, | ||
72 | + array->pointer + (index + count) * array->item_size, | ||
73 | + (array->next - index - count) * array->item_size); | ||
74 | + | ||
75 | array->next -= count; | ||
76 | return 0; | ||
77 | } | ||
78 | -- | ||
79 | 2.25.4 | ||
80 | |||
81 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Max Reitz <mreitz@redhat.com> | ||
2 | 1 | ||
3 | Waiting on a process for which we have a pipe will stall if the process | ||
4 | outputs more data than fits into the OS-provided buffer. We must use | ||
5 | communicate() before wait(), and in fact, communicate() perfectly | ||
6 | replaces wait() already. | ||
7 | |||
8 | We have to drop the stderr=subprocess.STDOUT parameter from | ||
9 | subprocess.Popen() in qemu_nbd_early_pipe(), because stderr is passed on | ||
10 | to the child process, so if we do not drop this parameter, communicate() | ||
11 | will hang (because the pipe is not closed). | ||
12 | |||
13 | Signed-off-by: Max Reitz <mreitz@redhat.com> | ||
14 | Message-Id: <20200630083711.40567-1-mreitz@redhat.com> | ||
15 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
16 | --- | ||
17 | tests/qemu-iotests/iotests.py | 34 +++++++++++++++++----------------- | ||
18 | 1 file changed, 17 insertions(+), 17 deletions(-) | ||
19 | |||
20 | diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py | ||
21 | index XXXXXXX..XXXXXXX 100644 | ||
22 | --- a/tests/qemu-iotests/iotests.py | ||
23 | +++ b/tests/qemu-iotests/iotests.py | ||
24 | @@ -XXX,XX +XXX,XX @@ def qemu_img_pipe(*args): | ||
25 | stdout=subprocess.PIPE, | ||
26 | stderr=subprocess.STDOUT, | ||
27 | universal_newlines=True) | ||
28 | - exitcode = subp.wait() | ||
29 | - if exitcode < 0: | ||
30 | + output = subp.communicate()[0] | ||
31 | + if subp.returncode < 0: | ||
32 | sys.stderr.write('qemu-img received signal %i: %s\n' | ||
33 | - % (-exitcode, ' '.join(qemu_img_args + list(args)))) | ||
34 | - return subp.communicate()[0] | ||
35 | + % (-subp.returncode, | ||
36 | + ' '.join(qemu_img_args + list(args)))) | ||
37 | + return output | ||
38 | |||
39 | def qemu_img_log(*args): | ||
40 | result = qemu_img_pipe(*args) | ||
41 | @@ -XXX,XX +XXX,XX @@ def qemu_io(*args): | ||
42 | subp = subprocess.Popen(args, stdout=subprocess.PIPE, | ||
43 | stderr=subprocess.STDOUT, | ||
44 | universal_newlines=True) | ||
45 | - exitcode = subp.wait() | ||
46 | - if exitcode < 0: | ||
47 | + output = subp.communicate()[0] | ||
48 | + if subp.returncode < 0: | ||
49 | sys.stderr.write('qemu-io received signal %i: %s\n' | ||
50 | - % (-exitcode, ' '.join(args))) | ||
51 | - return subp.communicate()[0] | ||
52 | + % (-subp.returncode, ' '.join(args))) | ||
53 | + return output | ||
54 | |||
55 | def qemu_io_log(*args): | ||
56 | result = qemu_io(*args) | ||
57 | @@ -XXX,XX +XXX,XX @@ def qemu_nbd_early_pipe(*args): | ||
58 | and its output in case of an error''' | ||
59 | subp = subprocess.Popen(qemu_nbd_args + ['--fork'] + list(args), | ||
60 | stdout=subprocess.PIPE, | ||
61 | - stderr=subprocess.STDOUT, | ||
62 | universal_newlines=True) | ||
63 | - exitcode = subp.wait() | ||
64 | - if exitcode < 0: | ||
65 | + output = subp.communicate()[0] | ||
66 | + if subp.returncode < 0: | ||
67 | sys.stderr.write('qemu-nbd received signal %i: %s\n' % | ||
68 | - (-exitcode, | ||
69 | + (-subp.returncode, | ||
70 | ' '.join(qemu_nbd_args + ['--fork'] + list(args)))) | ||
71 | |||
72 | - return exitcode, subp.communicate()[0] if exitcode else '' | ||
73 | + return subp.returncode, output if subp.returncode else '' | ||
74 | |||
75 | def qemu_nbd_popen(*args): | ||
76 | '''Run qemu-nbd in daemon mode and return the parent's exit code''' | ||
77 | @@ -XXX,XX +XXX,XX @@ def qemu_pipe(*args): | ||
78 | subp = subprocess.Popen(args, stdout=subprocess.PIPE, | ||
79 | stderr=subprocess.STDOUT, | ||
80 | universal_newlines=True) | ||
81 | - exitcode = subp.wait() | ||
82 | - if exitcode < 0: | ||
83 | + output = subp.communicate()[0] | ||
84 | + if subp.returncode < 0: | ||
85 | sys.stderr.write('qemu received signal %i: %s\n' % | ||
86 | - (-exitcode, ' '.join(args))) | ||
87 | - return subp.communicate()[0] | ||
88 | + (-subp.returncode, ' '.join(args))) | ||
89 | + return output | ||
90 | |||
91 | def supported_formats(read_only=False): | ||
92 | '''Set 'read_only' to True to check ro-whitelist | ||
93 | -- | ||
94 | 2.25.4 | ||
95 | |||
96 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
2 | 1 | ||
3 | Commit 96927c744 replaced qdev_init_nofail() call by | ||
4 | isa_realize_and_unref() which has a different error | ||
5 | message. Update the test output accordingly. | ||
6 | |||
7 | Gitlab CI error after merging b77b5b3dc7: | ||
8 | https://gitlab.com/qemu-project/qemu/-/jobs/597414772#L4375 | ||
9 | |||
10 | Reported-by: Thomas Huth <thuth@redhat.com> | ||
11 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
12 | Signed-off-by: Alex Bennée <alex.bennee@linaro.org> | ||
13 | Reviewed-by: John Snow <jsnow@redhat.com> | ||
14 | Reviewed-by: Thomas Huth <thuth@redhat.com> | ||
15 | Message-Id: <20200616154949.6586-1-philmd@redhat.com> | ||
16 | Message-Id: <20200624140446.15380-2-alex.bennee@linaro.org> | ||
17 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
18 | --- | ||
19 | tests/qemu-iotests/051.pc.out | 4 ++-- | ||
20 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out | ||
23 | index XXXXXXX..XXXXXXX 100644 | ||
24 | --- a/tests/qemu-iotests/051.pc.out | ||
25 | +++ b/tests/qemu-iotests/051.pc.out | ||
26 | @@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information | ||
27 | |||
28 | Testing: -drive if=ide | ||
29 | QEMU X.Y.Z monitor - type 'help' for more information | ||
30 | -(qemu) QEMU_PROG: Initialization of device ide-hd failed: Device needs media, but drive is empty | ||
31 | +(qemu) QEMU_PROG: Device needs media, but drive is empty | ||
32 | |||
33 | Testing: -drive if=virtio | ||
34 | QEMU X.Y.Z monitor - type 'help' for more information | ||
35 | @@ -XXX,XX +XXX,XX @@ QEMU X.Y.Z monitor - type 'help' for more information | ||
36 | |||
37 | Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on | ||
38 | QEMU X.Y.Z monitor - type 'help' for more information | ||
39 | -(qemu) QEMU_PROG: Initialization of device ide-hd failed: Block node is read-only | ||
40 | +(qemu) QEMU_PROG: Block node is read-only | ||
41 | |||
42 | Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on | ||
43 | QEMU X.Y.Z monitor - type 'help' for more information | ||
44 | -- | ||
45 | 2.25.4 | ||
46 | |||
47 | diff view generated by jsdifflib |