From nobody Sun May 5 08:42:30 2024 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=1626856284; cv=none; d=zohomail.com; s=zohoarc; b=l8K5+VQIcNlc3t2R9mp9qmFe5QaeqW1CW/NUopQ0IKYMuuMsI9HBHNuSiQusb5Fq75a4fRt4ST7AxmJIydLKGGZndeT3lrnp55pep9B/QcRb2HkkqWdkWlVe6/Dy/mIBrHJCgZrHAOie8/iBrJHfqMFAUsFDmNLUBJU1RVXCe9M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626856284; 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=AlyQrA/VsqiD7eE/3iNS1aQAU9rW7PaVP91ZdiOXjfg=; b=TaXkQFpqZdxogUvmGR67f4pdVlg2LweKV6ltaBhj5Rs+yZqr+0gwIPSaZ7sdkA5sT6auuVCx5HuNEoN+600EZ85fOfOdd40BtjjTlQ2ffWTPmJx87INDq2qvqT/w5MuAQEYyzUmyRJedX2PQ2EqONlITHy2otRqNKyCbUTcHHd8= 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 1626856284560168.98212402604008; Wed, 21 Jul 2021 01:31:24 -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-230-IAvck2VNPfWDrm_9kYXYoQ-1; Wed, 21 Jul 2021 04:31:21 -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 B2D16CC655; Wed, 21 Jul 2021 08:30:58 +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 E658E69CB7; Wed, 21 Jul 2021 08:30:56 +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 AC47F1801028; Wed, 21 Jul 2021 08:30:54 +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 16L8PVoj019512 for ; Wed, 21 Jul 2021 04:25:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7061869284; Wed, 21 Jul 2021 08:25:31 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.43.2.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id E085E69326 for ; Wed, 21 Jul 2021 08:25:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626856283; 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=AlyQrA/VsqiD7eE/3iNS1aQAU9rW7PaVP91ZdiOXjfg=; b=SYd4R2KRVHORlRrYLIZoNrHtKGOXte/ORAlwnyxxyZLZI/hTj8NkBcfVF33zEfP/JeX5UN CtHqatb480rrVpr7DsiaWI0sBNnwZFsFOP1SnTMy7n60KmJh8MaUQvaOwutNYs6MJFIdvJ PaizkB3bIpIwtQ7PELsmMLILpAYouco= X-MC-Unique: IAvck2VNPfWDrm_9kYXYoQ-1 From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH] lxcxml2xmltest: Substitute 'inactive' variable with 'active' Date: Wed, 21 Jul 2021 10:25:22 +0200 Message-Id: <8e5e501747857a5795dc5e11b71e29dc4ff78371.1626855670.git.khanicov@redhat.com> 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626856286901100001 Content-Type: text/plain; charset="utf-8" I removed negation from the name of a variable to make the code more readable. Signed-off-by: Kristina Hanicova Reviewed-by: Michal Privoznik --- tests/lxcxml2xmltest.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/lxcxml2xmltest.c b/tests/lxcxml2xmltest.c index 00341ad695..69c333b9b5 100644 --- a/tests/lxcxml2xmltest.c +++ b/tests/lxcxml2xmltest.c @@ -21,7 +21,7 @@ static virLXCDriver *driver; struct testInfo { const char *name; int different; - bool inactive_only; + bool active_only; unsigned int parse_flags; }; =20 @@ -40,7 +40,7 @@ testCompareXMLToXMLHelper(const void *data) =20 ret =3D testCompareDomXML2XMLFiles(driver->caps, driver->xmlopt, xml_i= n, info->different ? xml_out : xml_in, - !info->inactive_only, + info->active_only, info->parse_flags, TEST_COMPARE_DOM_XML2XML_RESULT_SUCCE= SS); VIR_FREE(xml_in); @@ -57,9 +57,9 @@ mymain(void) if (!(driver =3D testLXCDriverInit())) return EXIT_FAILURE; =20 -# define DO_TEST_FULL(name, is_different, inactive, parse_flags) \ +# define DO_TEST_FULL(name, is_different, active, parse_flags) \ do { \ - const struct testInfo info =3D {name, is_different, inactive, \ + const struct testInfo info =3D {name, is_different, active, \ parse_flags}; \ if (virTestRun("LXC XML-2-XML " name, \ testCompareXMLToXMLHelper, &info) < 0) \ @@ -67,10 +67,10 @@ mymain(void) } while (0) =20 # define DO_TEST(name) \ - DO_TEST_FULL(name, 0, false, 0) + DO_TEST_FULL(name, 0, true, 0) =20 # define DO_TEST_DIFFERENT(name) \ - DO_TEST_FULL(name, 1, false, 0) + DO_TEST_FULL(name, 1, true, 0) =20 /* Unset or set all envvars here that are copied in lxcdBuildCommandLi= ne * using ADD_ENV_COPY, otherwise these tests may fail due to unexpected --=20 2.31.1