mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
qemuxmlconftest: Allow testing of the 'writable' flag for passed FDs for disks
Pass also the 'writable' state to the fake passed FDs so that we can test it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
8e48a4fafb
commit
500d985a13
@ -1655,9 +1655,9 @@ mymain(void)
|
||||
DO_TEST_CAPS_LATEST("disk-backing-chains-noindex");
|
||||
DO_TEST_CAPS_LATEST("disk-qcow2-datafile-store");
|
||||
DO_TEST_CAPS_ARCH_LATEST_FULL("disk-source-fd", "x86_64",
|
||||
ARG_FD_GROUP, "testgroup2", 2, 200, 205,
|
||||
ARG_FD_GROUP, "testgroup5", 1, 204,
|
||||
ARG_FD_GROUP, "testgroup6", 2, 247, 248);
|
||||
ARG_FD_GROUP, "testgroup2", false, 2, 200, 205,
|
||||
ARG_FD_GROUP, "testgroup5", false, 1, 204,
|
||||
ARG_FD_GROUP, "testgroup6", false, 2, 247, 248);
|
||||
|
||||
DO_TEST_CAPS_LATEST("disk-slices");
|
||||
DO_TEST_CAPS_LATEST("disk-rotation");
|
||||
|
@ -704,11 +704,13 @@ testQemuInfoSetArgs(testQemuInfo *info,
|
||||
virStorageSourceFDTuple *new = virStorageSourceFDTupleNew();
|
||||
const char *fdname = va_arg(argptr, char *);
|
||||
VIR_AUTOCLOSE fakefd = open("/dev/zero", O_RDWR);
|
||||
bool writable = va_arg(argptr, int);
|
||||
size_t i;
|
||||
|
||||
new->nfds = va_arg(argptr, unsigned int);
|
||||
new->fds = g_new0(int, new->nfds);
|
||||
new->testfds = g_new0(int, new->nfds);
|
||||
new->writable = writable;
|
||||
|
||||
for (i = 0; i < new->nfds; i++) {
|
||||
new->testfds[i] = va_arg(argptr, unsigned int);
|
||||
|
@ -49,7 +49,7 @@ typedef enum {
|
||||
ARG_CAPS_VER,
|
||||
ARG_CAPS_VARIANT,
|
||||
ARG_CAPS_HOST_CPU_MODEL,
|
||||
ARG_FD_GROUP, /* name, nfds, fd[0], ... fd[n-1] */
|
||||
ARG_FD_GROUP, /* name, writable, nfds, fd[0], ... fd[n-1] */
|
||||
ARG_VDPA_FD, /* vdpadev, fd */
|
||||
ARG_NBDKIT_CAPS,
|
||||
ARG_END,
|
||||
|
Loading…
x
Reference in New Issue
Block a user