From nobody Mon Feb 9 00:07:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1630789686; cv=none; d=zohomail.com; s=zohoarc; b=FqagPssRll9YXLyqKDikBFvxHm+CO5w2S7VdbEoIQW0Cta/g0MiAwcKvE1GNmxmavWWHJDsSF0lcwMN9bpI+871bdzwK31R86pK7O4DFsIM6Z8R9WycamAKLD3F9rbXkDZwDtIfpBcJ5Ftt3oxi6owTozRR6l2sqj30QQbhQNuY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630789686; 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=r51qFeNCF6ezEJGTgu3bmpvWeigLv7hcy+EbHtWkGOQ=; b=LEEFHZPaPFYMXsNIcQH9isxGmQWmtdh+g8R61KLHVA1Qo12FzIYiQ+UnmHogAKHlPMcrh4be9xGbJzBNfSlgEIDp27/ob4I7JS1/0UmtoI0g146tv5dQ8Wc8K65+ww83oQOrxxE+HIWolOlAwekEbf8ynOkTjDtw48wFLwXOWRA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1630789686019341.98146030971986; Sat, 4 Sep 2021 14:08:06 -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-433-hih2C5xfPYaUhmz9vAmdWQ-1; Sat, 04 Sep 2021 17:07:34 -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 27D2CFC86; Sat, 4 Sep 2021 21:07:30 +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 0C7FE69FC9; Sat, 4 Sep 2021 21:07:30 +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 D4C13180B44F; Sat, 4 Sep 2021 21:07:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 184KimXv008913 for ; Sat, 4 Sep 2021 16:44:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3504A1F4; Sat, 4 Sep 2021 20:44:48 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id B33EA2619D for ; Sat, 4 Sep 2021 20:44:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630789685; 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=r51qFeNCF6ezEJGTgu3bmpvWeigLv7hcy+EbHtWkGOQ=; b=URVsG9QtTc/bU+COIEKTQQKCCBLqvqFW2iX9tIGTBNXTwbzVj9Mnjrd8oegpqM0k9Nwh0U oxM5oiQei8wjDqg7+Ffp1vlsDkxo1AEjEDQJj2TjpvSc995swL0exdoJI7qbUsGhwQuT06 LbWCvcyi3fHKSNNfOAhRdYmuC20TGTM= X-MC-Unique: hih2C5xfPYaUhmz9vAmdWQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 19/24] tests: vmx: remove pointless labels Date: Sat, 4 Sep 2021 22:44:17 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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) X-ZM-MESSAGEID: 1630789687412100001 Signed-off-by: J=C3=A1n Tomko --- tests/vmx2xmltest.c | 19 +++++++------------ tests/xml2vmxtest.c | 15 +++++---------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c index b7f232eb77..0974168cb4 100644 --- a/tests/vmx2xmltest.c +++ b/tests/vmx2xmltest.c @@ -68,7 +68,6 @@ testCapsInit(void) static int testCompareFiles(const char *vmx, const char *xml, bool should_fail_parse) { - int ret =3D -1; g_autofree char *vmxData =3D NULL; g_autofree char *formatted =3D NULL; g_autoptr(virDomainDef) def =3D NULL; @@ -79,31 +78,27 @@ testCompareFiles(const char *vmx, const char *xml, bool= should_fail_parse) def =3D virVMXParseConfig(&ctx, xmlopt, caps, vmxData); if (should_fail_parse) { if (!def) - ret =3D 0; + return 0; else VIR_TEST_DEBUG("passed instead of expected failure"); - goto cleanup; + return -1; } if (!def) - goto cleanup; + return -1; =20 if (!virDomainDefCheckABIStability(def, def, xmlopt)) { fprintf(stderr, "ABI stability check failed on %s", vmx); - goto cleanup; + return -1; } =20 if (!(formatted =3D virDomainDefFormat(def, xmlopt, VIR_DOMAIN_DEF_FORMAT_SECURE))) - goto cleanup; + return -1; =20 if (virTestCompareToFile(formatted, xml) < 0) - goto cleanup; + return -1; =20 - ret =3D 0; - - cleanup: - - return ret; + return 0; } =20 struct testInfo { diff --git a/tests/xml2vmxtest.c b/tests/xml2vmxtest.c index 8a03237b16..60185746a8 100644 --- a/tests/xml2vmxtest.c +++ b/tests/xml2vmxtest.c @@ -70,7 +70,6 @@ testCapsInit(void) static int testCompareFiles(const char *xml, const char *vmx, int virtualHW_version) { - int result =3D -1; g_autofree char *formatted =3D NULL; g_autoptr(virDomainDef) def =3D NULL; =20 @@ -78,25 +77,21 @@ testCompareFiles(const char *xml, const char *vmx, int = virtualHW_version) VIR_DOMAIN_DEF_PARSE_INACTIVE); =20 if (def =3D=3D NULL) - goto failure; + return -1; =20 if (!virDomainDefCheckABIStability(def, def, xmlopt)) { fprintf(stderr, "ABI stability check failed on %s", xml); - goto failure; + return -1; } =20 formatted =3D virVMXFormatConfig(&ctx, xmlopt, def, virtualHW_version); if (formatted =3D=3D NULL) - goto failure; + return -1; =20 if (virTestCompareToFile(formatted, vmx) < 0) - goto failure; + return -1; =20 - result =3D 0; - - failure: - - return result; + return 0; } =20 struct testInfo { --=20 2.31.1