qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Tomáš Golembiovský" <tgolembi@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Michael Roth" <mdroth@linux.vnet.ibm.com>,
	"Vinzenz 'evilissimo' Feenstra" <vfeenstr@redhat.com>
Cc: qemu-devel@nongnu.org, "Tomáš Golembiovský" <tgolembi@redhat.com>
Subject: [Qemu-devel] [PATCH v6 2/3] test-qga: pass environemnt to qemu-ga
Date: Thu, 29 Jun 2017 23:27:05 +0200	[thread overview]
Message-ID: <bd712b6748c18d6bb885514c5a489ff7afd3b33e.1498771584.git.tgolembi@redhat.com> (raw)
In-Reply-To: <cover.1498771584.git.tgolembi@redhat.com>

Modify fixture_setup() to pass environemnt variables to spawned qemu-ga
instance.

Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.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 c77f241036..631b98639a 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.13.1

  parent reply	other threads:[~2017-06-29 21:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 21:27 [Qemu-devel] [PATCH v6 0/3] qemu-ga: add guest-get-osinfo command Tomáš Golembiovský
2017-06-29 21:27 ` [Qemu-devel] [PATCH v6 1/3] " Tomáš Golembiovský
2017-06-29 21:27 ` Tomáš Golembiovský [this message]
2017-06-29 21:27 ` [Qemu-devel] [PATCH v6 3/3] test-qga: add test for guest-get-osinfo Tomáš Golembiovský
2017-06-30 13:48   ` Marc-André Lureau
2017-07-03 11:37     ` Tomáš Golembiovský

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=bd712b6748c18d6bb885514c5a489ff7afd3b33e.1498771584.git.tgolembi@redhat.com \
    --to=tgolembi@redhat.com \
    --cc=eblake@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vfeenstr@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).