From nobody Sun Feb 8 21:12:33 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=1669801747; cv=none; d=zohomail.com; s=zohoarc; b=jKZ6esffzt3hrflSCrqcGn03yzSPxB4RvO6vqmCM3uLARmXNJq5fGh94ZXzEgL2aPYl66FmiSLFBELIeIXqitkgtQ/gMnBXC1mEwa+ypROa+B8j20F9llEuEIwUv9UUdDgtp5gRNt1CkCVmy+Q1jVljp83uZRx5RoZVFaMl8t/o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669801747; 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=JUPmsuIc1AGga4qDpVMmGVKD09MiwDrkKVPIIdVKfnk=; b=jEEEiWc49u5UOVqmrIce2NRcX7UMAKOVXLpvCk+BxUAF0WYksAnTf2ufFNEQjVsJVxzYm13LPZW+FmZIb9+IOifJVy5SLhujmtdMQB2U2uIJ/2qEV32KAra2xmy8pBM/rLVAo1IoDVr4hOYUjzYSZcnGemV2akur13MRilrRquY= 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 1669801747725616.8222924659625; Wed, 30 Nov 2022 01:49:07 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-500-j6KwV6b0OC-OftoYpyIYzQ-1; Wed, 30 Nov 2022 04:48:23 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 44DE829324A9; Wed, 30 Nov 2022 09:48:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C591111E3FF; Wed, 30 Nov 2022 09:48:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 204AD1946A40; Wed, 30 Nov 2022 09:48:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2EDBB19465A4 for ; Wed, 30 Nov 2022 09:48:18 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 03D4A4B3FCE; Wed, 30 Nov 2022 09:48:18 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C48D4B3FC8 for ; Wed, 30 Nov 2022 09:48:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669801746; 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=JUPmsuIc1AGga4qDpVMmGVKD09MiwDrkKVPIIdVKfnk=; b=ZfuCBQV5zoGDeNGWh6wZ7bFwfUVpzZuJAfepG5wTZMXd//roK7L5CLErme9sWYMX9jJxLb 5EYkqj8o7hO03E0kE2cjtAIqBbGHtMaifmDsxubjh5K+js5UgIfI1O/Qx6/NdZykBBjbu3 NFfK0Wj2MB8gcd5mwEuUikBc96bKahs= X-MC-Unique: j6KwV6b0OC-OftoYpyIYzQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 8/9] tests: Don't wrap virTestDifference() arguments in NULLSTR() Date: Wed, 30 Nov 2022 10:48:10 +0100 Message-Id: <5c278b6e2922e47eddbe7de90122117c71bf5f48.1669801586.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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: 1669801748960100005 Content-Type: text/plain; charset="utf-8"; x-default="true" The virTestDifference() is perfectly capable of handling NULL arguments. There's no need to wrap arguments in NULLSTR(). Signed-off-by: Michal Privoznik --- tests/virnetdevbandwidthtest.c | 4 +--- tests/virnetdevopenvswitchtest.c | 8 ++------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c index d5e4092fc3..fced657811 100644 --- a/tests/virnetdevbandwidthtest.c +++ b/tests/virnetdevbandwidthtest.c @@ -93,9 +93,7 @@ testVirNetDevBandwidthSet(const void *data) } =20 if (STRNEQ_NULLABLE(exp_cmd, actual_cmd)) { - virTestDifference(stderr, - NULLSTR(exp_cmd), - NULLSTR(actual_cmd)); + virTestDifference(stderr, exp_cmd, actual_cmd); return -1; } =20 diff --git a/tests/virnetdevopenvswitchtest.c b/tests/virnetdevopenvswitcht= est.c index 57860f4bc4..e5883eb076 100644 --- a/tests/virnetdevopenvswitchtest.c +++ b/tests/virnetdevopenvswitchtest.c @@ -176,9 +176,7 @@ testVirNetDevOpenvswitchInterfaceSetQos(const void *dat= a) } =20 if (STRNEQ_NULLABLE(info->exp_cmd, actual_cmd)) { - virTestDifference(stderr, - NULLSTR(info->exp_cmd), - NULLSTR(actual_cmd)); + virTestDifference(stderr, info->exp_cmd, actual_cmd); return -1; } =20 @@ -207,9 +205,7 @@ testVirNetDevOpenvswitchInterfaceClearQos(const void *d= ata) } =20 if (STRNEQ_NULLABLE(info->exp_cmd, actual_cmd)) { - virTestDifference(stderr, - NULLSTR(info->exp_cmd), - NULLSTR(actual_cmd)); + virTestDifference(stderr, info->exp_cmd, actual_cmd); return -1; } =20 --=20 2.37.4