提交 b9884681 编写于 作者: M Markus Armbruster

qemu-io qemu-nbd: Use error_report() etc. instead of fprintf()

Just three instances left.
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Message-Id: <1450452927-8346-16-git-send-email-armbru@redhat.com>
上级 d410fe14
...@@ -57,17 +57,15 @@ static int openfile(char *name, int flags, QDict *opts) ...@@ -57,17 +57,15 @@ static int openfile(char *name, int flags, QDict *opts)
BlockDriverState *bs; BlockDriverState *bs;
if (qemuio_blk) { if (qemuio_blk) {
fprintf(stderr, "file open already, try 'help close'\n"); error_report("file open already, try 'help close'");
QDECREF(opts); QDECREF(opts);
return 1; return 1;
} }
qemuio_blk = blk_new_open("hda", name, NULL, opts, flags, &local_err); qemuio_blk = blk_new_open("hda", name, NULL, opts, flags, &local_err);
if (!qemuio_blk) { if (!qemuio_blk) {
fprintf(stderr, "%s: can't open%s%s: %s\n", progname, error_reportf_err(local_err, "can't open%s%s: ",
name ? " device " : "", name ?: "", name ? " device " : "", name ?: "");
error_get_pretty(local_err));
error_free(local_err);
return 1; return 1;
} }
......
...@@ -257,7 +257,7 @@ static void *nbd_client_thread(void *arg) ...@@ -257,7 +257,7 @@ static void *nbd_client_thread(void *arg)
fd = open(device, O_RDWR); fd = open(device, O_RDWR);
if (fd < 0) { if (fd < 0) {
/* Linux-only, we can use %m in printf. */ /* Linux-only, we can use %m in printf. */
fprintf(stderr, "Failed to open %s: %m\n", device); error_report("Failed to open %s: %m", device);
goto out_socket; goto out_socket;
} }
......
...@@ -2,17 +2,17 @@ QA output created by 059 ...@@ -2,17 +2,17 @@ QA output created by 059
=== Testing invalid granularity === === Testing invalid granularity ===
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.vmdk: Invalid granularity, image may be corrupt can't open device TEST_DIR/t.vmdk: Invalid granularity, image may be corrupt
no file open, try 'help open' no file open, try 'help open'
=== Testing too big L2 table size === === Testing too big L2 table size ===
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.vmdk: L2 table size too big can't open device TEST_DIR/t.vmdk: L2 table size too big
no file open, try 'help open' no file open, try 'help open'
=== Testing too big L1 table size === === Testing too big L1 table size ===
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.vmdk: L1 size too big can't open device TEST_DIR/t.vmdk: L1 size too big
no file open, try 'help open' no file open, try 'help open'
=== Testing monolithicFlat creation and opening === === Testing monolithicFlat creation and opening ===
...@@ -2055,7 +2055,7 @@ wrote 512/512 bytes at offset 10240 ...@@ -2055,7 +2055,7 @@ wrote 512/512 bytes at offset 10240
=== Testing monolithicFlat with internally generated JSON file name === === Testing monolithicFlat with internally generated JSON file name ===
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 subformat=monolithicFlat Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 subformat=monolithicFlat
qemu-io: can't open: Cannot use relative extent paths with VMDK descriptor file 'json:{"image": {"driver": "file", "filename": "TEST_DIR/t.IMGFMT"}, "driver": "blkdebug", "inject-error.0.event": "read_aio"}' can't open: Cannot use relative extent paths with VMDK descriptor file 'json:{"image": {"driver": "file", "filename": "TEST_DIR/t.IMGFMT"}, "driver": "blkdebug", "inject-error.0.event": "read_aio"}'
=== Testing version 3 === === Testing version 3 ===
image: TEST_DIR/iotest-version3.IMGFMT image: TEST_DIR/iotest-version3.IMGFMT
......
...@@ -20,7 +20,7 @@ Format specific information: ...@@ -20,7 +20,7 @@ Format specific information:
lazy refcounts: false lazy refcounts: false
refcount bits: 16 refcount bits: 16
corrupt: true corrupt: true
qemu-io: can't open device TEST_DIR/t.IMGFMT: IMGFMT: Image is corrupt; cannot be opened read/write can't open device TEST_DIR/t.IMGFMT: IMGFMT: Image is corrupt; cannot be opened read/write
read 512/512 bytes at offset 0 read 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
......
...@@ -4,5 +4,5 @@ QA output created by 069 ...@@ -4,5 +4,5 @@ QA output created by 069
Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=131072 Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=131072
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=131072 backing_file=TEST_DIR/t.IMGFMT.base Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=131072 backing_file=TEST_DIR/t.IMGFMT.base
qemu-io: can't open device TEST_DIR/t.IMGFMT: Could not open backing file: Could not open 'TEST_DIR/t.IMGFMT.base': No such file or directory can't open device TEST_DIR/t.IMGFMT: Could not open backing file: Could not open 'TEST_DIR/t.IMGFMT.base': No such file or directory
*** done *** done
QA output created by 070 QA output created by 070
=== Verify open image read-only fails, due to dirty log === === Verify open image read-only fails, due to dirty log ===
qemu-io: can't open device TEST_DIR/iotest-dirtylog-10G-4M.vhdx: VHDX image file 'TEST_DIR/iotest-dirtylog-10G-4M.vhdx' opened read-only, but contains a log that needs to be replayed. To replay the log, execute: can't open device TEST_DIR/iotest-dirtylog-10G-4M.vhdx: VHDX image file 'TEST_DIR/iotest-dirtylog-10G-4M.vhdx' opened read-only, but contains a log that needs to be replayed. To replay the log, execute:
qemu-img check -r all 'TEST_DIR/iotest-dirtylog-10G-4M.vhdx': Operation not permitted qemu-img check -r all 'TEST_DIR/iotest-dirtylog-10G-4M.vhdx': Operation not permitted
no file open, try 'help open' no file open, try 'help open'
=== Verify open image replays log === === Verify open image replays log ===
......
...@@ -9,30 +9,30 @@ read 512/512 bytes at offset 1048064 ...@@ -9,30 +9,30 @@ read 512/512 bytes at offset 1048064
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
== block_size must be a multiple of 512 == == block_size must be a multiple of 512 ==
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: block_size 513 must be a multiple of 512 can't open device TEST_DIR/simple-pattern.cloop: block_size 513 must be a multiple of 512
no file open, try 'help open' no file open, try 'help open'
== block_size cannot be zero == == block_size cannot be zero ==
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: block_size cannot be zero can't open device TEST_DIR/simple-pattern.cloop: block_size cannot be zero
no file open, try 'help open' no file open, try 'help open'
== huge block_size === == huge block_size ===
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: block_size 4294966784 must be 64 MB or less can't open device TEST_DIR/simple-pattern.cloop: block_size 4294966784 must be 64 MB or less
no file open, try 'help open' no file open, try 'help open'
== offsets_size overflow === == offsets_size overflow ===
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: n_blocks 4294967295 must be 536870911 or less can't open device TEST_DIR/simple-pattern.cloop: n_blocks 4294967295 must be 536870911 or less
no file open, try 'help open' no file open, try 'help open'
== refuse images that require too many offsets === == refuse images that require too many offsets ===
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: image requires too many offsets, try increasing block size can't open device TEST_DIR/simple-pattern.cloop: image requires too many offsets, try increasing block size
no file open, try 'help open' no file open, try 'help open'
== refuse images with non-monotonically increasing offsets == == refuse images with non-monotonically increasing offsets ==
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: offsets not monotonically increasing at index 1, image file is corrupt can't open device TEST_DIR/simple-pattern.cloop: offsets not monotonically increasing at index 1, image file is corrupt
no file open, try 'help open' no file open, try 'help open'
== refuse images with invalid compressed block size == == refuse images with invalid compressed block size ==
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: invalid compressed block size at index 1, image file is corrupt can't open device TEST_DIR/simple-pattern.cloop: invalid compressed block size at index 1, image file is corrupt
no file open, try 'help open' no file open, try 'help open'
*** done *** done
...@@ -5,15 +5,15 @@ read 65536/65536 bytes at offset 0 ...@@ -5,15 +5,15 @@ read 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
== Negative catalog size == == Negative catalog size ==
qemu-io: can't open device TEST_DIR/parallels-v1: Catalog too large can't open device TEST_DIR/parallels-v1: Catalog too large
no file open, try 'help open' no file open, try 'help open'
== Overflow in catalog allocation == == Overflow in catalog allocation ==
qemu-io: can't open device TEST_DIR/parallels-v1: Catalog too large can't open device TEST_DIR/parallels-v1: Catalog too large
no file open, try 'help open' no file open, try 'help open'
== Zero sectors per track == == Zero sectors per track ==
qemu-io: can't open device TEST_DIR/parallels-v1: Invalid image: Zero sectors per track can't open device TEST_DIR/parallels-v1: Invalid image: Zero sectors per track
no file open, try 'help open' no file open, try 'help open'
== Read from a valid v2 image == == Read from a valid v2 image ==
......
...@@ -5,24 +5,24 @@ read 512/512 bytes at offset 0 ...@@ -5,24 +5,24 @@ read 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
== Negative catalog size == == Negative catalog size ==
qemu-io: can't open device TEST_DIR/empty.bochs: Catalog size is too large can't open device TEST_DIR/empty.bochs: Catalog size is too large
no file open, try 'help open' no file open, try 'help open'
== Overflow for catalog size * sizeof(uint32_t) == == Overflow for catalog size * sizeof(uint32_t) ==
qemu-io: can't open device TEST_DIR/empty.bochs: Catalog size is too large can't open device TEST_DIR/empty.bochs: Catalog size is too large
no file open, try 'help open' no file open, try 'help open'
== Too small catalog bitmap for image size == == Too small catalog bitmap for image size ==
qemu-io: can't open device TEST_DIR/empty.bochs: Catalog size is too small for this disk size can't open device TEST_DIR/empty.bochs: Catalog size is too small for this disk size
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/empty.bochs: Catalog size is too small for this disk size can't open device TEST_DIR/empty.bochs: Catalog size is too small for this disk size
no file open, try 'help open' no file open, try 'help open'
== Negative extent size == == Negative extent size ==
qemu-io: can't open device TEST_DIR/empty.bochs: Extent size 2147483648 is too large can't open device TEST_DIR/empty.bochs: Extent size 2147483648 is too large
no file open, try 'help open' no file open, try 'help open'
== Zero extent size == == Zero extent size ==
qemu-io: can't open device TEST_DIR/empty.bochs: Extent size must be at least 512 can't open device TEST_DIR/empty.bochs: Extent size must be at least 512
no file open, try 'help open' no file open, try 'help open'
*** done *** done
...@@ -2,46 +2,46 @@ QA output created by 080 ...@@ -2,46 +2,46 @@ QA output created by 080
== Huge header size == == Huge header size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.qcow2: qcow2 header exceeds cluster size can't open device TEST_DIR/t.qcow2: qcow2 header exceeds cluster size
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow2: qcow2 header exceeds cluster size can't open device TEST_DIR/t.qcow2: qcow2 header exceeds cluster size
no file open, try 'help open' no file open, try 'help open'
== Huge unknown header extension == == Huge unknown header extension ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.qcow2: Invalid backing file offset can't open device TEST_DIR/t.qcow2: Invalid backing file offset
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow2: Header extension too large can't open device TEST_DIR/t.qcow2: Header extension too large
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow2: Header extension too large can't open device TEST_DIR/t.qcow2: Header extension too large
no file open, try 'help open' no file open, try 'help open'
== Huge refcount table size == == Huge refcount table size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.qcow2: Reference count table too large can't open device TEST_DIR/t.qcow2: Reference count table too large
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow2: Reference count table too large can't open device TEST_DIR/t.qcow2: Reference count table too large
no file open, try 'help open' no file open, try 'help open'
== Misaligned refcount table == == Misaligned refcount table ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.qcow2: Invalid reference count table offset can't open device TEST_DIR/t.qcow2: Invalid reference count table offset
no file open, try 'help open' no file open, try 'help open'
== Huge refcount offset == == Huge refcount offset ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.qcow2: Invalid reference count table offset can't open device TEST_DIR/t.qcow2: Invalid reference count table offset
no file open, try 'help open' no file open, try 'help open'
== Invalid snapshot table == == Invalid snapshot table ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.qcow2: Too many snapshots can't open device TEST_DIR/t.qcow2: Too many snapshots
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow2: Too many snapshots can't open device TEST_DIR/t.qcow2: Too many snapshots
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow2: Invalid snapshot table offset can't open device TEST_DIR/t.qcow2: Invalid snapshot table offset
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow2: Invalid snapshot table offset can't open device TEST_DIR/t.qcow2: Invalid snapshot table offset
no file open, try 'help open' no file open, try 'help open'
== Hitting snapshot table size limit == == Hitting snapshot table size limit ==
...@@ -52,13 +52,13 @@ read 512/512 bytes at offset 0 ...@@ -52,13 +52,13 @@ read 512/512 bytes at offset 0
== Invalid L1 table == == Invalid L1 table ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.qcow2: Active L1 table too large can't open device TEST_DIR/t.qcow2: Active L1 table too large
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow2: Active L1 table too large can't open device TEST_DIR/t.qcow2: Active L1 table too large
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow2: Invalid L1 table offset can't open device TEST_DIR/t.qcow2: Invalid L1 table offset
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow2: Invalid L1 table offset can't open device TEST_DIR/t.qcow2: Invalid L1 table offset
no file open, try 'help open' no file open, try 'help open'
== Invalid L1 table (with internal snapshot in the image) == == Invalid L1 table (with internal snapshot in the image) ==
...@@ -67,7 +67,7 @@ qemu-img: Could not open 'TEST_DIR/t.IMGFMT': L1 table is too small ...@@ -67,7 +67,7 @@ qemu-img: Could not open 'TEST_DIR/t.IMGFMT': L1 table is too small
== Invalid backing file size == == Invalid backing file size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.qcow2: Backing file name too long can't open device TEST_DIR/t.qcow2: Backing file name too long
no file open, try 'help open' no file open, try 'help open'
== Invalid L2 entry (huge physical offset) == == Invalid L2 entry (huge physical offset) ==
......
QA output created by 083 QA output created by 083
=== Check disconnect before neg1 === === Check disconnect before neg1 ===
qemu-io: can't open device nbd:127.0.0.1:PORT:exportname=foo can't open device nbd:127.0.0.1:PORT:exportname=foo
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect after neg1 === === Check disconnect after neg1 ===
qemu-io: can't open device nbd:127.0.0.1:PORT:exportname=foo can't open device nbd:127.0.0.1:PORT:exportname=foo
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect 8 neg1 === === Check disconnect 8 neg1 ===
qemu-io: can't open device nbd:127.0.0.1:PORT:exportname=foo can't open device nbd:127.0.0.1:PORT:exportname=foo
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect 16 neg1 === === Check disconnect 16 neg1 ===
qemu-io: can't open device nbd:127.0.0.1:PORT:exportname=foo can't open device nbd:127.0.0.1:PORT:exportname=foo
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect before export === === Check disconnect before export ===
qemu-io: can't open device nbd:127.0.0.1:PORT:exportname=foo can't open device nbd:127.0.0.1:PORT:exportname=foo
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect after export === === Check disconnect after export ===
qemu-io: can't open device nbd:127.0.0.1:PORT:exportname=foo can't open device nbd:127.0.0.1:PORT:exportname=foo
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect 4 export === === Check disconnect 4 export ===
qemu-io: can't open device nbd:127.0.0.1:PORT:exportname=foo can't open device nbd:127.0.0.1:PORT:exportname=foo
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect 12 export === === Check disconnect 12 export ===
qemu-io: can't open device nbd:127.0.0.1:PORT:exportname=foo can't open device nbd:127.0.0.1:PORT:exportname=foo
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect 16 export === === Check disconnect 16 export ===
qemu-io: can't open device nbd:127.0.0.1:PORT:exportname=foo can't open device nbd:127.0.0.1:PORT:exportname=foo
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect before neg2 === === Check disconnect before neg2 ===
qemu-io: can't open device nbd:127.0.0.1:PORT:exportname=foo can't open device nbd:127.0.0.1:PORT:exportname=foo
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect after neg2 === === Check disconnect after neg2 ===
...@@ -56,12 +56,12 @@ read failed: Input/output error ...@@ -56,12 +56,12 @@ read failed: Input/output error
=== Check disconnect 8 neg2 === === Check disconnect 8 neg2 ===
qemu-io: can't open device nbd:127.0.0.1:PORT:exportname=foo can't open device nbd:127.0.0.1:PORT:exportname=foo
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect 10 neg2 === === Check disconnect 10 neg2 ===
qemu-io: can't open device nbd:127.0.0.1:PORT:exportname=foo can't open device nbd:127.0.0.1:PORT:exportname=foo
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect before request === === Check disconnect before request ===
...@@ -107,27 +107,27 @@ read 512/512 bytes at offset 0 ...@@ -107,27 +107,27 @@ read 512/512 bytes at offset 0
=== Check disconnect before neg-classic === === Check disconnect before neg-classic ===
qemu-io: can't open device nbd:127.0.0.1:PORT can't open device nbd:127.0.0.1:PORT
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect 8 neg-classic === === Check disconnect 8 neg-classic ===
qemu-io: can't open device nbd:127.0.0.1:PORT can't open device nbd:127.0.0.1:PORT
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect 16 neg-classic === === Check disconnect 16 neg-classic ===
qemu-io: can't open device nbd:127.0.0.1:PORT can't open device nbd:127.0.0.1:PORT
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect 24 neg-classic === === Check disconnect 24 neg-classic ===
qemu-io: can't open device nbd:127.0.0.1:PORT can't open device nbd:127.0.0.1:PORT
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect 28 neg-classic === === Check disconnect 28 neg-classic ===
qemu-io: can't open device nbd:127.0.0.1:PORT can't open device nbd:127.0.0.1:PORT
no file open, try 'help open' no file open, try 'help open'
=== Check disconnect after neg-classic === === Check disconnect after neg-classic ===
......
...@@ -2,16 +2,16 @@ QA output created by 088 ...@@ -2,16 +2,16 @@ QA output created by 088
== Invalid block size == == Invalid block size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.vpc: Invalid block size 0 can't open device TEST_DIR/t.vpc: Invalid block size 0
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.vpc: Invalid block size 0 can't open device TEST_DIR/t.vpc: Invalid block size 0
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.vpc: Invalid block size 128 can't open device TEST_DIR/t.vpc: Invalid block size 128
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.vpc: Invalid block size 128 can't open device TEST_DIR/t.vpc: Invalid block size 128
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.vpc: Invalid block size 305419896 can't open device TEST_DIR/t.vpc: Invalid block size 305419896
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.vpc: Invalid block size 305419896 can't open device TEST_DIR/t.vpc: Invalid block size 305419896
no file open, try 'help open' no file open, try 'help open'
*** done *** done
...@@ -2,37 +2,37 @@ QA output created by 092 ...@@ -2,37 +2,37 @@ QA output created by 092
== Invalid cluster size == == Invalid cluster size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.qcow: Cluster size must be between 512 and 64k can't open device TEST_DIR/t.qcow: Cluster size must be between 512 and 64k
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow: Cluster size must be between 512 and 64k can't open device TEST_DIR/t.qcow: Cluster size must be between 512 and 64k
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow: Cluster size must be between 512 and 64k can't open device TEST_DIR/t.qcow: Cluster size must be between 512 and 64k
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow: Cluster size must be between 512 and 64k can't open device TEST_DIR/t.qcow: Cluster size must be between 512 and 64k
no file open, try 'help open' no file open, try 'help open'
== Invalid L2 table size == == Invalid L2 table size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.qcow: L2 table size must be between 512 and 64k can't open device TEST_DIR/t.qcow: L2 table size must be between 512 and 64k
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow: L2 table size must be between 512 and 64k can't open device TEST_DIR/t.qcow: L2 table size must be between 512 and 64k
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow: L2 table size must be between 512 and 64k can't open device TEST_DIR/t.qcow: L2 table size must be between 512 and 64k
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow: L2 table size must be between 512 and 64k can't open device TEST_DIR/t.qcow: L2 table size must be between 512 and 64k
no file open, try 'help open' no file open, try 'help open'
== Invalid size == == Invalid size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.qcow: Image too large can't open device TEST_DIR/t.qcow: Image too large
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow: Image too large can't open device TEST_DIR/t.qcow: Image too large
no file open, try 'help open' no file open, try 'help open'
== Invalid backing file length == == Invalid backing file length ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.qcow: Backing file name too long can't open device TEST_DIR/t.qcow: Backing file name too long
no file open, try 'help open' no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow: Backing file name too long can't open device TEST_DIR/t.qcow: Backing file name too long
no file open, try 'help open' no file open, try 'help open'
*** done *** done
...@@ -5,10 +5,10 @@ wrote 65536/65536 bytes at offset 0 ...@@ -5,10 +5,10 @@ wrote 65536/65536 bytes at offset 0
=== Testing invalid option combinations === === Testing invalid option combinations ===
qemu-io: can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set the same time can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set the same time
qemu-io: can't open device TEST_DIR/t.IMGFMT: l2-cache-size may not exceed cache-size can't open device TEST_DIR/t.IMGFMT: l2-cache-size may not exceed cache-size
qemu-io: can't open device TEST_DIR/t.IMGFMT: refcount-cache-size may not exceed cache-size can't open device TEST_DIR/t.IMGFMT: refcount-cache-size may not exceed cache-size
qemu-io: can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set the same time can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set the same time
=== Testing valid option combinations === === Testing valid option combinations ===
......
...@@ -7,7 +7,7 @@ virtual size: 64M (67108864 bytes) ...@@ -7,7 +7,7 @@ virtual size: 64M (67108864 bytes)
cluster_size: 65536 cluster_size: 65536
backing file: TEST_DIR/t.IMGFMT.base backing file: TEST_DIR/t.IMGFMT.base
backing file format: foo backing file format: foo
qemu-io: can't open device TEST_DIR/t.qcow2: Could not open backing file: Unknown driver 'foo' can't open device TEST_DIR/t.qcow2: Could not open backing file: Unknown driver 'foo'
read 4096/4096 bytes at offset 0 read 4096/4096 bytes at offset 0
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
*** done *** done
...@@ -2,36 +2,36 @@ QA output created by 116 ...@@ -2,36 +2,36 @@ QA output created by 116
== truncated header cluster == == truncated header cluster ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
qemu-io: can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument
no file open, try 'help open' no file open, try 'help open'
== invalid header magic == == invalid header magic ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
qemu-io: can't open device TEST_DIR/t.qed: Image not in QED format can't open device TEST_DIR/t.qed: Image not in QED format
no file open, try 'help open' no file open, try 'help open'
== invalid cluster size == == invalid cluster size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
qemu-io: can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument
no file open, try 'help open' no file open, try 'help open'
== invalid table size == == invalid table size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
qemu-io: can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument
no file open, try 'help open' no file open, try 'help open'
== invalid header size == == invalid header size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
qemu-io: can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument
no file open, try 'help open' no file open, try 'help open'
== invalid L1 table offset == == invalid L1 table offset ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
qemu-io: can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument
no file open, try 'help open' no file open, try 'help open'
== invalid image size == == invalid image size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
qemu-io: can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument
no file open, try 'help open' no file open, try 'help open'
*** done *** done
...@@ -22,7 +22,7 @@ read 32768/32768 bytes at offset 163840 ...@@ -22,7 +22,7 @@ read 32768/32768 bytes at offset 163840
read 32768/32768 bytes at offset 0 read 32768/32768 bytes at offset 0
32 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 32 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
== Corrupt image == == Corrupt image ==
qemu-io: can't open device TEST_DIR/t.parallels: parallels: Image was not closed correctly; cannot be opened read/write can't open device TEST_DIR/t.parallels: parallels: Image was not closed correctly; cannot be opened read/write
no file open, try 'help open' no file open, try 'help open'
ERROR image was not closed correctly ERROR image was not closed correctly
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册