nbd patches for 2021-01-20

- minor resource leak fixes in qemu-nbd
 - ensure proper aio context when nbd server uses iothreads
 - iotest refactorings in preparation for rewriting ./check to be more
 flexible, and preparing for more nbd server reconnect features
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAmAI5sMACgkQp6FrSiUn
 Q2rmQwf+Jmlsn8s0tdeeOhv6mp8ZSyvr2/x1/daGHkzZqhoL7m/4kJLP4p/u8uTV
 XzXyXt7MKvHKd8UvKB6VsN6z75RJvi7y8pKpOQA96t08hjWuAcVtivKnyZd6MTwj
 zeKsmrE8LAuMjHvmsrtrmRqCSdaVeFPb3qC6bvJ+WEiXJIMiXybF7lccPvR7WWjR
 2FcyraZJgnlKrQv1i8M1++Px5W14jhOacAMUNAdVzNiYpu4tq6PTk9giq1/GULCz
 xVYGHqoTFYy7Slj7xKQJuOwGNLMwL+F9x7/6wRFhKxjutc0/Po1lSfbaNe8q147H
 p9jtDT9/OuTlQf7qpqqyQnASABDgaA==
 =XW+E
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2021-01-20' into staging

nbd patches for 2021-01-20

- minor resource leak fixes in qemu-nbd
- ensure proper aio context when nbd server uses iothreads
- iotest refactorings in preparation for rewriting ./check to be more
flexible, and preparing for more nbd server reconnect features

# gpg: Signature made Thu 21 Jan 2021 02:28:19 GMT
# gpg:                using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full]
# gpg:                 aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full]
# gpg:                 aka "[jpeg image of size 6874]" [full]
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A

* remotes/ericb/tags/pull-nbd-2021-01-20:
  iotests.py: qemu_io(): reuse qemu_tool_pipe_and_status()
  iotests.py: fix qemu_tool_pipe_and_status()
  iotests/264: fix style
  iotests: define group in each iotest
  iotests/294: add shebang line
  iotests: make tests executable
  iotests: fix some whitespaces in test output files
  iotests/303: use dot slash for qcow2.py running
  iotests/277: use dot slash for nbd-fault-injector.py running
  nbd/server: Quiesce coroutines on context switch
  block: Honor blk_set_aio_context() context requirements
  qemu-nbd: Fix a memleak in nbd_client_thread()
  qemu-nbd: Fix a memleak in qemu_nbd_client_list()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2021-01-21 10:44:27 +00:00
commit fef80ea073
301 changed files with 453 additions and 73 deletions

View File

