Skip to contentSkip to conversation

Unbreak qemu-img error messages and iotests

PATCH Applied Markus Armbruster 2 participants 4 messages Mar 14, 2015 – Mar 16, 2015

lore
Share & tools
lore
#1 lore raw

PATCH 1/2 iotests: Update 051's reference output

In reply to Markus Armbruster

Commit c4bacaf improved error reporting, but neglected to update 051.out. Commit 2726958 tried to redress, but didn't get it quite right (punctuation difference), and shortly after commit ae071cc..master improved error reporting some more, neglecting 051.out some more. Sorry!

---
 tests/qemu-iotests/051.out | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
tests/qemu-iotests/051.out +1 -3
index 09895e6..2890eac 100644
@@ -128,13 +128,11 @@ QEMU_PROG: Initialization of device ide-hd failed: Device initialization failed.
 Testing: -drive if=virtio
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) QEMU_PROG: -drive if=virtio: Device needs media, but drive is empty
-QEMU_PROG: -drive if=virtio: Device initialization failed.
 QEMU_PROG: -drive if=virtio: Device 'virtio-blk-pci' could not be initialized
 
 Testing: -drive if=scsi
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -drive if=scsi: Device needs media, but drive is empty
-QEMU_PROG: Initialization of device lsi53c895a failed: Device initialization failed.
+(qemu) QEMU_PROG: Initialization of device lsi53c895a failed: Device needs media, but drive is empty
 
 Testing: -drive if=none,id=disk -device ide-cd,drive=disk
 QEMU X.Y.Z monitor - type 'help' for more information
Signature · 1 line
1.9.3
#0 lore raw

cover Unbreak qemu-img error messages and iotests

"check -T -qcow2" now passes again. Sorry for the mess I made.

Markus Armbruster (2):
iotests: Update 051's reference output
qemu-img: Fix convert, amend error messages for unknown options

 qemu-img.c                 | 6 ++----
 tests/qemu-iotests/051.out | 4 +---
 tests/qemu-iotests/061.out | 1 -
 3 files changed, 3 insertions(+), 8 deletions(-)
Signature · 1 line
1.9.3
#2 lore raw

PATCH 2/2 qemu-img: Fix convert, amend error messages for unknown options

Message quality regressed in commit dc523cd.

---
 qemu-img.c                 | 6 ++----
 tests/qemu-iotests/061.out | 1 -
 2 files changed, 2 insertions(+), 5 deletions(-)
qemu-img.c +2 -4
index 5af6f45..82d9078 100644
@@ -1554,8 +1554,7 @@ static int img_convert(int argc, char **argv)
         if (options) {
             qemu_opts_do_parse(opts, options, NULL, &local_err);
             if (local_err) {
-                error_report("Invalid options for file format '%s'", out_fmt);
-                error_free(local_err);
+                error_report_err(local_err);
                 ret = -1;
                 goto out;
             }
@@ -3001,8 +3000,7 @@ static int img_amend(int argc, char **argv)
     if (options) {
         qemu_opts_do_parse(opts, options, NULL, &err);
         if (err) {
-            error_report("Invalid options for file format '%s'", fmt);
-            error_free(err);
+            error_report_err(err);
             ret = -1;
             goto out;
         }
tests/qemu-iotests/061.out +0 -1
index e70f983..5ec248f 100644
@@ -288,7 +288,6 @@ qemu-img: Error while amending options: Invalid argument
 Unknown compatibility level 0.42.
 qemu-img: Error while amending options: Invalid argument
 qemu-img: Invalid parameter 'foo'
-qemu-img: Invalid options for file format 'qcow2'
 Changing the cluster size is not supported.
 qemu-img: Error while amending options: Operation not supported
 Changing the encryption flag is not supported.
Signature · 1 line
1.9.3
Applied
#3 lore raw
In reply to Markus Armbruster

Am 14.03.2015 um 10:23 hat Markus Armbruster geschrieben:

Quoted 5 lines

"check -T -qcow2" now passes again. Sorry for the mess I made.

Markus Armbruster (2):
iotests: Update 051's reference output
qemu-img: Fix convert, amend error messages for unknown options

Thanks, applied to the block branch.

Kevin