From nobody Mon Feb 9 01:20:07 2026 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.zohomail.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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 154506651359745.1954061710079; Mon, 17 Dec 2018 09:08:33 -0800 (PST) Received: from localhost ([::1]:47734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gYvm3-0007Et-Dm for importer@patchew.org; Mon, 17 Dec 2018 11:29:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gYveS-0000WX-4q for qemu-devel@nongnu.org; Mon, 17 Dec 2018 11:21:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gYveN-0000Ls-Kn for qemu-devel@nongnu.org; Mon, 17 Dec 2018 11:21:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42328) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gYveK-0000EO-KQ for qemu-devel@nongnu.org; Mon, 17 Dec 2018 11:21:44 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1732389AEF for ; Mon, 17 Dec 2018 16:21:43 +0000 (UTC) Received: from thuth.com (dhcp-200-199.str.redhat.com [10.33.200.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id 353B3100034B; Mon, 17 Dec 2018 16:21:42 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Date: Mon, 17 Dec 2018 17:21:23 +0100 Message-Id: <1545063690-10116-7-git-send-email-thuth@redhat.com> In-Reply-To: <1545063690-10116-1-git-send-email-thuth@redhat.com> References: <1545063690-10116-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 17 Dec 2018 16:21:43 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 06/13] tests/boot-serial: Get rid of global_qtest variable 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: Laurent Vivier , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The test does not use any of the functions that require global_qtest, so we can simply get rid of this global variable here. Reviewed-by: Eric Blake Signed-off-by: Thomas Huth --- tests/boot-serial-test.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c index 8ec6aed..366fe51 100644 --- a/tests/boot-serial-test.c +++ b/tests/boot-serial-test.c @@ -161,6 +161,7 @@ static void test_machine(const void *data) char codetmp[] =3D "/tmp/qtest-boot-serial-cXXXXXX"; const char *codeparam =3D ""; const uint8_t *code =3D NULL; + QTestState *qts; int ser_fd; =20 ser_fd =3D mkstemp(serialtmp); @@ -189,11 +190,11 @@ static void test_machine(const void *data) * Make sure that this test uses tcg if available: It is used as a * fast-enough smoketest for that. */ - global_qtest =3D qtest_initf("%s %s -M %s,accel=3Dtcg:kvm " - "-chardev file,id=3Dserial0,path=3D%s " - "-no-shutdown -serial chardev:serial0 %s", - codeparam, code ? codetmp : "", - test->machine, serialtmp, test->extra); + qts =3D qtest_initf("%s %s -M %s,accel=3Dtcg:kvm -no-shutdown " + "-chardev file,id=3Dserial0,path=3D%s " + "-serial chardev:serial0 %s", + codeparam, code ? codetmp : "", test->machine, + serialtmp, test->extra); if (code) { unlink(codetmp); } @@ -204,7 +205,7 @@ static void test_machine(const void *data) } unlink(serialtmp); =20 - qtest_quit(global_qtest); + qtest_quit(qts); =20 close(ser_fd); } --=20 1.8.3.1