summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-07-26 10:53:23 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-07-26 10:53:23 +0100
commita467bb9940145ed678ac6f84e9cc260f31174905 (patch)
tree79bd2b56e0958aeb39d5f6dd0ea80d4af44ab188
parent2d2e632ad00d11867c6c5625605b1fbc022dd62f (diff)
parent690604f696db6b3da35988e29da3f8d7966e12bc (diff)
downloadqemu-a467bb9940145ed678ac6f84e9cc260f31174905.zip
Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2016-07-25-tag' into staging
qemu-ga patch queue for 2.7 * fix w32 build failures due to -Werror when building with VSS/fsfreeze enabled * fix leaking for qemu-ga config files in `make check` # gpg: Signature made Mon 25 Jul 2016 20:01:09 BST # gpg: using RSA key 0x3353C9CEF108B584 # gpg: Good signature from "Michael Roth <flukshun@gmail.com>" # gpg: aka "Michael Roth <mdroth@utexas.edu>" # gpg: aka "Michael Roth <mdroth@linux.vnet.ibm.com>" # Primary key fingerprint: CEAC C9E1 5534 EBAB B82D 3FA0 3353 C9CE F108 B584 * remotes/mdroth/tags/qga-pull-2016-07-25-tag: configure: mark qemu-ga VSS includes as system headers tests: use static qga config file build-sys: link tests/data Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rwxr-xr-xconfigure11
-rw-r--r--tests/data/test-qga-config8
-rw-r--r--tests/test-qga.c27
3 files changed, 20 insertions, 26 deletions
diff --git a/configure b/configure
index 6ffa4a83cc..879324b0fd 100755
--- a/configure
+++ b/configure
@@ -4051,13 +4051,13 @@ fi
if test "$mingw32" = "yes" -a "$guest_agent" != "no" -a "$vss_win32_sdk" != "no" ; then
case "$vss_win32_sdk" in
- "") vss_win32_include="-I$source_path" ;;
+ "") vss_win32_include="-isystem $source_path" ;;
*\ *) # The SDK is installed in "Program Files" by default, but we cannot
# handle path with spaces. So we symlink the headers into ".sdk/vss".
- vss_win32_include="-I$source_path/.sdk/vss"
+ vss_win32_include="-isystem $source_path/.sdk/vss"
symlink "$vss_win32_sdk/inc" "$source_path/.sdk/vss/inc"
;;
- *) vss_win32_include="-I$vss_win32_sdk"
+ *) vss_win32_include="-isystem $vss_win32_sdk"
esac
cat > $TMPC << EOF
#define __MIDL_user_allocate_free_DEFINED__
@@ -5995,6 +5995,11 @@ for rom in seabios vgabios ; do
echo "LD=$ld" >> $config_mak
done
+# set up tests data directory
+if [ ! -e tests/data ]; then
+ symlink "$source_path/tests/data" tests/data
+fi
+
# set up qemu-iotests in this build directory
iotests_common_env="tests/qemu-iotests/common.env"
iotests_check="tests/qemu-iotests/check"
diff --git a/tests/data/test-qga-config b/tests/data/test-qga-config
new file mode 100644
index 0000000000..4bb721a4a1
--- /dev/null
+++ b/tests/data/test-qga-config
@@ -0,0 +1,8 @@
+[general]
+daemon=false
+method=virtio-serial
+path=/path/to/org.qemu.guest_agent.0
+pidfile=/var/foo/qemu-ga.pid
+statedir=/var/state
+verbose=true
+blacklist=guest-ping;guest-get-time
diff --git a/tests/test-qga.c b/tests/test-qga.c
index 251b20190c..dac8fb8c0a 100644
--- a/tests/test-qga.c
+++ b/tests/test-qga.c
@@ -691,28 +691,11 @@ static void test_qga_blacklist(gconstpointer data)
static void test_qga_config(gconstpointer data)
{
GError *error = NULL;
- char *cwd, *cmd, *out, *err, *str, **strv, *conf, **argv = NULL;
+ char *cwd, *cmd, *out, *err, *str, **strv, **argv = NULL;
char *env[2];
- int status, tmp;
+ int status;
gsize n;
GKeyFile *kf;
- const char *qga_config =
- "[general]\n"
- "daemon=false\n"
- "method=virtio-serial\n"
- "path=/path/to/org.qemu.guest_agent.0\n"
- "pidfile=/var/foo/qemu-ga.pid\n"
- "statedir=/var/state\n"
- "verbose=true\n"
- "blacklist=guest-ping;guest-get-time\n";
-
- tmp = g_file_open_tmp(NULL, &conf, &error);
- g_assert_no_error(error);
- g_assert_cmpint(tmp, >=, 0);
- g_assert_cmpstr(conf, !=, "");
-
- g_file_set_contents(conf, qga_config, -1, &error);
- g_assert_no_error(error);
cwd = g_get_current_dir();
cmd = g_strdup_printf("%s%cqemu-ga -D",
@@ -720,7 +703,8 @@ static void test_qga_config(gconstpointer data)
g_shell_parse_argv(cmd, NULL, &argv, &error);
g_assert_no_error(error);
- env[0] = g_strdup_printf("QGA_CONF=%s", conf);
+ env[0] = g_strdup_printf("QGA_CONF=tests%cdata%ctest-qga-config",
+ G_DIR_SEPARATOR, G_DIR_SEPARATOR);
env[1] = NULL;
g_spawn_sync(NULL, argv, env, 0,
NULL, NULL, &out, &err, &status, &error);
@@ -775,11 +759,8 @@ static void test_qga_config(gconstpointer data)
g_free(out);
g_free(err);
- g_free(conf);
g_free(env[0]);
g_key_file_free(kf);
-
- close(tmp);
}
static void test_qga_fsfreeze_status(gconstpointer fix)