From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, "Tomáš Golembiovský" <tgolembi@redhat.com>
Subject: [Qemu-devel] [PULL 7/8] test-qga: pass environemnt to qemu-ga
Date: Tue, 18 Jul 2017 00:20:15 -0500 [thread overview]
Message-ID: <1500355216-23603-8-git-send-email-mdroth@linux.vnet.ibm.com> (raw)
In-Reply-To: <1500355216-23603-1-git-send-email-mdroth@linux.vnet.ibm.com>
From: Tomáš Golembiovský <tgolembi@redhat.com>
Modify fixture_setup() to pass environemnt variables to spawned qemu-ga
instance.
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
tests/test-qga.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/test-qga.c b/tests/test-qga.c
index c77f241..631b986 100644
--- a/tests/test-qga.c
+++ b/tests/test-qga.c
@@ -46,7 +46,7 @@ static void qga_watch(GPid pid, gint status, gpointer user_data)
}
static void
-fixture_setup(TestFixture *fixture, gconstpointer data)
+fixture_setup(TestFixture *fixture, gconstpointer data, gchar **envp)
{
const gchar *extra_arg = data;
GError *error = NULL;
@@ -67,7 +67,7 @@ fixture_setup(TestFixture *fixture, gconstpointer data)
g_shell_parse_argv(cmd, NULL, &argv, &error);
g_assert_no_error(error);
- g_spawn_async(fixture->test_dir, argv, NULL,
+ g_spawn_async(fixture->test_dir, argv, envp,
G_SPAWN_SEARCH_PATH|G_SPAWN_DO_NOT_REAP_CHILD,
NULL, NULL, &fixture->pid, &error);
g_assert_no_error(error);
@@ -707,7 +707,7 @@ static void test_qga_blacklist(gconstpointer data)
QDict *ret, *error;
const gchar *class, *desc;
- fixture_setup(&fix, "-b guest-ping,guest-get-time");
+ fixture_setup(&fix, "-b guest-ping,guest-get-time", NULL);
/* check blacklist */
ret = qmp_fd(fix.fd, "{'execute': 'guest-ping'}");
@@ -943,7 +943,7 @@ int main(int argc, char **argv)
setlocale (LC_ALL, "");
g_test_init(&argc, &argv, NULL);
- fixture_setup(&fix, NULL);
+ fixture_setup(&fix, NULL, NULL);
g_test_add_data_func("/qga/sync-delimited", &fix, test_qga_sync_delimited);
g_test_add_data_func("/qga/sync", &fix, test_qga_sync);
--
2.7.4
next prev parent reply other threads:[~2017-07-18 5:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-18 5:20 [Qemu-devel] [PULL 0/8] qemu-ga patch queue Michael Roth
2017-07-18 5:20 ` [Qemu-devel] [PULL 1/8] qga-win: fix installation on localized windows Michael Roth
2017-07-18 5:20 ` [Qemu-devel] [PULL 2/8] qemu-ga: add missing libpcre to MSI build Michael Roth
2017-07-18 5:20 ` [Qemu-devel] [PULL 3/8] qemu-ga: check if utmpx.h is available on the system Michael Roth
2017-07-18 5:20 ` [Qemu-devel] [PULL 4/8] qga-win32: remove a redundancy code Michael Roth
2017-07-18 5:20 ` [Qemu-devel] [PULL 5/8] qga: report error on keyfile dump error Michael Roth
2017-07-18 5:20 ` [Qemu-devel] [PULL 6/8] qemu-ga: add guest-get-osinfo command Michael Roth
2017-07-18 5:20 ` Michael Roth [this message]
2017-07-18 5:20 ` [Qemu-devel] [PULL 8/8] test-qga: add test for guest-get-osinfo Michael Roth
2017-07-18 11:01 ` [Qemu-devel] [PULL 0/8] qemu-ga patch queue Michael Roth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1500355216-23603-8-git-send-email-mdroth@linux.vnet.ibm.com \
--to=mdroth@linux.vnet.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=tgolembi@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).