@ -172,6 +172,7 @@ int virtio_blk_data_plane_start(VirtIODevice *vdev)
VirtIOBlockDataPlane *s = vblk->dataplane; VirtIOBlockDataPlane *s = vblk->dataplane;
BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(vblk))); BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(vblk)));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
AioContext *old_context;
unsigned i; unsigned i;
unsigned nvqs = s->conf->num_queues; unsigned nvqs = s->conf->num_queues;
Error *local_err = NULL; Error *local_err = NULL;
@ -214,7 +215,10 @@ int virtio_blk_data_plane_start(VirtIODevice *vdev)
vblk->dataplane_started = true; vblk->dataplane_started = true;
trace_virtio_blk_data_plane_start(s); trace_virtio_blk_data_plane_start(s);
old_context = blk_get_aio_context(s->conf->conf.blk);
aio_context_acquire(old_context);
r = blk_set_aio_context(s->conf->conf.blk, s->ctx, &local_err); r = blk_set_aio_context(s->conf->conf.blk, s->ctx, &local_err);
aio_context_release(old_context);
if (r < 0) { if (r < 0) {
error_report_err(local_err); error_report_err(local_err);
goto fail_guest_notifiers; goto fail_guest_notifiers;

View File

@ -725,6 +725,7 @@ void xen_block_dataplane_start(XenBlockDataPlane *dataplane,
{ {
ERRP_GUARD(); ERRP_GUARD();
XenDevice *xendev = dataplane->xendev; XenDevice *xendev = dataplane->xendev;
AioContext *old_context;
unsigned int ring_size; unsigned int ring_size;
unsigned int i; unsigned int i;
@ -808,10 +809,14 @@ void xen_block_dataplane_start(XenBlockDataPlane *dataplane,
goto stop; goto stop;
} }
aio_context_acquire(dataplane->ctx); old_context = blk_get_aio_context(dataplane->blk);
aio_context_acquire(old_context);
/* If other users keep the BlockBackend in the iothread, that's ok */ /* If other users keep the BlockBackend in the iothread, that's ok */
blk_set_aio_context(dataplane->blk, dataplane->ctx, NULL); blk_set_aio_context(dataplane->blk, dataplane->ctx, NULL);
aio_context_release(old_context);
/* Only reason for failure is a NULL channel */ /* Only reason for failure is a NULL channel */
aio_context_acquire(dataplane->ctx);
xen_device_set_event_channel_context(xendev, dataplane->event_channel, xen_device_set_event_channel_context(xendev, dataplane->event_channel,
dataplane->ctx, &error_abort); dataplane->ctx, &error_abort);
aio_context_release(dataplane->ctx); aio_context_release(dataplane->ctx);

View File

@ -849,15 +849,17 @@ static void virtio_scsi_hotplug(HotplugHandler *hotplug_dev, DeviceState *dev,
VirtIODevice *vdev = VIRTIO_DEVICE(hotplug_dev); VirtIODevice *vdev = VIRTIO_DEVICE(hotplug_dev);
VirtIOSCSI *s = VIRTIO_SCSI(vdev); VirtIOSCSI *s = VIRTIO_SCSI(vdev);
SCSIDevice *sd = SCSI_DEVICE(dev); SCSIDevice *sd = SCSI_DEVICE(dev);
AioContext *old_context;
int ret; int ret;
if (s->ctx && !s->dataplane_fenced) { if (s->ctx && !s->dataplane_fenced) {
if (blk_op_is_blocked(sd->conf.blk, BLOCK_OP_TYPE_DATAPLANE, errp)) { if (blk_op_is_blocked(sd->conf.blk, BLOCK_OP_TYPE_DATAPLANE, errp)) {
return; return;
} }
virtio_scsi_acquire(s); old_context = blk_get_aio_context(sd->conf.blk);
aio_context_acquire(old_context);
ret = blk_set_aio_context(sd->conf.blk, s->ctx, errp); ret = blk_set_aio_context(sd->conf.blk, s->ctx, errp);
virtio_scsi_release(s); aio_context_release(old_context);
if (ret < 0) { if (ret < 0) {
return; return;
} }

View File

@ -132,6 +132,9 @@ struct NBDClient {
CoMutex send_lock; CoMutex send_lock;
Coroutine *send_coroutine; Coroutine *send_coroutine;
bool read_yielding;
bool quiescing;
QTAILQ_ENTRY(NBDClient) next; QTAILQ_ENTRY(NBDClient) next;
int nb_requests; int nb_requests;
bool closing; bool closing;
@ -1352,14 +1355,60 @@ static coroutine_fn int nbd_negotiate(NBDClient *client, Error **errp)
return 0; return 0;
} }
static int nbd_receive_request(QIOChannel *ioc, NBDRequest *request, /* nbd_read_eof
* Tries to read @size bytes from @ioc. This is a local implementation of
* qio_channel_readv_all_eof. We have it here because we need it to be
* interruptible and to know when the coroutine is yielding.
* Returns 1 on success
* 0 on eof, when no data was read (errp is not set)
* negative errno on failure (errp is set)
*/
static inline int coroutine_fn
nbd_read_eof(NBDClient *client, void *buffer, size_t size, Error **errp)
{
bool partial = false;
assert(size);
while (size > 0) {
struct iovec iov = { .iov_base = buffer, .iov_len = size };
ssize_t len;
len = qio_channel_readv(client->ioc, &iov, 1, errp);
if (len == QIO_CHANNEL_ERR_BLOCK) {
client->read_yielding = true;
qio_channel_yield(client->ioc, G_IO_IN);
client->read_yielding = false;
if (client->quiescing) {
return -EAGAIN;
}
continue;
} else if (len < 0) {
return -EIO;
} else if (len == 0) {
if (partial) {
error_setg(errp,
"Unexpected end-of-file before all bytes were read");
return -EIO;
} else {
return 0;
}
}
partial = true;
size -= len;
buffer = (uint8_t *) buffer + len;
}
return 1;
}
static int nbd_receive_request(NBDClient *client, NBDRequest *request,
Error **errp) Error **errp)
{ {
uint8_t buf[NBD_REQUEST_SIZE]; uint8_t buf[NBD_REQUEST_SIZE];
uint32_t magic; uint32_t magic;
int ret; int ret;
ret = nbd_read(ioc, buf, sizeof(buf), "request", errp); ret = nbd_read_eof(client, buf, sizeof(buf), errp);
if (ret < 0) { if (ret < 0) {
return ret; return ret;
} }
@ -1480,11 +1529,37 @@ static void blk_aio_attached(AioContext *ctx, void *opaque)
QTAILQ_FOREACH(client, &exp->clients, next) { QTAILQ_FOREACH(client, &exp->clients, next) {
qio_channel_attach_aio_context(client->ioc, ctx); qio_channel_attach_aio_context(client->ioc, ctx);
if (client->recv_coroutine) {
aio_co_schedule(ctx, client->recv_coroutine); assert(client->recv_coroutine == NULL);
assert(client->send_coroutine == NULL);
if (client->quiescing) {
client->quiescing = false;
nbd_client_receive_next_request(client);
} }
}
}
static void nbd_aio_detach_bh(void *opaque)
{
NBDExport *exp = opaque;
NBDClient *client;
QTAILQ_FOREACH(client, &exp->clients, next) {
qio_channel_detach_aio_context(client->ioc);
client->quiescing = true;
if (client->recv_coroutine) {
if (client->read_yielding) {
qemu_aio_coroutine_enter(exp->common.ctx,
client->recv_coroutine);
} else {
AIO_WAIT_WHILE(exp->common.ctx, client->recv_coroutine != NULL);
}
}
if (client->send_coroutine) { if (client->send_coroutine) {
aio_co_schedule(ctx, client->send_coroutine); AIO_WAIT_WHILE(exp->common.ctx, client->send_coroutine != NULL);
} }
} }
} }
@ -1492,13 +1567,10 @@ static void blk_aio_attached(AioContext *ctx, void *opaque)
static void blk_aio_detach(void *opaque) static void blk_aio_detach(void *opaque)
{ {
NBDExport *exp = opaque; NBDExport *exp = opaque;
NBDClient *client;
trace_nbd_blk_aio_detach(exp->name, exp->common.ctx); trace_nbd_blk_aio_detach(exp->name, exp->common.ctx);
QTAILQ_FOREACH(client, &exp->clients, next) { aio_wait_bh_oneshot(exp->common.ctx, nbd_aio_detach_bh, exp);
qio_channel_detach_aio_context(client->ioc);
}
exp->common.ctx = NULL; exp->common.ctx = NULL;
} }
@ -2151,20 +2223,23 @@ static int nbd_co_send_bitmap(NBDClient *client, uint64_t handle,
/* nbd_co_receive_request /* nbd_co_receive_request
* Collect a client request. Return 0 if request looks valid, -EIO to drop * Collect a client request. Return 0 if request looks valid, -EIO to drop
* connection right away, and any other negative value to report an error to * connection right away, -EAGAIN to indicate we were interrupted and the
* the client (although the caller may still need to disconnect after reporting * channel should be quiesced, and any other negative value to report an error
* the error). * to the client (although the caller may still need to disconnect after
* reporting the error).
*/ */
static int nbd_co_receive_request(NBDRequestData *req, NBDRequest *request, static int nbd_co_receive_request(NBDRequestData *req, NBDRequest *request,
Error **errp) Error **errp)
{ {
NBDClient *client = req->client; NBDClient *client = req->client;
int valid_flags; int valid_flags;
int ret;
g_assert(qemu_in_coroutine()); g_assert(qemu_in_coroutine());
assert(client->recv_coroutine == qemu_coroutine_self()); assert(client->recv_coroutine == qemu_coroutine_self());
if (nbd_receive_request(client->ioc, request, errp) < 0) { ret = nbd_receive_request(client, request, errp);
return -EIO; if (ret < 0) {
return ret;
} }
trace_nbd_co_receive_request_decode_type(request->handle, request->type, trace_nbd_co_receive_request_decode_type(request->handle, request->type,
@ -2507,6 +2582,17 @@ static coroutine_fn void nbd_trip(void *opaque)
return; return;
} }
if (client->quiescing) {
/*
* We're switching between AIO contexts. Don't attempt to receive a new
* request and kick the main context which may be waiting for us.
*/
nbd_client_put(client);
client->recv_coroutine = NULL;
aio_wait_kick();
return;
}
req = nbd_request_get(client); req = nbd_request_get(client);
ret = nbd_co_receive_request(req, &request, &local_err); ret = nbd_co_receive_request(req, &request, &local_err);
client->recv_coroutine = NULL; client->recv_coroutine = NULL;
@ -2519,6 +2605,11 @@ static coroutine_fn void nbd_trip(void *opaque)
goto done; goto done;
} }
if (ret == -EAGAIN) {
assert(client->quiescing);
goto done;
}
nbd_client_receive_next_request(client); nbd_client_receive_next_request(client);
if (ret == -EIO) { if (ret == -EIO) {
goto disconnect; goto disconnect;
@ -2565,7 +2656,8 @@ disconnect:
static void nbd_client_receive_next_request(NBDClient *client) static void nbd_client_receive_next_request(NBDClient *client)
{ {
if (!client->recv_coroutine && client->nb_requests < MAX_NBD_REQUESTS) { if (!client->recv_coroutine && client->nb_requests < MAX_NBD_REQUESTS &&
!client->quiescing) {
nbd_client_get(client); nbd_client_get(client);
client->recv_coroutine = qemu_coroutine_create(nbd_trip, client); client->recv_coroutine = qemu_coroutine_create(nbd_trip, client);
aio_co_schedule(client->exp->common.ctx, client->recv_coroutine); aio_co_schedule(client->exp->common.ctx, client->recv_coroutine);

View File

@ -181,7 +181,7 @@ static int qemu_nbd_client_list(SocketAddress *saddr, QCryptoTLSCreds *tls,
sioc = qio_channel_socket_new(); sioc = qio_channel_socket_new();
if (qio_channel_socket_connect_sync(sioc, saddr, &err) < 0) { if (qio_channel_socket_connect_sync(sioc, saddr, &err) < 0) {
error_report_err(err); error_report_err(err);
return EXIT_FAILURE; goto out;
} }
rc = nbd_receive_export_list(QIO_CHANNEL(sioc), tls, hostname, &list, rc = nbd_receive_export_list(QIO_CHANNEL(sioc), tls, hostname, &list,
&err); &err);
@ -265,8 +265,8 @@ static void *nbd_client_thread(void *arg)
char *device = arg; char *device = arg;
NBDExportInfo info = { .request_sizes = false, .name = g_strdup("") }; NBDExportInfo info = { .request_sizes = false, .name = g_strdup("") };
QIOChannelSocket *sioc; QIOChannelSocket *sioc;
int fd; int fd = -1;
int ret; int ret = EXIT_FAILURE;
pthread_t show_parts_thread; pthread_t show_parts_thread;
Error *local_error = NULL; Error *local_error = NULL;
@ -278,26 +278,24 @@ static void *nbd_client_thread(void *arg)
goto out; goto out;
} }
ret = nbd_receive_negotiate(NULL, QIO_CHANNEL(sioc), if (nbd_receive_negotiate(NULL, QIO_CHANNEL(sioc),
NULL, NULL, NULL, &info, &local_error); NULL, NULL, NULL, &info, &local_error) < 0) {
if (ret < 0) {
if (local_error) { if (local_error) {
error_report_err(local_error); error_report_err(local_error);
} }
goto out_socket; goto out;
} }
fd = open(device, O_RDWR); fd = open(device, O_RDWR);
if (fd < 0) { if (fd < 0) {
/* Linux-only, we can use %m in printf. */ /* Linux-only, we can use %m in printf. */
error_report("Failed to open %s: %m", device); error_report("Failed to open %s: %m", device);
goto out_socket; goto out;
} }
ret = nbd_init(fd, sioc, &info, &local_error); if (nbd_init(fd, sioc, &info, &local_error) < 0) {
if (ret < 0) {
error_report_err(local_error); error_report_err(local_error);
goto out_fd; goto out;
} }
/* update partition table */ /* update partition table */
@ -311,24 +309,20 @@ static void *nbd_client_thread(void *arg)
dup2(STDOUT_FILENO, STDERR_FILENO); dup2(STDOUT_FILENO, STDERR_FILENO);
} }
ret = nbd_client(fd); if (nbd_client(fd) < 0) {
if (ret) { goto out;
goto out_fd;
} }
close(fd);
object_unref(OBJECT(sioc));
g_free(info.name);
kill(getpid(), SIGTERM);
return (void *) EXIT_SUCCESS;
out_fd: ret = EXIT_SUCCESS;
close(fd);
out_socket: out:
if (fd >= 0) {
close(fd);
}
object_unref(OBJECT(sioc)); object_unref(OBJECT(sioc));
out:
g_free(info.name); g_free(info.name);
kill(getpid(), SIGTERM); kill(getpid(), SIGTERM);
return (void *) EXIT_FAILURE; return (void *) (intptr_t) ret;
} }
#endif /* HAVE_NBD_DEVICE */ #endif /* HAVE_NBD_DEVICE */

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test simple read/write using plain bdrv_pread/bdrv_pwrite # Test simple read/write using plain bdrv_pread/bdrv_pwrite
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test simple read/write using plain bdrv_pread/bdrv_pwrite # Test simple read/write using plain bdrv_pread/bdrv_pwrite
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto
# #
# Test simple read/write using bdrv_aio_readv/bdrv_aio_writev # Test simple read/write using bdrv_aio_readv/bdrv_aio_writev
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Make sure we can't read and write outside of the image size. # Make sure we can't read and write outside of the image size.
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: img auto quick
# #
# Make sure qemu-img can create 5TB images # Make sure qemu-img can create 5TB images
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: snapshot auto
# #
# Check for one possible case of qcow2 refcount corruption. # Check for one possible case of qcow2 refcount corruption.
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test simple asynchronous read/write operations. # Test simple asynchronous read/write operations.
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Nolan I qcow2 corruption - incorrectly reports free clusters # Nolan I qcow2 corruption - incorrectly reports free clusters
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Nolan II qcow2 corruption - wrong used cluster # Nolan II qcow2 corruption - wrong used cluster
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test for AIO allocation on the same cluster # Test for AIO allocation on the same cluster
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: auto quick
# #
# Make sure we can open read-only images # Make sure we can open read-only images
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto
# #
# qcow2 pattern test, empty and compressed image - 4k cluster patterns # qcow2 pattern test, empty and compressed image - 4k cluster patterns
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw
# #
# qcow2 pattern test, complex patterns including compression and snapshots # qcow2 pattern test, complex patterns including compression and snapshots
# Using patterns for 4k cluster size. # Using patterns for 4k cluster size.

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw snapshot
# #
# Combined test to grow the refcount table and test snapshots. # Combined test to grow the refcount table and test snapshots.
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw backing auto quick
# #
# Simple backing file reads # Simple backing file reads
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw backing auto quick
# #
# Merge backing file into test image when converting the image # Merge backing file into test image when converting the image
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw backing auto quick
# #
# When using a backing file for the output image in qemu-img convert, # When using a backing file for the output image in qemu-img convert,
# the backing file clusters must not copied. The data must still be # the backing file clusters must not copied. The data must still be

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw backing auto quick
# #
# Commit changes to backing file # Commit changes to backing file
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: io auto quick
# #
# Test handling of invalid patterns arguments to qemu-io # Test handling of invalid patterns arguments to qemu-io
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw snapshot auto
# #
# Test bdrv_load/save_vmstate using the usual patterns # Test bdrv_load/save_vmstate using the usual patterns
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw
# #
# qcow2 pattern test with various cluster sizes # qcow2 pattern test with various cluster sizes
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw backing auto quick
# #
# Rebasing COW images # Rebasing COW images
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Resizing images # Resizing images
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw blkdbg
# #
# qcow2 error path testing # qcow2 error path testing
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test that sub-cluster allocating writes zero the rest of the cluster # Test that sub-cluster allocating writes zero the rest of the cluster
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw backing quick
# #
# Test that backing files can be smaller than the image # Test that backing files can be smaller than the image
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# qcow2 internal snapshots/VM state tests # qcow2 internal snapshots/VM state tests
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# group: rw auto backing
# #
# Tests for image streaming. # Tests for image streaming.
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test that all qcow2 header extensions survive a header rewrite # Test that all qcow2 header extensions survive a header rewrite
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test that AIO requests are drained before an image is closed. This used # Test that AIO requests are drained before an image is closed. This used
# to segfault because the request coroutine kept running even after the # to segfault because the request coroutine kept running even after the

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test aligned and misaligned write zeroes operations. # Test aligned and misaligned write zeroes operations.
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto backing quick
# #
# Test bdrv_pwrite_zeroes with backing files (see also 154) # Test bdrv_pwrite_zeroes with backing files (see also 154)
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Let a few AIO requests run in parallel and have them access different L2 # Let a few AIO requests run in parallel and have them access different L2
# tables so that the cache has a chance to get used up. # tables so that the cache has a chance to get used up.

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test qcow2 feature bits # Test qcow2 feature bits
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto backing quick
# #
# Test COW from backing files # Test COW from backing files
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto backing quick
# #
# Test COW from backing files with AIO # Test COW from backing files with AIO
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test qcow2 lazy refcounts # Test qcow2 lazy refcounts
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# group: rw auto
# #
# Tests for image block commit. # Tests for image block commit.
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# group: rw auto backing
# #
# Tests for image mirroring. # Tests for image mirroring.
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test qemu-img operation on zero size images # Test qemu-img operation on zero size images
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto backing
# #
# Test that qemu-img info --backing-chain detects infinite loops # Test that qemu-img info --backing-chain detects infinite loops
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# group: rw
# #
# Tests growing a large refcount table. # Tests growing a large refcount table.
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# group: rw quick
# #
# Tests for fdsets and getfd. # Tests for fdsets and getfd.
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto aio quick
# #
# Test concurrent cluster allocations # Test concurrent cluster allocations
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Regression test for commit b7ab0fea (which was a corruption fix, # Regression test for commit b7ab0fea (which was a corruption fix,
# despite the commit message claiming otherwise) # despite the commit message claiming otherwise)

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: img auto quick
## ##
## qemu-img compare test ## qemu-img compare test
## ##

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto
# #
# Check qemu-img option parsing # Check qemu-img option parsing
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto backing quick
# #
# Test qemu-img rebase with zero clusters # Test qemu-img rebase with zero clusters
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw
# #
# Test command line configuration of block devices and driver-specific options # Test command line configuration of block devices and driver-specific options
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto backing quick
# #
# Test bdrv_pread/bdrv_pwrite using BDRV_O_SNAPSHOT # Test bdrv_pread/bdrv_pwrite using BDRV_O_SNAPSHOT
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test qemu-img convert when image length is not a multiple of cluster size # Test qemu-img convert when image length is not a multiple of cluster size
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test huge qcow2 images # Test huge qcow2 images
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# group: rw
# #
# Tests for drive-backup and blockdev-backup # Tests for drive-backup and blockdev-backup
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# group: rw backing
# #
# Tests for drive-backup # Tests for drive-backup
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# group: rw
# #
# Tests for internal snapshot. # Tests for internal snapshot.
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# Test export internal snapshot by qemu-nbd, convert it by qemu-img. # Test export internal snapshot by qemu-nbd, convert it by qemu-img.
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# Test case for vmdk # Test case for vmdk
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test case for image corruption (overlapping data structures) in qcow2 # Test case for image corruption (overlapping data structures) in qcow2
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto
# #
# Test case for image option amendment in qcow2. # Test case for image option amendment in qcow2.
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test case for snapshotting images with unallocated zero clusters in # Test case for snapshotting images with unallocated zero clusters in
# qcow2 # qcow2

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# test of qemu-img convert -n - convert without creation # test of qemu-img convert -n - convert without creation
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# Test VHDX read/write from a sample image created with Hyper-V # Test VHDX read/write from a sample image created with Hyper-V
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# group: rw quick
# #
# Test for additional information emitted by qemu-img info on qcow2 # Test for additional information emitted by qemu-img info on qcow2
# images # images

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test case for preallocated zero clusters in qcow2 # Test case for preallocated zero clusters in qcow2
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# Test case for loading a saved VM state from a qcow2 image # Test case for loading a saved VM state from a qcow2 image
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test case for deleting a backing file # Test case for deleting a backing file
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# Test VHDX log replay from an image with a journal that needs to be # Test VHDX log replay from an image with a journal that needs to be
# replayed # replayed

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test case for the QMP blkdebug and blkverify interfaces # Test case for the QMP blkdebug and blkverify interfaces
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test case for nested image formats # Test case for nested image formats
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test count_contiguous_clusters in qcow2 # Test count_contiguous_clusters in qcow2
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
## ##
## qemu-img compare test (qcow2 only ones) ## qemu-img compare test (qcow2 only ones)
## ##

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# cloop format input validation tests # cloop format input validation tests
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: io
# #
# parallels format input validation tests # parallels format input validation tests
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# Test concurrent pread/pwrite # Test concurrent pread/pwrite
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# bochs format input validation tests # bochs format input validation tests
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto
# #
# Test qcow2 preallocation with different cluster_sizes # Test qcow2 preallocation with different cluster_sizes
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto
# #
# qcow2 format input validation tests # qcow2 format input validation tests
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# Test Quorum block driver # Test Quorum block driver
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# Test qemu-img command line parsing # Test qemu-img command line parsing
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw
# #
# Test NBD client unexpected disconnect # Test NBD client unexpected disconnect
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: img quick
# #
# Test case for VDI header corruption; image too large, and too many blocks. # Test case for VDI header corruption; image too large, and too many blocks.
# Also simple test for creating dynamic and static VDI images. # Also simple test for creating dynamic and static VDI images.

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw
# #
# Live snapshot tests # Live snapshot tests
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test qemu-img progress output # Test qemu-img progress output
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# Test unsupported blockdev-add cases # Test unsupported blockdev-add cases
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# vpc (VHD) format input validation tests # vpc (VHD) format input validation tests
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test case for support of JSON filenames # Test case for support of JSON filenames
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto quick
# #
# Test for discarding compressed clusters on qcow2 images # Test for discarding compressed clusters on qcow2 images
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw migration quick
# #
# Live migration test # Live migration test
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# qcow1 format input validation tests # qcow1 format input validation tests
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# group: throttle
# #
# Tests for IO throttling # Tests for IO throttling
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# Test case for drive-mirror to NBD # Test case for drive-mirror to NBD
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw quick
# #
# Test for commit of larger active layer # Test for commit of larger active layer
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# group: rw quick
# #
# Test that snapshots move the throttling configuration to the active # Test that snapshots move the throttling configuration to the active
# layer # layer

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto backing
# #
# Commit changes into backing chains and empty the top image if the # Commit changes into backing chains and empty the top image if the
# backing image is not explicitly specified # backing image is not explicitly specified

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# group: rw auto backing quick
# #
# Test qcow2's bdrv_make_empty for images without internal snapshots # Test qcow2's bdrv_make_empty for images without internal snapshots
# #

Some files were not shown because too many files have changed in this diff Show More