|
|
3f2699 |
From e2cab87d83c5c285132dd036835ac106cb747a05 Mon Sep 17 00:00:00 2001
|
|
|
3f2699 |
From: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
3f2699 |
Date: Thu, 19 Apr 2018 12:33:47 -0300
|
|
|
3f2699 |
Subject: [PATCH 6/7] test-qga: pass environemnt to qemu-ga
|
|
|
3f2699 |
MIME-Version: 1.0
|
|
|
3f2699 |
Content-Type: text/plain; charset=UTF-8
|
|
|
3f2699 |
Content-Transfer-Encoding: 8bit
|
|
|
3f2699 |
|
|
|
3f2699 |
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
3f2699 |
Message-id: <e268e218482b844665c63a0592485fc843ad30c9.1524139831.git.mrezanin@redhat.com>
|
|
|
3f2699 |
Patchwork-id: 79707
|
|
|
3f2699 |
O-Subject: [RHEL-7.5.z qemu-guest-agent PATCH 6/7] test-qga: pass environemnt to qemu-ga
|
|
|
3f2699 |
Bugzilla: 1598210
|
|
|
3f2699 |
RH-Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
3f2699 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
3f2699 |
RH-Acked-by: Tomáš Golembiovský <tgolembi@redhat.com>
|
|
|
3f2699 |
|
|
|
3f2699 |
From: Tomáš Golembiovský <tgolembi@redhat.com>
|
|
|
3f2699 |
|
|
|
3f2699 |
Modify fixture_setup() to pass environemnt variables to spawned qemu-ga
|
|
|
3f2699 |
instance.
|
|
|
3f2699 |
|
|
|
3f2699 |
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
|
|
|
3f2699 |
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
3f2699 |
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
|
|
|
3f2699 |
(cherry picked from commit c28afa76c0e2829d1ebe5ad33062d1697bf2710b)
|
|
|
3f2699 |
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
|
|
|
3f2699 |
---
|
|
|
3f2699 |
tests/test-qga.c | 8 ++++----
|
|
|
3f2699 |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
3f2699 |
|
|
|
3f2699 |
diff --git a/tests/test-qga.c b/tests/test-qga.c
|
|
|
3f2699 |
index 868b02a40f..ef8616f89d 100644
|
|
|
3f2699 |
--- a/tests/test-qga.c
|
|
|
3f2699 |
+++ b/tests/test-qga.c
|
|
|
3f2699 |
@@ -46,7 +46,7 @@ static void qga_watch(GPid pid, gint status, gpointer user_data)
|
|
|
3f2699 |
}
|
|
|
3f2699 |
|
|
|
3f2699 |
static void
|
|
|
3f2699 |
-fixture_setup(TestFixture *fixture, gconstpointer data)
|
|
|
3f2699 |
+fixture_setup(TestFixture *fixture, gconstpointer data, gchar **envp)
|
|
|
3f2699 |
{
|
|
|
3f2699 |
const gchar *extra_arg = data;
|
|
|
3f2699 |
GError *error = NULL;
|
|
|
3f2699 |
@@ -67,7 +67,7 @@ fixture_setup(TestFixture *fixture, gconstpointer data)
|
|
|
3f2699 |
g_shell_parse_argv(cmd, NULL, &argv, &error);
|
|
|
3f2699 |
g_assert_no_error(error);
|
|
|
3f2699 |
|
|
|
3f2699 |
- g_spawn_async(fixture->test_dir, argv, NULL,
|
|
|
3f2699 |
+ g_spawn_async(fixture->test_dir, argv, envp,
|
|
|
3f2699 |
G_SPAWN_SEARCH_PATH|G_SPAWN_DO_NOT_REAP_CHILD,
|
|
|
3f2699 |
NULL, NULL, &fixture->pid, &error);
|
|
|
3f2699 |
g_assert_no_error(error);
|
|
|
3f2699 |
@@ -680,7 +680,7 @@ static void test_qga_blacklist(gconstpointer data)
|
|
|
3f2699 |
QDict *ret, *error;
|
|
|
3f2699 |
const gchar *class, *desc;
|
|
|
3f2699 |
|
|
|
3f2699 |
- fixture_setup(&fix, "-b guest-ping,guest-get-time");
|
|
|
3f2699 |
+ fixture_setup(&fix, "-b guest-ping,guest-get-time", NULL);
|
|
|
3f2699 |
|
|
|
3f2699 |
/* check blacklist */
|
|
|
3f2699 |
ret = qmp_fd(fix.fd, "{'execute': 'guest-ping'}");
|
|
|
3f2699 |
@@ -916,7 +916,7 @@ int main(int argc, char **argv)
|
|
|
3f2699 |
|
|
|
3f2699 |
setlocale (LC_ALL, "");
|
|
|
3f2699 |
g_test_init(&argc, &argv, NULL);
|
|
|
3f2699 |
- fixture_setup(&fix, NULL);
|
|
|
3f2699 |
+ fixture_setup(&fix, NULL, NULL);
|
|
|
3f2699 |
|
|
|
3f2699 |
g_test_add_data_func("/qga/sync-delimited", &fix, test_qga_sync_delimited);
|
|
|
3f2699 |
g_test_add_data_func("/qga/sync", &fix, test_qga_sync);
|
|
|
3f2699 |
--
|
|
|
3f2699 |
2.13.6
|
|
|
3f2699 |
|