From patchwork Fri Jun 16 11:22:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 9791119 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 07D1F60325 for ; Fri, 16 Jun 2017 11:23:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E376928627 for ; Fri, 16 Jun 2017 11:23:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6AD62863F; Fri, 16 Jun 2017 11:23:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6501A28627 for ; Fri, 16 Jun 2017 11:23:07 +0000 (UTC) Received: from localhost ([::1]:58191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLpLG-0004aK-QG for patchwork-qemu-devel@patchwork.kernel.org; Fri, 16 Jun 2017 07:23:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLpKP-0004Yq-Re for qemu-devel@nongnu.org; Fri, 16 Jun 2017 07:22:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLpKN-0003WN-2W for qemu-devel@nongnu.org; Fri, 16 Jun 2017 07:22:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6130) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dLpKM-0003Vj-S4 for qemu-devel@nongnu.org; Fri, 16 Jun 2017 07:22:10 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E2C4EC04B93D for ; Fri, 16 Jun 2017 11:22:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E2C4EC04B93D 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=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E2C4EC04B93D Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-31.phx2.redhat.com [10.3.116.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id B8D9D88B11; Fri, 16 Jun 2017 11:22:08 +0000 (UTC) From: Laszlo Ersek To: qemu devel list Date: Fri, 16 Jun 2017 13:22:00 +0200 Message-Id: <20170616112201.24512-2-lersek@redhat.com> In-Reply-To: <20170616112201.24512-1-lersek@redhat.com> References: <20170616112201.24512-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 16 Jun 2017 11:22:10 +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] [PATCH 1/2] 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: Paolo Bonzini , Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 cc58f3ecf491..6c21b402a76c 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; + qtest_start("-M q35"); + pcibus = qpci_init_pc(NULL); g_assert(pcibus != NULL); @@ -74,19 +76,15 @@ static void test_smram_lock(void) g_free(pcidev); qpci_free_pc(pcibus); + + qtest_end(); } int main(int argc, char **argv) { - int ret; - g_test_init(&argc, &argv, NULL); qtest_add_func("/q35/smram/lock", test_smram_lock); - qtest_start("-M q35"); - ret = g_test_run(); - qtest_end(); - - return ret; + return g_test_run(); }