search for: generic_qmp_test

Displaying 6 results from an estimated 6 matches for "generic_qmp_test".

2017 Sep 12
0
[PATCH v2 3/5] lib: qemu: Run QMP ‘query-commands’, ‘query-qmp-schema’ against the qemu binary.
...uestfs_h *g, const char *, yajl_val *); static void read_all (guestfs_h *g, void *retv, const char *buf, size_t len); static int generic_read_cache (guestfs_h *g, const char *filename, char **strp); static int generic_write_cache (guestfs_h *g, const char *filename, const char *str); +static int generic_qmp_test (guestfs_h *g, struct qemu_data *data, const char *qmp_command, char **outp); /* This structure abstracts the data we are reading from qemu and how * we get it. @@ -89,6 +103,10 @@ static const struct qemu_fields { test_qemu_help, read_cache_qemu_help, write_cache_qemu_help }, { "...
2017 Sep 11
4
[PATCH 0/4] lib: qemu: Add test for mandatory locking.
The patch I posted last week to disable mandatory locking for readonly drives (https://www.redhat.com/archives/libguestfs/2017-September/msg00013.html) was wrong in a couple of respects. Firstly it didn't work, which I didn't detect because my tests were testing the wrong thing. Oops. Secondly it used a simple version number check to detect qemu binaries implementing mandatory locking.
2019 Mar 23
1
[PATCH] lib: direct: Set QEMU_AUDIO_DRV=none when testing schema.
...eady doing when launching the real appliance subprocess. See also: https://bugzilla.redhat.com/show_bug.cgi?id=1692047 --- lib/qemu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/qemu.c b/lib/qemu.c index 10bb83105..2f3493217 100644 --- a/lib/qemu.c +++ b/lib/qemu.c @@ -566,6 +566,7 @@ generic_qmp_test (guestfs_h *g, struct qemu_data *data, /* Exit QEMU after sending the commands. */ guestfs_int_cmd_add_string_unquoted (cmd, "'{ \"execute\": \"quit\" }' "); guestfs_int_cmd_add_string_unquoted (cmd, " | "); + guestfs_int_cmd_add_string_unqu...
2017 Sep 12
9
[PATCH v2 0/5] launch: direct: Disable qemu locking when opening drives readonly (RHBZ#1417306)
Patches 1-4 are almost the same as they are when previously posted here: https://www.redhat.com/archives/libguestfs/2017-September/msg00039.html Patch 5 actually uses the mandatory locking test to turn off locking in the narrow case where a drive is opened readonly, and then only for the drive being inspected. Passes ordinary tests (‘check-direct’ and ‘check-valgrind-direct’). Rich.
2017 Sep 12
8
[PATCH v3 0/6] launch: direct: Disable qemu locking when opening drives readonly.
v2 -> v3: - I addressed everything that Pino mentioned last time. - It's tricky to get a stable run when multiple copies of qemu are involved, because the same cache files get overwritten by parallel libguestfs. So I changed the names of the cache files to include the qemu binary key (size, mtime), which removes this conflict. This is in new patch 4/6. Rich.
2018 Sep 13
1
[PATCH] lib: direct: Query qemu binary for availability of KVM (RHBZ#1605071).
...->query_kvm, &data->has_kvm); return data; @@ -338,6 +360,26 @@ write_cache_qmp_schema (guestfs_h *g, const struct qemu_data *data, return generic_write_cache (g, filename, data->qmp_schema); } +static int +test_query_kvm (guestfs_h *g, struct qemu_data *data) +{ + return generic_qmp_test (g, data, "query-kvm", &data->query_kvm); +} + +static int +read_cache_query_kvm (guestfs_h *g, struct qemu_data *data, + const char *filename) +{ + return generic_read_cache (g, filename, &data->query_kvm); +} + +static int +write_cache_query_kvm (gues...