Message ID | 217e64d171636218b61c41f1f70e72cdb40f9144.1499082038.git.tgolembi@redhat.com |
---|---|
State | New |
Headers | show |
On Mon, Jul 3, 2017 at 1:40 PM Tomáš Golembiovský <tgolembi@redhat.com> wrote: > 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> --- > 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 > > -- Marc-André Lureau
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);
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(-)