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`
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJXlmH1AAoJEDNTyc7xCLWEzZkH/2moAgsi6Ze6La05mWNJgL1/
 MO/bLVJjm9U3AFicc6EQHYrt7zteBmWxiU3+rKEGfE2gwHIHIROFBZcVgoCuo/dl
 E5vBUhvUH7CjlgUEIPfBbqGQja0HdaIp7SRs2O+n42LL9KvOuPrrlpgrFIfvhFWp
 Dan4lJuU4AsCWhy9DgjRfrcjo5W1GnL2FxrfofRlxwaRHXKfZGMAQ63XG8XkMKdL
 IWJhqm4Wt29juwPklB6cagyiKEhGF1tCjUhljU9+2d3fC/2Liqp8GUgVn3Hh76GG
 9silfe2hjHfy+bXpIaN0vX1dDLCIv4KJqWPsxqyTXitAKk06YFrTWRVQQnwEbhE=
 =uWsN
 -----END PGP SIGNATURE-----

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>
This commit is contained in:
Peter Maydell 2016-07-26 10:53:23 +01:00
commit a467bb9940
3 changed files with 20 additions and 26 deletions

11
configure vendored
View File

@ -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"

View File

@ -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

View File

@ -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)