From nobody Sun Feb 8 19:12:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1595979897; cv=none; d=zohomail.com; s=zohoarc; b=XjNi1PK/VX8I7ejhmsrLZhwSdOa2t85WbMdndwWwO/CXkpBpdeiPKYxeBASFCs8Lb/uEHbC13kwV50xV7yjvMygBciK4Kbw80NBzKyH5Vd2S2ZAMKaKnxS94/bkz6o/4IArXOZ1LI2t6ZVjFXx7l5D3nN+Tl/ay0I3WrXtUJhrA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595979897; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SvKw2NJgsFKqzRF6yOP7uMugmO3zUUlRR0xW49wRX1k=; b=NX08ulhPecdtlCLGKPz1tIlfPMGCQspOR7aSxMyf6OS3DcGSssrIE2HUYzIAejLRO+zJeT8USMG3XkJHFgj/QTDHBqO3Ssqg4ttzE+Hf0LyWw8b/f3LK3AE4imbZEsOgowa2p0Xc7okOvzwiaDXPuxbYBZJVCBZWcbFOGAzAvY8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1595979897027343.05129093287667; Tue, 28 Jul 2020 16:44:57 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-46-hfn7ZMqhPemSy002VRszWg-1; Tue, 28 Jul 2020 19:44:52 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A4225100A8C2; Tue, 28 Jul 2020 23:44:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 83239712FF; Tue, 28 Jul 2020 23:44:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 504361800FDE; Tue, 28 Jul 2020 23:44:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06SNieQU004496 for ; Tue, 28 Jul 2020 19:44:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1075D59; Tue, 28 Jul 2020 23:44:40 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 78A7869327 for ; Tue, 28 Jul 2020 23:44:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595979895; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=SvKw2NJgsFKqzRF6yOP7uMugmO3zUUlRR0xW49wRX1k=; b=XFCc6YmBHDI4hCx6gPB2SlIN9L0X3zOPf9Ifkf8jE2Zm2j9LYo6S1SUz/JG2WEQqQvkejs qZEj/hNkXdsIBLj2fmLbueZsks6t+YPAUJOhgpriVIUlLzOwW40TUHeUYN8ba0t3vGq/Jv 79RR0QXBTBbmHOHpnVSETmrHSvhVcBQ= X-MC-Unique: hfn7ZMqhPemSy002VRszWg-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 4/4] tests: bhyve: remove unnecessary labels Date: Wed, 29 Jul 2020 01:44:27 +0200 Message-Id: <5f2f6546b9a1f5eed1c9d0b98169d361b30474e9.1595979850.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Signed-off-by: J=C3=A1n Tomko --- tests/bhyveargv2xmltest.c | 28 +++++++++++----------------- tests/bhyvexml2argvtest.c | 5 +---- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/tests/bhyveargv2xmltest.c b/tests/bhyveargv2xmltest.c index e7ec3ae020..2a497f48e8 100644 --- a/tests/bhyveargv2xmltest.c +++ b/tests/bhyveargv2xmltest.c @@ -31,11 +31,10 @@ testCompareXMLToArgvFiles(const char *xmlfile, g_autofree char *actualxml =3D NULL; g_autofree char *cmd =3D NULL; g_autofree char *log =3D NULL; - int ret =3D -1; g_autoptr(virDomainDef) vmdef =3D NULL; =20 if (virTestLoadFile(cmdfile, &cmd) < 0) - goto fail; + return -1; =20 if (!(vmdef =3D bhyveParseCommandLineString(cmd, driver.bhyvecaps, driver.xmlopt))) { @@ -43,16 +42,16 @@ testCompareXMLToArgvFiles(const char *xmlfile, VIR_TEST_DEBUG("Got expected failure from " "bhyveParseCommandLineString."); } else { - goto fail; + return -1; } } else if ((flags & FLAG_EXPECT_FAILURE)) { VIR_TEST_DEBUG("Did not get expected failure from " "bhyveParseCommandLineString."); - goto fail; + return -1; } =20 if ((log =3D virTestLogContentAndReset()) =3D=3D NULL) - goto fail; + return -1; if (flags & FLAG_EXPECT_WARNING) { if (*log) { VIR_TEST_DEBUG("Got expected warning from " @@ -61,32 +60,29 @@ testCompareXMLToArgvFiles(const char *xmlfile, } else { VIR_TEST_DEBUG("bhyveParseCommandLineString " "should have logged a warning"); - goto fail; + return -1; } } else { /* didn't expect a warning */ if (*log) { VIR_TEST_DEBUG("Got unexpected warning from " "bhyveParseCommandLineString:\n%s", log); - goto fail; + return -1; } } =20 if (vmdef && !virDomainDefCheckABIStability(vmdef, vmdef, driver.xmlop= t)) { VIR_TEST_DEBUG("ABI stability check failed on %s", xmlfile); - goto fail; + return -1; } =20 if (vmdef && !(actualxml =3D virDomainDefFormat(vmdef, driver.xmlopt, = 0))) - goto fail; + return -1; =20 if (vmdef && virTestCompareToFile(actualxml, xmlfile) < 0) - goto fail; + return -1; =20 - ret =3D 0; - - fail: - return ret; + return 0; } =20 struct testInfo { @@ -97,7 +93,6 @@ struct testInfo { static int testCompareXMLToArgvHelper(const void *data) { - int result =3D -1; const struct testInfo *info =3D data; g_autofree char *xml =3D NULL; g_autofree char *args =3D NULL; @@ -107,8 +102,7 @@ testCompareXMLToArgvHelper(const void *data) args =3D g_strdup_printf("%s/bhyveargv2xmldata/bhyveargv2xml-%s.args", abs_srcdir, info->name); =20 - result =3D testCompareXMLToArgvFiles(xml, args, info->flags); - return result; + return testCompareXMLToArgvFiles(xml, args, info->flags); } =20 static int diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index 33e7ac5772..7ce4dc6e58 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -110,7 +110,6 @@ struct testInfo { static int testCompareXMLToArgvHelper(const void *data) { - int ret =3D -1; const struct testInfo *info =3D data; g_autofree char *xml =3D NULL; g_autofree char *args =3D NULL; @@ -126,9 +125,7 @@ testCompareXMLToArgvHelper(const void *data) dmargs =3D g_strdup_printf("%s/bhyvexml2argvdata/bhyvexml2argv-%s.devm= ap", abs_srcdir, info->name); =20 - ret =3D testCompareXMLToArgvFiles(xml, args, ldargs, dmargs, info->fla= gs); - - return ret; + return testCompareXMLToArgvFiles(xml, args, ldargs, dmargs, info->flag= s); } =20 static int --=20 2.26.2