From nobody Wed Nov 27 02:32:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1701707626; cv=none; d=zohomail.com; s=zohoarc; b=KtOb9ZFuun1Ofn5Q/VmACQ/rHZ9aQPb1zKlsxwjGDjo8XG5RoV+oYH5pStvTdFf+pdPwyFV1GWuEbVM8Q17lJiD4G5U9Oa7iThO+LHAfBsTMVzsxQj+UVsOJgwC/9hTGpNyvUvnQnjCZ/aqm6hhE0JHjOP+NWgO7Bw8XFtccxWA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701707626; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=coHukyH1DWww3pN4g1Hrcz2ONewv1IyvwdwjevEANZQ=; b=L7OOEe166h4NcyDVnJwUTtL/ibglkBR9CO4L5LezZznE54DDS0tk0jdCNEPLSgubwgHUNOaRPyDOb3rkClBZ7FjXV18MMv0qf2wfWtqcIdECDAhhH82TfcD70JEcs+9DBh5HCrcrJj2NWD37TpjrHWAJvfVbKdeOqrnzn4C8kJM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701707626207557.5266035070832; Mon, 4 Dec 2023 08:33:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rABsZ-0002GW-Fm; Mon, 04 Dec 2023 11:33:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rABsX-0002G2-KC for qemu-devel@nongnu.org; Mon, 04 Dec 2023 11:33:05 -0500 Received: from relay.virtuozzo.com ([130.117.225.111]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rABsV-0006qa-Ts for qemu-devel@nongnu.org; Mon, 04 Dec 2023 11:33:05 -0500 Received: from [130.117.225.1] (helo=dev005.ch-qa.vzint.dev) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1rABqo-00Gie6-0O; Mon, 04 Dec 2023 17:32:49 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-Id:Date:Subject:From: Content-Type; bh=coHukyH1DWww3pN4g1Hrcz2ONewv1IyvwdwjevEANZQ=; b=nV+WjmjRl5L7 CxV+4oZ6rV4w7+EtjzTJQ6/Ft7Adeh8Mhohn2GWOkq8MJjdg130e3NishIrIdJNIAuoMRvfXEgv0m f+CZVu7TTMNj/15MJp//1l8IldVGilGXOa59adGVo8tQV6nSbLcR3JSxKrObUf7G8Kh9LMEB2IHw5 4PenfFSRVTPuavDFJTfIpCXtWgYkIEPIpWJkIirG+HDeCFZ60oA4PwHhjY8a0zJc3jE6Zj6GRKZ1+ iKPYC9sNu8Rd0vtovEhz8/siDmCQYhbwR/etpK8Y9Nyfq4KbnevDjDGhKkXnGiSRNUp85d0AfuW4l 8FWFqDR3u0ebqg3AesSmRg==; From: Andrey Drobyshev To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, kkostiuk@redhat.com, michael.roth@amd.com, andrey.drobyshev@virtuozzo.com, den@virtuozzo.com Subject: [PATCH] Revert "test/qga: use G_TEST_DIR to locate os-release test file" Date: Mon, 4 Dec 2023 18:32:57 +0200 Message-Id: <20231204163257.1011556-1-andrey.drobyshev@virtuozzo.com> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=130.117.225.111; envelope-from=andrey.drobyshev@virtuozzo.com; helo=relay.virtuozzo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @virtuozzo.com) X-ZM-MESSAGEID: 1701707627651100003 Content-Type: text/plain; charset="utf-8" Since the commit a85d09269b QGA_OS_RELEASE variable points to the path relative to the build dir. Then on qemu-ga startup this path can't be found as qemu-ga cwd is somewhere else, which leads to the test failure: # ./tests/unit/test-qga -p /qga/guest-get-osinfo # random seed: R02S3a90c22d77ff1070fbd844f4959cf4a4 # Start of qga tests ** ERROR:../tests/unit/test-qga.c:906:test_qga_guest_get_osinfo: 'str' shoul= d not be NULL Bail out! ERROR:../tests/unit/test-qga.c:906:test_qga_guest_get_osinfo: '= str' should not be NULL Let's obtain the absolute path again. This reverts commit a85d09269bb1a7071d3ce0f2957e3ca9dba7c047. Signed-off-by: Andrey Drobyshev --- tests/unit/test-qga.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/test-qga.c b/tests/unit/test-qga.c index 671e83cb86..47cf5e30ec 100644 --- a/tests/unit/test-qga.c +++ b/tests/unit/test-qga.c @@ -1034,10 +1034,12 @@ static void test_qga_guest_get_osinfo(gconstpointer= data) g_autoptr(QDict) ret =3D NULL; char *env[2]; QDict *val; + g_autofree gchar *cwd =3D NULL; =20 + cwd =3D g_get_current_dir(); env[0] =3D g_strdup_printf( - "QGA_OS_RELEASE=3D%s%c..%cdata%ctest-qga-os-release", - g_test_get_dir(G_TEST_DIST), G_DIR_SEPARATOR, G_DIR_SEPARATOR, G_D= IR_SEPARATOR); + "QGA_OS_RELEASE=3D%s%ctests%cdata%ctest-qga-os-release", + cwd, G_DIR_SEPARATOR, G_DIR_SEPARATOR, G_DIR_SEPARATOR); env[1] =3D NULL; fixture_setup(&fixture, NULL, env); =20 --=20 2.39.3