From nobody Sun Feb 8 19:03:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1629465431; cv=none; d=zohomail.com; s=zohoarc; b=apvKwb8S7nbv7TamzpsaaVZnIxBY8PJtYBWzXSOuOviiqBMSUs/nZUsQf9X6D8mfSw2NCS2nmTBMZImAyTc6+mfmSLR/wWzqtD2E42wTmZng6FY+CFOokU0hJdHov9FBNZe6VigZ+0XlVPufbzbaSAnjOgscn37YkMlL8plf0iA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629465431; 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=o3t+AUOq14cL9jLUajifNyiJQhRq1btpJBbMfsggeYQ=; b=Ewp+wBUV/LpVZKnx+o/pKoft2ETmi0DSKrWd/Yvd7BFkNFbe9601pBtLFs5kl0Ro0W0QQZGN5CfqM1UcYnn6WbBEKFX5ahkExF0RRNMwitfCDfShqR6Zh/D+JoPFfuX1OIrcMBLtzqtMFPGlRk3Ui4wnM2xvyEiJbL9XZ8mRqAk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 162946543129698.18316228784795; Fri, 20 Aug 2021 06:17:11 -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-516-ki8EJITZMOSS3dV1tZb_Pw-1; Fri, 20 Aug 2021 09:17:08 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4A97B87D56C; Fri, 20 Aug 2021 13:17:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE231E2FA; Fri, 20 Aug 2021 13:17:01 +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 B93AC4BB7C; Fri, 20 Aug 2021 13:17:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 17KDFmTx016649 for ; Fri, 20 Aug 2021 09:15:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 44F221017CE5; Fri, 20 Aug 2021 13:15:48 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id BFA221002D71 for ; Fri, 20 Aug 2021 13:15:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629465430; 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=o3t+AUOq14cL9jLUajifNyiJQhRq1btpJBbMfsggeYQ=; b=KPg3+bbtVPMHgPB/9KfQ+DOSSRsU0EtQKcC0OfYWPCyuXKbg4bdc3Ik/XtWu3V0E8w6fC0 LSNR9CM23aizAGG1DXGyxe5u1iD+3bZ2nM5hhx/jE9WIJxgL42rS9w346pKOrTOMOGjKa6 CwYEcTcvA61alwtzbU2SahD/tZYsRE0= X-MC-Unique: ki8EJITZMOSS3dV1tZb_Pw-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 5/5] tests: virnetdev*: remove unnecessary labels Date: Fri, 20 Aug 2021 15:15:32 +0200 Message-Id: <239db02d8901d42cc0dd96595ab6b9e352d2861a.1629465240.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.84 on 10.5.11.23 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: 1629465431795100003 Signed-off-by: J=C3=A1n Tomko --- tests/virnetdevbandwidthtest.c | 9 +++------ tests/virnetdevopenvswitchtest.c | 18 ++++++------------ 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c index a17737ec40..eb4f47dfce 100644 --- a/tests/virnetdevbandwidthtest.c +++ b/tests/virnetdevbandwidthtest.c @@ -63,7 +63,6 @@ testVirNetDevBandwidthParse(virNetDevBandwidth **var, static int testVirNetDevBandwidthSet(const void *data) { - int ret =3D -1; const struct testSetStruct *info =3D data; const char *iface =3D info->iface; g_autoptr(virNetDevBandwidth) band =3D NULL; @@ -80,7 +79,7 @@ testVirNetDevBandwidthSet(const void *data) virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); =20 if (virNetDevBandwidthSet(iface, band, info->hierarchical_class, true)= < 0) - goto cleanup; + return -1; =20 if (!(actual_cmd =3D virBufferContentAndReset(&buf))) { /* This is interesting, no command has been executed. @@ -91,12 +90,10 @@ testVirNetDevBandwidthSet(const void *data) virTestDifference(stderr, NULLSTR(info->exp_cmd), NULLSTR(actual_cmd)); - goto cleanup; + return -1; } =20 - ret =3D 0; - cleanup: - return ret; + return 0; } =20 static int diff --git a/tests/virnetdevopenvswitchtest.c b/tests/virnetdevopenvswitcht= est.c index 1026c890cd..2a20ba82d0 100644 --- a/tests/virnetdevopenvswitchtest.c +++ b/tests/virnetdevopenvswitchtest.c @@ -152,7 +152,6 @@ testNameEscape(const void *opaque) static int testVirNetDevOpenvswitchInterfaceSetQos(const void *data) { - int ret =3D -1; const struct testSetQosStruct *info =3D data; const char *iface =3D info->iface; g_autoptr(virNetDevBandwidth) band =3D NULL; @@ -169,7 +168,7 @@ testVirNetDevOpenvswitchInterfaceSetQos(const void *dat= a) virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); =20 if (virNetDevOpenvswitchInterfaceSetQos(iface, band, vm_id, true) < 0) - goto cleanup; + return -1; =20 if (!(actual_cmd =3D virBufferContentAndReset(&buf))) { /* This is interesting, no command has been executed. @@ -180,19 +179,16 @@ testVirNetDevOpenvswitchInterfaceSetQos(const void *d= ata) virTestDifference(stderr, NULLSTR(info->exp_cmd), NULLSTR(actual_cmd)); - goto cleanup; + return -1; } =20 - ret =3D 0; - cleanup: - return ret; + return 0; } =20 =20 static int testVirNetDevOpenvswitchInterfaceClearQos(const void *data) { - int ret =3D -1; const struct testClearQosStruct *info =3D data; g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; g_autofree char *actual_cmd =3D NULL; @@ -203,7 +199,7 @@ testVirNetDevOpenvswitchInterfaceClearQos(const void *d= ata) virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); =20 if (virNetDevOpenvswitchInterfaceClearQos(iface, vmid) < 0) - goto cleanup; + return -1; =20 if (!(actual_cmd =3D virBufferContentAndReset(&buf))) { /* This is interesting, no command has been executed. @@ -214,12 +210,10 @@ testVirNetDevOpenvswitchInterfaceClearQos(const void = *data) virTestDifference(stderr, NULLSTR(info->exp_cmd), NULLSTR(actual_cmd)); - goto cleanup; + return -1; } =20 - ret =3D 0; - cleanup: - return ret; + return 0; } =20 static int --=20 2.31.1