From nobody Wed Nov 27 07:51:07 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) 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 17232073334861014.1957698368421; Fri, 9 Aug 2024 05:42:13 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 69E1414FC; Fri, 9 Aug 2024 08:42:12 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id C6D61157C; Fri, 9 Aug 2024 08:41:02 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 05D661395; Fri, 9 Aug 2024 08:40:58 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 8C15A1425 for ; Fri, 9 Aug 2024 08:40:57 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-632-9WUKfgIlPGO-7GuYrKKcfw-1; Fri, 09 Aug 2024 08:40:56 -0400 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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 mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 32F751944AB0 for ; Fri, 9 Aug 2024 12:40:55 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.19]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 26C901955E82 for ; Fri, 9 Aug 2024 12:40:53 +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.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723207257; h=from:from: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; bh=Lwkcjdbbr4j3BnVFolCIFcTETryrhYnO6DJ2E8HPzgw=; b=iXb+dHfiWUVxAzkFs827RGkCOKbrrEH1H5ys+t4FX6pNfYe5moJ8jInm5tDtD0rFNniN/u l6VwwJS2KKi0a6BjZfwDeBB14pa0TJluBaFBSyiieNARaVguGOtxsbd+hpZddlGbx4hRPv ZLudjWcTFbjRphX2ua/1dUxWSROUKLk= X-MC-Unique: 9WUKfgIlPGO-7GuYrKKcfw-1 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH v2 2/3] testQemuConfXMLCommon: Strip 'abs_srcdir' paths from '.err' files in qemuxmlconftest Date: Fri, 9 Aug 2024 14:40:48 +0200 Message-ID: <9c04f4e7276f035e00a1093e8cb2577bb54bc488.1723207140.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: CEVXXKRHDUVSBMNBUCENDQZCWYSIC3QG X-Message-ID-Hash: CEVXXKRHDUVSBMNBUCENDQZCWYSIC3QG X-MailFrom: pkrempa@redhat.com 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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1723207334925116600 Content-Type: text/plain; charset="utf-8" Upcoming patch will result in having the build directory path in some of the output files. Replace it by a constant 'ABS_SRCDIR' to avoild breaking tests. Signed-off-by: Peter Krempa --- tests/qemuxmlconftest.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c index 7e47c78150..5fe69db15f 100644 --- a/tests/qemuxmlconftest.c +++ b/tests/qemuxmlconftest.c @@ -687,8 +687,12 @@ testQemuConfXMLCommon(testQemuInfo *info, } if (info->flags & FLAG_EXPECT_PARSE_ERROR) { - g_autofree char *tmperr =3D g_strdup_printf("%s\n", NULLSTR(er= r->message)); - if (virTestCompareToFile(tmperr, info->errfile) >=3D 0) { + g_autoptr(GString) errstr =3D g_string_new(NULLSTR(err->messag= e)); + + g_string_replace(errstr, abs_srcdir, "ABS_SRCDIR", 0); + g_string_append_c(errstr, '\n'); + + if (virTestCompareToFile(errstr->str, info->errfile) >=3D 0) { info->prep_skip =3D true; } } --=20 2.45.2