Commit a467bb99 authored by Peter Maydell's avatar Peter Maydell
Browse files

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: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 2d2e632a 690604f6
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -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"
+8 −0
Original line number Diff line number Diff line
[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
+4 −23
Original line number Diff line number Diff line
@@ -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)