aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS4
-rw-r--r--VERSION2
-rw-r--r--backends/hostmem-file.c8
-rw-r--r--block/block-backend.c27
-rw-r--r--block/gluster.c77
-rw-r--r--block/qcow2.c4
-rw-r--r--block/vpc.c104
-rwxr-xr-xconfigure11
-rw-r--r--docs/specs/fw_cfg.txt36
-rw-r--r--docs/specs/vhost-user.txt4
-rw-r--r--hw/block/pflash_cfi01.c18
-rw-r--r--hw/char/cadence_uart.c3
-rw-r--r--hw/i386/acpi-build.c12
-rw-r--r--hw/ide/atapi.c26
-rw-r--r--hw/ide/core.c39
-rw-r--r--hw/ide/internal.h35
-rw-r--r--hw/ide/macio.c2
-rw-r--r--hw/ide/pci.c4
-rw-r--r--hw/ide/piix.c1
-rw-r--r--hw/input/virtio-input-hid.c6
-rw-r--r--hw/input/virtio-input-host.c70
-rw-r--r--hw/input/virtio-input.c46
-rw-r--r--hw/misc/ivshmem.c30
-rw-r--r--hw/misc/macio/cuda.c4
-rw-r--r--hw/tpm/tpm_passthrough.c2
-rw-r--r--hw/usb/hcd-ehci.c11
-rw-r--r--hw/virtio/virtio-balloon.c5
-rw-r--r--include/hw/virtio/virtio-input.h17
-rw-r--r--include/qemu/bswap.h19
-rw-r--r--nbd/client.c23
-rw-r--r--nbd/server.c15
-rw-r--r--pc-bios/openbios-ppcbin750684 -> 750684 bytes
-rw-r--r--pc-bios/openbios-sparc32bin381584 -> 381584 bytes
-rw-r--r--pc-bios/openbios-sparc64bin1592280 -> 1592280 bytes
-rw-r--r--po/de_DE.po36
-rw-r--r--po/fr_FR.po36
-rw-r--r--po/hu.po36
-rw-r--r--po/it.po36
-rw-r--r--po/messages.po38
-rw-r--r--po/tr.po36
-rw-r--r--po/zh_CN.po36
-rw-r--r--qemu-img.c8
-rw-r--r--qemu-io-cmds.c65
-rw-r--r--qemu-io.c6
-rw-r--r--qemu-nbd.c9
-rw-r--r--qemu-options.hx24
-rw-r--r--qemu-seccomp.c9
m---------roms/openbios0
-rw-r--r--slirp/slirp.h5
-rw-r--r--slirp/tcp_input.c1
-rw-r--r--target-i386/cpu.c16
-rw-r--r--target-ppc/cpu.h10
-rw-r--r--target-ppc/machine.c2
-rw-r--r--target-ppc/mem_helper.c5
-rw-r--r--target-ppc/translate.c6
-rw-r--r--target-sparc/int64_helper.c5
-rw-r--r--target-sparc/ldst_helper.c12
-rw-r--r--tests/Makefile4
-rwxr-xr-xtests/qemu-iotests/0011
-rwxr-xr-xtests/qemu-iotests/0021
-rwxr-xr-xtests/qemu-iotests/0031
-rwxr-xr-xtests/qemu-iotests/0041
-rwxr-xr-xtests/qemu-iotests/0051
-rwxr-xr-xtests/qemu-iotests/0071
-rwxr-xr-xtests/qemu-iotests/0081
-rwxr-xr-xtests/qemu-iotests/0091
-rwxr-xr-xtests/qemu-iotests/0101
-rwxr-xr-xtests/qemu-iotests/0111
-rwxr-xr-xtests/qemu-iotests/0121
-rwxr-xr-xtests/qemu-iotests/0131
-rwxr-xr-xtests/qemu-iotests/0141
-rwxr-xr-xtests/qemu-iotests/0151
-rwxr-xr-xtests/qemu-iotests/0171
-rwxr-xr-xtests/qemu-iotests/0181
-rwxr-xr-xtests/qemu-iotests/0191
-rwxr-xr-xtests/qemu-iotests/0201
-rwxr-xr-xtests/qemu-iotests/0211
-rwxr-xr-xtests/qemu-iotests/0221
-rwxr-xr-xtests/qemu-iotests/0231
-rwxr-xr-xtests/qemu-iotests/0241
-rwxr-xr-xtests/qemu-iotests/0251
-rwxr-xr-xtests/qemu-iotests/0261
-rw-r--r--tests/qemu-iotests/026.out.nocache142
-rwxr-xr-xtests/qemu-iotests/0271
-rwxr-xr-xtests/qemu-iotests/0281
-rwxr-xr-xtests/qemu-iotests/0291
-rwxr-xr-xtests/qemu-iotests/0311
-rwxr-xr-xtests/qemu-iotests/0321
-rwxr-xr-xtests/qemu-iotests/0339
-rw-r--r--tests/qemu-iotests/033.out82
-rwxr-xr-xtests/qemu-iotests/0341
-rwxr-xr-xtests/qemu-iotests/0351
-rwxr-xr-xtests/qemu-iotests/0361
-rwxr-xr-xtests/qemu-iotests/0371
-rwxr-xr-xtests/qemu-iotests/0381
-rwxr-xr-xtests/qemu-iotests/0391
-rwxr-xr-xtests/qemu-iotests/04112
-rwxr-xr-xtests/qemu-iotests/0421
-rwxr-xr-xtests/qemu-iotests/0431
-rwxr-xr-xtests/qemu-iotests/0461
-rwxr-xr-xtests/qemu-iotests/0471
-rwxr-xr-xtests/qemu-iotests/0491
-rwxr-xr-xtests/qemu-iotests/0501
-rwxr-xr-xtests/qemu-iotests/0511
-rw-r--r--tests/qemu-iotests/051.out10
-rwxr-xr-xtests/qemu-iotests/0521
-rwxr-xr-xtests/qemu-iotests/0531
-rwxr-xr-xtests/qemu-iotests/0541
-rwxr-xr-xtests/qemu-iotests/0581
-rwxr-xr-xtests/qemu-iotests/0591
-rwxr-xr-xtests/qemu-iotests/0601
-rwxr-xr-xtests/qemu-iotests/0611
-rwxr-xr-xtests/qemu-iotests/0621
-rwxr-xr-xtests/qemu-iotests/0631
-rwxr-xr-xtests/qemu-iotests/0641
-rwxr-xr-xtests/qemu-iotests/0661
-rwxr-xr-xtests/qemu-iotests/0671
-rwxr-xr-xtests/qemu-iotests/0683
-rwxr-xr-xtests/qemu-iotests/0691
-rwxr-xr-xtests/qemu-iotests/0701
-rwxr-xr-xtests/qemu-iotests/0711
-rwxr-xr-xtests/qemu-iotests/0721
-rwxr-xr-xtests/qemu-iotests/0731
-rwxr-xr-xtests/qemu-iotests/0751
-rwxr-xr-xtests/qemu-iotests/0761
-rwxr-xr-xtests/qemu-iotests/0771
-rwxr-xr-xtests/qemu-iotests/0781
-rwxr-xr-xtests/qemu-iotests/0791
-rwxr-xr-xtests/qemu-iotests/0801
-rwxr-xr-xtests/qemu-iotests/0811
-rwxr-xr-xtests/qemu-iotests/0821
-rwxr-xr-xtests/qemu-iotests/0831
-rwxr-xr-xtests/qemu-iotests/0841
-rwxr-xr-xtests/qemu-iotests/0861
-rwxr-xr-xtests/qemu-iotests/0871
-rwxr-xr-xtests/qemu-iotests/0881
-rwxr-xr-xtests/qemu-iotests/0891
-rwxr-xr-xtests/qemu-iotests/0901
-rwxr-xr-xtests/qemu-iotests/0921
-rwxr-xr-xtests/qemu-iotests/0941
-rwxr-xr-xtests/qemu-iotests/0971
-rwxr-xr-xtests/qemu-iotests/0981
-rwxr-xr-xtests/qemu-iotests/0991
-rwxr-xr-xtests/qemu-iotests/1001
-rwxr-xr-xtests/qemu-iotests/1011
-rwxr-xr-xtests/qemu-iotests/1021
-rwxr-xr-xtests/qemu-iotests/1031
-rwxr-xr-xtests/qemu-iotests/1041
-rwxr-xr-xtests/qemu-iotests/1051
-rwxr-xr-xtests/qemu-iotests/1071
-rwxr-xr-xtests/qemu-iotests/1081
-rwxr-xr-xtests/qemu-iotests/1091
-rwxr-xr-xtests/qemu-iotests/1101
-rwxr-xr-xtests/qemu-iotests/1111
-rwxr-xr-xtests/qemu-iotests/1121
-rwxr-xr-xtests/qemu-iotests/1131
-rwxr-xr-xtests/qemu-iotests/1141
-rwxr-xr-xtests/qemu-iotests/1151
-rwxr-xr-xtests/qemu-iotests/1161
-rwxr-xr-xtests/qemu-iotests/1171
-rwxr-xr-xtests/qemu-iotests/1191
-rwxr-xr-xtests/qemu-iotests/1201
-rwxr-xr-xtests/qemu-iotests/1211
-rwxr-xr-xtests/qemu-iotests/1221
-rwxr-xr-xtests/qemu-iotests/1231
-rwxr-xr-xtests/qemu-iotests/1281
-rwxr-xr-xtests/qemu-iotests/1301
-rwxr-xr-xtests/qemu-iotests/1311
-rwxr-xr-xtests/qemu-iotests/1331
-rwxr-xr-xtests/qemu-iotests/1341
-rwxr-xr-xtests/qemu-iotests/1351
-rwxr-xr-xtests/qemu-iotests/1371
-rwxr-xr-xtests/qemu-iotests/1381
-rwxr-xr-xtests/qemu-iotests/1401
-rwxr-xr-xtests/qemu-iotests/1411
-rwxr-xr-xtests/qemu-iotests/1421
-rwxr-xr-xtests/qemu-iotests/1431
-rwxr-xr-xtests/qemu-iotests/1451
-rw-r--r--tests/qemu-iotests/1484
-rwxr-xr-xtests/qemu-iotests/15042
-rw-r--r--tests/qemu-iotests/150.out13
-rwxr-xr-xtests/qemu-iotests/check21
-rw-r--r--tests/qemu-iotests/common.config2
-rw-r--r--tests/qemu-iotests/common.filter101
-rw-r--r--tests/qemu-iotests/common.rc46
-rw-r--r--tests/qemu-iotests/iotests.py36
-rw-r--r--ui/input-linux.c30
187 files changed, 1057 insertions, 716 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index d26141277d..28e2b17049 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -985,6 +985,7 @@ F: tests/intel-hda-test.c
Block layer core
M: Kevin Wolf <kwolf@redhat.com>
+M: Max Reitz <mreitz@redhat.com>
L: qemu-block@nongnu.org
S: Supported
F: block*
@@ -1049,7 +1050,6 @@ M: Andreas Färber <afaerber@suse.de>
S: Supported
F: qom/cpu.c
F: include/qom/cpu.h
-F: target-i386/cpu.c
ICC Bus
M: Igor Mammedov <imammedo@redhat.com>
@@ -1569,6 +1569,7 @@ F: block/win32-aio.c
qcow2
M: Kevin Wolf <kwolf@redhat.com>
+M: Max Reitz <mreitz@redhat.com>
L: qemu-block@nongnu.org
S: Supported
F: block/qcow2*
@@ -1581,6 +1582,7 @@ F: block/qcow.c
blkdebug
M: Kevin Wolf <kwolf@redhat.com>
+M: Max Reitz <mreitz@redhat.com>
L: qemu-block@nongnu.org
S: Supported
F: block/blkdebug.c
diff --git a/VERSION b/VERSION
index e710b3f780..f313bba536 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.5.91
+2.5.92
diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
index b17a1f10a2..5c4b808c1a 100644
--- a/backends/hostmem-file.c
+++ b/backends/hostmem-file.c
@@ -121,11 +121,19 @@ file_backend_instance_init(Object *o)
set_mem_path, NULL);
}
+static void file_backend_instance_finalize(Object *o)
+{
+ HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(o);
+
+ g_free(fb->mem_path);
+}
+
static const TypeInfo file_backend_info = {
.name = TYPE_MEMORY_BACKEND_FILE,
.parent = TYPE_MEMORY_BACKEND,
.class_init = file_backend_class_init,
.instance_init = file_backend_instance_init,
+ .instance_finalize = file_backend_instance_finalize,
.instance_size = sizeof(HostMemoryBackendFile),
};
diff --git a/block/block-backend.c b/block/block-backend.c
index d74f6701b5..16c9d5e0f2 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -820,7 +820,7 @@ int blk_write_zeroes(BlockBackend *blk, int64_t sector_num,
int nb_sectors, BdrvRequestFlags flags)
{
return blk_rw(blk, sector_num, NULL, nb_sectors, blk_write_entry,
- BDRV_REQ_ZERO_WRITE);
+ flags | BDRV_REQ_ZERO_WRITE);
}
static void error_callback_bh(void *opaque)
@@ -852,6 +852,7 @@ BlockAIOCB *blk_abort_aio_request(BlockBackend *blk,
typedef struct BlkAioEmAIOCB {
BlockAIOCB common;
BlkRwCo rwco;
+ int bytes;
bool has_returned;
QEMUBH* bh;
} BlkAioEmAIOCB;
@@ -877,7 +878,7 @@ static void blk_aio_complete_bh(void *opaque)
blk_aio_complete(opaque);
}
-static BlockAIOCB *blk_aio_prwv(BlockBackend *blk, int64_t offset,
+static BlockAIOCB *blk_aio_prwv(BlockBackend *blk, int64_t offset, int bytes,
QEMUIOVector *qiov, CoroutineEntry co_entry,
BdrvRequestFlags flags,
BlockCompletionFunc *cb, void *opaque)
@@ -893,6 +894,7 @@ static BlockAIOCB *blk_aio_prwv(BlockBackend *blk, int64_t offset,
.flags = flags,
.ret = NOT_DONE,
};
+ acb->bytes = bytes;
acb->bh = NULL;
acb->has_returned = false;
@@ -913,7 +915,8 @@ static void blk_aio_read_entry(void *opaque)
BlkAioEmAIOCB *acb = opaque;
BlkRwCo *rwco = &acb->rwco;
- rwco->ret = blk_co_preadv(rwco->blk, rwco->offset, rwco->qiov->size,
+ assert(rwco->qiov->size == acb->bytes);
+ rwco->ret = blk_co_preadv(rwco->blk, rwco->offset, acb->bytes,
rwco->qiov, rwco->flags);
blk_aio_complete(acb);
}
@@ -923,8 +926,8 @@ static void blk_aio_write_entry(void *opaque)
BlkAioEmAIOCB *acb = opaque;
BlkRwCo *rwco = &acb->rwco;
- rwco->ret = blk_co_pwritev(rwco->blk, rwco->offset,
- rwco->qiov ? rwco->qiov->size : 0,
+ assert(!rwco->qiov || rwco->qiov->size == acb->bytes);
+ rwco->ret = blk_co_pwritev(rwco->blk, rwco->offset, acb->bytes,
rwco->qiov, rwco->flags);
blk_aio_complete(acb);
}
@@ -937,8 +940,10 @@ BlockAIOCB *blk_aio_write_zeroes(BlockBackend *blk, int64_t sector_num,
return blk_abort_aio_request(blk, cb, opaque, -EINVAL);
}
- return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS, NULL,
- blk_aio_write_entry, BDRV_REQ_ZERO_WRITE, cb, opaque);
+ return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS,
+ nb_sectors << BDRV_SECTOR_BITS, NULL,
+ blk_aio_write_entry, flags | BDRV_REQ_ZERO_WRITE,
+ cb, opaque);
}
int blk_pread(BlockBackend *blk, int64_t offset, void *buf, int count)
@@ -994,7 +999,8 @@ BlockAIOCB *blk_aio_readv(BlockBackend *blk, int64_t sector_num,
return blk_abort_aio_request(blk, cb, opaque, -EINVAL);
}
- return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS, iov,
+ assert(nb_sectors << BDRV_SECTOR_BITS == iov->size);
+ return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS, iov->size, iov,
blk_aio_read_entry, 0, cb, opaque);
}
@@ -1006,7 +1012,8 @@ BlockAIOCB *blk_aio_writev(BlockBackend *blk, int64_t sector_num,
return blk_abort_aio_request(blk, cb, opaque, -EINVAL);
}
- return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS, iov,
+ assert(nb_sectors << BDRV_SECTOR_BITS == iov->size);
+ return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS, iov->size, iov,
blk_aio_write_entry, 0, cb, opaque);
}
@@ -1446,7 +1453,7 @@ int coroutine_fn blk_co_write_zeroes(BlockBackend *blk, int64_t sector_num,
return blk_co_pwritev(blk, sector_num << BDRV_SECTOR_BITS,
nb_sectors << BDRV_SECTOR_BITS, NULL,
- BDRV_REQ_ZERO_WRITE);
+ flags | BDRV_REQ_ZERO_WRITE);
}
int blk_write_compressed(BlockBackend *blk, int64_t sector_num,
diff --git a/block/gluster.c b/block/gluster.c
index 51e154c247..a8aaacf645 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -247,7 +247,7 @@ static void gluster_finish_aiocb(struct glfs_fd *fd, ssize_t ret, void *arg)
if (!ret || ret == acb->size) {
acb->ret = 0; /* Success */
} else if (ret < 0) {
- acb->ret = ret; /* Read/Write failed */
+ acb->ret = -errno; /* Read/Write failed */
} else {
acb->ret = -EIO; /* Partial read/write - fail it */
}
@@ -314,6 +314,23 @@ static int qemu_gluster_open(BlockDriverState *bs, QDict *options,
goto out;
}
+#ifdef CONFIG_GLUSTERFS_XLATOR_OPT
+ /* Without this, if fsync fails for a recoverable reason (for instance,
+ * ENOSPC), gluster will dump its cache, preventing retries. This means
+ * almost certain data loss. Not all gluster versions support the
+ * 'resync-failed-syncs-after-fsync' key value, but there is no way to
+ * discover during runtime if it is supported (this api returns success for
+ * unknown key/value pairs) */
+ ret = glfs_set_xlator_option(s->glfs, "*-write-behind",
+ "resync-failed-syncs-after-fsync",
+ "on");
+ if (ret < 0) {
+ error_setg_errno(errp, errno, "Unable to set xlator key/value pair");
+ ret = -errno;
+ goto out;
+ }
+#endif
+
qemu_gluster_parse_flags(bdrv_flags, &open_flags);
s->fd = glfs_open(s->glfs, gconf->image, open_flags);
@@ -366,6 +383,16 @@ static int qemu_gluster_reopen_prepare(BDRVReopenState *state,
goto exit;
}
+#ifdef CONFIG_GLUSTERFS_XLATOR_OPT
+ ret = glfs_set_xlator_option(reop_s->glfs, "*-write-behind",
+ "resync-failed-syncs-after-fsync", "on");
+ if (ret < 0) {
+ error_setg_errno(errp, errno, "Unable to set xlator key/value pair");
+ ret = -errno;
+ goto exit;
+ }
+#endif
+
reop_s->fd = glfs_open(reop_s->glfs, gconf->image, open_flags);
if (reop_s->fd == NULL) {
/* reops->glfs will be cleaned up in _abort */
@@ -589,6 +616,17 @@ static coroutine_fn int qemu_gluster_co_writev(BlockDriverState *bs,
return qemu_gluster_co_rw(bs, sector_num, nb_sectors, qiov, 1);
}
+static void qemu_gluster_close(BlockDriverState *bs)
+{
+ BDRVGlusterState *s = bs->opaque;
+
+ if (s->fd) {
+ glfs_close(s->fd);
+ s->fd = NULL;
+ }
+ glfs_fini(s->glfs);
+}
+
static coroutine_fn int qemu_gluster_co_flush_to_disk(BlockDriverState *bs)
{
int ret;
@@ -602,11 +640,35 @@ static coroutine_fn int qemu_gluster_co_flush_to_disk(BlockDriverState *bs)
ret = glfs_fsync_async(s->fd, gluster_finish_aiocb, &acb);
if (ret < 0) {
- return -errno;
+ ret = -errno;
+ goto error;
}
qemu_coroutine_yield();
+ if (acb.ret < 0) {
+ ret = acb.ret;
+ goto error;
+ }
+
return acb.ret;
+
+error:
+ /* Some versions of Gluster (3.5.6 -> 3.5.8?) will not retain its cache
+ * after a fsync failure, so we have no way of allowing the guest to safely
+ * continue. Gluster versions prior to 3.5.6 don't retain the cache
+ * either, but will invalidate the fd on error, so this is again our only
+ * option.
+ *
+ * The 'resync-failed-syncs-after-fsync' xlator option for the
+ * write-behind cache will cause later gluster versions to retain its
+ * cache after error, so long as the fd remains open. However, we
+ * currently have no way of knowing if this option is supported.
+ *
+ * TODO: Once gluster provides a way for us to determine if the option
+ * is supported, bypass the closure and setting drv to NULL. */
+ qemu_gluster_close(bs);
+ bs->drv = NULL;
+ return ret;
}
#ifdef CONFIG_GLUSTERFS_DISCARD
@@ -661,17 +723,6 @@ static int64_t qemu_gluster_allocated_file_size(BlockDriverState *bs)
}
}
-static void qemu_gluster_close(BlockDriverState *bs)
-{
- BDRVGlusterState *s = bs->opaque;
-
- if (s->fd) {
- glfs_close(s->fd);
- s->fd = NULL;
- }
- glfs_fini(s->glfs);
-}
-
static int qemu_gluster_has_zero_init(BlockDriverState *bs)
{
/* GlusterFS volume could be backed by a block device */
diff --git a/block/qcow2.c b/block/qcow2.c
index 056525c7fd..470734be9f 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1986,6 +1986,10 @@ static int qcow2_change_backing_file(BlockDriverState *bs,
{
BDRVQcow2State *s = bs->opaque;
+ if (backing_file && strlen(backing_file) > 1023) {
+ return -EINVAL;
+ }
+
pstrcpy(bs->backing_file, sizeof(bs->backing_file), backing_file ?: "");
pstrcpy(bs->backing_format, sizeof(bs->backing_format), backing_fmt ?: "");
diff --git a/block/vpc.c b/block/vpc.c
index 8830b5b2b0..3e2ea698d9 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -45,34 +45,34 @@ enum vhd_type {
VHD_DIFFERENCING = 4,
};
-// Seconds since Jan 1, 2000 0:00:00 (UTC)
+/* Seconds since Jan 1, 2000 0:00:00 (UTC) */
#define VHD_TIMESTAMP_BASE 946684800
#define VHD_CHS_MAX_C 65535LL
#define VHD_CHS_MAX_H 16
#define VHD_CHS_MAX_S 255
-#define VHD_MAX_SECTORS (65535LL * 255 * 255)
+#define VHD_MAX_SECTORS 0xff000000 /* 2040 GiB max image size */
#define VHD_MAX_GEOMETRY (VHD_CHS_MAX_C * VHD_CHS_MAX_H * VHD_CHS_MAX_S)
#define VPC_OPT_FORCE_SIZE "force_size"
-// always big-endian
+/* always big-endian */
typedef struct vhd_footer {
- char creator[8]; // "conectix"
+ char creator[8]; /* "conectix" */
uint32_t features;
uint32_t version;
- // Offset of next header structure, 0xFFFFFFFF if none
+ /* Offset of next header structure, 0xFFFFFFFF if none */
uint64_t data_offset;
- // Seconds since Jan 1, 2000 0:00:00 (UTC)
+ /* Seconds since Jan 1, 2000 0:00:00 (UTC) */
uint32_t timestamp;
- char creator_app[4]; // "vpc "
+ char creator_app[4]; /* e.g., "vpc " */
uint16_t major;
uint16_t minor;
- char creator_os[4]; // "Wi2k"
+ char creator_os[4]; /* "Wi2k" */
uint64_t orig_size;
uint64_t current_size;
@@ -83,29 +83,29 @@ typedef struct vhd_footer {
uint32_t type;
- // Checksum of the Hard Disk Footer ("one's complement of the sum of all
- // the bytes in the footer without the checksum field")
+ /* Checksum of the Hard Disk Footer ("one's complement of the sum of all
+ the bytes in the footer without the checksum field") */
uint32_t checksum;
- // UUID used to identify a parent hard disk (backing file)
+ /* UUID used to identify a parent hard disk (backing file) */
uint8_t uuid[16];
uint8_t in_saved_state;
} QEMU_PACKED VHDFooter;
typedef struct vhd_dyndisk_header {
- char magic[8]; // "cxsparse"
+ char magic[8]; /* "cxsparse" */
- // Offset of next header structure, 0xFFFFFFFF if none
+ /* Offset of next header structure, 0xFFFFFFFF if none */
uint64_t data_offset;
- // Offset of the Block Allocation Table (BAT)
+ /* Offset of the Block Allocation Table (BAT) */
uint64_t table_offset;
uint32_t version;
- uint32_t max_table_entries; // 32bit/entry
+ uint32_t max_table_entries; /* 32bit/entry */
- // 2 MB by default, must be a power of two
+ /* 2 MB by default, must be a power of two */
uint32_t block_size;
uint32_t checksum;
@@ -113,7 +113,7 @@ typedef struct vhd_dyndisk_header {
uint32_t parent_timestamp;
uint32_t reserved;
- // Backing file name (in UTF-16)
+ /* Backing file name (in UTF-16) */
uint8_t parent_name[512];
struct {
@@ -238,6 +238,7 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
ret = bdrv_pread(bs->file->bs, 0, s->footer_buf, HEADER_SIZE);
if (ret < 0) {
+ error_setg(errp, "Unable to read VHD header");
goto fail;
}
@@ -246,9 +247,11 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
int64_t offset = bdrv_getlength(bs->file->bs);
if (offset < 0) {
ret = offset;
+ error_setg(errp, "Invalid file size");
goto fail;
} else if (offset < HEADER_SIZE) {
ret = -EINVAL;
+ error_setg(errp, "File too small for a VHD header");
goto fail;
}
@@ -275,9 +278,9 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
/* Write 'checksum' back to footer, or else will leave it with zero. */
footer->checksum = cpu_to_be32(checksum);
- // The visible size of a image in Virtual PC depends on the geometry
- // rather than on the size stored in the footer (the size in the footer
- // is too large usually)
+ /* The visible size of a image in Virtual PC depends on the geometry
+ rather than on the size stored in the footer (the size in the footer
+ is too large usually) */
bs->total_sectors = (int64_t)
be16_to_cpu(footer->cyls) * footer->heads * footer->secs_per_cyl;
@@ -299,6 +302,8 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
* 'qem2' : current_size QEMU (uses current_size)
* 'win ' : current_size Hyper-V
* 'd2v ' : current_size Disk2vhd
+ * 'tap\0' : current_size XenServer
+ * 'CTXS' : current_size XenConverter
*
* The user can override the table values via drive options, however
* even with an override we will still use current_size for images
@@ -306,15 +311,17 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
*/
use_chs = (!!strncmp(footer->creator_app, "win ", 4) &&
!!strncmp(footer->creator_app, "qem2", 4) &&
- !!strncmp(footer->creator_app, "d2v ", 4)) || s->force_use_chs;
+ !!strncmp(footer->creator_app, "d2v ", 4) &&
+ !!strncmp(footer->creator_app, "CTXS", 4) &&
+ !!memcmp(footer->creator_app, "tap", 4)) || s->force_use_chs;
if (!use_chs || bs->total_sectors == VHD_MAX_GEOMETRY || s->force_use_sz) {
bs->total_sectors = be64_to_cpu(footer->current_size) /
BDRV_SECTOR_SIZE;
}
- /* Allow a maximum disk size of approximately 2 TB */
- if (bs->total_sectors >= VHD_MAX_SECTORS) {
+ /* Allow a maximum disk size of 2040 GiB */
+ if (bs->total_sectors > VHD_MAX_SECTORS) {
ret = -EFBIG;
goto fail;
}
@@ -323,12 +330,14 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
ret = bdrv_pread(bs->file->bs, be64_to_cpu(footer->data_offset), buf,
HEADER_SIZE);
if (ret < 0) {
+ error_setg(errp, "Error reading dynamic VHD header");
goto fail;
}
dyndisk_header = (VHDDynDiskHeader *) buf;
if (strncmp(dyndisk_header->magic, "cxsparse", 8)) {
+ error_setg(errp, "Invalid header magic");
ret = -EINVAL;
goto fail;
}
@@ -344,16 +353,14 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
s->max_table_entries = be32_to_cpu(dyndisk_header->max_table_entries);
if ((bs->total_sectors * 512) / s->block_size > 0xffffffffU) {
- ret = -EINVAL;
- goto fail;
- }
- if (s->max_table_entries > (VHD_MAX_SECTORS * 512) / s->block_size) {
+ error_setg(errp, "Too many blocks");
ret = -EINVAL;
goto fail;
}
computed_size = (uint64_t) s->max_table_entries * s->block_size;
if (computed_size < bs->total_sectors * 512) {
+ error_setg(errp, "Page table too small");
ret = -EINVAL;
goto fail;
}
@@ -370,6 +377,7 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
s->pagetable = qemu_try_blockalign(bs->file->bs, pagetable_size);
if (s->pagetable == NULL) {
+ error_setg(errp, "Unable to allocate memory for page table");
ret = -ENOMEM;
goto fail;
}
@@ -379,6 +387,7 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
ret = bdrv_pread(bs->file->bs, s->bat_offset, s->pagetable,
pagetable_size);
if (ret < 0) {
+ error_setg(errp, "Error reading pagetable");
goto fail;
}
@@ -457,16 +466,16 @@ static inline int64_t get_sector_offset(BlockDriverState *bs,
pageentry_index = (offset % s->block_size) / 512;
if (pagetable_index >= s->max_table_entries || s->pagetable[pagetable_index] == 0xffffffff)
- return -1; // not allocated
+ return -1; /* not allocated */
bitmap_offset = 512 * (uint64_t) s->pagetable[pagetable_index];
block_offset = bitmap_offset + s->bitmap_size + (512 * pageentry_index);
- // We must ensure that we don't write to any sectors which are marked as
- // unused in the bitmap. We get away with setting all bits in the block
- // bitmap each time we write to a new block. This might cause Virtual PC to
- // miss sparse read optimization, but it's not a problem in terms of
- // correctness.
+ /* We must ensure that we don't write to any sectors which are marked as
+ unused in the bitmap. We get away with setting all bits in the block
+ bitmap each time we write to a new block. This might cause Virtual PC to
+ miss sparse read optimization, but it's not a problem in terms of
+ correctness. */
if (write && (s->last_bitmap_offset != bitmap_offset)) {
uint8_t bitmap[s->bitmap_size];
@@ -512,18 +521,18 @@ static int64_t alloc_block(BlockDriverState* bs, int64_t sector_num)
int ret;
uint8_t bitmap[s->bitmap_size];
- // Check if sector_num is valid
+ /* Check if sector_num is valid */
if ((sector_num < 0) || (sector_num > bs->total_sectors))
return -1;
- // Write entry into in-memory BAT
+ /* Write entry into in-memory BAT */
index = (sector_num * 512) / s->block_size;
if (s->pagetable[index] != 0xFFFFFFFF)
return -1;
s->pagetable[index] = s->free_data_block_offset / 512;
- // Initialize the block's bitmap
+ /* Initialize the block's bitmap */
memset(bitmap, 0xff, s->bitmap_size);
ret = bdrv_pwrite_sync(bs->file->bs, s->free_data_block_offset, bitmap,
s->bitmap_size);
@@ -531,13 +540,13 @@ static int64_t alloc_block(BlockDriverState* bs, int64_t sector_num)
return ret;
}
- // Write new footer (the old one will be overwritten)
+ /* Write new footer (the old one will be overwritten) */
s->free_data_block_offset += s->block_size + s->bitmap_size;
ret = rewrite_footer(bs);
if (ret < 0)
goto fail;
- // Write BAT entry to disk
+ /* Write BAT entry to disk */
bat_offset = s->bat_offset + (4 * index);
bat_value = cpu_to_be32(s->pagetable[index]);
ret = bdrv_pwrite_sync(bs->file->bs, bat_offset, &bat_value, 4);
@@ -718,7 +727,7 @@ static int64_t coroutine_fn vpc_co_get_block_status(BlockDriverState *bs,
* Note that the geometry doesn't always exactly match total_sectors but
* may round it down.
*
- * Returns 0 on success, -EFBIG if the size is larger than ~2 TB. Override
+ * Returns 0 on success, -EFBIG if the size is larger than 2040 GiB. Override
* the hardware EIDE and ATA-2 limit of 16 heads (max disk size of 127 GB)
* and instead allow up to 255 heads.
*/
@@ -770,12 +779,12 @@ static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf,
int ret;
int64_t offset = 0;
- // Write the footer (twice: at the beginning and at the end)
+ /* Write the footer (twice: at the beginning and at the end) */
block_size = 0x200000;
num_bat_entries = (total_sectors + block_size / 512) / (block_size / 512);
ret = blk_pwrite(blk, offset, buf, HEADER_SIZE);
- if (ret) {
+ if (ret < 0) {
goto fail;
}
@@ -785,7 +794,7 @@ static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf,
goto fail;
}
- // Write the initial BAT
+ /* Write the initial BAT */
offset = 3 * 512;
memset(buf, 0xFF, 512);
@@ -797,7 +806,7 @@ static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf,
offset += 512;
}
- // Prepare the Dynamic Disk Header
+ /* Prepare the Dynamic Disk Header */
memset(buf, 0, 1024);
memcpy(dyndisk_header->magic, "cxsparse", 8);
@@ -814,7 +823,7 @@ static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf,
dyndisk_header->checksum = cpu_to_be32(vpc_checksum(buf, 1024));
- // Write the header
+ /* Write the header */
offset = 512;
ret = blk_pwrite(blk, offset, buf, 1024);
@@ -874,6 +883,7 @@ static int vpc_create(const char *filename, QemuOpts *opts, Error **errp)
} else if (!strcmp(disk_type_param, "fixed")) {
disk_type = VHD_FIXED;
} else {
+ error_setg(errp, "Invalid disk type, %s", disk_type_param);
ret = -EINVAL;
goto out;
}
@@ -922,8 +932,9 @@ static int vpc_create(const char *filename, QemuOpts *opts, Error **errp)
if ((int64_t)cyls * heads * secs_per_cyl == VHD_MAX_GEOMETRY) {
total_sectors = total_size / BDRV_SECTOR_SIZE;
- /* Allow a maximum disk size of approximately 2 TB */
+ /* Allow a maximum disk size of 2040 GiB */
if (total_sectors > VHD_MAX_SECTORS) {
+ error_setg(errp, "Disk size is too large, max size is 2040 GiB");
ret = -EFBIG;
goto out;
}
@@ -974,6 +985,9 @@ static int vpc_create(const char *filename, QemuOpts *opts, Error **errp)
} else {
ret = create_fixed_disk(blk, buf, total_size);
}
+ if (ret < 0) {
+ error_setg(errp, "Unable to create or write VHD header");
+ }
out:
blk_unref(blk);
diff --git a/configure b/configure
index 5db29f0245..ab54f3c8ee 100755
--- a/configure
+++ b/configure
@@ -298,6 +298,7 @@ coroutine=""
coroutine_pool=""
seccomp=""
glusterfs=""
+glusterfs_xlator_opt="no"
glusterfs_discard="no"
glusterfs_zerofill="no"
archipelago="no"
@@ -1872,6 +1873,9 @@ if test "$seccomp" != "no" ; then
i386|x86_64)
libseccomp_minver="2.1.0"
;;
+ mips)
+ libseccomp_minver="2.2.0"
+ ;;
arm|aarch64)
libseccomp_minver="2.2.3"
;;
@@ -3397,6 +3401,9 @@ if test "$glusterfs" != "no" ; then
glusterfs="yes"
glusterfs_cflags=`$pkg_config --cflags glusterfs-api`
glusterfs_libs=`$pkg_config --libs glusterfs-api`
+ if $pkg_config --atleast-version=4 glusterfs-api; then
+ glusterfs_xlator_opt="yes"
+ fi
if $pkg_config --atleast-version=5 glusterfs-api; then
glusterfs_discard="yes"
fi
@@ -5339,6 +5346,10 @@ if test "$glusterfs" = "yes" ; then
echo "GLUSTERFS_LIBS=$glusterfs_libs" >> $config_host_mak
fi
+if test "$glusterfs_xlator_opt" = "yes" ; then
+ echo "CONFIG_GLUSTERFS_XLATOR_OPT=y" >> $config_host_mak
+fi
+
if test "$glusterfs_discard" = "yes" ; then
echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak
fi
diff --git a/docs/specs/fw_cfg.txt b/docs/specs/fw_cfg.txt
index 5414140f33..7a5f8c7824 100644
--- a/docs/specs/fw_cfg.txt
+++ b/docs/specs/fw_cfg.txt
@@ -210,29 +210,27 @@ the following syntax:
-fw_cfg [name=]<item_name>,file=<path>
-where <item_name> is the fw_cfg item name, and <path> is the location
-on the host file system of a file containing the data to be inserted.
-
-Small enough items may be provided directly as strings on the command
-line, using the syntax:
+Or
-fw_cfg [name=]<item_name>,string=<string>
-The terminating NUL character of the content <string> will NOT be
-included as part of the fw_cfg item data, which is consistent with
-the absence of a NUL terminator for items inserted via the file option.
+See QEMU man page for more documentation.
+
+Using item_name with plain ASCII characters only is recommended.
+
+Item names beginning with "opt/" are reserved for users. QEMU will
+never create entries with such names unless explicitly ordered by the
+user.
-Both <item_name> and, if applicable, the content <string> are passed
-through by QEMU without any interpretation, expansion, or further
-processing. Any such processing (potentially performed e.g., by the shell)
-is outside of QEMU's responsibility; as such, using plain ASCII characters
-is recommended.
+To avoid clashes among different users, it is strongly recommended
+that you use names beginning with opt/RFQDN/, where RFQDN is a reverse
+fully qualified domain name you control. For instance, if SeaBIOS
+wanted to define additional names, the prefix "opt/org.seabios/" would
+be appropriate.
-NOTE: Users *SHOULD* choose item names beginning with the prefix "opt/"
-when using the "-fw_cfg" command line option, to avoid conflicting with
-item names used internally by QEMU. For instance:
+For historical reasons, "opt/ovmf/" is reserved for OVMF firmware.
- -fw_cfg name=opt/my_item_name,file=./my_blob.bin
+Prefix "opt/org.qemu/" is reserved for QEMU itself.
-Similarly, QEMU developers *SHOULD NOT* use item names prefixed with
-"opt/" when inserting items programmatically, e.g. via fw_cfg_add_file().
+Use of names not beginning with "opt/" is potentially dangerous and
+entirely unsupported. QEMU will warn if you try.
diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt
index 0312d40af0..777c49cfe6 100644
--- a/docs/specs/vhost-user.txt
+++ b/docs/specs/vhost-user.txt
@@ -364,7 +364,7 @@ Message types
Equivalent ioctl: VHOST_SET_VRING_NUM
Master payload: vring state description
- Sets the number of vrings for this owner.
+ Set the size of the queue.
* VHOST_USER_SET_VRING_ADDR
@@ -438,7 +438,7 @@ Message types
Slave payload: u64
Query how many queues the backend supports. This request should be
- sent only when VHOST_USER_PROTOCOL_F_MQ is set in quried protocol
+ sent only when VHOST_USER_PROTOCOL_F_MQ is set in queried protocol
features by VHOST_USER_GET_PROTOCOL_FEATURES.
* VHOST_USER_SET_VRING_ENABLE
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index c475c2aea7..106a775232 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -46,6 +46,7 @@
#include "exec/address-spaces.h"
#include "qemu/host-utils.h"
#include "hw/sysbus.h"
+#include "sysemu/sysemu.h"
#define PFLASH_BUG(fmt, ...) \
do { \
@@ -97,6 +98,7 @@ struct pflash_t {
MemoryRegion mem;
char *name;
void *storage;
+ VMChangeStateEntry *vmstate;
};
static int pflash_post_load(void *opaque, int version_id);
@@ -944,13 +946,25 @@ MemoryRegion *pflash_cfi01_get_memory(pflash_t *fl)
return &fl->mem;
}
+static void postload_update_cb(void *opaque, int running, RunState state)
+{
+ pflash_t *pfl = opaque;
+
+ /* This is called after bdrv_invalidate_cache_all. */
+ qemu_del_vm_change_state_handler(pfl->vmstate);
+ pfl->vmstate = NULL;
+
+ DPRINTF("%s: updating bdrv for %s\n", __func__, pfl->name);
+ pflash_update(pfl, 0, pfl->sector_len * pfl->nb_blocs);
+}
+
static int pflash_post_load(void *opaque, int version_id)
{
pflash_t *pfl = opaque;
if (!pfl->ro) {
- DPRINTF("%s: updating bdrv for %s\n", __func__, pfl->name);
- pflash_update(pfl, 0, pfl->sector_len * pfl->nb_blocs);
+ pfl->vmstate = qemu_add_vm_change_state_handler(postload_update_cb,
+ pfl);
}
return 0;
}
diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c
index 486591bf07..797787823e 100644
--- a/hw/char/cadence_uart.c
+++ b/hw/char/cadence_uart.c
@@ -375,6 +375,9 @@ static void uart_write(void *opaque, hwaddr offset,
DB_PRINT(" offset:%x data:%08x\n", (unsigned)offset, (unsigned)value);
offset >>= 2;
+ if (offset >= CADENCE_UART_R_MAX) {
+ return;
+ }
switch (offset) {
case R_IER: /* ier (wts imr) */
s->r[R_IMR] |= value;
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 35180efe0c..64770034ff 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2167,6 +2167,11 @@ build_dsdt(GArray *table_data, GArray *linker,
0, pci->w64.begin, pci->w64.end - 1, 0,
pci->w64.end - pci->w64.begin));
}
+
+ if (misc->tpm_version != TPM_VERSION_UNSPEC) {
+ aml_append(crs, aml_memory32_fixed(TPM_TIS_ADDR_BASE,
+ TPM_TIS_ADDR_SIZE, AML_READ_WRITE));
+ }
aml_append(scope, aml_name_decl("_CRS", crs));
/* reserve GPE0 block resources */
@@ -2343,7 +2348,12 @@ build_dsdt(GArray *table_data, GArray *linker,
crs = aml_resource_template();
aml_append(crs, aml_memory32_fixed(TPM_TIS_ADDR_BASE,
TPM_TIS_ADDR_SIZE, AML_READ_WRITE));
- aml_append(crs, aml_irq_no_flags(TPM_TIS_IRQ));
+ /*
+ FIXME: TPM_TIS_IRQ=5 conflicts with PNP0C0F irqs,
+ Rewrite to take IRQ from TPM device model and
+ fix default IRQ value there to use some unused IRQ
+ */
+ /* aml_append(crs, aml_irq_no_flags(TPM_TIS_IRQ)); */
aml_append(dev, aml_name_decl("_CRS", crs));
aml_append(scope, dev);
}
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 1fe58ab7fd..2bb606c1c5 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -375,15 +375,18 @@ static void ide_atapi_cmd_check_status(IDEState *s)
}
/* ATAPI DMA support */
-/* XXX: handle read errors */
static void ide_atapi_cmd_read_dma_cb(void *opaque, int ret)
{
IDEState *s = opaque;
int data_offset, n;
if (ret < 0) {
- ide_atapi_io_error(s, ret);
- goto eot;
+ if (ide_handle_rw_error(s, -ret, ide_dma_cmd_to_retry(s->dma_cmd))) {
+ if (s->bus->error_status) {
+ return;
+ }
+ goto eot;
+ }
}
if (s->io_buffer_size > 0) {
@@ -481,21 +484,16 @@ static void ide_atapi_cmd_read(IDEState *s, int lba, int nb_sectors,
}
}
-
-/* Called by *_restart_bh when the transfer function points
- * to ide_atapi_cmd
- */
void ide_atapi_dma_restart(IDEState *s)
{
/*
- * I'm not sure we have enough stored to restart the command
- * safely, so give the guest an error it should recover from.
- * I'm assuming most guests will try to recover from something
- * listed as a medium error on a CD; it seems to work on Linux.
- * This would be more of a problem if we did any other type of
- * DMA operation.
+ * At this point we can just re-evaluate the packet command and start over.
+ * The presence of ->dma_cb callback in the pre_save ensures that the packet
+ * command has been completely sent and we can safely restart command.
*/
- ide_atapi_cmd_error(s, MEDIUM_ERROR, ASC_NO_SEEK_COMPLETE);
+ s->unit = s->bus->retry_unit;
+ s->bus->dma->ops->restart_dma(s->bus->dma);
+ ide_atapi_cmd(s);
}
static inline uint8_t ide_atapi_set_profile(uint8_t *buf, uint8_t *index,
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 90524d5e16..41e6a2dc45 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -57,7 +57,6 @@ static const int smart_attributes[][12] = {
{ 190, 0x03, 0x00, 0x45, 0x45, 0x1f, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x32},
};
-static int ide_handle_rw_error(IDEState *s, int error, int op);
static void ide_dummy_transfer_stop(IDEState *s);
static void padstr(char *str, const char *src, int len)
@@ -773,7 +772,7 @@ void ide_dma_error(IDEState *s)
ide_set_irq(s->bus);
}
-static int ide_handle_rw_error(IDEState *s, int error, int op)
+int ide_handle_rw_error(IDEState *s, int error, int op)
{
bool is_read = (op & IDE_RETRY_READ) != 0;
BlockErrorAction action = blk_get_error_action(s->blk, is_read, error);
@@ -783,8 +782,10 @@ static int ide_handle_rw_error(IDEState *s, int error, int op)
s->bus->error_status = op;
} else if (action == BLOCK_ERROR_ACTION_REPORT) {
block_acct_failed(blk_get_stats(s->blk), &s->acct);
- if (op & IDE_RETRY_DMA) {
+ if (IS_IDE_RETRY_DMA(op)) {
ide_dma_error(s);
+ } else if (IS_IDE_RETRY_ATAPI(op)) {
+ ide_atapi_io_error(s, -error);
} else {
ide_rw_error(s);
}
@@ -804,14 +805,7 @@ static void ide_dma_cb(void *opaque, int ret)
return;
}
if (ret < 0) {
- int op = IDE_RETRY_DMA;
-
- if (s->dma_cmd == IDE_DMA_READ)
- op |= IDE_RETRY_READ;
- else if (s->dma_cmd == IDE_DMA_TRIM)
- op |= IDE_RETRY_TRIM;
-
- if (ide_handle_rw_error(s, -ret, op)) {
+ if (ide_handle_rw_error(s, -ret, ide_dma_cmd_to_retry(s->dma_cmd))) {
return;
}
}
@@ -879,6 +873,8 @@ static void ide_dma_cb(void *opaque, int ret)
ide_issue_trim, ide_dma_cb, s,
DMA_DIRECTION_TO_DEVICE);
break;
+ default:
+ abort();
}
return;
@@ -1641,6 +1637,9 @@ static bool cmd_packet(IDEState *s, uint8_t cmd)
s->status = READY_STAT | SEEK_STAT;
s->atapi_dma = s->feature & 1;
+ if (s->atapi_dma) {
+ s->dma_cmd = IDE_DMA_ATAPI;
+ }
s->nsector = 1;
ide_transfer_start(s, s->io_buffer, ATAPI_PACKET_SIZE,
ide_atapi_cmd);
@@ -2525,15 +2524,13 @@ static void ide_restart_bh(void *opaque)
if (s->bus->dma->ops->restart) {
s->bus->dma->ops->restart(s->bus->dma);
}
- }
-
- if (error_status & IDE_RETRY_DMA) {
+ } else if (IS_IDE_RETRY_DMA(error_status)) {
if (error_status & IDE_RETRY_TRIM) {
ide_restart_dma(s, IDE_DMA_TRIM);
} else {
ide_restart_dma(s, is_read ? IDE_DMA_READ : IDE_DMA_WRITE);
}
- } else if (error_status & IDE_RETRY_PIO) {
+ } else if (IS_IDE_RETRY_PIO(error_status)) {
if (is_read) {
ide_sector_read(s);
} else {
@@ -2541,15 +2538,11 @@ static void ide_restart_bh(void *opaque)
}
} else if (error_status & IDE_RETRY_FLUSH) {
ide_flush_cache(s);
+ } else if (IS_IDE_RETRY_ATAPI(error_status)) {
+ assert(s->end_transfer_func == ide_atapi_cmd);
+ ide_atapi_dma_restart(s);
} else {
- /*
- * We've not got any bits to tell us about ATAPI - but
- * we do have the end_transfer_func that tells us what
- * we're trying to do.
- */
- if (s->end_transfer_func == ide_atapi_cmd) {
- ide_atapi_dma_restart(s);
- }
+ abort();
}
}
diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index 86bde26551..d2c458f579 100644
--- a/hw/ide/internal.h
+++ b/hw/ide/internal.h
@@ -338,6 +338,7 @@ enum ide_dma_cmd {
IDE_DMA_READ,
IDE_DMA_WRITE,
IDE_DMA_TRIM,
+ IDE_DMA_ATAPI,
};
#define ide_cmd_is_read(s) \
@@ -506,13 +507,45 @@ struct IDEDevice {
};
/* These are used for the error_status field of IDEBus */
+#define IDE_RETRY_MASK 0xf8
#define IDE_RETRY_DMA 0x08
#define IDE_RETRY_PIO 0x10
+#define IDE_RETRY_ATAPI 0x20 /* reused IDE_RETRY_READ bit */
#define IDE_RETRY_READ 0x20
#define IDE_RETRY_FLUSH 0x40
#define IDE_RETRY_TRIM 0x80
#define IDE_RETRY_HBA 0x100
+#define IS_IDE_RETRY_DMA(_status) \
+ ((_status) & IDE_RETRY_DMA)
+
+#define IS_IDE_RETRY_PIO(_status) \
+ ((_status) & IDE_RETRY_PIO)
+
+/*
+ * The method of the IDE_RETRY_ATAPI determination is to use a previously
+ * impossible bit combination as a new status value.
+ */
+#define IS_IDE_RETRY_ATAPI(_status) \
+ (((_status) & IDE_RETRY_MASK) == IDE_RETRY_ATAPI)
+
+static inline uint8_t ide_dma_cmd_to_retry(uint8_t dma_cmd)
+{
+ switch (dma_cmd) {
+ case IDE_DMA_READ:
+ return IDE_RETRY_DMA | IDE_RETRY_READ;
+ case IDE_DMA_WRITE:
+ return IDE_RETRY_DMA;
+ case IDE_DMA_TRIM:
+ return IDE_RETRY_DMA | IDE_RETRY_TRIM;
+ case IDE_DMA_ATAPI:
+ return IDE_RETRY_ATAPI;
+ default:
+ break;
+ }
+ return 0;
+}
+
static inline IDEState *idebus_active_if(IDEBus *bus)
{
return bus->ifs + bus->unit;
@@ -597,4 +630,6 @@ void ide_bus_new(IDEBus *idebus, size_t idebus_size, DeviceState *dev,
int bus_id, int max_units);
IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive);
+int ide_handle_rw_error(IDEState *s, int error, int op);
+
#endif /* HW_IDE_INTERNAL_H */
diff --git a/hw/ide/macio.c b/hw/ide/macio.c
index 1725e5b23f..76256eb8a8 100644
--- a/hw/ide/macio.c
+++ b/hw/ide/macio.c
@@ -346,6 +346,8 @@ static void pmac_ide_transfer_cb(void *opaque, int ret)
case IDE_DMA_TRIM:
pmac_dma_trim(s->blk, offset, io->len, pmac_ide_transfer_cb, io);
break;
+ default:
+ abort();
}
return;
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 92ffee7264..8d56a00b1b 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -308,6 +308,10 @@ static void ide_bmdma_pre_save(void *opaque)
BMDMAState *bm = opaque;
uint8_t abused_bits = BM_MIGRATION_COMPAT_STATUS_BITS;
+ if (!(bm->status & BM_STATUS_DMAING) && bm->dma_cb) {
+ bm->bus->error_status =
+ ide_dma_cmd_to_retry(bmdma_active_if(bm)->dma_cmd);
+ }
bm->migration_retry_unit = bm->bus->retry_unit;
bm->migration_retry_sector_num = bm->bus->retry_sector_num;
bm->migration_retry_nsector = bm->bus->retry_nsector;
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index 0a4cbcbcbb..6d76ce980b 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -189,6 +189,7 @@ int pci_piix3_xen_ide_unplug(DeviceState *dev)
idedev = pci_ide->bus[di->bus].slave;
}
idedev->conf.blk = NULL;
+ monitor_remove_blk(blk);
blk_unref(blk);
}
}
diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c
index 5d12157114..3ee0c1814a 100644
--- a/hw/input/virtio-input-hid.c
+++ b/hw/input/virtio-input-hid.c
@@ -121,6 +121,8 @@ static const unsigned int keymap_qcode[Q_KEY_CODE__MAX] = {
[Q_KEY_CODE_CTRL_R] = KEY_RIGHTCTRL,
[Q_KEY_CODE_SYSRQ] = KEY_SYSRQ,
+ [Q_KEY_CODE_PRINT] = KEY_SYSRQ,
+ [Q_KEY_CODE_PAUSE] = KEY_PAUSE,
[Q_KEY_CODE_ALT_R] = KEY_RIGHTALT,
[Q_KEY_CODE_HOME] = KEY_HOME,
@@ -482,12 +484,12 @@ static struct virtio_input_config virtio_tablet_config[] = {
.select = VIRTIO_INPUT_CFG_ABS_INFO,
.subsel = ABS_X,
.size = sizeof(virtio_input_absinfo),
- .u.abs.max = const_le32(INPUT_EVENT_ABS_SIZE),
+ .u.abs.max = const_le32(INPUT_EVENT_ABS_SIZE - 1),
},{
.select = VIRTIO_INPUT_CFG_ABS_INFO,
.subsel = ABS_Y,
.size = sizeof(virtio_input_absinfo),
- .u.abs.max = const_le32(INPUT_EVENT_ABS_SIZE),
+ .u.abs.max = const_le32(INPUT_EVENT_ABS_SIZE - 1),
},
{ /* end of list */ },
};
diff --git a/hw/input/virtio-input-host.c b/hw/input/virtio-input-host.c
index 9e0f46d88f..cb79e80024 100644
--- a/hw/input/virtio-input-host.c
+++ b/hw/input/virtio-input-host.c
@@ -70,13 +70,39 @@ static void virtio_input_bits_config(VirtIOInputHost *vih,
virtio_input_add_config(VIRTIO_INPUT(vih), &bits);
}
+static void virtio_input_abs_config(VirtIOInputHost *vih, int axis)
+{
+ virtio_input_config config;
+ struct input_absinfo absinfo;
+ int rc;
+
+ rc = ioctl(vih->fd, EVIOCGABS(axis), &absinfo);
+ if (rc < 0) {
+ return;
+ }
+
+ memset(&config, 0, sizeof(config));
+ config.select = VIRTIO_INPUT_CFG_ABS_INFO;
+ config.subsel = axis;
+ config.size = sizeof(virtio_input_absinfo);
+
+ config.u.abs.min = cpu_to_le32(absinfo.minimum);
+ config.u.abs.max = cpu_to_le32(absinfo.maximum);
+ config.u.abs.fuzz = cpu_to_le32(absinfo.fuzz);
+ config.u.abs.flat = cpu_to_le32(absinfo.flat);
+ config.u.abs.res = cpu_to_le32(absinfo.resolution);
+
+ virtio_input_add_config(VIRTIO_INPUT(vih), &config);
+}
+
static void virtio_input_host_realize(DeviceState *dev, Error **errp)
{
VirtIOInputHost *vih = VIRTIO_INPUT_HOST(dev);
VirtIOInput *vinput = VIRTIO_INPUT(dev);
- virtio_input_config id;
+ virtio_input_config id, *abs;
struct input_id ids;
- int rc, ver;
+ int rc, ver, i, axis;
+ uint8_t byte;
if (!vih->evdev) {
error_setg(errp, "evdev property is required");
@@ -125,6 +151,23 @@ static void virtio_input_host_realize(DeviceState *dev, Error **errp)
virtio_input_bits_config(vih, EV_ABS, ABS_CNT);
virtio_input_bits_config(vih, EV_MSC, MSC_CNT);
virtio_input_bits_config(vih, EV_SW, SW_CNT);
+ virtio_input_bits_config(vih, EV_LED, LED_CNT);
+
+ abs = virtio_input_find_config(VIRTIO_INPUT(vih),
+ VIRTIO_INPUT_CFG_EV_BITS, EV_ABS);
+ if (abs) {
+ for (i = 0; i < abs->size; i++) {
+ byte = abs->u.bitmap[i];
+ axis = 8 * i;
+ while (byte) {
+ if (byte & 1) {
+ virtio_input_abs_config(vih, axis);
+ }
+ axis++;
+ byte >>= 1;
+ }
+ }
+ }
qemu_set_fd_handler(vih->fd, virtio_input_host_event, NULL, vih);
return;
@@ -145,6 +188,28 @@ static void virtio_input_host_unrealize(DeviceState *dev, Error **errp)
}
}
+static void virtio_input_host_handle_status(VirtIOInput *vinput,
+ virtio_input_event *event)
+{
+ VirtIOInputHost *vih = VIRTIO_INPUT_HOST(vinput);
+ struct input_event evdev;
+ int rc;
+
+ if (gettimeofday(&evdev.time, NULL)) {
+ perror("virtio_input_host_handle_status: gettimeofday");
+ return;
+ }
+
+ evdev.type = le16_to_cpu(event->type);
+ evdev.code = le16_to_cpu(event->code);
+ evdev.value = le32_to_cpu(event->value);
+
+ rc = write(vih->fd, &evdev, sizeof(evdev));
+ if (rc == -1) {
+ perror("virtio_input_host_handle_status: write");
+ }
+}
+
static const VMStateDescription vmstate_virtio_input_host = {
.name = "virtio-input-host",
.unmigratable = 1,
@@ -164,6 +229,7 @@ static void virtio_input_host_class_init(ObjectClass *klass, void *data)
dc->props = virtio_input_host_properties;
vic->realize = virtio_input_host_realize;
vic->unrealize = virtio_input_host_unrealize;
+ vic->handle_status = virtio_input_host_handle_status;
}
static void virtio_input_host_init(Object *obj)
diff --git a/hw/input/virtio-input.c b/hw/input/virtio-input.c
index 672c207eb5..f59749a943 100644
--- a/hw/input/virtio-input.c
+++ b/hw/input/virtio-input.c
@@ -14,6 +14,8 @@
#include "standard-headers/linux/input.h"
+#define VIRTIO_INPUT_VM_VERSION 1
+
/* ----------------------------------------------------------------- */
void virtio_input_send(VirtIOInput *vinput, virtio_input_event *event)
@@ -97,9 +99,9 @@ static void virtio_input_handle_sts(VirtIODevice *vdev, VirtQueue *vq)
virtio_notify(vdev, vinput->sts);
}
-static virtio_input_config *virtio_input_find_config(VirtIOInput *vinput,
- uint8_t select,
- uint8_t subsel)
+virtio_input_config *virtio_input_find_config(VirtIOInput *vinput,
+ uint8_t select,
+ uint8_t subsel)
{
VirtIOInputConfig *cfg;
@@ -214,6 +216,38 @@ static void virtio_input_reset(VirtIODevice *vdev)
}
}
+static void virtio_input_save(QEMUFile *f, void *opaque)
+{
+ VirtIOInput *vinput = opaque;
+ VirtIODevice *vdev = VIRTIO_DEVICE(vinput);
+
+ virtio_save(vdev, f);
+}
+
+static int virtio_input_load(QEMUFile *f, void *opaque, int version_id)
+{
+ VirtIOInput *vinput = opaque;
+ VirtIOInputClass *vic = VIRTIO_INPUT_GET_CLASS(vinput);
+ VirtIODevice *vdev = VIRTIO_DEVICE(vinput);
+ int ret;
+
+ if (version_id != VIRTIO_INPUT_VM_VERSION) {
+ return -EINVAL;
+ }
+
+ ret = virtio_load(vdev, f, version_id);
+ if (ret) {
+ return ret;
+ }
+
+ /* post_load() */
+ vinput->active = vdev->status & VIRTIO_CONFIG_S_DRIVER_OK;
+ if (vic->change_active) {
+ vic->change_active(vinput);
+ }
+ return 0;
+}
+
static void virtio_input_device_realize(DeviceState *dev, Error **errp)
{
VirtIOInputClass *vic = VIRTIO_INPUT_GET_CLASS(dev);
@@ -245,14 +279,20 @@ static void virtio_input_device_realize(DeviceState *dev, Error **errp)
vinput->cfg_size);
vinput->evt = virtio_add_queue(vdev, 64, virtio_input_handle_evt);
vinput->sts = virtio_add_queue(vdev, 64, virtio_input_handle_sts);
+
+ register_savevm(dev, "virtio-input", -1, VIRTIO_INPUT_VM_VERSION,
+ virtio_input_save, virtio_input_load, vinput);
}
static void virtio_input_device_unrealize(DeviceState *dev, Error **errp)
{
VirtIOInputClass *vic = VIRTIO_INPUT_GET_CLASS(dev);
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
+ VirtIOInput *vinput = VIRTIO_INPUT(dev);
Error *local_err = NULL;
+ unregister_savevm(dev, "virtio-input", vinput);
+
if (vic->unrealize) {
vic->unrealize(dev, &local_err);
if (local_err) {
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 2eb866899a..e40f23bfc2 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -872,6 +872,8 @@ static void ivshmem_common_realize(PCIDevice *dev, Error **errp)
s->ivshmem_bar2 = host_memory_backend_get_memory(s->hostmem,
&error_abort);
} else {
+ assert(s->server_chr);
+
IVSHMEM_DPRINTF("using shared memory server (socket = %s)\n",
s->server_chr->filename);
@@ -1051,10 +1053,24 @@ static void ivshmem_plain_init(Object *obj)
&error_abort);
}
+static void ivshmem_plain_realize(PCIDevice *dev, Error **errp)
+{
+ IVShmemState *s = IVSHMEM_COMMON(dev);
+
+ if (!s->hostmem) {
+ error_setg(errp, "You must specify a 'memdev'");
+ return;
+ }
+
+ ivshmem_common_realize(dev, errp);
+}
+
static void ivshmem_plain_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
+ PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+ k->realize = ivshmem_plain_realize;
dc->props = ivshmem_plain_properties;
dc->vmsd = &ivshmem_plain_vmsd;
}
@@ -1099,10 +1115,24 @@ static void ivshmem_doorbell_init(Object *obj)
s->legacy_size = SIZE_MAX; /* whatever the server sends */
}
+static void ivshmem_doorbell_realize(PCIDevice *dev, Error **errp)
+{
+ IVShmemState *s = IVSHMEM_COMMON(dev);
+
+ if (!s->server_chr) {
+ error_setg(errp, "You must specify a 'chardev'");
+ return;
+ }
+
+ ivshmem_common_realize(dev, errp);
+}
+
static void ivshmem_doorbell_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
+ PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+ k->realize = ivshmem_doorbell_realize;
dc->props = ivshmem_doorbell_properties;
dc->vmsd = &ivshmem_doorbell_vmsd;
}
diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c
index c7472aaa9d..f15f301100 100644
--- a/hw/misc/macio/cuda.c
+++ b/hw/misc/macio/cuda.c
@@ -685,8 +685,8 @@ static bool cuda_cmd_set_time(CUDAState *s,
return false;
}
- ti = (((uint32_t)in_data[1]) << 24) + (((uint32_t)in_data[2]) << 16)
- + (((uint32_t)in_data[3]) << 8) + in_data[4];
+ ti = (((uint32_t)in_data[0]) << 24) + (((uint32_t)in_data[1]) << 16)
+ + (((uint32_t)in_data[2]) << 8) + in_data[3];
s->tick_offset = ti - (qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL)
/ NANOSECONDS_PER_SECOND);
return true;
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
index e98efb709e..e88c0d20bc 100644
--- a/hw/tpm/tpm_passthrough.c
+++ b/hw/tpm/tpm_passthrough.c
@@ -86,7 +86,7 @@ static int tpm_passthrough_unix_write(int fd, const uint8_t *buf, uint32_t len)
int ret, remain;
remain = len;
- while (len > 0) {
+ while (remain > 0) {
ret = write(fd, buf, remain);
if (ret < 0) {
if (errno != EINTR && errno != EAGAIN) {
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 159f58d5a0..43a8f7abcc 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -1397,7 +1397,7 @@ static int ehci_process_itd(EHCIState *ehci,
{
USBDevice *dev;
USBEndpoint *ep;
- uint32_t i, len, pid, dir, devaddr, endp, xfers = 0;
+ uint32_t i, len, pid, dir, devaddr, endp;
uint32_t pg, off, ptr1, ptr2, max, mult;
ehci->periodic_sched_active = PERIODIC_ACTIVE;
@@ -1489,10 +1489,9 @@ static int ehci_process_itd(EHCIState *ehci,
ehci_raise_irq(ehci, USBSTS_INT);
}
itd->transact[i] &= ~ITD_XACT_ACTIVE;
- xfers++;
}
}
- return xfers ? 0 : -1;
+ return 0;
}
@@ -2011,6 +2010,7 @@ static int ehci_state_writeback(EHCIQueue *q)
static void ehci_advance_state(EHCIState *ehci, int async)
{
EHCIQueue *q = NULL;
+ int itd_count = 0;
int again;
do {
@@ -2035,10 +2035,12 @@ static void ehci_advance_state(EHCIState *ehci, int async)
case EST_FETCHITD:
again = ehci_state_fetchitd(ehci, async);
+ itd_count++;
break;
case EST_FETCHSITD:
again = ehci_state_fetchsitd(ehci, async);
+ itd_count++;
break;
case EST_ADVANCEQUEUE:
@@ -2087,7 +2089,8 @@ static void ehci_advance_state(EHCIState *ehci, int async)
break;
}
- if (again < 0) {
+ if (again < 0 || itd_count > 16) {
+ /* TODO: notify guest (raise HSE irq?) */
fprintf(stderr, "processing error - resetting ehci HC\n");
ehci_reset(ehci);
again = 0;
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index c74101e479..9dbe681790 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -19,7 +19,6 @@
#include "qemu-common.h"
#include "hw/virtio/virtio.h"
#include "hw/i386/pc.h"
-#include "cpu.h"
#include "sysemu/balloon.h"
#include "hw/virtio/virtio-balloon.h"
#include "sysemu/kvm.h"
@@ -35,12 +34,14 @@
#include "hw/virtio/virtio-bus.h"
#include "hw/virtio/virtio-access.h"
+#define BALLOON_PAGE_SIZE (1 << VIRTIO_BALLOON_PFN_SHIFT)
+
static void balloon_page(void *addr, int deflate)
{
#if defined(__linux__)
if (!qemu_balloon_is_inhibited() && (!kvm_enabled() ||
kvm_has_sync_mmu())) {
- qemu_madvise(addr, TARGET_PAGE_SIZE,
+ qemu_madvise(addr, BALLOON_PAGE_SIZE,
deflate ? QEMU_MADV_WILLNEED : QEMU_MADV_DONTNEED);
}
#endif
diff --git a/include/hw/virtio/virtio-input.h b/include/hw/virtio/virtio-input.h
index af1c207ab1..bddbd4b287 100644
--- a/include/hw/virtio/virtio-input.h
+++ b/include/hw/virtio/virtio-input.h
@@ -13,20 +13,6 @@ typedef struct virtio_input_absinfo virtio_input_absinfo;
typedef struct virtio_input_config virtio_input_config;
typedef struct virtio_input_event virtio_input_event;
-#if defined(HOST_WORDS_BIGENDIAN)
-# define const_le32(_x) \
- (((_x & 0x000000ffU) << 24) | \
- ((_x & 0x0000ff00U) << 8) | \
- ((_x & 0x00ff0000U) >> 8) | \
- ((_x & 0xff000000U) >> 24))
-# define const_le16(_x) \
- (((_x & 0x00ff) << 8) | \
- ((_x & 0xff00) >> 8))
-#else
-# define const_le32(_x) (_x)
-# define const_le16(_x) (_x)
-#endif
-
/* ----------------------------------------------------------------- */
/* qemu internals */
@@ -111,6 +97,9 @@ struct VirtIOInputHost {
void virtio_input_send(VirtIOInput *vinput, virtio_input_event *event);
void virtio_input_init_config(VirtIOInput *vinput,
virtio_input_config *config);
+virtio_input_config *virtio_input_find_config(VirtIOInput *vinput,
+ uint8_t select,
+ uint8_t subsel);
void virtio_input_add_config(VirtIOInput *vinput,
virtio_input_config *config);
void virtio_input_idstr_config(VirtIOInput *vinput,
diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index fcedf0d249..ce3c42e4d9 100644
--- a/include/qemu/bswap.h
+++ b/include/qemu/bswap.h
@@ -125,6 +125,25 @@ static inline uint32_t qemu_bswap_len(uint32_t value, int len)
return bswap32(value) >> (32 - 8 * len);
}
+/*
+ * Same as cpu_to_le{16,23}, except that gcc will figure the result is
+ * a compile-time constant if you pass in a constant. So this can be
+ * used to initialize static variables.
+ */
+#if defined(HOST_WORDS_BIGENDIAN)
+# define const_le32(_x) \
+ ((((_x) & 0x000000ffU) << 24) | \
+ (((_x) & 0x0000ff00U) << 8) | \
+ (((_x) & 0x00ff0000U) >> 8) | \
+ (((_x) & 0xff000000U) >> 24))
+# define const_le16(_x) \
+ ((((_x) & 0x00ff) << 8) | \
+ (((_x) & 0xff00) >> 8))
+#else
+# define const_le32(_x) (_x)
+# define const_le16(_x) (_x)
+#endif
+
/* Unions for reinterpreting between floats and integers. */
typedef union {
diff --git a/nbd/client.c b/nbd/client.c
index 6777e589d1..48f2a21f33 100644
--- a/nbd/client.c
+++ b/nbd/client.c
@@ -192,13 +192,18 @@ static int nbd_receive_list(QIOChannel *ioc, char **name, Error **errp)
return -1;
}
} else if (type == NBD_REP_SERVER) {
+ if (len < sizeof(namelen) || len > NBD_MAX_BUFFER_SIZE) {
+ error_setg(errp, "incorrect option length");
+ return -1;
+ }
if (read_sync(ioc, &namelen, sizeof(namelen)) != sizeof(namelen)) {
error_setg(errp, "failed to read option name length");
return -1;
}
namelen = be32_to_cpu(namelen);
- if (len != (namelen + sizeof(namelen))) {
- error_setg(errp, "incorrect option mame length");
+ len -= sizeof(namelen);
+ if (len < namelen) {
+ error_setg(errp, "incorrect option name length");
return -1;
}
if (namelen > 255) {
@@ -214,6 +219,20 @@ static int nbd_receive_list(QIOChannel *ioc, char **name, Error **errp)
return -1;
}
(*name)[namelen] = '\0';
+ len -= namelen;
+ if (len) {
+ char *buf = g_malloc(len + 1);
+ if (read_sync(ioc, buf, len) != len) {
+ error_setg(errp, "failed to read export description");
+ g_free(*name);
+ g_free(buf);
+ *name = NULL;
+ return -1;
+ }
+ buf[len] = '\0';
+ TRACE("Ignoring export description: %s", buf);
+ g_free(buf);
+ }
} else {
error_setg(errp, "Unexpected reply type %x expected %x",
type, NBD_REP_SERVER);
diff --git a/nbd/server.c b/nbd/server.c
index 2a4dd10f52..a13a69169a 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -449,11 +449,19 @@ static int nbd_negotiate_options(NBDClient *client)
client->ioc = QIO_CHANNEL(tioc);
break;
+ case NBD_OPT_EXPORT_NAME:
+ /* No way to return an error to client, so drop connection */
+ TRACE("Option 0x%x not permitted before TLS", clientflags);
+ return -EINVAL;
+
default:
TRACE("Option 0x%x not permitted before TLS", clientflags);
+ if (nbd_negotiate_drop_sync(client->ioc, length) != length) {
+ return -EIO;
+ }
nbd_negotiate_send_rep(client->ioc, NBD_REP_ERR_TLS_REQD,
clientflags);
- return -EINVAL;
+ break;
}
} else if (fixedNewstyle) {
switch (clientflags) {
@@ -471,6 +479,9 @@ static int nbd_negotiate_options(NBDClient *client)
return nbd_negotiate_handle_export_name(client, length);
case NBD_OPT_STARTTLS:
+ if (nbd_negotiate_drop_sync(client->ioc, length) != length) {
+ return -EIO;
+ }
if (client->tlscreds) {
TRACE("TLS already enabled");
nbd_negotiate_send_rep(client->ioc, NBD_REP_ERR_INVALID,
@@ -480,7 +491,7 @@ static int nbd_negotiate_options(NBDClient *client)
nbd_negotiate_send_rep(client->ioc, NBD_REP_ERR_POLICY,
clientflags);
}
- return -EINVAL;
+ break;
default:
TRACE("Unsupported option 0x%x", clientflags);
if (nbd_negotiate_drop_sync(client->ioc, length) != length) {
diff --git a/pc-bios/openbios-ppc b/pc-bios/openbios-ppc
index 4a883843e5..ff980adb12 100644
--- a/pc-bios/openbios-ppc
+++ b/pc-bios/openbios-ppc
Binary files differ
diff --git a/pc-bios/openbios-sparc32 b/pc-bios/openbios-sparc32
index e288624c7e..e744e898b8 100644
--- a/pc-bios/openbios-sparc32
+++ b/pc-bios/openbios-sparc32
Binary files differ
diff --git a/pc-bios/openbios-sparc64 b/pc-bios/openbios-sparc64
index f69e56c780..4d23be3edc 100644
--- a/pc-bios/openbios-sparc64
+++ b/pc-bios/openbios-sparc64
Binary files differ
diff --git a/po/de_DE.po b/po/de_DE.po
index cbba20308d..97ae655169 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: QEMU 1.4.50\n"
"Report-Msgid-Bugs-To: qemu-devel@nongnu.org\n"
-"POT-Creation-Date: 2015-12-10 13:29+0000\n"
+"POT-Creation-Date: 2016-04-18 14:50+0100\n"
"PO-Revision-Date: 2012-02-28 16:00+0100\n"
"Last-Translator: Kevin Wolf <kwolf@redhat.com>\n"
"Language-Team: Deutsch <de@li.org>\n"
@@ -16,70 +16,70 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
-#: ui/gtk.c:271
+#: ui/gtk.c:273
msgid " - Press Ctrl+Alt+G to release grab"
msgstr " - Strg+Alt+G drücken, um Eingabegeräte freizugeben"
-#: ui/gtk.c:275
+#: ui/gtk.c:277
msgid " [Paused]"
msgstr " [Angehalten]"
-#: ui/gtk.c:1783
+#: ui/gtk.c:1833
msgid "_Pause"
msgstr "_Angehalten"
-#: ui/gtk.c:1789
+#: ui/gtk.c:1839
msgid "_Reset"
msgstr "_Reset"
-#: ui/gtk.c:1792
+#: ui/gtk.c:1842
msgid "Power _Down"
msgstr "_Herunterfahren"
-#: ui/gtk.c:1798
+#: ui/gtk.c:1848
msgid "_Quit"
msgstr "_Beenden"
-#: ui/gtk.c:1890
+#: ui/gtk.c:1940
msgid "_Fullscreen"
msgstr "_Vollbild"
-#: ui/gtk.c:1904
+#: ui/gtk.c:1954
msgid "Zoom _In"
msgstr "_Heranzoomen"
-#: ui/gtk.c:1911
+#: ui/gtk.c:1961
msgid "Zoom _Out"
msgstr "_Wegzoomen"
-#: ui/gtk.c:1918
+#: ui/gtk.c:1968
msgid "Best _Fit"
msgstr "_Einpassen"
-#: ui/gtk.c:1925
+#: ui/gtk.c:1975
msgid "Zoom To _Fit"
msgstr "Auf _Fenstergröße skalieren"
-#: ui/gtk.c:1931
+#: ui/gtk.c:1981
msgid "Grab On _Hover"
msgstr "Tastatur _automatisch einfangen"
-#: ui/gtk.c:1934
+#: ui/gtk.c:1984
msgid "_Grab Input"
msgstr "_Eingabegeräte einfangen"
-#: ui/gtk.c:1963
+#: ui/gtk.c:2013
msgid "Show _Tabs"
msgstr "Reiter anzeigen"
-#: ui/gtk.c:1966
+#: ui/gtk.c:2016
msgid "Detach Tab"
msgstr "Reiter abtrennen"
-#: ui/gtk.c:1978
+#: ui/gtk.c:2028
msgid "_Machine"
msgstr "_Maschine"
-#: ui/gtk.c:1983
+#: ui/gtk.c:2033
msgid "_View"
msgstr "_Ansicht"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index 8acbb6b06b..e9fb0402db 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: QEMU 1.4.50\n"
"Report-Msgid-Bugs-To: qemu-devel@nongnu.org\n"
-"POT-Creation-Date: 2015-12-10 13:29+0000\n"
+"POT-Creation-Date: 2016-04-18 14:50+0100\n"
"PO-Revision-Date: 2014-07-28 23:25+0200\n"
"Last-Translator: Aurelien Jarno <aurelien@aurel32.net>\n"
"Language-Team: French <FR@li.org>\n"
@@ -17,70 +17,70 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Lokalize 1.4\n"
-#: ui/gtk.c:271
+#: ui/gtk.c:273
msgid " - Press Ctrl+Alt+G to release grab"
msgstr "- Appuyer sur Ctrl+Alt+G pour arrêter la capture"
-#: ui/gtk.c:275
+#: ui/gtk.c:277
msgid " [Paused]"
msgstr " [En pause]"
-#: ui/gtk.c:1783
+#: ui/gtk.c:1833
msgid "_Pause"
msgstr "_Pause"
-#: ui/gtk.c:1789
+#: ui/gtk.c:1839
msgid "_Reset"
msgstr "_Réinitialiser"
-#: ui/gtk.c:1792
+#: ui/gtk.c:1842
msgid "Power _Down"
msgstr "_Éteindre"
-#: ui/gtk.c:1798
+#: ui/gtk.c:1848
msgid "_Quit"
msgstr "_Quitter"
-#: ui/gtk.c:1890
+#: ui/gtk.c:1940
msgid "_Fullscreen"
msgstr "Mode _plein écran"
-#: ui/gtk.c:1904
+#: ui/gtk.c:1954
msgid "Zoom _In"
msgstr "Zoom _avant"
-#: ui/gtk.c:1911
+#: ui/gtk.c:1961
msgid "Zoom _Out"
msgstr "_Zoom arrière"
-#: ui/gtk.c:1918
+#: ui/gtk.c:1968
msgid "Best _Fit"
msgstr "Zoom _idéal"
-#: ui/gtk.c:1925
+#: ui/gtk.c:1975
msgid "Zoom To _Fit"
msgstr "Zoomer pour a_juster"
-#: ui/gtk.c:1931
+#: ui/gtk.c:1981
msgid "Grab On _Hover"
msgstr "Capturer en _survolant"
-#: ui/gtk.c:1934
+#: ui/gtk.c:1984
msgid "_Grab Input"
msgstr "_Capturer les entrées"
-#: ui/gtk.c:1963
+#: ui/gtk.c:2013
msgid "Show _Tabs"
msgstr "Montrer les _onglets"
-#: ui/gtk.c:1966
+#: ui/gtk.c:2016
msgid "Detach Tab"
msgstr "_Détacher l'onglet"
-#: ui/gtk.c:1978
+#: ui/gtk.c:2028
msgid "_Machine"
msgstr "_Machine"
-#: ui/gtk.c:1983
+#: ui/gtk.c:2033
msgid "_View"
msgstr "_Vue"
diff --git a/po/hu.po b/po/hu.po
index ee1540bf6c..1149adf26b 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: QEMU 1.4.50\n"
"Report-Msgid-Bugs-To: qemu-devel@nongnu.org\n"
-"POT-Creation-Date: 2015-12-10 13:29+0000\n"
+"POT-Creation-Date: 2016-04-18 14:50+0100\n"
"PO-Revision-Date: 2013-05-06 20:42+0200\n"
"Last-Translator: Ákos Kovács <akoskovacs@gmx.com>\n"
"Language-Team: Hungarian <hu@li.org>\n"
@@ -15,73 +15,73 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ui/gtk.c:271
+#: ui/gtk.c:273
msgid " - Press Ctrl+Alt+G to release grab"
msgstr " - Nyomj Ctrl+Alt+G-t a bemeneti eszközök elengedéséhez"
-#: ui/gtk.c:275
+#: ui/gtk.c:277
msgid " [Paused]"
msgstr " [Megállítva]"
-#: ui/gtk.c:1783
+#: ui/gtk.c:1833
msgid "_Pause"
msgstr "_Megállítás"
-#: ui/gtk.c:1789
+#: ui/gtk.c:1839
msgid "_Reset"
msgstr "Új_raindítás"
-#: ui/gtk.c:1792
+#: ui/gtk.c:1842
msgid "Power _Down"
msgstr "_Leállítás"
-#: ui/gtk.c:1798
+#: ui/gtk.c:1848
msgid "_Quit"
msgstr ""
-#: ui/gtk.c:1890
+#: ui/gtk.c:1940
msgid "_Fullscreen"
msgstr ""
-#: ui/gtk.c:1904
+#: ui/gtk.c:1954
#, fuzzy
msgid "Zoom _In"
msgstr "Ablakmérethez _igazítás"
-#: ui/gtk.c:1911
+#: ui/gtk.c:1961
#, fuzzy
msgid "Zoom _Out"
msgstr "Ablakmérethez _igazítás"
-#: ui/gtk.c:1918
+#: ui/gtk.c:1968
msgid "Best _Fit"
msgstr ""
-#: ui/gtk.c:1925
+#: ui/gtk.c:1975
msgid "Zoom To _Fit"
msgstr "Ablakmérethez _igazítás"
-#: ui/gtk.c:1931
+#: ui/gtk.c:1981
msgid "Grab On _Hover"
msgstr "Automatikus _elfogás"
-#: ui/gtk.c:1934
+#: ui/gtk.c:1984
msgid "_Grab Input"
msgstr "_Bemeneti eszközök megragadása"
-#: ui/gtk.c:1963
+#: ui/gtk.c:2013
msgid "Show _Tabs"
msgstr "_Fülek megjelenítése"
-#: ui/gtk.c:1966
+#: ui/gtk.c:2016
msgid "Detach Tab"
msgstr ""
-#: ui/gtk.c:1978
+#: ui/gtk.c:2028
msgid "_Machine"
msgstr "_Gép"
-#: ui/gtk.c:1983
+#: ui/gtk.c:2033
msgid "_View"
msgstr "_Nézet"
diff --git a/po/it.po b/po/it.po
index c141e2ff93..a2c8e558c5 100644
--- a/po/it.po
+++ b/po/it.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: QEMU 1.4.50\n"
"Report-Msgid-Bugs-To: qemu-devel@nongnu.org\n"
-"POT-Creation-Date: 2015-12-10 13:29+0000\n"
+"POT-Creation-Date: 2016-04-18 14:50+0100\n"
"PO-Revision-Date: 2014-07-29 08:25+0200\n"
"Last-Translator: Paolo Bonzini <pbonzini@redhat.com>\n"
"Language-Team: Italian <it@li.org>\n"
@@ -16,70 +16,70 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-#: ui/gtk.c:271
+#: ui/gtk.c:273
msgid " - Press Ctrl+Alt+G to release grab"
msgstr " - Premere Ctrl+Alt+G per rilasciare l'input"
-#: ui/gtk.c:275
+#: ui/gtk.c:277
msgid " [Paused]"
msgstr " [Pausa]"
-#: ui/gtk.c:1783
+#: ui/gtk.c:1833
msgid "_Pause"
msgstr "_Pausa"
-#: ui/gtk.c:1789
+#: ui/gtk.c:1839
msgid "_Reset"
msgstr "_Reset"
-#: ui/gtk.c:1792
+#: ui/gtk.c:1842
msgid "Power _Down"
msgstr "_Spegni"
-#: ui/gtk.c:1798
+#: ui/gtk.c:1848
msgid "_Quit"
msgstr "_Esci"
-#: ui/gtk.c:1890
+#: ui/gtk.c:1940
msgid "_Fullscreen"
msgstr ""
-#: ui/gtk.c:1904
+#: ui/gtk.c:1954
msgid "Zoom _In"
msgstr "_Aumenta zoom"
-#: ui/gtk.c:1911
+#: ui/gtk.c:1961
msgid "Zoom _Out"
msgstr "_Riduci zoom"
-#: ui/gtk.c:1918
+#: ui/gtk.c:1968
msgid "Best _Fit"
msgstr "A_nnulla zoom"
-#: ui/gtk.c:1925
+#: ui/gtk.c:1975
msgid "Zoom To _Fit"
msgstr "Adatta alla _finestra"
-#: ui/gtk.c:1931
+#: ui/gtk.c:1981
msgid "Grab On _Hover"
msgstr "Cattura _automatica input"
-#: ui/gtk.c:1934
+#: ui/gtk.c:1984
msgid "_Grab Input"
msgstr "_Cattura input"
-#: ui/gtk.c:1963
+#: ui/gtk.c:2013
msgid "Show _Tabs"
msgstr "Mostra _tab"
-#: ui/gtk.c:1966
+#: ui/gtk.c:2016
msgid "Detach Tab"
msgstr "_Sposta in una nuova finestra"
-#: ui/gtk.c:1978
+#: ui/gtk.c:2028
msgid "_Machine"
msgstr "_Macchina virtuale"
-#: ui/gtk.c:1983
+#: ui/gtk.c:2033
msgid "_View"
msgstr "_Visualizza"
diff --git a/po/messages.po b/po/messages.po
index 00f53f13a5..e8f9ccd389 100644
--- a/po/messages.po
+++ b/po/messages.po
@@ -5,9 +5,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: QEMU 2.4.93\n"
+"Project-Id-Version: QEMU 2.5.92\n"
"Report-Msgid-Bugs-To: qemu-devel@nongnu.org\n"
-"POT-Creation-Date: 2015-12-10 13:29+0000\n"
+"POT-Creation-Date: 2016-04-18 14:50+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,70 +16,70 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ui/gtk.c:271
+#: ui/gtk.c:273
msgid " - Press Ctrl+Alt+G to release grab"
msgstr ""
-#: ui/gtk.c:275
+#: ui/gtk.c:277
msgid " [Paused]"
msgstr ""
-#: ui/gtk.c:1783
+#: ui/gtk.c:1833
msgid "_Pause"
msgstr ""
-#: ui/gtk.c:1789
+#: ui/gtk.c:1839
msgid "_Reset"
msgstr ""
-#: ui/gtk.c:1792
+#: ui/gtk.c:1842
msgid "Power _Down"
msgstr ""
-#: ui/gtk.c:1798
+#: ui/gtk.c:1848
msgid "_Quit"
msgstr ""
-#: ui/gtk.c:1890
+#: ui/gtk.c:1940
msgid "_Fullscreen"
msgstr ""
-#: ui/gtk.c:1904
+#: ui/gtk.c:1954
msgid "Zoom _In"
msgstr ""
-#: ui/gtk.c:1911
+#: ui/gtk.c:1961
msgid "Zoom _Out"
msgstr ""
-#: ui/gtk.c:1918
+#: ui/gtk.c:1968
msgid "Best _Fit"
msgstr ""
-#: ui/gtk.c:1925
+#: ui/gtk.c:1975
msgid "Zoom To _Fit"
msgstr ""
-#: ui/gtk.c:1931
+#: ui/gtk.c:1981
msgid "Grab On _Hover"
msgstr ""
-#: ui/gtk.c:1934
+#: ui/gtk.c:1984
msgid "_Grab Input"
msgstr ""
-#: ui/gtk.c:1963
+#: ui/gtk.c:2013
msgid "Show _Tabs"
msgstr ""
-#: ui/gtk.c:1966
+#: ui/gtk.c:2016
msgid "Detach Tab"
msgstr ""
-#: ui/gtk.c:1978
+#: ui/gtk.c:2028
msgid "_Machine"
msgstr ""
-#: ui/gtk.c:1983
+#: ui/gtk.c:2033
msgid "_View"
msgstr ""
diff --git a/po/tr.po b/po/tr.po
index 837776e898..ec99127793 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: QEMU 1.4.50\n"
"Report-Msgid-Bugs-To: qemu-devel@nongnu.org\n"
-"POT-Creation-Date: 2015-12-10 13:29+0000\n"
+"POT-Creation-Date: 2016-04-18 14:50+0100\n"
"PO-Revision-Date: 2013-04-22 18:35+0300\n"
"Last-Translator: Ozan Çağlayan <ozancag@gmail.com>\n"
"Language-Team: Türkçe <>\n"
@@ -17,72 +17,72 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Gtranslator 2.91.6\n"
-#: ui/gtk.c:271
+#: ui/gtk.c:273
msgid " - Press Ctrl+Alt+G to release grab"
msgstr " - Yakalamayı durdurmak için Ctrl+Alt+G tuşlarına basın"
-#: ui/gtk.c:275
+#: ui/gtk.c:277
msgid " [Paused]"
msgstr " [Duraklatıldı]"
-#: ui/gtk.c:1783
+#: ui/gtk.c:1833
msgid "_Pause"
msgstr "_Duraklat"
-#: ui/gtk.c:1789
+#: ui/gtk.c:1839
msgid "_Reset"
msgstr "_Sıfırla"
-#: ui/gtk.c:1792
+#: ui/gtk.c:1842
msgid "Power _Down"
msgstr "_Kapat"
-#: ui/gtk.c:1798
+#: ui/gtk.c:1848
msgid "_Quit"
msgstr ""
-#: ui/gtk.c:1890
+#: ui/gtk.c:1940
msgid "_Fullscreen"
msgstr ""
-#: ui/gtk.c:1904
+#: ui/gtk.c:1954
#, fuzzy
msgid "Zoom _In"
msgstr "Yakınlaş ve Sığ_dır"
-#: ui/gtk.c:1911
+#: ui/gtk.c:1961
#, fuzzy
msgid "Zoom _Out"
msgstr "Yakınlaş ve Sığ_dır"
-#: ui/gtk.c:1918
+#: ui/gtk.c:1968
msgid "Best _Fit"
msgstr ""
-#: ui/gtk.c:1925
+#: ui/gtk.c:1975
msgid "Zoom To _Fit"
msgstr "Yakınlaş ve Sığ_dır"
-#: ui/gtk.c:1931
+#: ui/gtk.c:1981
msgid "Grab On _Hover"
msgstr "Ü_zerindeyken Yakala"
-#: ui/gtk.c:1934
+#: ui/gtk.c:1984
msgid "_Grab Input"
msgstr "Girdiyi _Yakala"
-#: ui/gtk.c:1963
+#: ui/gtk.c:2013
msgid "Show _Tabs"
msgstr "Se_kmeleri Göster"
-#: ui/gtk.c:1966
+#: ui/gtk.c:2016
msgid "Detach Tab"
msgstr ""
-#: ui/gtk.c:1978
+#: ui/gtk.c:2028
msgid "_Machine"
msgstr "_Makine"
-#: ui/gtk.c:1983
+#: ui/gtk.c:2033
msgid "_View"
msgstr "_Görüntüle"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index f50c1fcf4b..b55b6f375a 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: QEMU 2.2\n"
"Report-Msgid-Bugs-To: qemu-devel@nongnu.org\n"
-"POT-Creation-Date: 2015-12-10 13:29+0000\n"
+"POT-Creation-Date: 2016-04-18 14:50+0100\n"
"PO-Revision-Date: 2014-07-31 10:00+0800\n"
"Last-Translator: Fam Zheng <famz@redhat.com>\n"
"Language-Team: Chinese <zh@li.org>\n"
@@ -17,70 +17,70 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Lokalize 1.4\n"
-#: ui/gtk.c:271
+#: ui/gtk.c:273
msgid " - Press Ctrl+Alt+G to release grab"
msgstr " - 按下 Ctrl+Alt+G 取消捕获"
-#: ui/gtk.c:275
+#: ui/gtk.c:277
msgid " [Paused]"
msgstr " [已暂停]"
-#: ui/gtk.c:1783
+#: ui/gtk.c:1833
msgid "_Pause"
msgstr "暂停(_P)"
-#: ui/gtk.c:1789
+#: ui/gtk.c:1839
msgid "_Reset"
msgstr "重置(_R)"
-#: ui/gtk.c:1792
+#: ui/gtk.c:1842
msgid "Power _Down"
msgstr "关闭电源(_D)"
-#: ui/gtk.c:1798
+#: ui/gtk.c:1848
msgid "_Quit"
msgstr "退出(_Q)"
-#: ui/gtk.c:1890
+#: ui/gtk.c:1940
msgid "_Fullscreen"
msgstr "全屏(_F)"
-#: ui/gtk.c:1904
+#: ui/gtk.c:1954
msgid "Zoom _In"
msgstr "放大(_I)"
-#: ui/gtk.c:1911
+#: ui/gtk.c:1961
msgid "Zoom _Out"
msgstr "缩小(_O)"
-#: ui/gtk.c:1918
+#: ui/gtk.c:1968
msgid "Best _Fit"
msgstr "最合适大小(_F)"
-#: ui/gtk.c:1925
+#: ui/gtk.c:1975
msgid "Zoom To _Fit"
msgstr "缩放以适应大小(_F)"
-#: ui/gtk.c:1931
+#: ui/gtk.c:1981
msgid "Grab On _Hover"
msgstr "鼠标经过时捕获(_H)"
-#: ui/gtk.c:1934
+#: ui/gtk.c:1984
msgid "_Grab Input"
msgstr "捕获输入(_G)"
-#: ui/gtk.c:1963
+#: ui/gtk.c:2013
msgid "Show _Tabs"
msgstr "显示标签页(_T)"
-#: ui/gtk.c:1966
+#: ui/gtk.c:2016
msgid "Detach Tab"
msgstr "分离标签页"
-#: ui/gtk.c:1978
+#: ui/gtk.c:2028
msgid "_Machine"
msgstr "虚拟机(_M)"
-#: ui/gtk.c:1983
+#: ui/gtk.c:2033
msgid "_View"
msgstr "视图(_V)"
diff --git a/qemu-img.c b/qemu-img.c
index 06264d9128..1697762606 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -37,6 +37,7 @@
#include "block/block_int.h"
#include "block/blockjob.h"
#include "block/qapi.h"
+#include "crypto/init.h"
#include <getopt.h>
#define QEMU_IMG_VERSION "qemu-img version " QEMU_VERSION QEMU_PKGVERSION \
@@ -256,7 +257,7 @@ static BlockBackend *img_open_opts(const char *optstr,
options = qemu_opts_to_qdict(opts, NULL);
blk = blk_new_open(NULL, NULL, options, flags, &local_err);
if (!blk) {
- error_reportf_err(local_err, "Could not open '%s'", optstr);
+ error_reportf_err(local_err, "Could not open '%s': ", optstr);
return NULL;
}
blk_set_enable_write_cache(blk, !writethrough);
@@ -3486,6 +3487,11 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
+ if (qcrypto_init(&local_error) < 0) {
+ error_reportf_err(local_error, "cannot initialize crypto: ");
+ exit(1);
+ }
+
module_call_init(MODULE_INIT_QOM);
bdrv_init();
if (argc < 2) {
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
index 382faa8a2a..e34f777118 100644
--- a/qemu-io-cmds.c
+++ b/qemu-io-cmds.c
@@ -1416,6 +1416,7 @@ struct aio_ctx {
int vflag;
int Cflag;
int Pflag;
+ int zflag;
BlockAcctCookie acct;
int pattern;
struct timeval t1;
@@ -1446,8 +1447,10 @@ static void aio_write_done(void *opaque, int ret)
print_report("wrote", &t2, ctx->offset, ctx->qiov.size,
ctx->qiov.size, 1, ctx->Cflag);
out:
- qemu_io_free(ctx->buf);
- qemu_iovec_destroy(&ctx->qiov);
+ if (!ctx->zflag) {
+ qemu_io_free(ctx->buf);
+ qemu_iovec_destroy(&ctx->qiov);
+ }
g_free(ctx);
}
@@ -1612,6 +1615,7 @@ static void aio_write_help(void)
" -P, -- use different pattern to fill file\n"
" -C, -- report statistics in a machine parsable format\n"
" -q, -- quiet mode, do not show I/O statistics\n"
+" -z, -- write zeroes using blk_aio_write_zeroes\n"
"\n");
}
@@ -1622,7 +1626,7 @@ static const cmdinfo_t aio_write_cmd = {
.cfunc = aio_write_f,
.argmin = 2,
.argmax = -1,
- .args = "[-Cq] [-P pattern ] off len [len..]",
+ .args = "[-Cqz] [-P pattern ] off len [len..]",
.oneline = "asynchronously writes a number of bytes",
.help = aio_write_help,
};
@@ -1634,7 +1638,7 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)
struct aio_ctx *ctx = g_new0(struct aio_ctx, 1);
ctx->blk = blk;
- while ((c = getopt(argc, argv, "CqP:")) != -1) {
+ while ((c = getopt(argc, argv, "CqP:z")) != -1) {
switch (c) {
case 'C':
ctx->Cflag = 1;
@@ -1649,6 +1653,9 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)
return 0;
}
break;
+ case 'z':
+ ctx->zflag = 1;
+ break;
default:
g_free(ctx);
return qemuio_command_usage(&aio_write_cmd);
@@ -1660,6 +1667,18 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)
return qemuio_command_usage(&aio_write_cmd);
}
+ if (ctx->zflag && optind != argc - 2) {
+ printf("-z supports only a single length parameter\n");
+ g_free(ctx);
+ return 0;
+ }
+
+ if (ctx->zflag && ctx->Pflag) {
+ printf("-z and -P cannot be specified at the same time\n");
+ g_free(ctx);
+ return 0;
+ }
+
ctx->offset = cvtnum(argv[optind]);
if (ctx->offset < 0) {
print_cvtnum_err(ctx->offset, argv[optind]);
@@ -1676,19 +1695,33 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)
return 0;
}
- nr_iov = argc - optind;
- ctx->buf = create_iovec(blk, &ctx->qiov, &argv[optind], nr_iov, pattern);
- if (ctx->buf == NULL) {
- block_acct_invalid(blk_get_stats(blk), BLOCK_ACCT_WRITE);
- g_free(ctx);
- return 0;
- }
+ if (ctx->zflag) {
+ int64_t count = cvtnum(argv[optind]);
+ if (count < 0) {
+ print_cvtnum_err(count, argv[optind]);
+ return 0;
+ }
- gettimeofday(&ctx->t1, NULL);
- block_acct_start(blk_get_stats(blk), &ctx->acct, ctx->qiov.size,
- BLOCK_ACCT_WRITE);
- blk_aio_writev(blk, ctx->offset >> 9, &ctx->qiov,
- ctx->qiov.size >> 9, aio_write_done, ctx);
+ ctx->qiov.size = count;
+ blk_aio_write_zeroes(blk, ctx->offset >> 9, count >> 9, 0,
+ aio_write_done, ctx);
+ } else {
+ nr_iov = argc - optind;
+ ctx->buf = create_iovec(blk, &ctx->qiov, &argv[optind], nr_iov,
+ pattern);
+ if (ctx->buf == NULL) {
+ block_acct_invalid(blk_get_stats(blk), BLOCK_ACCT_WRITE);
+ g_free(ctx);
+ return 0;
+ }
+
+ gettimeofday(&ctx->t1, NULL);
+ block_acct_start(blk_get_stats(blk), &ctx->acct, ctx->qiov.size,
+ BLOCK_ACCT_WRITE);
+
+ blk_aio_writev(blk, ctx->offset >> 9, &ctx->qiov,
+ ctx->qiov.size >> 9, aio_write_done, ctx);
+ }
return 0;
}
diff --git a/qemu-io.c b/qemu-io.c
index 0a738f12f0..288bba84b9 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -23,6 +23,7 @@
#include "sysemu/block-backend.h"
#include "block/block_int.h"
#include "trace/control.h"
+#include "crypto/init.h"
#define CMD_NOFILE_OK 0x01
@@ -443,6 +444,11 @@ int main(int argc, char **argv)
progname = basename(argv[0]);
qemu_init_exec_dir(argv[0]);
+ if (qcrypto_init(&local_error) < 0) {
+ error_reportf_err(local_error, "cannot initialize crypto: ");
+ exit(1);
+ }
+
module_call_init(MODULE_INIT_QOM);
qemu_add_opts(&qemu_object_opts);
bdrv_init();
diff --git a/qemu-nbd.c b/qemu-nbd.c
index c2e4d3f64c..2c9754e5d6 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -31,6 +31,7 @@
#include "qapi/qmp/qstring.h"
#include "qom/object_interfaces.h"
#include "io/channel-socket.h"
+#include "crypto/init.h"
#include <getopt.h>
#include <libgen.h>
@@ -214,7 +215,7 @@ static int find_partition(BlockBackend *blk, int partition,
static void termsig_handler(int signum)
{
- state = TERMINATE;
+ atomic_cmpxchg(&state, RUNNING, TERMINATE);
qemu_notify_event();
}
@@ -519,6 +520,12 @@ int main(int argc, char **argv)
memset(&sa_sigterm, 0, sizeof(sa_sigterm));
sa_sigterm.sa_handler = termsig_handler;
sigaction(SIGTERM, &sa_sigterm, NULL);
+
+ if (qcrypto_init(&local_err) < 0) {
+ error_reportf_err(local_err, "cannot initialize crypto: ");
+ exit(1);
+ }
+
module_call_init(MODULE_INIT_QOM);
qemu_add_opts(&qemu_object_opts);
qemu_init_exec_dir(argv[0]);
diff --git a/qemu-options.hx b/qemu-options.hx
index 587de8f3cd..6106520c56 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2864,18 +2864,32 @@ ETEXI
DEF("fw_cfg", HAS_ARG, QEMU_OPTION_fwcfg,
"-fw_cfg [name=]<name>,file=<file>\n"
- " add named fw_cfg entry from file\n"
+ " add named fw_cfg entry with contents from file\n"
"-fw_cfg [name=]<name>,string=<str>\n"
- " add named fw_cfg entry from string\n",
+ " add named fw_cfg entry with contents from string\n",
QEMU_ARCH_ALL)
STEXI
+
@item -fw_cfg [name=]@var{name},file=@var{file}
@findex -fw_cfg
-Add named fw_cfg entry from file. @var{name} determines the name of
-the entry in the fw_cfg file directory exposed to the guest.
+Add named fw_cfg entry with contents from file @var{file}.
@item -fw_cfg [name=]@var{name},string=@var{str}
-Add named fw_cfg entry from string.
+Add named fw_cfg entry with contents from string @var{str}.
+
+The terminating NUL character of the contents of @var{str} will not be
+included as part of the fw_cfg item data. To insert contents with
+embedded NUL characters, you have to use the @var{file} parameter.
+
+The fw_cfg entries are passed by QEMU through to the guest.
+
+Example:
+@example
+ -fw_cfg name=opt/com.mycompany/blob,file=./my_blob.bin
+@end example
+creates an fw_cfg entry named opt/com.mycompany/blob with contents
+from ./my_blob.bin.
+
ETEXI
DEF("serial", HAS_ARG, QEMU_OPTION_serial, \
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index 2866e3c2a6..cb569dc058 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -16,11 +16,13 @@
#include <seccomp.h>
#include "sysemu/seccomp.h"
+/* For some architectures (notably ARM) cacheflush is not supported until
+ * libseccomp 2.2.3, but configure enforces that we are using a more recent
+ * version on those hosts, so it is OK for this check to be less strict.
+ */
#if SCMP_VER_MAJOR >= 3
#define HAVE_CACHEFLUSH
-#elif SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR >= 3
- #define HAVE_CACHEFLUSH
-#elif SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR == 2 && SCMP_VER_MICRO >= 3
+#elif SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR >= 2
#define HAVE_CACHEFLUSH
#endif
@@ -250,6 +252,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
#ifdef HAVE_CACHEFLUSH
{ SCMP_SYS(cacheflush), 240 },
#endif
+ { SCMP_SYS(sysinfo), 240 },
};
int seccomp_start(void)
diff --git a/roms/openbios b/roms/openbios
-Subproject 0dbda5d935f95391d16431cd3c079fbf53d668d
+Subproject 422b916649aa0db8c5edadccb22387b3e807e3b
diff --git a/slirp/slirp.h b/slirp/slirp.h
index c99ebb9621..203deec480 100644
--- a/slirp/slirp.h
+++ b/slirp/slirp.h
@@ -347,9 +347,4 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err);
#define max(x,y) ((x) > (y) ? (x) : (y))
#endif
-#ifdef _WIN32
-#undef errno
-#define errno (WSAGetLastError())
-#endif
-
#endif
diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c
index 5433e7fe9c..e2b5d4ebbb 100644
--- a/slirp/tcp_input.c
+++ b/slirp/tcp_input.c
@@ -659,6 +659,7 @@ findso:
}
if ((tcp_fconnect(so, so->so_ffamily) == -1) &&
+ (errno != EAGAIN) &&
(errno != EINPROGRESS) && (errno != EWOULDBLOCK)
) {
uint8_t code;
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index ddae932ee1..d0b5b69156 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -2897,6 +2897,14 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
env->cpuid_level = 7;
}
+ if (x86_cpu_filter_features(cpu) && cpu->enforce_cpuid) {
+ error_setg(&local_err,
+ kvm_enabled() ?
+ "Host doesn't support requested features" :
+ "TCG doesn't support requested features");
+ goto out;
+ }
+
/* On AMD CPUs, some CPUID[8000_0001].EDX bits must match the bits on
* CPUID[1].EDX.
*/
@@ -2907,14 +2915,6 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
}
- if (x86_cpu_filter_features(cpu) && cpu->enforce_cpuid) {
- error_setg(&local_err,
- kvm_enabled() ?
- "Host doesn't support requested features" :
- "TCG doesn't support requested features");
- goto out;
- }
-
#ifndef CONFIG_USER_ONLY
qemu_register_reset(x86_cpu_machine_reset_cb, cpu);
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 9d4e43cf1f..5282533b38 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -2415,6 +2415,16 @@ static inline bool msr_is_64bit(CPUPPCState *env, target_ulong msr)
return msr & (1ULL << MSR_SF);
}
+/**
+ * Check whether register rx is in the range between start and
+ * start + nregs (as needed by the LSWX and LSWI instructions)
+ */
+static inline bool lsw_reg_in_range(int start, int nregs, int rx)
+{
+ return (start + nregs <= 32 && rx >= start && rx < start + nregs) ||
+ (start + nregs > 32 && (rx >= start || rx < start + nregs - 32));
+}
+
extern void (*cpu_ppc_hypercall)(PowerPCCPU *);
#include "exec/exec-all.h"
diff --git a/target-ppc/machine.c b/target-ppc/machine.c
index 692121e983..46684fb933 100644
--- a/target-ppc/machine.c
+++ b/target-ppc/machine.c
@@ -136,7 +136,7 @@ static void cpu_pre_save(void *opaque)
env->spr[SPR_LR] = env->lr;
env->spr[SPR_CTR] = env->ctr;
- env->spr[SPR_XER] = env->xer;
+ env->spr[SPR_XER] = cpu_read_xer(env);
#if defined(TARGET_PPC64)
env->spr[SPR_CFAR] = env->cfar;
#endif
diff --git a/target-ppc/mem_helper.c b/target-ppc/mem_helper.c
index 581d9faa23..6d584c9126 100644
--- a/target-ppc/mem_helper.c
+++ b/target-ppc/mem_helper.c
@@ -102,8 +102,9 @@ void helper_lswx(CPUPPCState *env, target_ulong addr, uint32_t reg,
{
if (likely(xer_bc != 0)) {
int num_used_regs = (xer_bc + 3) / 4;
- if (unlikely((ra != 0 && reg < ra && (reg + num_used_regs) > ra) ||
- (reg < rb && (reg + num_used_regs) > rb))) {
+ if (unlikely((ra != 0 && lsw_reg_in_range(reg, num_used_regs, ra)) ||
+ lsw_reg_in_range(reg, num_used_regs, rb))) {
+ env->nip += 4; /* Compensate the "nip - 4" from gen_lswx() */
helper_raise_exception_err(env, POWERPC_EXCP_PROGRAM,
POWERPC_EXCP_INVAL |
POWERPC_EXCP_INVAL_LSWX);
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 6f0e7b4fac..b3860ecdea 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -3227,10 +3227,8 @@ static void gen_lswi(DisasContext *ctx)
if (nb == 0)
nb = 32;
- nr = nb / 4;
- if (unlikely(((start + nr) > 32 &&
- start <= ra && (start + nr - 32) > ra) ||
- ((start + nr) <= 32 && start <= ra && (start + nr) > ra))) {
+ nr = (nb + 3) / 4;
+ if (unlikely(lsw_reg_in_range(start, nr, ra))) {
gen_inval_exception(ctx, POWERPC_EXCP_INVAL_LSWX);
return;
}
diff --git a/target-sparc/int64_helper.c b/target-sparc/int64_helper.c
index aa876cd8ba..29360fa5fe 100644
--- a/target-sparc/int64_helper.c
+++ b/target-sparc/int64_helper.c
@@ -158,9 +158,8 @@ void sparc_cpu_do_interrupt(CPUState *cs)
} else if ((intno & 0x1c0) == TT_FILL) {
cpu_set_cwp(env, cpu_cwp_inc(env, env->cwp + 1));
}
- env->tbr &= ~0x7fffULL;
- env->tbr |= ((env->tl > 1) ? 1 << 14 : 0) | (intno << 5);
- env->pc = env->tbr;
+ env->pc = env->tbr & ~0x7fffULL;
+ env->pc |= ((env->tl > 1) ? 1 << 14 : 0) | (intno << 5);
env->npc = env->pc + 4;
cs->exception_index = -1;
}
diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c
index b0600fd24d..658e7d8585 100644
--- a/target-sparc/ldst_helper.c
+++ b/target-sparc/ldst_helper.c
@@ -2059,11 +2059,11 @@ void helper_ldda_asi(CPUSPARCState *env, target_ulong addr, int asi, int rd)
bswap64s(&env->gregs[rd + 1]);
}
} else {
- env->regwptr[rd] = cpu_ldq_nucleus(env, addr);
- env->regwptr[rd + 1] = cpu_ldq_nucleus(env, addr + 8);
+ env->regwptr[rd - 8] = cpu_ldq_nucleus(env, addr);
+ env->regwptr[rd + 1 - 8] = cpu_ldq_nucleus(env, addr + 8);
if (asi == 0x2c) {
- bswap64s(&env->regwptr[rd]);
- bswap64s(&env->regwptr[rd + 1]);
+ bswap64s(&env->regwptr[rd - 8]);
+ bswap64s(&env->regwptr[rd + 1 - 8]);
}
}
break;
@@ -2076,8 +2076,8 @@ void helper_ldda_asi(CPUSPARCState *env, target_ulong addr, int asi, int rd)
env->gregs[rd] = helper_ld_asi(env, addr, asi, 4, 0);
env->gregs[rd + 1] = helper_ld_asi(env, addr + 4, asi, 4, 0);
} else {
- env->regwptr[rd] = helper_ld_asi(env, addr, asi, 4, 0);
- env->regwptr[rd + 1] = helper_ld_asi(env, addr + 4, asi, 4, 0);
+ env->regwptr[rd - 8] = helper_ld_asi(env, addr, asi, 4, 0);
+ env->regwptr[rd + 1 - 8] = helper_ld_asi(env, addr + 4, asi, 4, 0);
}
break;
}
diff --git a/tests/Makefile b/tests/Makefile
index 9de959847b..9194f1850b 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -83,7 +83,9 @@ check-unit-y += tests/test-crypto-cipher$(EXESUF)
check-unit-y += tests/test-crypto-secret$(EXESUF)
check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlscredsx509$(EXESUF)
check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlssession$(EXESUF)
-#check-unit-$(CONFIG_LINUX) += tests/test-qga$(EXESUF)
+ifneq (,$(findstring qemu-ga,$(TOOLS)))
+check-unit-$(CONFIG_LINUX) += tests/test-qga$(EXESUF)
+endif
check-unit-y += tests/test-timed-average$(EXESUF)
check-unit-y += tests/test-io-task$(EXESUF)
check-unit-y += tests/test-io-channel-socket$(EXESUF)
diff --git a/tests/qemu-iotests/001 b/tests/qemu-iotests/001
index 4e1646941b..ffd14e2ce9 100755
--- a/tests/qemu-iotests/001
+++ b/tests/qemu-iotests/001
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/002 b/tests/qemu-iotests/002
index 6a865aac73..d4f8e91b91 100755
--- a/tests/qemu-iotests/002
+++ b/tests/qemu-iotests/002
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/003 b/tests/qemu-iotests/003
index 98638d4ce7..19889b9fcd 100755
--- a/tests/qemu-iotests/003
+++ b/tests/qemu-iotests/003
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/004 b/tests/qemu-iotests/004
index 2ad77ed514..67e1beb209 100755
--- a/tests/qemu-iotests/004
+++ b/tests/qemu-iotests/004
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/005 b/tests/qemu-iotests/005
index ba1236dfbf..444737751f 100755
--- a/tests/qemu-iotests/005
+++ b/tests/qemu-iotests/005
@@ -28,7 +28,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/007 b/tests/qemu-iotests/007
index 7b5aff59b2..fa543eeb7d 100755
--- a/tests/qemu-iotests/007
+++ b/tests/qemu-iotests/007
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/008 b/tests/qemu-iotests/008
index 2d28efd428..8e89d74fe9 100755
--- a/tests/qemu-iotests/008
+++ b/tests/qemu-iotests/008
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/009 b/tests/qemu-iotests/009
index 57a43f5a16..16e4475ca4 100755
--- a/tests/qemu-iotests/009
+++ b/tests/qemu-iotests/009
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/010 b/tests/qemu-iotests/010
index 896a0058ff..151dac238d 100755
--- a/tests/qemu-iotests/010
+++ b/tests/qemu-iotests/010
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/011 b/tests/qemu-iotests/011
index 1c5158af43..f8d044ec85 100755
--- a/tests/qemu-iotests/011
+++ b/tests/qemu-iotests/011
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/012 b/tests/qemu-iotests/012
index 7c5b6892d3..d1d3f22093 100755
--- a/tests/qemu-iotests/012
+++ b/tests/qemu-iotests/012
@@ -27,7 +27,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013
index ea3cab91d6..d013f87da9 100755
--- a/tests/qemu-iotests/013
+++ b/tests/qemu-iotests/013
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/014 b/tests/qemu-iotests/014
index b23c2db9b6..2ea79e8c8b 100755
--- a/tests/qemu-iotests/014
+++ b/tests/qemu-iotests/014
@@ -27,7 +27,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/015 b/tests/qemu-iotests/015
index 6f26095243..aaf9c3f415 100755
--- a/tests/qemu-iotests/015
+++ b/tests/qemu-iotests/015
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/017 b/tests/qemu-iotests/017
index 3af3cdfbc3..e3f9e75967 100755
--- a/tests/qemu-iotests/017
+++ b/tests/qemu-iotests/017
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/018 b/tests/qemu-iotests/018
index 07b2de970e..1d39d35c47 100755
--- a/tests/qemu-iotests/018
+++ b/tests/qemu-iotests/018
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/019 b/tests/qemu-iotests/019
index 0937b5c57d..24a789a25c 100755
--- a/tests/qemu-iotests/019
+++ b/tests/qemu-iotests/019
@@ -27,7 +27,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/020 b/tests/qemu-iotests/020
index 6625b553ba..9c4a68c977 100755
--- a/tests/qemu-iotests/020
+++ b/tests/qemu-iotests/020
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/021 b/tests/qemu-iotests/021
index 1c69024ccb..11e8ed7187 100755
--- a/tests/qemu-iotests/021
+++ b/tests/qemu-iotests/021
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/022 b/tests/qemu-iotests/022
index d35b8162be..2452a9f86a 100755
--- a/tests/qemu-iotests/022
+++ b/tests/qemu-iotests/022
@@ -27,7 +27,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/023 b/tests/qemu-iotests/023
index 9ad06b990e..497ae1ed17 100755
--- a/tests/qemu-iotests/023
+++ b/tests/qemu-iotests/023
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/024 b/tests/qemu-iotests/024
index 2c2d14846d..e0d77ce2f5 100755
--- a/tests/qemu-iotests/024
+++ b/tests/qemu-iotests/024
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/025 b/tests/qemu-iotests/025
index 467a4b7090..c41370f3b2 100755
--- a/tests/qemu-iotests/025
+++ b/tests/qemu-iotests/025
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/026 b/tests/qemu-iotests/026
index ba1047c96a..f5a7f02b25 100755
--- a/tests/qemu-iotests/026
+++ b/tests/qemu-iotests/026
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/026.out.nocache b/tests/qemu-iotests/026.out.nocache
index a5000d5c8b..9c2c8a9486 100644
--- a/tests/qemu-iotests/026.out.nocache
+++ b/tests/qemu-iotests/026.out.nocache
@@ -14,6 +14,8 @@ 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
+Failed to flush the L2 table cache: Input/output error
+Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
1 leaked clusters were found on the image.
@@ -21,6 +23,8 @@ This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 5; imm: off; once: off; write -b
+Failed to flush the L2 table cache: Input/output error
+Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
1 leaked clusters were found on the image.
@@ -38,6 +42,8 @@ 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
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
1 leaked clusters were found on the image.
@@ -45,6 +51,8 @@ This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 28; imm: off; once: off; write -b
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
1 leaked clusters were found on the image.
@@ -70,7 +78,11 @@ 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)
+Failed to flush the L2 table cache: Input/output error
+Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
+Failed to flush the L2 table cache: Input/output error
+Failed to flush the refcount block cache: Input/output error
read failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -78,7 +90,11 @@ 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)
+Failed to flush the L2 table cache: Input/output error
+Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
+Failed to flush the L2 table cache: Input/output error
+Failed to flush the refcount block cache: Input/output error
read failed: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -102,7 +118,11 @@ 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)
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
read failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -110,7 +130,11 @@ 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)
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
read failed: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -118,20 +142,18 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; 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)
-
-127 leaked clusters were found on the image.
-This means waste of disk space, but no harm to data.
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
+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
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-
-127 leaked clusters were found on the image.
-This means waste of disk space, but no harm to data.
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
+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
+Failed to flush the L2 table cache: Input/output error
+Failed to flush the refcount block cache: Input/output error
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
@@ -140,6 +162,8 @@ This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 5; imm: off; once: off; write -b
+Failed to flush the L2 table cache: Input/output error
+Failed to flush the refcount block cache: Input/output error
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
@@ -150,20 +174,18 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; 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)
-
-127 leaked clusters were found on the image.
-This means waste of disk space, but no harm to data.
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
+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
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-
-127 leaked clusters were found on the image.
-This means waste of disk space, but no harm to data.
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
+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
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
@@ -172,6 +194,8 @@ This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 28; imm: off; once: off; write -b
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
@@ -190,11 +214,15 @@ 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
+Failed to flush the L2 table cache: Input/output error
+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
+Failed to flush the L2 table cache: Input/output error
+Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
1 leaked clusters were found on the image.
@@ -212,11 +240,15 @@ 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
+Failed to flush the L2 table cache: No space left on device
+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
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
1 leaked clusters were found on the image.
@@ -234,11 +266,15 @@ 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
+Failed to flush the L2 table cache: Input/output error
+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
+Failed to flush the L2 table cache: Input/output error
+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
@@ -254,11 +290,15 @@ 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
+Failed to flush the L2 table cache: No space left on device
+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
+Failed to flush the L2 table cache: No space left on device
+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
@@ -274,11 +314,15 @@ 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
+Failed to flush the L2 table cache: Input/output error
+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
+Failed to flush the L2 table cache: Input/output error
+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
@@ -294,11 +338,15 @@ 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
+Failed to flush the L2 table cache: No space left on device
+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
+Failed to flush the L2 table cache: No space left on device
+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
@@ -314,11 +362,15 @@ 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
+Failed to flush the L2 table cache: Input/output error
+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
+Failed to flush the L2 table cache: Input/output error
+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
@@ -334,11 +386,15 @@ 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
+Failed to flush the L2 table cache: No space left on device
+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
+Failed to flush the L2 table cache: No space left on device
+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
@@ -354,11 +410,15 @@ 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
+Failed to flush the L2 table cache: Input/output error
+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
+Failed to flush the L2 table cache: Input/output error
+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
@@ -374,11 +434,15 @@ 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
+Failed to flush the L2 table cache: No space left on device
+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
+Failed to flush the L2 table cache: No space left on device
+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
@@ -394,11 +458,15 @@ 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
+Failed to flush the L2 table cache: Input/output error
+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: cluster_alloc; errno: 5; imm: off; once: off; write -b
+Failed to flush the L2 table cache: Input/output error
+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
@@ -414,11 +482,15 @@ 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
+Failed to flush the L2 table cache: No space left on device
+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: 28; imm: off; once: off; write -b
+Failed to flush the L2 table cache: No space left on device
+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.
@@ -437,6 +509,8 @@ 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
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
55 leaked clusters were found on the image.
@@ -444,6 +518,8 @@ This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_hookup; errno: 28; imm: off; once: off; write -b
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
251 leaked clusters were found on the image.
@@ -461,11 +537,15 @@ 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
+Failed to flush the L2 table cache: No space left on device
+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
+Failed to flush the L2 table cache: No space left on device
+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
@@ -481,13 +561,17 @@ 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
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
-10 leaked clusters were found on the image.
+11 leaked clusters were found on the image.
This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: off; write -b
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
23 leaked clusters were found on the image.
@@ -505,13 +589,17 @@ 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
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
-10 leaked clusters were found on the image.
+11 leaked clusters were found on the image.
This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_table; errno: 28; imm: off; once: off; write -b
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
23 leaked clusters were found on the image.
@@ -529,13 +617,17 @@ 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
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
-10 leaked clusters were found on the image.
+11 leaked clusters were found on the image.
This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_switch_table; errno: 28; imm: off; once: off; write -b
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
23 leaked clusters were found on the image.
@@ -551,6 +643,8 @@ 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
+Failed to flush the L2 table cache: Input/output error
+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
@@ -561,6 +655,8 @@ 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
+Failed to flush the L2 table cache: No space left on device
+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
@@ -571,6 +667,8 @@ 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
+Failed to flush the L2 table cache: Input/output error
+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
@@ -581,6 +679,8 @@ 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
+Failed to flush the L2 table cache: No space left on device
+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
@@ -591,6 +691,8 @@ 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
+Failed to flush the L2 table cache: Input/output error
+Failed to flush the refcount block cache: Input/output error
write failed: Input/output error
96 leaked clusters were found on the image.
@@ -603,6 +705,8 @@ 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
+Failed to flush the L2 table cache: No space left on device
+Failed to flush the refcount block cache: No space left on device
write failed: No space left on device
96 leaked clusters were found on the image.
diff --git a/tests/qemu-iotests/027 b/tests/qemu-iotests/027
index 3fa81b83bb..08593da775 100755
--- a/tests/qemu-iotests/027
+++ b/tests/qemu-iotests/027
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/028 b/tests/qemu-iotests/028
index 4909b9bc88..7783e57c71 100755
--- a/tests/qemu-iotests/028
+++ b/tests/qemu-iotests/028
@@ -28,7 +28,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/029 b/tests/qemu-iotests/029
index b9cd826c7e..e639ac0ddf 100755
--- a/tests/qemu-iotests/029
+++ b/tests/qemu-iotests/029
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/031 b/tests/qemu-iotests/031
index 2a77ba8cbb..1e08abc5ed 100755
--- a/tests/qemu-iotests/031
+++ b/tests/qemu-iotests/031
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/032 b/tests/qemu-iotests/032
index b1ba5c3218..24bcb52fc2 100755
--- a/tests/qemu-iotests/032
+++ b/tests/qemu-iotests/032
@@ -27,7 +27,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/033 b/tests/qemu-iotests/033
index a61d8ced1c..16edcf2f00 100755
--- a/tests/qemu-iotests/033
+++ b/tests/qemu-iotests/033
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
@@ -57,12 +56,13 @@ do_test()
} | $QEMU_IO
}
+for write_zero_cmd in "write -z" "aio_write -z"; do
for align in 512 4k; do
echo
echo "== preparing image =="
do_test $align "write -P 0xa 0x200 0x400" "$TEST_IMG" | _filter_qemu_io
do_test $align "write -P 0xa 0x20000 0x600" "$TEST_IMG" | _filter_qemu_io
- do_test $align "write -z 0x400 0x20000" "$TEST_IMG" | _filter_qemu_io
+ do_test $align "$write_zero_cmd 0x400 0x20000" "$TEST_IMG" | _filter_qemu_io
echo
echo "== verifying patterns (1) =="
@@ -73,7 +73,7 @@ for align in 512 4k; do
echo
echo "== rewriting zeroes =="
do_test $align "write -P 0xb 0x10000 0x10000" "$TEST_IMG" | _filter_qemu_io
- do_test $align "write -z 0x10000 0x10000" "$TEST_IMG" | _filter_qemu_io
+ do_test $align "$write_zero_cmd 0x10000 0x10000" "$TEST_IMG" | _filter_qemu_io
echo
echo "== verifying patterns (2) =="
@@ -82,7 +82,7 @@ for align in 512 4k; do
echo
echo "== rewriting unaligned zeroes =="
do_test $align "write -P 0xb 0x0 0x1000" "$TEST_IMG" | _filter_qemu_io
- do_test $align "write -z 0x200 0x200" "$TEST_IMG" | _filter_qemu_io
+ do_test $align "$write_zero_cmd 0x200 0x200" "$TEST_IMG" | _filter_qemu_io
echo
echo "== verifying patterns (3) =="
@@ -92,6 +92,7 @@ for align in 512 4k; do
echo
done
+done
# success, all done
echo "*** done"
diff --git a/tests/qemu-iotests/033.out b/tests/qemu-iotests/033.out
index c3d18aa450..95929eff70 100644
--- a/tests/qemu-iotests/033.out
+++ b/tests/qemu-iotests/033.out
@@ -82,4 +82,86 @@ read 512/512 bytes at offset 512
read 3072/3072 bytes at offset 1024
3 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== preparing image ==
+wrote 1024/1024 bytes at offset 512
+1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 1536/1536 bytes at offset 131072
+1.500 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 131072/131072 bytes at offset 1024
+128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== verifying patterns (1) ==
+read 512/512 bytes at offset 512
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 131072/131072 bytes at offset 1024
+128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 512/512 bytes at offset 132096
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== rewriting zeroes ==
+wrote 65536/65536 bytes at offset 65536
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 65536/65536 bytes at offset 65536
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== verifying patterns (2) ==
+read 131072/131072 bytes at offset 1024
+128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== rewriting unaligned zeroes ==
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 512/512 bytes at offset 512
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== verifying patterns (3) ==
+read 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 512/512 bytes at offset 512
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 3072/3072 bytes at offset 1024
+3 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+
+== preparing image ==
+wrote 1024/1024 bytes at offset 512
+1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 1536/1536 bytes at offset 131072
+1.500 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 131072/131072 bytes at offset 1024
+128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== verifying patterns (1) ==
+read 512/512 bytes at offset 512
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 131072/131072 bytes at offset 1024
+128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 512/512 bytes at offset 132096
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== rewriting zeroes ==
+wrote 65536/65536 bytes at offset 65536
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 65536/65536 bytes at offset 65536
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== verifying patterns (2) ==
+read 131072/131072 bytes at offset 1024
+128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== rewriting unaligned zeroes ==
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 512/512 bytes at offset 512
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== verifying patterns (3) ==
+read 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 512/512 bytes at offset 512
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 3072/3072 bytes at offset 1024
+3 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
*** done
diff --git a/tests/qemu-iotests/034 b/tests/qemu-iotests/034
index c769dd8b86..c711cfce94 100755
--- a/tests/qemu-iotests/034
+++ b/tests/qemu-iotests/034
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/035 b/tests/qemu-iotests/035
index ebe9b8c925..efc38e4d49 100755
--- a/tests/qemu-iotests/035
+++ b/tests/qemu-iotests/035
@@ -26,7 +26,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/036 b/tests/qemu-iotests/036
index c4cc91b8af..ce638d6076 100755
--- a/tests/qemu-iotests/036
+++ b/tests/qemu-iotests/036
@@ -28,7 +28,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/037 b/tests/qemu-iotests/037
index 586245159f..c476b823d2 100755
--- a/tests/qemu-iotests/037
+++ b/tests/qemu-iotests/037
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/038 b/tests/qemu-iotests/038
index 34fe698117..d99a1501d7 100755
--- a/tests/qemu-iotests/038
+++ b/tests/qemu-iotests/038
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039
index 9e9b379baa..1f48339692 100755
--- a/tests/qemu-iotests/039
+++ b/tests/qemu-iotests/039
@@ -28,7 +28,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
index c7da95d94e..b1c542f99b 100755
--- a/tests/qemu-iotests/041
+++ b/tests/qemu-iotests/041
@@ -810,8 +810,7 @@ class TestRepairQuorum(iotests.QMPTestCase):
self.assert_qmp(result, 'return', {})
self.complete_and_wait(drive="quorum0")
- result = self.vm.qmp('query-named-block-nodes')
- self.assert_qmp(result, 'return[0]/file', quorum_repair_img)
+ self.assert_has_block_node("repair0", quorum_repair_img)
# TODO: a better test requiring some QEMU infrastructure will be added
# to check that this file is really driven by quorum
self.vm.shutdown()
@@ -833,8 +832,7 @@ class TestRepairQuorum(iotests.QMPTestCase):
self.cancel_and_wait(drive="quorum0", force=True)
# here we check that the last registered quorum file has not been
# swapped out and unref
- result = self.vm.qmp('query-named-block-nodes')
- self.assert_qmp(result, 'return[1]/file', quorum_img3)
+ self.assert_has_block_node(None, quorum_img3)
self.vm.shutdown()
def test_cancel_after_ready(self):
@@ -850,10 +848,9 @@ class TestRepairQuorum(iotests.QMPTestCase):
self.assert_qmp(result, 'return', {})
self.wait_ready_and_cancel(drive="quorum0")
- result = self.vm.qmp('query-named-block-nodes')
# here we check that the last registered quorum file has not been
# swapped out and unref
- self.assert_qmp(result, 'return[1]/file', quorum_img3)
+ self.assert_has_block_node(None, quorum_img3)
self.vm.shutdown()
self.assertTrue(iotests.compare_images(quorum_img2, quorum_repair_img),
'target image does not match source after mirroring')
@@ -974,8 +971,7 @@ class TestRepairQuorum(iotests.QMPTestCase):
self.assert_qmp(result, 'return', {})
self.complete_and_wait(drive="quorum0")
- result = self.vm.qmp('query-named-block-nodes')
- self.assert_qmp(result, 'return[0]/file', quorum_repair_img)
+ self.assert_has_block_node("repair0", quorum_repair_img)
# TODO: a better test requiring some QEMU infrastructure will be added
# to check that this file is really driven by quorum
self.vm.shutdown()
diff --git a/tests/qemu-iotests/042 b/tests/qemu-iotests/042
index 94ce3a9cc3..351b2830a2 100755
--- a/tests/qemu-iotests/042
+++ b/tests/qemu-iotests/042
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/043 b/tests/qemu-iotests/043
index b316b97c0c..1c6c22d92a 100755
--- a/tests/qemu-iotests/043
+++ b/tests/qemu-iotests/043
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046
index e0be46cf2b..e528b67cc6 100755
--- a/tests/qemu-iotests/046
+++ b/tests/qemu-iotests/046
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/047 b/tests/qemu-iotests/047
index c35cd096b8..1b8f3d4a64 100755
--- a/tests/qemu-iotests/047
+++ b/tests/qemu-iotests/047
@@ -26,7 +26,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/049 b/tests/qemu-iotests/049
index 93aa0ea55f..fff07604fc 100755
--- a/tests/qemu-iotests/049
+++ b/tests/qemu-iotests/049
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/050 b/tests/qemu-iotests/050
index 13006dd1db..03b4a5d620 100755
--- a/tests/qemu-iotests/050
+++ b/tests/qemu-iotests/050
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 88b3d91da8..630cb7a114 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out
index c1291ff317..408d613bc1 100644
--- a/tests/qemu-iotests/051.out
+++ b/tests/qemu-iotests/051.out
@@ -145,7 +145,7 @@ QEMU X.Y.Z monitor - type 'help' for more information
Testing: -drive driver=null-co,cache=invalid_value
QEMU_PROG: -drive driver=null-co,cache=invalid_value: invalid cache option
-Testing: -drive file=TEST_DIR/t.qcow2,cache=writeback,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.cache.writeback=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0 -nodefaults
+Testing: -drive file=TEST_DIR/t.qcow2,cache=writeback,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0 -nodefaults
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) iininfinfoinfo info binfo blinfo bloinfo blocinfo block
drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
@@ -165,7 +165,7 @@ backing-file: TEST_DIR/t.qcow2.base (file, read-only)
Cache mode: writeback, ignore flushes
(qemu) qququiquit
-Testing: -drive file=TEST_DIR/t.qcow2,cache=writethrough,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.cache.writeback=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0 -nodefaults
+Testing: -drive file=TEST_DIR/t.qcow2,cache=writethrough,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0 -nodefaults
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) iininfinfoinfo info binfo blinfo bloinfo blocinfo block
drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
@@ -185,7 +185,7 @@ backing-file: TEST_DIR/t.qcow2.base (file, read-only)
Cache mode: writeback, ignore flushes
(qemu) qququiquit
-Testing: -drive file=TEST_DIR/t.qcow2,cache=unsafe,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.cache.writeback=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0 -nodefaults
+Testing: -drive file=TEST_DIR/t.qcow2,cache=unsafe,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0 -nodefaults
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) iininfinfoinfo info binfo blinfo bloinfo blocinfo block
drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
@@ -205,8 +205,8 @@ backing-file: TEST_DIR/t.qcow2.base (file, read-only)
Cache mode: writeback, ignore flushes
(qemu) qququiquit
-Testing: -drive file=TEST_DIR/t.qcow2,cache=invalid_value,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.cache.writeback=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0 -nodefaults
-QEMU_PROG: -drive file=TEST_DIR/t.qcow2,cache=invalid_value,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.cache.writeback=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0: invalid cache option
+Testing: -drive file=TEST_DIR/t.qcow2,cache=invalid_value,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0 -nodefaults
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,cache=invalid_value,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0: invalid cache option
=== Specifying the protocol layer ===
diff --git a/tests/qemu-iotests/052 b/tests/qemu-iotests/052
index 61959e286e..4b647242d2 100755
--- a/tests/qemu-iotests/052
+++ b/tests/qemu-iotests/052
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/053 b/tests/qemu-iotests/053
index e589e5f126..2a04f5f551 100755
--- a/tests/qemu-iotests/053
+++ b/tests/qemu-iotests/053
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/054 b/tests/qemu-iotests/054
index bd94153d66..bf47ef9fac 100755
--- a/tests/qemu-iotests/054
+++ b/tests/qemu-iotests/054
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/058 b/tests/qemu-iotests/058
index 63a6598784..2253c6a6d1 100755
--- a/tests/qemu-iotests/058
+++ b/tests/qemu-iotests/058
@@ -27,7 +27,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
nbd_unix_socket=$TEST_DIR/test_qemu_nbd_socket
diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059
index 0332bbb348..6655aaf384 100755
--- a/tests/qemu-iotests/059
+++ b/tests/qemu-iotests/059
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
index c81319c169..8e95c450eb 100755
--- a/tests/qemu-iotests/060
+++ b/tests/qemu-iotests/060
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/061 b/tests/qemu-iotests/061
index e191e65d5f..f5678b10c9 100755
--- a/tests/qemu-iotests/061
+++ b/tests/qemu-iotests/061
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/062 b/tests/qemu-iotests/062
index 0511246dee..051fb9f410 100755
--- a/tests/qemu-iotests/062
+++ b/tests/qemu-iotests/062
@@ -26,7 +26,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/063 b/tests/qemu-iotests/063
index a47493a076..352e78c778 100755
--- a/tests/qemu-iotests/063
+++ b/tests/qemu-iotests/063
@@ -26,7 +26,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/064 b/tests/qemu-iotests/064
index 7564563abd..5792fbbc92 100755
--- a/tests/qemu-iotests/064
+++ b/tests/qemu-iotests/064
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/066 b/tests/qemu-iotests/066
index 1c2452b0c5..364166d3b2 100755
--- a/tests/qemu-iotests/066
+++ b/tests/qemu-iotests/066
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/067 b/tests/qemu-iotests/067
index 77dec0d1fc..c1df48eded 100755
--- a/tests/qemu-iotests/067
+++ b/tests/qemu-iotests/067
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
# get standard environment, filters and checks
diff --git a/tests/qemu-iotests/068 b/tests/qemu-iotests/068
index 58d1d80e78..68f6e825d9 100755
--- a/tests/qemu-iotests/068
+++ b/tests/qemu-iotests/068
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
@@ -53,7 +52,7 @@ _make_test_img $IMG_SIZE
case "$QEMU_DEFAULT_MACHINE" in
s390-ccw-virtio)
- platform_parm="-no-shutdown -machine accel=kvm"
+ platform_parm="-no-shutdown"
;;
*)
platform_parm=""
diff --git a/tests/qemu-iotests/069 b/tests/qemu-iotests/069
index ce9e0541b2..96e55ef216 100755
--- a/tests/qemu-iotests/069
+++ b/tests/qemu-iotests/069
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/070 b/tests/qemu-iotests/070
index d649ddf9bd..8d08d74ff9 100755
--- a/tests/qemu-iotests/070
+++ b/tests/qemu-iotests/070
@@ -26,7 +26,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/071 b/tests/qemu-iotests/071
index 92ab991456..bdfd91fef1 100755
--- a/tests/qemu-iotests/071
+++ b/tests/qemu-iotests/071
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/072 b/tests/qemu-iotests/072
index e4a723d733..aa027c7d29 100755
--- a/tests/qemu-iotests/072
+++ b/tests/qemu-iotests/072
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/073 b/tests/qemu-iotests/073
index 392db54999..ad37a617b2 100755
--- a/tests/qemu-iotests/073
+++ b/tests/qemu-iotests/073
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/075 b/tests/qemu-iotests/075
index 6117660c58..770d51c6cb 100755
--- a/tests/qemu-iotests/075
+++ b/tests/qemu-iotests/075
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/076 b/tests/qemu-iotests/076
index c9b55a9801..ef9e6a4ff3 100755
--- a/tests/qemu-iotests/076
+++ b/tests/qemu-iotests/076
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/077 b/tests/qemu-iotests/077
index 8a7223fa46..4dc680b7fc 100755
--- a/tests/qemu-iotests/077
+++ b/tests/qemu-iotests/077
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/078 b/tests/qemu-iotests/078
index 7be2c3f691..f333e9ac84 100755
--- a/tests/qemu-iotests/078
+++ b/tests/qemu-iotests/078
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/079 b/tests/qemu-iotests/079
index ade6efa0d1..b2e3f7426a 100755
--- a/tests/qemu-iotests/079
+++ b/tests/qemu-iotests/079
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/080 b/tests/qemu-iotests/080
index a2c58aebdb..55044c700b 100755
--- a/tests/qemu-iotests/080
+++ b/tests/qemu-iotests/080
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081
index e4b4c6cbf3..d89fabcdbd 100755
--- a/tests/qemu-iotests/081
+++ b/tests/qemu-iotests/081
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/082 b/tests/qemu-iotests/082
index c83e01e7cd..ad1d9fadc1 100755
--- a/tests/qemu-iotests/082
+++ b/tests/qemu-iotests/082
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/083 b/tests/qemu-iotests/083
index aa99278fd8..bc724ae058 100755
--- a/tests/qemu-iotests/083
+++ b/tests/qemu-iotests/083
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
# get standard environment, filters and checks
diff --git a/tests/qemu-iotests/084 b/tests/qemu-iotests/084
index 733018d4a8..04f2aa9d7d 100755
--- a/tests/qemu-iotests/084
+++ b/tests/qemu-iotests/084
@@ -26,7 +26,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/086 b/tests/qemu-iotests/086
index 5527e864fb..cd4494a660 100755
--- a/tests/qemu-iotests/086
+++ b/tests/qemu-iotests/086
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/087 b/tests/qemu-iotests/087
index 27cbebc2bc..e7bca37efc 100755
--- a/tests/qemu-iotests/087
+++ b/tests/qemu-iotests/087
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
# get standard environment, filters and checks
diff --git a/tests/qemu-iotests/088 b/tests/qemu-iotests/088
index f9c3129182..b8076f216b 100755
--- a/tests/qemu-iotests/088
+++ b/tests/qemu-iotests/088
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/089 b/tests/qemu-iotests/089
index 3e0038dde1..9bfe2307b3 100755
--- a/tests/qemu-iotests/089
+++ b/tests/qemu-iotests/089
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/090 b/tests/qemu-iotests/090
index 70b5a6fd73..7380503d57 100755
--- a/tests/qemu-iotests/090
+++ b/tests/qemu-iotests/090
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/092 b/tests/qemu-iotests/092
index 52c529bae3..5bbdd071d8 100755
--- a/tests/qemu-iotests/092
+++ b/tests/qemu-iotests/092
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/094 b/tests/qemu-iotests/094
index 57a68f89e1..0ba0b0c361 100755
--- a/tests/qemu-iotests/094
+++ b/tests/qemu-iotests/094
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
trap "exit \$status" 0 1 2 3 15
diff --git a/tests/qemu-iotests/097 b/tests/qemu-iotests/097
index c7a613b7ee..01d8dd0331 100755
--- a/tests/qemu-iotests/097
+++ b/tests/qemu-iotests/097
@@ -26,7 +26,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/098 b/tests/qemu-iotests/098
index e2230ad60c..b002e969b3 100755
--- a/tests/qemu-iotests/098
+++ b/tests/qemu-iotests/098
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/099 b/tests/qemu-iotests/099
index 80f3d9aaf3..caaf58eee5 100755
--- a/tests/qemu-iotests/099
+++ b/tests/qemu-iotests/099
@@ -26,7 +26,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/100 b/tests/qemu-iotests/100
index 7c1b235b51..5b2fb33330 100755
--- a/tests/qemu-iotests/100
+++ b/tests/qemu-iotests/100
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/101 b/tests/qemu-iotests/101
index 70fbf25f68..ea53f8b8d3 100755
--- a/tests/qemu-iotests/101
+++ b/tests/qemu-iotests/101
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/102 b/tests/qemu-iotests/102
index 161b1974ce..64b4af9441 100755
--- a/tests/qemu-iotests/102
+++ b/tests/qemu-iotests/102
@@ -25,7 +25,6 @@ seq=$(basename $0)
echo "QA output created by $seq"
here=$PWD
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/103 b/tests/qemu-iotests/103
index fa9a3c1fc9..ecbd8ebd71 100755
--- a/tests/qemu-iotests/103
+++ b/tests/qemu-iotests/103
@@ -25,7 +25,6 @@ seq=$(basename $0)
echo "QA output created by $seq"
here=$PWD
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/104 b/tests/qemu-iotests/104
index 2e35ea80df..726d467052 100755
--- a/tests/qemu-iotests/104
+++ b/tests/qemu-iotests/104
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
trap "exit \$status" 0 1 2 3 15
diff --git a/tests/qemu-iotests/105 b/tests/qemu-iotests/105
index 9bae49e327..3db4ce3cf3 100755
--- a/tests/qemu-iotests/105
+++ b/tests/qemu-iotests/105
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/107 b/tests/qemu-iotests/107
index 9862030469..d7222dc1c9 100755
--- a/tests/qemu-iotests/107
+++ b/tests/qemu-iotests/107
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/108 b/tests/qemu-iotests/108
index ce447498e9..2355d98c1d 100755
--- a/tests/qemu-iotests/108
+++ b/tests/qemu-iotests/108
@@ -26,7 +26,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/109 b/tests/qemu-iotests/109
index 0b668da850..f980b0c9e5 100755
--- a/tests/qemu-iotests/109
+++ b/tests/qemu-iotests/109
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/110 b/tests/qemu-iotests/110
index a687f9567d..9de7369f3a 100755
--- a/tests/qemu-iotests/110
+++ b/tests/qemu-iotests/110
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/111 b/tests/qemu-iotests/111
index 6011c94b71..a1c152d0c1 100755
--- a/tests/qemu-iotests/111
+++ b/tests/qemu-iotests/111
@@ -26,7 +26,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/112 b/tests/qemu-iotests/112
index 34ba06acd6..28eb9aae93 100755
--- a/tests/qemu-iotests/112
+++ b/tests/qemu-iotests/112
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/113 b/tests/qemu-iotests/113
index a2cd96b176..19b68b2727 100755
--- a/tests/qemu-iotests/113
+++ b/tests/qemu-iotests/113
@@ -26,7 +26,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/114 b/tests/qemu-iotests/114
index d02e7ffbe3..f110d4f65a 100755
--- a/tests/qemu-iotests/114
+++ b/tests/qemu-iotests/114
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/115 b/tests/qemu-iotests/115
index a6be1876aa..665c2ead41 100755
--- a/tests/qemu-iotests/115
+++ b/tests/qemu-iotests/115
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/116 b/tests/qemu-iotests/116
index 713ed484ba..df0172fed3 100755
--- a/tests/qemu-iotests/116
+++ b/tests/qemu-iotests/116
@@ -28,7 +28,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/117 b/tests/qemu-iotests/117
index 969750d137..9385b3f8da 100755
--- a/tests/qemu-iotests/117
+++ b/tests/qemu-iotests/117
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/119 b/tests/qemu-iotests/119
index cc6ec07705..4f34fb4343 100755
--- a/tests/qemu-iotests/119
+++ b/tests/qemu-iotests/119
@@ -26,7 +26,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/120 b/tests/qemu-iotests/120
index d899a3f527..4f88a67fe1 100755
--- a/tests/qemu-iotests/120
+++ b/tests/qemu-iotests/120
@@ -26,7 +26,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/121 b/tests/qemu-iotests/121
index 0912c3f0cb..1307b4e327 100755
--- a/tests/qemu-iotests/121
+++ b/tests/qemu-iotests/121
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/122 b/tests/qemu-iotests/122
index 350ca9c466..45b359c2ba 100755
--- a/tests/qemu-iotests/122
+++ b/tests/qemu-iotests/122
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/123 b/tests/qemu-iotests/123
index ad608035d1..b18e3fca9a 100755
--- a/tests/qemu-iotests/123
+++ b/tests/qemu-iotests/123
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/128 b/tests/qemu-iotests/128
index 3d8107d2a3..0976a18133 100755
--- a/tests/qemu-iotests/128
+++ b/tests/qemu-iotests/128
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
devname="eiodev$$"
diff --git a/tests/qemu-iotests/130 b/tests/qemu-iotests/130
index 9209992daa..ecc8a5ba1b 100755
--- a/tests/qemu-iotests/130
+++ b/tests/qemu-iotests/130
@@ -27,7 +27,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/131 b/tests/qemu-iotests/131
index 4873f40e94..94a9ae76af 100755
--- a/tests/qemu-iotests/131
+++ b/tests/qemu-iotests/131
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/133 b/tests/qemu-iotests/133
index 858710288a..9d35a6a1ca 100755
--- a/tests/qemu-iotests/133
+++ b/tests/qemu-iotests/133
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/134 b/tests/qemu-iotests/134
index 1c3820b17e..af618b8817 100755
--- a/tests/qemu-iotests/134
+++ b/tests/qemu-iotests/134
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/135 b/tests/qemu-iotests/135
index 16bf736560..ce608312f6 100755
--- a/tests/qemu-iotests/135
+++ b/tests/qemu-iotests/135
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/137 b/tests/qemu-iotests/137
index 9a6597cf9d..e5e30de2fa 100755
--- a/tests/qemu-iotests/137
+++ b/tests/qemu-iotests/137
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/138 b/tests/qemu-iotests/138
index a5c3464d58..21650d8197 100755
--- a/tests/qemu-iotests/138
+++ b/tests/qemu-iotests/138
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/140 b/tests/qemu-iotests/140
index 05e4506676..49f9df4eb0 100755
--- a/tests/qemu-iotests/140
+++ b/tests/qemu-iotests/140
@@ -29,7 +29,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/141 b/tests/qemu-iotests/141
index f7c28b4463..b2617e5e2b 100755
--- a/tests/qemu-iotests/141
+++ b/tests/qemu-iotests/141
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/142 b/tests/qemu-iotests/142
index 3828c23b7b..29c0606bd7 100755
--- a/tests/qemu-iotests/142
+++ b/tests/qemu-iotests/142
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/143 b/tests/qemu-iotests/143
index 6207368f04..ec4ef2221a 100755
--- a/tests/qemu-iotests/143
+++ b/tests/qemu-iotests/143
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/145 b/tests/qemu-iotests/145
index 7d8febb8ce..1eca0e8990 100755
--- a/tests/qemu-iotests/145
+++ b/tests/qemu-iotests/145
@@ -25,7 +25,6 @@ seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
diff --git a/tests/qemu-iotests/148 b/tests/qemu-iotests/148
index d066ec3e41..e01b061fe7 100644
--- a/tests/qemu-iotests/148
+++ b/tests/qemu-iotests/148
@@ -79,9 +79,6 @@ sector = "%d"
self.assert_qmp(event, 'data/sector-num', sector)
def testQuorum(self):
- if not 'quorum' in iotests.qemu_img_pipe('--help'):
- return
-
# Generate an error and get an event
self.vm.hmp_qemu_io("drive0", "aio_read %d %d" %
(offset * sector_size, sector_size))
@@ -139,4 +136,5 @@ class TestFifoQuorumEvents(TestQuorumEvents):
read_pattern = 'fifo'
if __name__ == '__main__':
+ iotests.verify_quorum()
iotests.main(supported_fmts=["raw"])
diff --git a/tests/qemu-iotests/150 b/tests/qemu-iotests/150
index 97d2a35bfc..ee8f6375f6 100755
--- a/tests/qemu-iotests/150
+++ b/tests/qemu-iotests/150
@@ -25,7 +25,6 @@ seq="$(basename $0)"
echo "QA output created by $seq"
here="$PWD"
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
@@ -38,65 +37,34 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.rc
. ./common.filter
-_supported_fmt generic
+_supported_fmt raw qcow2
_supported_proto file
_supported_os Linux
-on_disk_size()
-{
- du "$@" | sed -e 's/\t\+.*//'
-}
-
-
img_size=1048576
echo
-echo '=== Comparing empty image against sparse conversion ==='
+echo '=== Mapping sparse conversion ==='
echo
-_make_test_img $img_size
-
-empty_size=$(on_disk_size "$TEST_IMG")
-
-
$QEMU_IMG_PROG convert -O "$IMGFMT" -S 512 \
"json:{ 'driver': 'null-co', 'size': $img_size, 'read-zeroes': true }" \
"$TEST_IMG"
-sparse_convert_size=$(on_disk_size "$TEST_IMG")
-
-
-if [ "$empty_size" -eq "$sparse_convert_size" ]; then
- echo 'Equal image size'
-else
- echo 'Different image size'
-fi
+$QEMU_IMG map "$TEST_IMG" | _filter_qemu_img_map
echo
-echo '=== Comparing full image against non-sparse conversion ==='
+echo '=== Mapping non-sparse conversion ==='
echo
-_make_test_img $img_size
-$QEMU_IO -c "write 0 $img_size" "$TEST_IMG" | _filter_qemu_io
-
-full_size=$(on_disk_size "$TEST_IMG")
-
-
$QEMU_IMG convert -O "$IMGFMT" -S 0 \
"json:{ 'driver': 'null-co', 'size': $img_size, 'read-zeroes': true }" \
"$TEST_IMG"
-non_sparse_convert_size=$(on_disk_size "$TEST_IMG")
-
-
-if [ "$full_size" -eq "$non_sparse_convert_size" ]; then
- echo 'Equal image size'
-else
- echo 'Different image size'
-fi
+$QEMU_IMG map "$TEST_IMG" | _filter_qemu_img_map
# success, all done
diff --git a/tests/qemu-iotests/150.out b/tests/qemu-iotests/150.out
index 2d29da13e7..2a54e8dcfa 100644
--- a/tests/qemu-iotests/150.out
+++ b/tests/qemu-iotests/150.out
@@ -1,14 +1,11 @@
QA output created by 150
-=== Comparing empty image against sparse conversion ===
+=== Mapping sparse conversion ===
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576
-Equal image size
+Offset Length File
-=== Comparing full image against non-sparse conversion ===
+=== Mapping non-sparse conversion ===
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576
-wrote 1048576/1048576 bytes at offset 0
-1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-Equal image size
+Offset Length File
+0 0x100000 TEST_DIR/t.IMGFMT
*** done
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index c350f16b6a..4cba2151e4 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -19,7 +19,6 @@
# Control script for QA
#
-tmp=/tmp/$$
status=0
needwrap=true
try=0
@@ -130,6 +129,8 @@ fi
# exit 1
#fi
+tmp="${TEST_DIR}"/$$
+
_wallclock()
{
date "+%H %M %S" | $AWK_PROG '{ print $1*3600 + $2*60 + $3 }'
@@ -146,8 +147,8 @@ _wrapup()
# for hangcheck ...
# remove files that were used by hangcheck
#
- [ -f /tmp/check.pid ] && rm -rf /tmp/check.pid
- [ -f /tmp/check.sts ] && rm -rf /tmp/check.sts
+ [ -f "${TEST_DIR}"/check.pid ] && rm -rf "${TEST_DIR}"/check.pid
+ [ -f "${TEST_DIR}"/check.sts ] && rm -rf "${TEST_DIR}"/check.sts
if $showme
then
@@ -197,8 +198,8 @@ END { if (NR > 0) {
needwrap=false
fi
- rm -f /tmp/*.out /tmp/*.err /tmp/*.time
- rm -f /tmp/check.pid /tmp/check.sts
+ rm -f "${TEST_DIR}"/*.out "${TEST_DIR}"/*.err "${TEST_DIR}"/*.time
+ rm -f "${TEST_DIR}"/check.pid "${TEST_DIR}"/check.sts
rm -f $tmp.*
}
@@ -208,16 +209,16 @@ trap "_wrapup; exit \$status" 0 1 2 3 15
# Save pid of check in a well known place, so that hangcheck can be sure it
# has the right pid (getting the pid from ps output is not reliable enough).
#
-rm -rf /tmp/check.pid
-echo $$ >/tmp/check.pid
+rm -rf "${TEST_DIR}"/check.pid
+echo $$ > "${TEST_DIR}"/check.pid
# for hangcheck ...
# Save the status of check in a well known place, so that hangcheck can be
# sure to know where check is up to (getting test number from ps output is
# not reliable enough since the trace stuff has been introduced).
#
-rm -rf /tmp/check.sts
-echo "preamble" >/tmp/check.sts
+rm -rf "${TEST_DIR}"/check.sts
+echo "preamble" > "${TEST_DIR}"/check.sts
# don't leave old full output behind on a clean run
rm -f check.full
@@ -285,7 +286,7 @@ do
rm -f core $seq.notrun
# for hangcheck ...
- echo "$seq" >/tmp/check.sts
+ echo "$seq" > "${TEST_DIR}"/check.sts
start=`_wallclock`
$timestamp && echo -n " ["`date "+%T"`"]"
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index 60bfabf348..f824651bac 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -122,7 +122,7 @@ _qemu_img_wrapper()
_qemu_io_wrapper()
{
- local VALGRIND_LOGFILE=/tmp/$$.valgrind
+ local VALGRIND_LOGFILE="${TEST_DIR}"/$$.valgrind
local RETVAL
(
if [ "${VALGRIND_QEMU}" == "y" ]; then
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index 84b7434bcf..8a6e1b57c1 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -19,107 +19,6 @@
# standard filters
#
-# Checks that given_value is in range of correct_value +/- tolerance.
-# Tolerance can be an absolute value or a percentage of the correct value
-# (see examples with tolerances below).
-# Outputs suitable message to stdout if it's not in range.
-#
-# A verbose option, -v, may be used as the LAST argument
-#
-# e.g.
-# foo: 0.0298 = 0.03 +/- 5%
-# _within_tolerance "foo" 0.0298 0.03 5%
-#
-# foo: 0.0298 = 0.03 +/- 0.01
-# _within_tolerance "foo" 0.0298 0.03 0.01
-#
-# foo: 0.0298 = 0.03 -0.01 +0.002
-# _within_tolerance "foo" 0.0298 0.03 0.01 0.002
-#
-# foo: verbose output of 0.0298 = 0.03 +/- 5%
-# _within_tolerance "foo" 0.0298 0.03 5% -v
-_within_tolerance()
-{
- _name=$1
- _given_val=$2
- _correct_val=$3
- _mintol=$4
- _maxtol=$_mintol
- _verbose=0
- _debug=false
-
- # maxtol arg is optional
- # verbose arg is optional
- if [ $# -ge 5 ]
- then
- if [ "$5" = "-v" ]
- then
- _verbose=1
- else
- _maxtol=$5
- fi
- fi
- if [ $# -ge 6 ]
- then
- [ "$6" = "-v" ] && _verbose=1
- fi
-
- # find min with or without %
- _mintolerance=`echo $_mintol | sed -e 's/%//'`
- if [ $_mintol = $_mintolerance ]
- then
- _min=`echo "scale=5; $_correct_val-$_mintolerance" | bc`
- else
- _min=`echo "scale=5; $_correct_val-$_mintolerance*0.01*$_correct_val" | bc`
- fi
-
- # find max with or without %
- _maxtolerance=`echo $_maxtol | sed -e 's/%//'`
- if [ $_maxtol = $_maxtolerance ]
- then
- _max=`echo "scale=5; $_correct_val+$_maxtolerance" | bc`
- else
- _max=`echo "scale=5; $_correct_val+$_maxtolerance*0.01*$_correct_val" | bc`
- fi
-
- $_debug && echo "min = $_min"
- $_debug && echo "max = $_max"
-
- cat <<EOF >$tmp.bc.1
-scale=5;
-if ($_min <= $_given_val) 1;
-if ($_min > $_given_val) 0;
-EOF
-
- cat <<EOF >$tmp.bc.2
-scale=5;
-if ($_given_val <= $_max) 1;
-if ($_given_val > $_max) 0;
-EOF
-
- _above_min=`bc <$tmp.bc.1`
- _below_max=`bc <$tmp.bc.2`
-
- rm -f $tmp.bc.[12]
-
- _in_range=`expr $_above_min \& $_below_max`
-
- # fix up min, max precision for output
- # can vary for 5.3, 6.2
- _min=`echo $_min | sed -e 's/0*$//'` # get rid of trailling zeroes
- _max=`echo $_max | sed -e 's/0*$//'` # get rid of trailling zeroes
-
- if [ $_in_range -eq 1 ]
- then
- [ $_verbose -eq 1 ] && echo $_name is in range
- return 0
- else
- [ $_verbose -eq 1 ] && echo $_name has value of $_given_val
- [ $_verbose -eq 1 ] && echo $_name is NOT in range $_min .. $_max
- return 1
- fi
-}
-
# ctime(3) dates
#
_filter_date()
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index d9913f8496..5249ec5922 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -287,52 +287,6 @@ _need_to_be_root()
fi
}
-
-# Do a command, log it to $seq.full, optionally test return status
-# and die if command fails. If called with one argument _do executes the
-# command, logs it, and returns its exit status. With two arguments _do
-# first prints the message passed in the first argument, and then "done"
-# or "fail" depending on the return status of the command passed in the
-# second argument. If the command fails and the variable _do_die_on_error
-# is set to "always" or the two argument form is used and _do_die_on_error
-# is set to "message_only" _do will print an error message to
-# $seq.out and exit.
-
-_do()
-{
- if [ $# -eq 1 ]; then
- _cmd=$1
- elif [ $# -eq 2 ]; then
- _note=$1
- _cmd=$2
- echo -n "$_note... "
- else
- echo "Usage: _do [note] cmd" 1>&2
- status=1; exit
- fi
-
- (eval "echo '---' \"$_cmd\"") >>"$OUTPUT_DIR/$seq.full"
- (eval "$_cmd") >$tmp._out 2>&1; ret=$?
- cat $tmp._out >>"$OUTPUT_DIR/$seq.full"
- if [ $# -eq 2 ]; then
- if [ $ret -eq 0 ]; then
- echo "done"
- else
- echo "fail"
- fi
- fi
- if [ $ret -ne 0 ] \
- && [ "$_do_die_on_error" = "always" \
- -o \( $# -eq 2 -a "$_do_die_on_error" = "message_only" \) ]
- then
- [ $# -ne 2 ] && echo
- eval "echo \"$_cmd\" failed \(returned $ret\): see $seq.full"
- status=1; exit
- fi
-
- return $ret
-}
-
# bail out, setting up .notrun file
#
_notrun()
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 8499e1b611..d9ef60ef03 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -16,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+import errno
import os
import re
import subprocess
@@ -28,10 +29,6 @@ import qmp
import qtest
import struct
-__all__ = ['imgfmt', 'imgproto', 'test_dir' 'qemu_img', 'qemu_io',
- 'VM', 'QMPTestCase', 'notrun', 'main', 'verify_image_format',
- 'verify_platform', 'filter_test_dir', 'filter_win32',
- 'filter_qemu_io', 'filter_chown', 'log']
# This will not work if arguments contain spaces but is necessary if we
# want to support the override options that ./check supports.
@@ -247,7 +244,8 @@ class VM(object):
self._qmp.accept()
self._qtest.accept()
except:
- os.remove(self._monitor_path)
+ _remove_if_exists(self._monitor_path)
+ _remove_if_exists(self._qtest_path)
raise
def shutdown(self):
@@ -350,6 +348,20 @@ class QMPTestCase(unittest.TestCase):
result = self.vm.qmp('query-block-jobs')
self.assert_qmp(result, 'return', [])
+ def assert_has_block_node(self, node_name=None, file_name=None):
+ """Issue a query-named-block-nodes and assert node_name and/or
+ file_name is present in the result"""
+ def check_equal_or_none(a, b):
+ return a == None or b == None or a == b
+ assert node_name or file_name
+ result = self.vm.qmp('query-named-block-nodes')
+ for x in result["return"]:
+ if check_equal_or_none(x.get("node-name"), node_name) and \
+ check_equal_or_none(x.get("file"), file_name):
+ return
+ self.assertTrue(False, "Cannot find %s %s in result:\n%s" % \
+ (node_name, file_name, result))
+
def cancel_and_wait(self, drive='drive0', force=False, resume=False):
'''Cancel a block job and wait for it to finish, returning the event'''
result = self.vm.qmp('block-job-cancel', device=drive, force=force)
@@ -409,6 +421,15 @@ class QMPTestCase(unittest.TestCase):
event = self.wait_until_completed(drive=drive)
self.assert_qmp(event, 'data/type', 'mirror')
+def _remove_if_exists(path):
+ '''Remove file object at path if it exists'''
+ try:
+ os.remove(path)
+ except OSError as exception:
+ if exception.errno == errno.ENOENT:
+ return
+ raise
+
def notrun(reason):
'''Skip this test suite'''
# Each test in qemu-iotests has a number ("seq")
@@ -426,6 +447,11 @@ def verify_platform(supported_oses=['linux']):
if True not in [sys.platform.startswith(x) for x in supported_oses]:
notrun('not suitable for this OS: %s' % sys.platform)
+def verify_quorum():
+ '''Skip test suite if quorum support is not available'''
+ if 'quorum' not in qemu_img_pipe('--help'):
+ notrun('quorum support missing')
+
def main(supported_fmts=[], supported_oses=['linux']):
'''Run tests'''
diff --git a/ui/input-linux.c b/ui/input-linux.c
index 9c921cc0ad..1d33b5c121 100644
--- a/ui/input-linux.c
+++ b/ui/input-linux.c
@@ -337,7 +337,7 @@ static void input_linux_event_mouse(void *opaque)
static void input_linux_complete(UserCreatable *uc, Error **errp)
{
InputLinux *il = INPUT_LINUX(uc);
- uint32_t evtmap;
+ uint32_t evtmap, relmap, absmap;
int rc, ver;
if (!il->evdev) {
@@ -359,16 +359,36 @@ static void input_linux_complete(UserCreatable *uc, Error **errp)
}
rc = ioctl(il->fd, EVIOCGBIT(0, sizeof(evtmap)), &evtmap);
+ if (rc < 0) {
+ error_setg(errp, "%s: failed to read event bits", il->evdev);
+ goto err_close;
+ }
if (evtmap & (1 << EV_REL)) {
- /* has relative axis -> assume mouse */
+ rc = ioctl(il->fd, EVIOCGBIT(EV_REL, sizeof(relmap)), &relmap);
+ if (rc < 0) {
+ relmap = 0;
+ }
+ }
+
+ if (evtmap & (1 << EV_ABS)) {
+ ioctl(il->fd, EVIOCGBIT(EV_ABS, sizeof(absmap)), &absmap);
+ if (rc < 0) {
+ absmap = 0;
+ }
+ }
+
+ if ((evtmap & (1 << EV_REL)) &&
+ (relmap & (1 << REL_X))) {
+ /* has relative x axis -> assume mouse */
qemu_set_fd_handler(il->fd, input_linux_event_mouse, NULL, il);
- } else if (evtmap & (1 << EV_ABS)) {
- /* has absolute axis -> not supported */
+ } else if ((evtmap & (1 << EV_ABS)) &&
+ (absmap & (1 << ABS_X))) {
+ /* has absolute x axis -> not supported */
error_setg(errp, "tablet/touchscreen not supported");
goto err_close;
} else if (evtmap & (1 << EV_KEY)) {
- /* has keys/buttons (and no axis) -> assume keyboard */
+ /* has keys/buttons (and no x axis) -> assume keyboard */
qemu_set_fd_handler(il->fd, input_linux_event_keyboard, NULL, il);
} else {
/* Huh? What is this? */