From nobody Fri May 3 12:07:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1614880802; cv=none; d=zohomail.com; s=zohoarc; b=N3fkEkn2/0d8Jfktf0T6ua7YbX4yKNlCvrdYUkmfmCQinhq8XpAWj2UxU/WUn2KSXKeO1+huoXe5CG11teYegAWiqs+KqYGRUBaGb1HptZRhoWb8gbYXmABCPBV35YXqL2u70mIv0T0SPNx69k1gnJp4q8oD+kmuIapwUxGUckA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614880802; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=hNqMk0+I/iAwa/dLr599Mspp5tnzUpomUW901WsHm80=; b=MXng8H/4ZBBZMkQx06x+hXFZZbBATDcug3WtLvZptCnvyYo8shmk+oM2Yt67DNJkGpUq6TLtaA9uZsNn58kvuI3hshrYdgu52FOwMSi8badgioyzK/cBG2oHpSDJuEf90nZE652yhmyMge3txRendlb2bBTi7VKnDT9WpaI88iI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1614880802222648.2524884522599; Thu, 4 Mar 2021 10:00:02 -0800 (PST) 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-510-Xn6ATvJ_NY6l-qEwB0h2Tw-1; Thu, 04 Mar 2021 12:59:58 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EC2DE87A826; Thu, 4 Mar 2021 17:59:52 +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 B94405D705; Thu, 4 Mar 2021 17:59:52 +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 4818E1809C86; Thu, 4 Mar 2021 17:59:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 124HxpQl005227 for ; Thu, 4 Mar 2021 12:59:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id 88E005D762; Thu, 4 Mar 2021 17:59:51 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id E8C2B5D705 for ; Thu, 4 Mar 2021 17:59:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614880801; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=hNqMk0+I/iAwa/dLr599Mspp5tnzUpomUW901WsHm80=; b=faQBMDmQuE28Nms/gDyVWlS38pdFEdGfuyMJ01jELKzrVJKC4K5mmdCCtek1t0cxyx/ACc Y7sgwVxLuktYatKX62E+KShJxLTv8Esl/XsYgRqjCoWAG1tru+lEH2DIlsDkd2mNSVIcCm Ebr+1+WuZWQfrwwr6wScZ4kLBBDRTg8= X-MC-Unique: Xn6ATvJ_NY6l-qEwB0h2Tw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] tests: Don't return -1 as program return value Date: Thu, 4 Mar 2021 18:59:45 +0100 Message-Id: <8356bab419542ff500acbdbe1340b2e75ae6ca93.1614880785.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.15 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" In cases we use -1 for failure internally we still must return EXIT_FAILURE. Signed-off-by: Peter Krempa --- tests/qemucommandutiltest.c | 3 +-- tests/virnetdevbandwidthtest.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/qemucommandutiltest.c b/tests/qemucommandutiltest.c index 6291c3b787..03947d87bc 100644 --- a/tests/qemucommandutiltest.c +++ b/tests/qemucommandutiltest.c @@ -146,8 +146,7 @@ mymain(void) "server.2.type=3Dtcp," "server.2.host=3Dexample.com"); - return ret; - + return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } VIR_TEST_MAIN(mymain) diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c index 2e76af3d0c..6d0443876c 100644 --- a/tests/virnetdevbandwidthtest.c +++ b/tests/virnetdevbandwidthtest.c @@ -156,7 +156,7 @@ mymain(void) TC " filter add dev eth0 parent ffff: protocol all u32 ma= tch u32 0 0 " "police rate 5kbps burst 7kb mtu 64kb drop flowid :1\n")); - return ret; + return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virnetdevbandwidth")) --=20 2.29.2