From nobody Sun Feb 8 20:12:57 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.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 1497628301174539.962245871561; Fri, 16 Jun 2017 08:51:41 -0700 (PDT) Received: from localhost ([::1]:59510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLtX8-000400-SJ for importer@patchew.org; Fri, 16 Jun 2017 11:51:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLtVU-0002ql-91 for qemu-devel@nongnu.org; Fri, 16 Jun 2017 11:49:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLtVR-0002rS-5b for qemu-devel@nongnu.org; Fri, 16 Jun 2017 11:49:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39686) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dLtVQ-0002r7-V7 for qemu-devel@nongnu.org; Fri, 16 Jun 2017 11:49:53 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 98F17C0467D7; Fri, 16 Jun 2017 15:49:51 +0000 (UTC) Received: from redhat.com (ovpn-123-69.rdu2.redhat.com [10.10.123.69]) by smtp.corp.redhat.com (Postfix) with SMTP id E08997E109; Fri, 16 Jun 2017 15:49:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 98F17C0467D7 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=mst@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 98F17C0467D7 Date: Fri, 16 Jun 2017 18:49:45 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1497628168-30489-3-git-send-email-mst@redhat.com> References: <1497628168-30489-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1497628168-30489-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 16 Jun 2017 15:49:52 +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 2/7] tests/q35-test: push down qtest_start / qtest_end to test case(s) 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: Peter Maydell , Greg Kurz , Gerd Hoffmann , Paolo Bonzini , Laszlo Ersek , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Laszlo Ersek A test program can start up QEMU several times, with different command lines. For such cases, qtest_start() and qtest_end() are called from within the individual test functions. Examples: "virtio-console-test.c", "numa-test.c", and many others. Cc: "Michael S. Tsirkin" Cc: Gerd Hoffmann Cc: Paolo Bonzini Signed-off-by: Laszlo Ersek Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/q35-test.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/q35-test.c b/tests/q35-test.c index cc58f3e..6c21b40 100644 --- a/tests/q35-test.c +++ b/tests/q35-test.c @@ -42,6 +42,8 @@ static void test_smram_lock(void) QPCIDevice *pcidev; QDict *response; =20 + qtest_start("-M q35"); + pcibus =3D qpci_init_pc(NULL); g_assert(pcibus !=3D NULL); =20 @@ -74,19 +76,15 @@ static void test_smram_lock(void) =20 g_free(pcidev); qpci_free_pc(pcibus); + + qtest_end(); } =20 int main(int argc, char **argv) { - int ret; - g_test_init(&argc, &argv, NULL); =20 qtest_add_func("/q35/smram/lock", test_smram_lock); =20 - qtest_start("-M q35"); - ret =3D g_test_run(); - qtest_end(); - - return ret; + return g_test_run(); } --=20 MST