From nobody Mon Feb 9 12:42:35 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1600070532; cv=none; d=zohomail.com; s=zohoarc; b=OFPOd8JDpmnMJeMrkAX96fp2Ws9WjSgPGhPuIbxuYn11fPe3/ZE6G0ZYowMwugDQgIn+WmxB1j+xAD0bYvTrN6VgwRdE8Xkv2uacdCChrT+irK3E63p25yD0fBshtt2VxCzU8cahkvoWps2lDLqAnuNgwTvmk3b5e1jE7KezTeo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600070532; h=Content-Type:Content-Transfer-Encoding:Cc: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=5KAYO+0h8ZQxRxgYz9uAXRTT1/AuPGKR8+IVzR2phew=; b=YK/fox36v52dbLK6kAOoKHify9jr20DJVn1aW8B6SB0GQxz+2csbolAcwnVAXcnaryYJbIf3JdH0VlfSoYlQ17v2eFZLNh9cvyMMu+5vWRoZligmvjWtVNy7pyXtFSr4Ogkn1+GTBLYuhNGw+F2Tx/v5SCMFv+PQ8m/lC55Kw6A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1600070532742682.090940611424; Mon, 14 Sep 2020 01:02:12 -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-188-kZVSA13ROD-PNDTTBx4fNA-1; Mon, 14 Sep 2020 04:02:08 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4BF981005E6E; Mon, 14 Sep 2020 08:02:03 +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 2768E1002D4E; Mon, 14 Sep 2020 08:02:03 +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 E6A158C7C1; Mon, 14 Sep 2020 08:02:02 +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 08E821X9008636 for ; Mon, 14 Sep 2020 04:02:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 928591A837; Mon, 14 Sep 2020 08:02:01 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-156.ams2.redhat.com [10.36.112.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD68519C66; Mon, 14 Sep 2020 08:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600070531; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=5KAYO+0h8ZQxRxgYz9uAXRTT1/AuPGKR8+IVzR2phew=; b=UO651fWrddiL01hYKw3cXfBzbWekrtB0w8by6ybmihueoNTJ05uf3RFONsRVXppVnC4cj4 lAbvXWrb9XgebQ+XmMNtxKxBSX7dJW9tzctgEnLIf07YWO1zdtFu9Ppgjx2PfWAalyBneX qs75NoZ1FicyBFTN2dMFviDuY530lSc= X-MC-Unique: kZVSA13ROD-PNDTTBx4fNA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/7] tests: Fix false positive in testConfRoundTrip. Date: Mon, 14 Sep 2020 10:01:48 +0200 Message-Id: <20200914080154.26361-2-twiederh@redhat.com> In-Reply-To: <20200914080154.26361-1-twiederh@redhat.com> References: <20200914080154.26361-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" testConfRoundTrip would return 0 (success) if virConfWriteMem returned 0 (n= othing written) and virTestCompareToFile failed. Signed-off-by: Tim Wiederhake --- tests/virconftest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/virconftest.c b/tests/virconftest.c index ab29b5b712..cac3718495 100644 --- a/tests/virconftest.c +++ b/tests/virconftest.c @@ -51,8 +51,7 @@ static int testConfRoundTrip(const void *opaque) fprintf(stderr, "Failed to process %s\n", srcfile); goto cleanup; } - ret =3D virConfWriteMem(buffer, &len, conf); - if (ret < 0) { + if (virConfWriteMem(buffer, &len, conf) < 0) { fprintf(stderr, "Failed to serialize %s back\n", srcfile); goto cleanup; } --=20 2.26.2