search for: test_qemu

Displaying 20 results from an estimated 29 matches for "test_qemu".

2013 Dec 09
1
[PATCH] launch: switch from -nographic to -display none
...*arg) if (qemu_supports (g, data, "-nodefaults")) ADD_CMDLINE ("-nodefaults"); - ADD_CMDLINE ("-nographic"); + ADD_CMDLINE ("-display"); + ADD_CMDLINE ("none"); #ifdef MACHINE_TYPE ADD_CMDLINE ("-M"); @@ -918,7 +919,8 @@ test_qemu (guestfs_h *g, struct backend_direct_data *data) data->qemu_devices = NULL; guestfs___cmd_add_arg (cmd1, g->hv); - guestfs___cmd_add_arg (cmd1, "-nographic"); + guestfs___cmd_add_arg (cmd1, "-display"); + guestfs___cmd_add_arg (cmd1, "none"); guestf...
2016 May 12
0
[PATCH 4/4] lib: qemu: Memoize qemu feature detection.
...mu feature detection takes about 95ms on my laptop. The overhead is almost all due to the time taken by the glibc link loader opening the 170+ libraries that qemu is linked to (×2 because we need to run qemu twice). Fixing that is seriously hard work. Therefore memoize the results of guestfs_int_test_qemu. This is keyed on the size and mtime of the qemu binary, so if the user changes the qemu binary (eg. setting LIBGUESTFS_HV) we discard the memoized result and rerun the qemu commands. There is also a generation number so we can bump the generation in future versions of libguestfs to invalidate al...
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.
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.
2016 Mar 22
0
[PATCH v3 07/11] launch: direct: Don't run qemu -version.
...ry (or wrapper) runs, and do 'qemu -help' and - * 'qemu -version' so we know what options this qemu supports and - * the version. +/* Test qemu binary (or wrapper) runs, and do 'qemu -help' so we know + * the version of qemu what options this qemu supports. */ static int test_qemu (guestfs_h *g, struct backend_direct_data *data) { CLEANUP_CMD_CLOSE struct command *cmd1 = guestfs_int_new_command (g); CLEANUP_CMD_CLOSE struct command *cmd2 = guestfs_int_new_command (g); - CLEANUP_CMD_CLOSE struct command *cmd3 = guestfs_int_new_command (g); int r; free (data-&g...
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.
2016 May 25
4
[PATCH 0/4] qemu: Use sqlite to store qemu detection data.
Patches 1 & 2 were posted previously here: https://www.redhat.com/archives/libguestfs/2016-May/msg00134.html Patch 3 is a hack so I can test this using my own version of qemu (the `-L ?' stuff is not upstream). Patch 4 is where the real action takes place: Replace the caching of qemu features in blob-like files with a sqlite database. Probably the best way to approach this patch is to
2015 May 11
3
[PATCH 1/2] mllib: Require OUnit2 for tests.
...b \r \t"; ] in assert_equal_string "{ \"test_string\": \"test \\\" ' \\n \\b \\r \\t\" }" (JSON.string_of_doc doc); @@ -136,7 +136,7 @@ let test_escape () = (JSON.string_of_doc ~fmt:JSON.Indented doc) (* "examples" suite. *) -let test_qemu () = +let test_qemu ctx = let doc = [ "file.driver", JSON.String "https"; "file.url", JSON.String "https://libguestfs.org"; @@ -155,7 +155,7 @@ let test_qemu () = }" (JSON.string_of_doc ~fmt:JSON.Indented doc) -let test_builder () =...
2009 Oct 21
1
[PATCH] Set LC_ALL=C before running qemu.
...4 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -1195,6 +1195,8 @@ guestfs__launch (guestfs_h *g) setpgid (0, 0); #endif + setenv ("LC_ALL", "C", 1); + execv (g->qemu, g->cmdline); /* Run qemu. */ perror (g->qemu); _exit (1); @@ -1486,7 +1488,7 @@ test_qemu (guestfs_h *g) g->qemu_help = NULL; g->qemu_version = NULL; - snprintf (cmd, sizeof cmd, "'%s' -help", g->qemu); + snprintf (cmd, sizeof cmd, "LC_ALL=C '%s' -help", g->qemu); fp = popen (cmd, "r"); /* qemu -help should alwa...
2017 Sep 12
0
[PATCH v2 2/5] lib: qemu: Factor out common code for reading and writing cache files.
.../* mtime of qemu binary when cached. */ + char *qemu_help; /* Output of qemu -help. */ char *qemu_devices; /* Output of qemu -device ? */ @@ -51,9 +55,42 @@ struct qemu_data { struct version qemu_version; /* Parsed qemu version number. */ }; -static int test_qemu (guestfs_h *g, struct qemu_data *data); +static int test_qemu_help (guestfs_h *g, struct qemu_data *data); +static int read_cache_qemu_help (guestfs_h *g, struct qemu_data *data, const char *filename); +static int write_cache_qemu_help (guestfs_h *g, const struct qemu_data *data, const char *filena...
2016 May 18
2
[PATCH v2 0/2] Use -bios bios-fast.bin where supported.
This commit uses -bios bios-fast.bin if available, which basically stops SeaBIOS from trying to do PCI probing during boot, which is a waste of time when using the -kernel option. v1 -> v2: - Rebase on top of Pino's work. This still has 3 dependencies: - The qemu memoization work (v2). - Support for '-L ?' in qemu:
2016 May 18
2
[PATCH v2 0/2] lib: qemu: Memoize qemu feature detection.
v1 -> v2: - Rebase on top of Pino's version work. Two patches went upstream, these are the two remaining patches. Note the generation number is still inside the qemu.stat file. We could put it in the filename, I have no particular preference. Rich.
2016 May 12
7
[PATCH 0/4] lib: qemu: Memoize qemu feature detection.
Doing qemu feature detection in the direct backend takes ~100ms because we need to run `qemu -help' and `qemu -devices ?', and each of those interacts with glibc's very slow link loader. Fixing the link loader is really hard. Instead memoize the output of those two commands. This patch series first separates all the code dealing with qemu into a separate module (src/qemu.c) and
2012 Jun 12
5
[PATCH 0/5] Assorted patches to add virtio-scsi support.
These assorted patches end up with adding virtio-scsi support to libguestfs. It passes libguestfs-test-tool, but I haven't yet tried to run the full set of tests. In theory > 26 devices can be added, but it's likely that certain parts of the daemon will break if you actually try this. This of course needs to be fixed. Thanks Paolo Bonzini for invaluable help. Rich.
2016 May 17
2
[PATCH 0/2] Use -bios bios-fast.bin where supported.
NOTE: Not for upstream, yet. This depends on 3 non-upstream patches. - The qemu rework in libguestfs, which in turn depends on what Pino is up to. - Support for '-L ?' in qemu: https://lists.gnu.org/archive/html/qemu-devel/2016-05/threads.html#02596 - Support for bios-fast.bin in qemu: https://lists.gnu.org/archive/html/qemu-devel/2016-05/threads.html#02408 This commit
2014 Apr 29
2
Adventures in building libguestfs on non-x86 architectures for Debian
...Cheers, -Hilko [1] https://buildd.debian.org/status/package.php?p=supermin [2] https://buildd.debian.org/status/package.php?p=libguestfs diff --git a/src/launch-direct.c b/src/launch-direct.c index 1460c56..2332368 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -1020,6 +1020,10 @@ test_qemu (guestfs_h *g, struct backend_direct_data *data) guestfs___cmd_add_arg (cmd3, g->hv); guestfs___cmd_add_arg (cmd3, "-display"); guestfs___cmd_add_arg (cmd3, "none"); +#ifdef MACHINE_TYPE + guestfs___cmd_add_arg (cmd3, "-M"); + guestfs___cmd_add_arg (cmd3,...
2015 Jan 23
0
[PATCH 2/2] mllib: add simple tests for the JSON module
...quot;test \\\" ' \\n \\b \\r \\t\" }" + (JSON.string_of_doc doc); + assert_equal_string "{ + \"test_string\": \"test \\\" ' \\n \\b \\r \\t\" +}" + (JSON.string_of_doc ~fmt:JSON.Indented doc) + +(* "examples" suite. *) +let test_qemu () = + let doc = [ + "file.driver", JSON.String "https"; + "file.url", JSON.String "https://libguestfs.org"; + "file.timeout", JSON.Int 60; + "file.readahead", JSON.Int (64 * 1024 * 1024); + ] in + assert_equal_string + &...
2015 Jan 23
2
[PATCH 1/2] mllib: tests: add tests for string_lines_split
--- mllib/common_utils_tests.ml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mllib/common_utils_tests.ml b/mllib/common_utils_tests.ml index 09d5c51..283e9a1 100644 --- a/mllib/common_utils_tests.ml +++ b/mllib/common_utils_tests.ml @@ -27,6 +27,7 @@ let prog = "common_utils_tests" let assert_equal_string = assert_equal ~printer:(fun x -> x) let
2012 Jun 12
9
[PATCH v2 0/9]
More comprehensive support for virtio-scsi. Passes all the tests. Rich.
2017 Sep 12
0
[PATCH v3 4/6] lib: qemu: Allow parallel qemu binaries to be used with cache conflicts.
...097d56929..1549bb33a 100644 --- a/lib/qemu.c +++ b/lib/qemu.c @@ -60,6 +60,7 @@ struct qemu_data { yajl_val qmp_schema_tree; /* qmp_schema parsed into a JSON tree */ }; +static char *cache_filename (guestfs_h *g, const char *cachedir, const struct stat *, const char *suffix); static int test_qemu_help (guestfs_h *g, struct qemu_data *data); static int read_cache_qemu_help (guestfs_h *g, struct qemu_data *data, const char *filename); static int write_cache_qemu_help (guestfs_h *g, const struct qemu_data *data, const char *filename); @@ -107,12 +108,12 @@ static const struct qemu_fields {...