From nobody Wed Nov 5 11:12:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 149877178047941.52247821877609; Thu, 29 Jun 2017 14:29:40 -0700 (PDT) Received: from localhost ([::1]:41326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQh0N-0006La-0C for importer@patchew.org; Thu, 29 Jun 2017 17:29:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQgy6-0004DA-RI for qemu-devel@nongnu.org; Thu, 29 Jun 2017 17:27:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQgy1-0000v2-S6 for qemu-devel@nongnu.org; Thu, 29 Jun 2017 17:27:18 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:37787) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dQgy1-0000uh-La for qemu-devel@nongnu.org; Thu, 29 Jun 2017 17:27:13 -0400 Received: by mail-wm0-f50.google.com with SMTP id i127so27801057wma.0 for ; Thu, 29 Jun 2017 14:27:13 -0700 (PDT) Received: from localhost.localdomain (ip-78-45-140-98.net.upcbroadband.cz. [78.45.140.98]) by smtp.gmail.com with ESMTPSA id 21sm11395020wmo.16.2017.06.29.14.27.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2017 14:27:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FzrvlXqICsVGjhRMi4gOtBmZADHGRNWZWH5Q64FuglU=; b=Fc1SurmE4uxy446n54UOKlKWHl8k7+678kYLdy6AumWPo1Tz8bchX0Z0RScaO1D5xD bmhGXTIDoD39wZ37CTiVaDOaq2nE6oVLNR3NW9PHeuyospc71kXgdlspSVAEbOycAymR y9n/0P3Plh3Utif6evCVVKxJUNXfiJzbyhTv/mur/PEu2N1TZxAK+HA1SSUB31qvQx6m WNsZd1DT8DshLL8aHWgRaAPeFegeoZl4TEZWdCCF3rDtiOYFg+BlCAbKHo4IgKANx1+I Ejo9HnSxqyKpJaAd+oeMPZ1I03v6PWOsWXRAeiitLL8wNhqfbAO+b6bikaPUhEvUAGpI 2ypg== X-Gm-Message-State: AKS2vOwgx/QJ89luu7R5L0AI5fYsfDTlDvUHIhs4gAoHjlb54IZB0K4A seGpz5WZ1siCjw+C X-Received: by 10.28.24.213 with SMTP id 204mr3582846wmy.15.1498771632626; Thu, 29 Jun 2017 14:27:12 -0700 (PDT) From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Golembiovsk=C3=BD?= To: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Eric Blake , Michael Roth , Vinzenz 'evilissimo' Feenstra Date: Thu, 29 Jun 2017 23:27:05 +0200 Message-Id: X-Mailer: git-send-email 2.13.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.50 Subject: [Qemu-devel] [PATCH v6 2/3] test-qga: pass environemnt to qemu-ga X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Tom=C3=A1=C5=A1=20Golembiovsk=C3=BD?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Modify fixture_setup() to pass environemnt variables to spawned qemu-ga instance. Signed-off-by: Tom=C3=A1=C5=A1 Golembiovsk=C3=BD --- 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 use= r_data) } =20 static void -fixture_setup(TestFixture *fixture, gconstpointer data) +fixture_setup(TestFixture *fixture, gconstpointer data, gchar **envp) { const gchar *extra_arg =3D data; GError *error =3D NULL; @@ -67,7 +67,7 @@ fixture_setup(TestFixture *fixture, gconstpointer data) g_shell_parse_argv(cmd, NULL, &argv, &error); g_assert_no_error(error); =20 - 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; =20 - fixture_setup(&fix, "-b guest-ping,guest-get-time"); + fixture_setup(&fix, "-b guest-ping,guest-get-time", NULL); =20 /* check blacklist */ ret =3D qmp_fd(fix.fd, "{'execute': 'guest-ping'}"); @@ -943,7 +943,7 @@ int main(int argc, char **argv) =20 setlocale (LC_ALL, ""); g_test_init(&argc, &argv, NULL); - fixture_setup(&fix, NULL); + fixture_setup(&fix, NULL, NULL); =20 g_test_add_data_func("/qga/sync-delimited", &fix, test_qga_sync_delimi= ted); g_test_add_data_func("/qga/sync", &fix, test_qga_sync); --=20 2.13.1