From nobody Mon Feb 9 16:12:32 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 17111956586681010.1503860562783; Sat, 23 Mar 2024 05:07:38 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7F6261EBD; Sat, 23 Mar 2024 08:07:37 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E8E5A228A; Sat, 23 Mar 2024 07:39:42 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B47A21D43; Sat, 23 Mar 2024 07:39:30 -0400 (EDT) Received: from mx1.osci.io (polly.osci.io [8.43.85.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 1A4AA1D43 for ; Sat, 23 Mar 2024 07:32:55 -0400 (EDT) Received: by mx1.osci.io (Postfix, from userid 994) id 74D9C223D5; Fri, 22 Mar 2024 13:56:36 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by mx1.osci.io (Postfix) with ESMTPS id 058F2223D4 for ; Fri, 22 Mar 2024 13:56:36 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-444-kQlHqeWrMQmjgmw2g0JWjw-1; Fri, 22 Mar 2024 13:56:33 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9A63080F7E4 for ; Fri, 22 Mar 2024 17:56:33 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id C5256492BDA for ; Fri, 22 Mar 2024 17:56:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: kQlHqeWrMQmjgmw2g0JWjw-1 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 15/35] virshtest: Drop support for testing against hardcoded strings Date: Fri, 22 Mar 2024 18:55:53 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: GO7ONKEDK7EXYEODLBA4WNDTFT4AYTR2 X-Message-ID-Hash: GO7ONKEDK7EXYEODLBA4WNDTFT4AYTR2 X-MailFrom: SRS0=Xa5W=K4=redhat.com=pkrempa@osci.io X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1711195659245100001 Now that all tests were converted, this is no longer needed. Signed-off-by: Peter Krempa --- tests/virshtest.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tests/virshtest.c b/tests/virshtest.c index 02bfb363c4..926f919d8d 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -36,7 +36,6 @@ static void testFilterLine(char *buffer, static int testCompareOutputLit(const char *expectFile, - const char *expectData, const char *filter, const char *const argv[]) { @@ -64,15 +63,8 @@ testCompareOutputLit(const char *expectFile, if (filter) testFilterLine(actual, filter); - if (expectData) { - if (virTestCompareToString(expectData, actual) < 0) - return -1; - } - - if (expectFile) { - if (virTestCompareToFileFull(actual, expectFile, false) < 0) - return -1; - } + if (virTestCompareToFileFull(actual, expectFile, false) < 0) + return -1; return 0; } @@ -103,7 +95,7 @@ static int testCompare(const void *data) abs_srcdir, info->testname); } - return testCompareOutputLit(outfile, NULL, info->filter, info->argv); + return testCompareOutputLit(outfile, info->filter, info->argv); } --=20 2.44.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org