qemu-io: propagate errors through Error API instead of printf

Convert the qemu-io command infrastructure to use QEMU's Error API
(Error **errp) for error propagation instead of printing directly to
stdout/stderr via printf/fprintf.

The cfunc_t typedef, all ~35 command functions, the dispatcher chain
(command/init_check_command/qemuio_command), and helper functions
(parse_pattern, create_iovec, qemu_io_alloc_from_file) all gain an
Error **errp parameter. Async completion callbacks (aio_read_done,
aio_write_done, aio_discard_done) use error_report() since they have
no Error path back to the caller.

Update tests:
- error_report_err() prepends qemu-io: prefix
- copy-before-write: check the HMP return value, rather than stdio
- other tests: update to check JSON {"return": "Error: error text"}

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260828-qemu-no-hmp-v5-21-9227de146347@redhat.com>
This commit is contained in:
Marc-André Lureau committed 2026-08-29 12:07:44 +04:00
1 parent 5261dda976
commit 3c0c7bfeba
35 files changed
+552 -523

No files matched your search

+1 -1
View File
@@ -598,7 +598,7 @@ void hmp_qemu_io(Monitor *mon, const QDict *qdict)
* extended, possibly resulting in a read-only guest device keeping write
* permissions. Ugly, but it appears to be the lesser evil.
*/
qemuio_command(blk, command);
qemuio_command(blk, command, &err);
fail:
blk_unref(local_blk);
+2 -2
View File
@@ -25,7 +25,7 @@
* Operate on @blk using @argc/@argv as the command's arguments, and
* return 0 on success or negative errno on failure.
*/
typedef int (*cfunc_t)(BlockBackend *blk, int argc, char **argv);
typedef int (*cfunc_t)(BlockBackend *blk, int argc, char **argv, Error **errp);
typedef void (*helpfunc_t)(void);
@@ -45,7 +45,7 @@ typedef struct cmdinfo {
extern bool qemuio_misalign;
int qemuio_command(BlockBackend *blk, const char *cmd);
int qemuio_command(BlockBackend *blk, const char *cmd, Error **errp);
void qemuio_add_command(const cmdinfo_t *ci);
void qemuio_command_usage(const cmdinfo_t *ci);
+213 -201
View File
File diff suppressed because it is too large. Load diff
+12 -5
View File
@@ -68,7 +68,7 @@ static int get_eof_char(void)
#endif
}
static int close_f(BlockBackend *blk, int argc, char **argv)
static int close_f(BlockBackend *blk, int argc, char **argv, Error **errp)
{
blk_unref(qemuio_blk);
qemuio_blk = NULL;
@@ -140,7 +140,7 @@ static void open_help(void)
"\n");
}
static int open_f(BlockBackend *blk, int argc, char **argv);
static int open_f(BlockBackend *blk, int argc, char **argv, Error **errp);
static const cmdinfo_t open_cmd = {
.name = "open",
@@ -164,7 +164,7 @@ static QemuOptsList empty_opts = {
},
};
static int open_f(BlockBackend *blk, int argc, char **argv)
static int open_f(BlockBackend *blk, int argc, char **argv, Error **errp)
{
int flags = BDRV_O_UNMAP;
int readonly = 0;
@@ -268,7 +268,7 @@ static int open_f(BlockBackend *blk, int argc, char **argv)
return 0;
}
static int quit_f(BlockBackend *blk, int argc, char **argv)
static int quit_f(BlockBackend *blk, int argc, char **argv, Error **errp)
{
quit_qemu_io = true;
return 0;
@@ -414,7 +414,14 @@ static void prep_fetchline(void *opaque)
static int do_qemuio_command(const char *cmd)
{
return qemuio_command(qemuio_blk, cmd);
Error *local_err = NULL;
int ret;
ret = qemuio_command(qemuio_blk, cmd, &local_err);
if (local_err) {
error_report_err(local_err);
}
return ret;
}
static int command_loop(void)
+10 -10
View File
@@ -6,36 +6,36 @@ wrote 1048576/1048576 bytes at offset 133169152
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write into image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
write at image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
write past image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
pwrite past image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
writev past image boundary
writev failed: Input/output error
qemu-io: writev failed: Input/output error
read before image boundary
read 1048576/1048576 bytes at offset 133169152
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read into image boundary
read failed: Input/output error
qemu-io: read failed: Input/output error
read at image boundary
read failed: Input/output error
qemu-io: read failed: Input/output error
read past image boundary
read failed: Input/output error
qemu-io: read failed: Input/output error
pread past image boundary
read failed: Input/output error
qemu-io: read failed: Input/output error
readv past image boundary
readv failed: Input/output error
qemu-io: readv failed: Input/output error
*** done
+30 -30
View File
@@ -2,92 +2,92 @@ QA output created by 021
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
== testing writev -P -1 ==
-1 is not a valid pattern byte
qemu-io: -1 is not a valid pattern byte
== testing read -P -1 ==
-1 is not a valid pattern byte
qemu-io: -1 is not a valid pattern byte
== testing write -P -1 ==
-1 is not a valid pattern byte
qemu-io: -1 is not a valid pattern byte
== testing readv -P -1 ==
-1 is not a valid pattern byte
qemu-io: -1 is not a valid pattern byte
== testing aio_read -P -1 ==
-1 is not a valid pattern byte
qemu-io: -1 is not a valid pattern byte
== testing aio_write -P -1 ==
-1 is not a valid pattern byte
qemu-io: -1 is not a valid pattern byte
== testing writev -P 300 ==
300 is not a valid pattern byte
qemu-io: 300 is not a valid pattern byte
== testing read -P 300 ==
300 is not a valid pattern byte
qemu-io: 300 is not a valid pattern byte
== testing write -P 300 ==
300 is not a valid pattern byte
qemu-io: 300 is not a valid pattern byte
== testing readv -P 300 ==
300 is not a valid pattern byte
qemu-io: 300 is not a valid pattern byte
== testing aio_read -P 300 ==
300 is not a valid pattern byte
qemu-io: 300 is not a valid pattern byte
== testing aio_write -P 300 ==
300 is not a valid pattern byte
qemu-io: 300 is not a valid pattern byte
== testing writev -P 12m ==
12m is not a valid pattern byte
qemu-io: 12m is not a valid pattern byte
== testing read -P 12m ==
12m is not a valid pattern byte
qemu-io: 12m is not a valid pattern byte
== testing write -P 12m ==
12m is not a valid pattern byte
qemu-io: 12m is not a valid pattern byte
== testing readv -P 12m ==
12m is not a valid pattern byte
qemu-io: 12m is not a valid pattern byte
== testing aio_read -P 12m ==
12m is not a valid pattern byte
qemu-io: 12m is not a valid pattern byte
== testing aio_write -P 12m ==
12m is not a valid pattern byte
qemu-io: 12m is not a valid pattern byte
== testing writev -P 4k ==
4k is not a valid pattern byte
qemu-io: 4k is not a valid pattern byte
== testing read -P 4k ==
4k is not a valid pattern byte
qemu-io: 4k is not a valid pattern byte
== testing write -P 4k ==
4k is not a valid pattern byte
qemu-io: 4k is not a valid pattern byte
== testing readv -P 4k ==
4k is not a valid pattern byte
qemu-io: 4k is not a valid pattern byte
== testing aio_read -P 4k ==
4k is not a valid pattern byte
qemu-io: 4k is not a valid pattern byte
== testing aio_write -P 4k ==
4k is not a valid pattern byte
qemu-io: 4k is not a valid pattern byte
== testing writev -P route66 ==
route66 is not a valid pattern byte
qemu-io: route66 is not a valid pattern byte
== testing read -P route66 ==
route66 is not a valid pattern byte
qemu-io: route66 is not a valid pattern byte
== testing write -P route66 ==
route66 is not a valid pattern byte
qemu-io: route66 is not a valid pattern byte
== testing readv -P route66 ==
route66 is not a valid pattern byte
qemu-io: route66 is not a valid pattern byte
== testing aio_read -P route66 ==
route66 is not a valid pattern byte
qemu-io: route66 is not a valid pattern byte
== testing aio_write -P route66 ==
route66 is not a valid pattern byte
qemu-io: route66 is not a valid pattern byte
*** done
+114 -114
View File
@@ -4,442 +4,442 @@ Errors while writing 128 kB
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 5; imm: off; once: on; write
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 5; imm: off; once: on; write -b
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 28; imm: off; once: on; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_load; errno: 5; imm: off; once: on; write
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write failed: Input/output error
read failed: Input/output error
qemu-io: write failed: Input/output error
qemu-io: read failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_load; errno: 5; imm: off; once: on; write -b
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write failed: Input/output error
read failed: Input/output error
qemu-io: write failed: Input/output error
qemu-io: read failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_load; errno: 5; imm: off; once: off; write
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write failed: Input/output error
read failed: Input/output error
qemu-io: write failed: Input/output error
qemu-io: read failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_load; errno: 5; imm: off; once: off; write -b
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write failed: Input/output error
read failed: Input/output error
qemu-io: write failed: Input/output error
qemu-io: read failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_load; errno: 28; imm: off; once: on; write
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write failed: No space left on device
read failed: No space left on device
qemu-io: write failed: No space left on device
qemu-io: read failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_load; errno: 28; imm: off; once: on; write -b
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write failed: No space left on device
read failed: No space left on device
qemu-io: write failed: No space left on device
qemu-io: read failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_load; errno: 28; imm: off; once: off; write
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write failed: No space left on device
read failed: No space left on device
qemu-io: write failed: No space left on device
qemu-io: read failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_load; errno: 28; imm: off; once: off; write -b
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write failed: No space left on device
read failed: No space left on device
qemu-io: write failed: No space left on device
qemu-io: read failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 5; imm: off; once: on; write
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 5; imm: off; once: on; write -b
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 28; imm: off; once: on; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_alloc_write; errno: 5; imm: off; once: on; write
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_alloc_write; errno: 5; imm: off; once: on; write -b
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_alloc_write; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_alloc_write; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_alloc_write; errno: 28; imm: off; once: on; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_alloc_write; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_alloc_write; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_alloc_write; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: write_aio; errno: 5; imm: off; once: on; write
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: write_aio; errno: 5; imm: off; once: on; write -b
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: write_aio; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: write_aio; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: write_aio; errno: 28; imm: off; once: on; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: write_aio; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: write_aio; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: write_aio; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_load; errno: 5; imm: off; once: on; write
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_load; errno: 5; imm: off; once: on; write -b
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_load; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_load; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_load; errno: 28; imm: off; once: on; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_load; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_load; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_load; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_update_part; errno: 5; imm: off; once: on; write
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_update_part; errno: 5; imm: off; once: on; write -b
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_update_part; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_update_part; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_update_part; errno: 28; imm: off; once: on; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_update_part; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_update_part; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_update_part; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc; errno: 5; imm: off; once: on; write
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc; errno: 5; imm: off; once: on; write -b
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc; errno: 28; imm: off; once: on; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: cluster_alloc; errno: 5; imm: off; once: on; write
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: cluster_alloc; errno: 5; imm: off; once: on; write -b
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: cluster_alloc; errno: 5; imm: off; once: off; write
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: cluster_alloc; errno: 5; imm: off; once: off; write -b
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: cluster_alloc; errno: 28; imm: off; once: on; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: cluster_alloc; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: cluster_alloc; errno: 28; imm: off; once: off; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: cluster_alloc; errno: 28; imm: off; once: off; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
=== Refcount table growth tests ===
@@ -447,122 +447,122 @@ No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_hookup; errno: 28; imm: off; once: on; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_hookup; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_hookup; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_hookup; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write; errno: 28; imm: off; once: on; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: on; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_table; errno: 28; imm: off; once: on; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_table; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_table; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_table; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_switch_table; errno: 28; imm: off; once: on; write
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_switch_table; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_switch_table; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_switch_table; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
=== L1 growth tests ===
@@ -570,76 +570,76 @@ No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_alloc_table; errno: 5; imm: off; once: on
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_alloc_table; errno: 5; imm: off; once: off
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_alloc_table; errno: 28; imm: off; once: on
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_alloc_table; errno: 28; imm: off; once: off
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_write_table; errno: 5; imm: off; once: on
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_write_table; errno: 5; imm: off; once: off
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_write_table; errno: 28; imm: off; once: on
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_write_table; errno: 28; imm: off; once: off
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_activate_table; errno: 5; imm: off; once: on
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_activate_table; errno: 5; imm: off; once: off
qemu-io: write failed: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_activate_table; errno: 28; imm: off; once: on
write failed: No space left on device
qemu-io: write failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_activate_table; errno: 28; imm: off; once: off
qemu-io: write failed: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
No errors were found on the image.
=== Avoid cluster leaks after temporary failure ===
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
write failed: Input/output error
qemu-io: write failed: Input/output error
wrote 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
No errors were found on the image.
@@ -651,6 +651,6 @@ wrote 1024/1024 bytes at offset 0
1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 1024/1024 bytes at offset 0
1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
*** done
+21 -23
View File
@@ -9,7 +9,7 @@ ERROR cluster 3 refcount=1 reference=3
Data may be corrupted, or further writes to the image may corrupt it.
incompatible_features []
qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with active L1 table); further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
incompatible_features [1]
image: TEST_DIR/t.IMGFMT
file format: IMGFMT
@@ -23,7 +23,7 @@ Format specific information:
corrupt: true
extended l2: false
qemu-io: can't open device TEST_DIR/t.IMGFMT: IMGFMT: Image is corrupt; cannot be opened read/write
no file open, try 'help open'
qemu-io: no file open, try 'help open'
read 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
@@ -37,7 +37,7 @@ ERROR cluster 2 refcount=1 reference=2
Data may be corrupted, or further writes to the image may corrupt it.
incompatible_features []
qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with refcount block); further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
incompatible_features [1]
ERROR refcount block 0 refcount=2
ERROR cluster 2 refcount=1 reference=2
@@ -73,7 +73,7 @@ Data may be corrupted, or further writes to the image may corrupt it.
This means waste of disk space, but no harm to data.
incompatible_features []
qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with inactive L2 table); further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
incompatible_features [1]
ERROR cluster 4 refcount=1 reference=2
Leaked cluster 9 refcount=1 reference=0
@@ -108,10 +108,10 @@ wrote 65536/65536 bytes at offset 0
wrote 65536/65536 bytes at offset 536870912
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with active L2 table); further corruption events will be suppressed
qemu-io: write failed: Input/output error
qemu-io: aio_write failed: No medium found
blkdebug: Suspended request '0'
write failed: Input/output error
blkdebug: Resuming request '0'
aio_write failed: No medium found
=== Testing unallocated image header ===
@@ -119,7 +119,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
wrote 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with qcow2_header); further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
=== Testing unaligned L1 entry ===
@@ -127,7 +127,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
wrote 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qcow2: Marking image as corrupt: L2 table offset 0x42a00 unaligned (L1 index: 0); further corruption events will be suppressed
read failed: Input/output error
qemu-io: read failed: Input/output error
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
wrote 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
@@ -140,7 +140,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
wrote 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qcow2: Marking image as corrupt: Cluster allocation offset 0x52a00 unaligned (L2 offset: 0x40000, L2 index: 0); further corruption events will be suppressed
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Testing unaligned pre-allocated zero cluster ===
@@ -154,7 +154,7 @@ qemu-img: Failed to turn zero into data clusters: Input/output error
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qcow2: Marking image as corrupt: Refblock offset 0x22a00 unaligned (reftable index: 0); further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
=== Testing non-fatal corruption on freeing ===
@@ -171,8 +171,8 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
wrote 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qcow2: Image is corrupt: Cluster allocation offset 0x52a00 unaligned (L2 offset: 0x40000, L2 index: 0); further non-fatal corruption events will be suppressed
read failed: Input/output error
read failed: Input/output error
qemu-io: read failed: Input/output error
qemu-io: read failed: Input/output error
=== Testing non-fatal and then fatal corruption report ===
@@ -181,15 +181,15 @@ wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qcow2: Image is corrupt: Cannot free unaligned cluster 0x52a00; further non-fatal corruption events will be suppressed
qcow2: Marking image as corrupt: Cluster allocation offset 0x62a00 unaligned (L2 offset: 0x40000, L2 index: 0x1); further corruption events will be suppressed
qemu-io: read failed: Input/output error
discard 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read failed: Input/output error
=== Testing empty refcount table ===
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with refcount table); further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
ERROR cluster 0 refcount=0 reference=1
ERROR cluster 1 refcount=0 reference=1
ERROR cluster 3 refcount=0 reference=1
@@ -209,7 +209,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
wrote 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qcow2: Marking image as corrupt: Preventing invalid allocation of refcount block at offset 0; further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
ERROR cluster 0 refcount=0 reference=1
ERROR cluster 1 refcount=0 reference=1
ERROR cluster 3 refcount=0 reference=1
@@ -229,7 +229,7 @@ No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qcow2: Marking image as corrupt: Preventing invalid allocation of L2 table at offset 0; further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
ERROR cluster 0 refcount=0 reference=1
ERROR cluster 1 refcount=0 reference=1
ERROR cluster 2 refcount=0 reference=1
@@ -251,7 +251,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
wrote 65536/65536 bytes at offset 65536
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qcow2: Marking image as corrupt: Preventing invalid allocation of compressed cluster at offset 0; further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
ERROR cluster 0 refcount=0 reference=1
ERROR cluster 1 refcount=0 reference=1
ERROR cluster 2 refcount=0 reference=1
@@ -286,7 +286,7 @@ No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qcow2: Marking image as corrupt: Preventing invalid allocation of L2 table at offset 0; further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
=== Testing dirty corrupt image ===
@@ -319,7 +319,7 @@ wrote 65536/65536 bytes at offset 0
discard 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qcow2: Marking image as corrupt: Preallocated zero cluster offset 0x2a00 unaligned (guest offset: 0); further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
--- Repairing ---
Repairing offset=2a00: Preallocated cluster is not properly aligned; L2 entry corrupted.
The following inconsistencies were found and repaired:
@@ -337,7 +337,7 @@ wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qcow2: Marking image as corrupt: Refblock offset 0x2a00 unaligned (reftable index: 0); further corruption events will be suppressed
qcow2_free_clusters failed: Input/output error
discard failed: No medium found
qemu-io: discard failed: No medium found
--- Repairing ---
ERROR refcount block 0 is not cluster aligned; refcount table entry corrupted
qcow2: Marking image as corrupt: Refblock offset 0x2a00 unaligned (reftable index: 0); further corruption events will be suppressed
@@ -419,8 +419,7 @@ qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps
QMP_VERSION
{"return": {}}
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "none0", "msg": "Preventing invalid write on metadata (overlaps with refcount table)", "offset": 65536, "node-name": "drive", "fatal": true, "size": 65536}}
write failed: Input/output error
{"return": ""}
{"return": "Error: write failed: Input/output error\r\n"}
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
{"return": {}}
@@ -431,7 +430,6 @@ QMP_VERSION
{"return": {}}
qcow2: Image is corrupt: L2 table offset 0x2a2a2a00 unaligned (L1 index: 0); further non-fatal corruption events will be suppressed
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "", "msg": "L2 table offset 0x2a2a2a00 unaligned (L1 index: 0)", "node-name": "drive", "fatal": false}}
{"return": ""}
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
{"return": {}}
+4 -6
View File
@@ -30,11 +30,11 @@ blkverify: read offset=0 bytes=512 contents mismatch at offset 0
=== Testing blkdebug through filename ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Testing blkdebug through file blockref ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Testing blkdebug on existing block device ===
@@ -43,8 +43,7 @@ QMP_VERSION
{"return": {}}
{"return": {}}
{"return": {}}
read failed: Input/output error
{"return": ""}
{"return": "Error: read failed: Input/output error\r\n"}
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
{"return": {}}
@@ -82,8 +81,7 @@ read 512/512 bytes at offset 0
wrote 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
{"return": ""}
read failed: Input/output error
{"return": ""}
{"return": "Error: read failed: Input/output error\r\n"}
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
QEMU_PROG: Failed to flush the L2 table cache: Input/output error
QEMU_PROG: Failed to flush the refcount block cache: Input/output error
+1 -1
View File
@@ -15,7 +15,7 @@ read 512/512 bytes at offset 512
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read 512/512 bytes at offset 1024
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Pattern verification failed at offset 0, 512 bytes
qemu-io: Pattern verification failed at offset 0, 512 bytes
read 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
*** done
+2 -2
View File
@@ -66,8 +66,8 @@ wrote 512/512 bytes at offset 0
qemu-img: Failed to load snapshot: Snapshot L1 table offset invalid
qemu-img: Snapshot L1 table offset invalid
qemu-img: Failed to turn zero into data clusters: Invalid argument
qemu-io: write failed: Invalid argument
qemu-io: Failed to flush the refcount block cache: Invalid argument
write failed: Invalid argument
qemu-img: Snapshot L1 table offset invalid
qemu-img: Could not apply snapshot 'test': Failed to load snapshot: Invalid argument
qemu-img: Could not delete snapshot 'test': Snapshot L1 table offset invalid
@@ -89,8 +89,8 @@ wrote 512/512 bytes at offset 0
qemu-img: Failed to load snapshot: Snapshot L1 table too large
qemu-img: Snapshot L1 table too large
qemu-img: Failed to turn zero into data clusters: File too large
qemu-io: write failed: File too large
qemu-io: Failed to flush the refcount block cache: File too large
write failed: File too large
qemu-img: Snapshot L1 table too large
qemu-img: Could not apply snapshot 'test': Failed to load snapshot: File too large
qemu-img: Could not delete snapshot 'test': Snapshot L1 table too large
+1 -1
View File
@@ -81,7 +81,7 @@ wrote 10485760/10485760 bytes at offset 0
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
== checking that quorum is broken ==
read failed: Input/output error
qemu-io: read failed: Input/output error
== checking the blkverify mode with broken content ==
quorum: offset=0 bytes=10485760 contents mismatch at offset 0
+18 -18
View File
@@ -41,7 +41,7 @@ qemu-io: can't open device nbd+tcp://127.0.0.1:PORT/foo
=== Check disconnect after neg2 ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect 8 neg2 ===
@@ -53,31 +53,31 @@ qemu-io: can't open device nbd+tcp://127.0.0.1:PORT/foo
=== Check disconnect before request ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect after request ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect before reply ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect after reply ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect 4 reply ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect 8 reply ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect before data ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect after data ===
@@ -106,7 +106,7 @@ qemu-io: can't open device nbd+tcp://127.0.0.1:PORT/
=== Check disconnect after neg-classic ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect before neg1 ===
@@ -150,7 +150,7 @@ qemu-io: can't open device nbd+unix:///foo?socket=SOCK_DIR/nbd.sock
=== Check disconnect after neg2 ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect 8 neg2 ===
@@ -162,31 +162,31 @@ qemu-io: can't open device nbd+unix:///foo?socket=SOCK_DIR/nbd.sock
=== Check disconnect before request ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect after request ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect before reply ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect after reply ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect 4 reply ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect 8 reply ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect before data ===
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Check disconnect after data ===
@@ -215,6 +215,6 @@ qemu-io: can't open device nbd+unix:///?socket=SOCK_DIR/nbd.sock
=== Check disconnect after neg-classic ===
read failed: Input/output error
qemu-io: read failed: Input/output error
*** done
+2 -2
View File
@@ -16,7 +16,7 @@ read 512/512 bytes at offset 512
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read 512/512 bytes at offset 1024
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Pattern verification failed at offset 0, 512 bytes
qemu-io: Pattern verification failed at offset 0, 512 bytes
read 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
@@ -33,7 +33,7 @@ read 512/512 bytes at offset 0
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
wrote 512/512 bytes at offset 229376
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read failed: Input/output error
qemu-io: read failed: Input/output error
=== Testing qemu-img info output ===
+1 -1
View File
@@ -11,7 +11,7 @@ cluster_size: 65536
backing file: TEST_DIR/t.IMGFMT.base
backing file format: foo
qemu-io: can't open device TEST_DIR/t.qcow2: Could not open backing file: Unknown driver 'foo'
no file open, try 'help open'
qemu-io: no file open, try 'help open'
read 4096/4096 bytes at offset 0
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qemu-img: Could not change the backing file to 'TEST_DIR/t.qcow2.base': backing format must be specified
+1 -1
View File
@@ -24,7 +24,7 @@ read 134217728/134217728 bytes at offset 0
128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
== verify pattern failure with wrong password ==
Pattern verification failed at offset 0, 134217728 bytes
qemu-io: Pattern verification failed at offset 0, 134217728 bytes
read 134217728/134217728 bytes at offset 0
128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
*** done
+1 -1
View File
@@ -40,5 +40,5 @@ OK: Dirty bit not set
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: Parameter 'lazy-refcounts' expects 'on' or 'off'
qcow2: Marking image as corrupt: Preventing invalid allocation of L2 table at offset 0; further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
*** done
+6 -6
View File
@@ -33,12 +33,12 @@ Is another process using the image [TEST_DIR/t.qcow2]?
_qemu_io_wrapper -c open TEST_DIR/t.qcow2 -c read 0 512
qemu-io: can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
Is another process using the image [TEST_DIR/t.qcow2]?
no file open, try 'help open'
qemu-io: no file open, try 'help open'
_qemu_io_wrapper -c open -r TEST_DIR/t.qcow2 -c read 0 512
qemu-io: can't open device TEST_DIR/t.qcow2: Failed to get shared "write" lock
Is another process using the image [TEST_DIR/t.qcow2]?
no file open, try 'help open'
qemu-io: no file open, try 'help open'
_qemu_img_wrapper info TEST_DIR/t.qcow2
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
@@ -107,7 +107,7 @@ _qemu_io_wrapper -U -r -c read 0 512 TEST_DIR/t.qcow2
_qemu_io_wrapper -c open -U TEST_DIR/t.qcow2 -c read 0 512
qemu-io: can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images
no file open, try 'help open'
qemu-io: no file open, try 'help open'
_qemu_io_wrapper -c open -r -U TEST_DIR/t.qcow2 -c read 0 512
@@ -176,7 +176,7 @@ _qemu_io_wrapper -r -c read 0 512 TEST_DIR/t.qcow2
_qemu_io_wrapper -c open TEST_DIR/t.qcow2 -c read 0 512
qemu-io: can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
Is another process using the image [TEST_DIR/t.qcow2]?
no file open, try 'help open'
qemu-io: no file open, try 'help open'
_qemu_io_wrapper -c open -r TEST_DIR/t.qcow2 -c read 0 512
@@ -231,7 +231,7 @@ _qemu_io_wrapper -U -r -c read 0 512 TEST_DIR/t.qcow2
_qemu_io_wrapper -c open -U TEST_DIR/t.qcow2 -c read 0 512
qemu-io: can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images
no file open, try 'help open'
qemu-io: no file open, try 'help open'
_qemu_io_wrapper -c open -r -U TEST_DIR/t.qcow2 -c read 0 512
@@ -336,7 +336,7 @@ _qemu_io_wrapper -U -r -c read 0 512 TEST_DIR/t.qcow2
_qemu_io_wrapper -c open -U TEST_DIR/t.qcow2 -c read 0 512
qemu-io: can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images
no file open, try 'help open'
qemu-io: no file open, try 'help open'
_qemu_io_wrapper -c open -r -U TEST_DIR/t.qcow2 -c read 0 512
+1 -1
View File
@@ -188,7 +188,7 @@ img_offset=512
img_size=512
_make_test_img $size
(
$QEMU_IO "$(img_json)" <<EOT
$QEMU_IO "$(img_json)" 2>&1 <<EOT
write -P 0x0a 0 512
write -P 0x0a 511 1
write -P 0x0a 512 1
+34 -34
View File
@@ -21,32 +21,32 @@ wrote 1/1 bytes at offset 3583
1 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write across image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
write at image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
write after image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
writev before/after image boundary
writev failed: Input/output error
qemu-io: writev failed: Input/output error
read before image boundary
read 1/1 bytes at offset 3583
1 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read across image boundary
read failed: Input/output error
qemu-io: read failed: Input/output error
read at image boundary
read failed: Input/output error
qemu-io: read failed: Input/output error
read after image boundary
read failed: Input/output error
qemu-io: read failed: Input/output error
readv before/after image boundary
readv failed: Input/output error
qemu-io: readv failed: Input/output error
fill image with pattern
wrote 4096/4096 bytes at offset 0
@@ -60,7 +60,7 @@ read 4/4 bytes at offset 510
4 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write zeroes across image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
write zeroes at image boundary and check
wrote 2/2 bytes at offset 3582
@@ -68,7 +68,7 @@ wrote 2/2 bytes at offset 3582
00000ffe: 00 00 ..
read 2/2 bytes at offset 4094
2 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read failed: Input/output error
qemu-io: read failed: Input/output error
fill image with pattern
wrote 4096/4096 bytes at offset 0
@@ -82,7 +82,7 @@ read 4/4 bytes at offset 510
4 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
discard across image boundary
discard failed: Input/output error
qemu-io: discard failed: Input/output error
discard at image boundary and check
discard 2/2 bytes at offset 3582
@@ -90,7 +90,7 @@ discard 2/2 bytes at offset 3582
00000ffe: 00 00 ..
read 2/2 bytes at offset 4094
2 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read failed: Input/output error
qemu-io: read failed: Input/output error
== test 'offset' and 'size' options ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=4096
@@ -113,32 +113,32 @@ wrote 1/1 bytes at offset 2047
1 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write across image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
write at image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
write after image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
writev before/after image boundary
writev failed: Input/output error
qemu-io: writev failed: Input/output error
read before image boundary
read 1/1 bytes at offset 2047
1 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read across image boundary
read failed: Input/output error
qemu-io: read failed: Input/output error
read at image boundary
read failed: Input/output error
qemu-io: read failed: Input/output error
read after image boundary
read failed: Input/output error
qemu-io: read failed: Input/output error
readv before/after image boundary
readv failed: Input/output error
qemu-io: readv failed: Input/output error
fill image with pattern
wrote 4096/4096 bytes at offset 0
@@ -152,7 +152,7 @@ read 4/4 bytes at offset 510
4 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write zeroes across image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
write zeroes at image boundary and check
wrote 2/2 bytes at offset 2046
@@ -176,7 +176,7 @@ read 4/4 bytes at offset 510
4 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
discard across image boundary
discard failed: Input/output error
qemu-io: discard failed: Input/output error
discard at image boundary and check
discard 2/2 bytes at offset 2046
@@ -209,32 +209,32 @@ wrote 1/1 bytes at offset 2047
1 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write across image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
write at image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
write after image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
writev before/after image boundary
writev failed: Input/output error
qemu-io: writev failed: Input/output error
read before image boundary
read 1/1 bytes at offset 2047
1 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read across image boundary
read failed: Input/output error
qemu-io: read failed: Input/output error
read at image boundary
read failed: Input/output error
qemu-io: read failed: Input/output error
read after image boundary
read failed: Input/output error
qemu-io: read failed: Input/output error
readv before/after image boundary
readv failed: Input/output error
qemu-io: readv failed: Input/output error
fill image with pattern
wrote 4096/4096 bytes at offset 0
@@ -248,7 +248,7 @@ read 4/4 bytes at offset 8
4 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write zeroes across image boundary
write failed: Input/output error
qemu-io: write failed: Input/output error
write zeroes at image boundary and check
wrote 2/2 bytes at offset 2046
@@ -272,7 +272,7 @@ read 4/4 bytes at offset 8
4 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
discard across image boundary
discard failed: Input/output error
qemu-io: discard failed: Input/output error
discard at image boundary and check
discard 2/2 bytes at offset 2046
@@ -290,12 +290,12 @@ wrote 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 1/1 bytes at offset 511
1 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write failed: Input/output error
qemu-io: write failed: Input/output error
wrote 1024/1024 bytes at offset 0
1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 1/1 bytes at offset 1023
1 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write failed: Input/output error
qemu-io: write failed: Input/output error
checking boundaries
000001fe: 00 00 0a 0a ....
read 4/4 bytes at offset 510
+1 -1
View File
@@ -75,7 +75,7 @@ class TestNbdServerRemove(iotests.QMPTestCase):
def assertReadFailed(self, qemu_io_output):
self.assertEqual(filter_qemu_io(qemu_io_output).strip(),
'read failed: Input/output error')
'qemu-io: read failed: Input/output error')
def assertConnectFailed(self, qemu_io_output):
self.assertEqual(filter_qemu_io(qemu_io_output).strip(),
+1 -1
View File
@@ -7,7 +7,7 @@ wrote 2097152/2097152 bytes at offset 0
2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 2097152/2097152 bytes at offset 2097152
2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read failed: Input/output error
qemu-io: read failed: Input/output error
No errors were found on the image.
read 4194304/4194304 bytes at offset 0
4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+1 -1
View File
@@ -38,7 +38,7 @@ wrote 2097152/2097152 bytes at offset 37748736
No errors were found on the image.
image size 39845888
== Trying to write compressed cluster ==
write failed: File too large
qemu-io: write failed: File too large
image size 562949957615616
== Writing normal cluster ==
wrote 2097152/2097152 bytes at offset 0
+2 -2
View File
@@ -14,11 +14,11 @@ read 512/512 bytes at offset 0
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) qemu-io overlay "read 0 512"
read failed: Invalid argument
Error: read failed: Invalid argument
=== Testing non-VMDK backing image ===
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) qemu-io overlay "read 0 512"
read failed: Invalid argument
Error: read failed: Invalid argument
*** done
+6 -6
View File
@@ -10,22 +10,22 @@ read 65536/65536 bytes at offset 0
read 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory
no file open, try 'help open'
qemu-io: no file open, try 'help open'
Data file required, but without data file name in the image:
qemu-io: can't open device TEST_DIR/t.qcow2: 'data-file' is required for this image
no file open, try 'help open'
qemu-io: no file open, try 'help open'
read 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory
no file open, try 'help open'
qemu-io: no file open, try 'help open'
Setting data-file for an image with internal data:
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-io: can't open device TEST_DIR/t.qcow2: 'data-file' can only be set for images with an external data file
no file open, try 'help open'
qemu-io: no file open, try 'help open'
qemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory
no file open, try 'help open'
qemu-io: no file open, try 'help open'
=== Conflicting features ===
@@ -37,7 +37,7 @@ qemu-img: error while writing at byte 0: Operation not supported
Convert uncompressed, then write compressed data manually:
Images are identical.
write failed: Operation not supported
qemu-io: write failed: Operation not supported
No errors were found on the image.
Take an internal snapshot:
+3 -3
View File
@@ -9,7 +9,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.
{ 'execute': 'human-monitor-command',
'arguments': {'command-line': 'qemu-io none0 "aio_write 0 2k"'}}
{"return": "Block node is read-onlyrn"}
{"return": "Error: Block node is read-onlyrn"}
=== Run block-commit on base using an invalid filter node name
@@ -24,7 +24,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.
{ 'execute': 'human-monitor-command',
'arguments': {'command-line': 'qemu-io none0 "aio_write 0 2k"'}}
{"return": "Block node is read-onlyrn"}
{"return": "Error: Block node is read-onlyrn"}
=== Run block-commit on base using the default filter node name
@@ -43,5 +43,5 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.
{ 'execute': 'human-monitor-command',
'arguments': {'command-line': 'qemu-io none0 "aio_write 0 2k"'}}
{"return": "Block node is read-onlyrn"}
{"return": "Error: Block node is read-onlyrn"}
*** done
+7 -7
View File
@@ -456,7 +456,7 @@ L2 entry #0: 0x8000000000050001 0000000000000001
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576
L2 entry #1: 0x8000000000060000 00000001ffffffff
qcow2: Marking image as corrupt: Invalid cluster entry found (L2 offset: 0x40000, L2 index: 0x1); further corruption events will be suppressed
read failed: Input/output error
qemu-io: read failed: Input/output error
### Corrupted L2 entries - read test (unallocated) ###
@@ -471,14 +471,14 @@ L2 entry #0: 0x0000000000000001 0000000000000000
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576
L2 entry #0: 0x0000000000000000 0000000000000001
qcow2: Marking image as corrupt: Invalid cluster entry found (L2 offset: 0x40000, L2 index: 0); further corruption events will be suppressed
read failed: Input/output error
qemu-io: read failed: Input/output error
# Both 'subcluster is zero' and 'subcluster is allocated' bits set
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576
L2 entry #1: 0x0000000000000000 0000000100000001
qcow2: Marking image as corrupt: Invalid cluster entry found (L2 offset: 0x40000, L2 index: 0x1); further corruption events will be suppressed
read failed: Input/output error
qemu-io: read failed: Input/output error
### Compressed cluster with subcluster bitmap != 0 - read test ###
@@ -501,7 +501,7 @@ L2 entry #0: 0x8000000000050001 0000000000000001
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576
L2 entry #1: 0x8000000000060000 00000001ffffffff
qcow2: Marking image as corrupt: Invalid cluster entry found (L2 offset: 0x40000, L2 index: 0x1); further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
### Corrupted L2 entries - write test (unallocated) ###
@@ -516,14 +516,14 @@ L2 entry #0: 0x8000000000060000 0000000000000001
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576
L2 entry #0: 0x0000000000000000 0000000000000001
qcow2: Marking image as corrupt: Invalid cluster entry found (L2 offset: 0x40000, L2 index: 0); further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
# Both 'subcluster is zero' and 'subcluster is allocated' bits set
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576
L2 entry #1: 0x0000000000000000 0000000100000001
qcow2: Marking image as corrupt: Invalid cluster entry found (L2 offset: 0x40000, L2 index: 0x1); further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
### Compressed cluster with subcluster bitmap != 0 - write test ###
@@ -555,7 +555,7 @@ Double checking the fixed image now...
1 errors were found on the image.
Data may be corrupted, or further writes to the image may corrupt it.
qcow2: Marking image as corrupt: Cluster allocation offset 0x50200 unaligned (L2 offset: 0x40000, L2 index: 0); further corruption events will be suppressed
read failed: Input/output error
qemu-io: read failed: Input/output error
# Corrupted L2 entry, no allocated subclusters #
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=131072 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=raw
Repairing offset=50200: Preallocated cluster is not properly aligned; L2 entry corrupted.
+1 -1
View File
@@ -3,6 +3,6 @@ QA output created by 289
=== Avoid freeing external data clusters on failure ===
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=65536 data_file=TEST_DIR/t.IMGFMT.data_file
write failed: Input/output error
qemu-io: write failed: Input/output error
No errors were found on the image.
*** done
+1 -1
View File
@@ -12,5 +12,5 @@ discard 1024/1024 bytes at offset 125952
### Corrupt the offset of the second refcount block
### Try to allocate the discarded clusters again
qcow2: Marking image as corrupt: Refblock offset 0x20600 unaligned (reftable index: 0x1); further corruption events will be suppressed
write failed: Input/output error
qemu-io: write failed: Input/output error
*** done
+1 -1
View File
@@ -127,7 +127,7 @@ exports available: 1
{"error": {"class": "GenericError", "desc": "export 'export1' still in use"}}
{"execute": "block-export-del", "arguments": {"id": "export1", "mode": "hard"}}
{"return": {}}
read failed: Input/output error
qemu-io: read failed: Input/output error
{"execute": "query-block-exports", "arguments": {}}
{"return": []}
@@ -87,11 +87,11 @@ class TestBackup(iotests.QMPTestCase):
def tearDown(self):
# That should fail, because region is discarded
self.vm.hmp_qemu_io('access', 'read 0 1M')
result = self.vm.hmp_qemu_io('access', 'read 0 1M')
self.vm.shutdown()
self.assertTrue('read failed: Permission denied' in self.vm.get_log())
self.assertIn('read failed: Permission denied', result['return'])
# Final check that temp image is empty
mapping = qemu_img_map(temp_img)
+40 -26
View File
@@ -87,17 +87,17 @@ class TestCbwError(iotests.QMPTestCase):
result = self.vm.qmp('human-monitor-command',
command_line='qemu-io cbw "write 0 1M"')
self.assert_qmp(result, 'return', '')
write_res = result['return']
result = self.vm.qmp('human-monitor-command',
command_line='qemu-io access "read 0 1M"')
self.assert_qmp(result, 'return', '')
read_res = result['return']
self.vm.shutdown()
log = self.vm.get_log()
log = iotests.filter_qtest(log)
log = iotests.filter_qemu_io(log)
return log
return log, write_res, read_res
def do_cbw_error_via_blockdev_backup(self, on_cbw_error=None):
self.vm.cmd('blockdev-add', {
@@ -150,28 +150,29 @@ class TestCbwError(iotests.QMPTestCase):
result = self.vm.qmp('human-monitor-command',
command_line='qemu-io cbw "write 0 1M"')
self.assert_qmp(result, 'return', '')
write_res = result['return']
result = self.vm.qmp('human-monitor-command',
command_line='qemu-io access "read 0 1M"')
self.assert_qmp(result, 'return', '')
read_res = result['return']
self.vm.shutdown()
log = self.vm.get_log()
log = iotests.filter_qemu_io(log)
return log
return log, write_res, read_res
def test_break_snapshot_on_cbw_error(self):
"""break-snapshot behavior:
Guest write succeed, but further snapshot-read fails, as snapshot is
broken.
"""
log = self.do_cbw_error('break-snapshot')
log, write_res, read_res = self.do_cbw_error('break-snapshot')
self.assertEqual(write_res, '')
self.assertIn('read failed: Permission denied', read_res)
self.assertEqual(log, """\
wrote 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read failed: Permission denied
""")
def test_break_guest_write_on_cbw_error(self):
@@ -179,10 +180,11 @@ read failed: Permission denied
Guest write fails, but snapshot-access continues working and further
snapshot-read succeeds.
"""
log = self.do_cbw_error('break-guest-write')
log, write_res, read_res = self.do_cbw_error('break-guest-write')
self.assertIn('write failed: Input/output error', write_res)
self.assertEqual(read_res, '')
self.assertEqual(log, """\
write failed: Input/output error
read 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
""")
@@ -191,20 +193,24 @@ read 1048576/1048576 bytes at offset 0
"""Ensure CBW filter accepts break-snapshot policy
specified in blockdev-backup QMP command.
"""
log = self.do_cbw_error_via_blockdev_backup('break-snapshot')
log, write_res, read_res = \
self.do_cbw_error_via_blockdev_backup('break-snapshot')
self.assertEqual(write_res, '')
self.assertIn('read failed: Permission denied', read_res)
self.assertEqual(log, """\
wrote 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read failed: Permission denied
""")
def test_break_guest_write_policy_forwarding(self):
"""Ensure CBW filter accepts break-guest-write policy
specified in blockdev-backup QMP command.
"""
log = self.do_cbw_error_via_blockdev_backup('break-guest-write')
log, write_res, read_res = \
self.do_cbw_error_via_blockdev_backup('break-guest-write')
self.assertIn('write failed: Input/output error', write_res)
self.assertEqual(read_res, '')
self.assertEqual(log, """\
write failed: Input/output error
read 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
""")
@@ -213,9 +219,11 @@ read 1048576/1048576 bytes at offset 0
"""Ensure break-guest-write policy is used by default when
on-cbw-error is not explicitly specified.
"""
log = self.do_cbw_error_via_blockdev_backup()
log, write_res, read_res = \
self.do_cbw_error_via_blockdev_backup()
self.assertIn('write failed: Input/output error', write_res)
self.assertEqual(read_res, '')
self.assertEqual(log, """\
write failed: Input/output error
read 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
""")
@@ -260,47 +268,53 @@ read 1048576/1048576 bytes at offset 0
result = self.vm.qmp('human-monitor-command',
command_line='qemu-io cbw "write 0 512K"')
self.assert_qmp(result, 'return', '')
write1_res = result['return']
# We need second write to trigger throttling
result = self.vm.qmp('human-monitor-command',
command_line='qemu-io cbw "write 512K 512K"')
self.assert_qmp(result, 'return', '')
write2_res = result['return']
result = self.vm.qmp('human-monitor-command',
command_line='qemu-io access "read 0 1M"')
self.assert_qmp(result, 'return', '')
read_res = result['return']
self.vm.shutdown()
log = self.vm.get_log()
log = re.sub(r'^\[I \d+\.\d+\] OPENED\n', '', log)
log = re.sub(r'\[I \+\d+\.\d+\] CLOSED\n?$', '', log)
log = iotests.filter_qemu_io(log)
return log
return log, write1_res, write2_res, read_res
def test_timeout_break_guest(self):
log = self.do_cbw_timeout('break-guest-write')
log, write1_res, write2_res, read_res = \
self.do_cbw_timeout('break-guest-write')
self.assertEqual(write1_res, '')
# macOS and FreeBSD tend to represent ETIMEDOUT as
# "Operation timed out", when Linux prefer
# "Connection timed out"
log = log.replace('Operation timed out',
'Connection timed out')
write2_res = write2_res.replace('Operation timed out',
'Connection timed out')
self.assertIn('write failed: Connection timed out', write2_res)
self.assertEqual(read_res, '')
self.assertEqual(log, """\
wrote 524288/524288 bytes at offset 0
512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write failed: Connection timed out
read 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
""")
def test_timeout_break_snapshot(self):
log = self.do_cbw_timeout('break-snapshot')
log, write1_res, write2_res, read_res = \
self.do_cbw_timeout('break-snapshot')
self.assertEqual(write1_res, '')
self.assertEqual(write2_res, '')
self.assertIn('read failed: Permission denied', read_res)
self.assertEqual(log, """\
wrote 524288/524288 bytes at offset 0
512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 524288/524288 bytes at offset 524288
512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read failed: Permission denied
""")
+1 -1
View File
@@ -21,7 +21,7 @@ QA output created by file-io-error
}}
{"return": {}}
write failed: Input/output error
qemu-io: write failed: Input/output error
{'execute': 'block-export-del',
'arguments': {'id': 'exp0'}}
+6 -6
View File
@@ -238,13 +238,13 @@ read -P0xd5 1M 64k
read -P0xdc 32M 64k
read -P0xcd 0x3ff0000 64k
read -P0 0x00f8000 32k
read failed: Invalid argument
qemu-io: read failed: Invalid argument
read -P0 0x2010000 32k
read failed: Invalid argument
qemu-io: read failed: Invalid argument
read -P0 0x3fe0000 64k
read failed: Invalid argument
qemu-io: read failed: Invalid argument
--- Testing COW ---
@@ -265,13 +265,13 @@ read -P0xd5 1M 64k
read -P0xdc 32M 64k
read -P0xcd 0x3ff0000 64k
read -P0 0x00f8000 32k
read failed: Invalid argument
qemu-io: read failed: Invalid argument
read -P0 0x2010000 32k
read failed: Invalid argument
qemu-io: read failed: Invalid argument
read -P0 0x3fe0000 64k
read failed: Invalid argument
qemu-io: read failed: Invalid argument
--- Cleanup ---
@@ -215,13 +215,13 @@ target-fmt active: True
read 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
write failed: Operation not permitted
qemu-io: write failed: Operation not permitted
write failed: Operation not permitted
qemu-io: write failed: Operation not permitted
write failed: Operation not permitted
qemu-io: write failed: Operation not permitted
discard failed: Operation not permitted
qemu-io: discard failed: Operation not permitted
qemu-io: Failed to get allocation status: Operation not permitted