From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by sourceware.org (Postfix) with ESMTPS id 259D03858D33 for ; Wed, 22 Feb 2023 12:58:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 259D03858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-pj1-x1031.google.com with SMTP id d1-20020a17090a3b0100b00229ca6a4636so8911932pjc.0 for ; Wed, 22 Feb 2023 04:58:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=5jIrOkWn1xBRYXt/3SPkN2ELgTCDUBN3dqIkPiUYVPE=; b=J8IljMGwO9XCHn3NzWIxBPzRmHr6bvJnZwtetd3Uj5zhwwC/SORZOmnMcfdMgqtaIA 7LNtN8Ont0d3ARgac/UlXXqEv9LQAk+JrnCcZNKGetrAduyNoVmZ70KcDcgiArfpR3zF k4IB73VY8hZJ6FtlUcWiupgaijQz4Zhr0vA+DepdxYCwfxMC12iBr77DAmzbOl/S4fFy m+PObDuwpaCU2hid1ta+tjGkGuGWLFnlL4xBCnmMVIuW1EV2iz7xVxyv8Qnp0FvOC8uw ANUz2mTldaQcRd8SIowO0qbG3EoCC71ROA55spA9C9SvKIAQTHYfcMP2YSZ+9kTECjtl e5lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5jIrOkWn1xBRYXt/3SPkN2ELgTCDUBN3dqIkPiUYVPE=; b=QzATF2utFKhL4L2oWhhZ/XdTR2Nhs6Xu1L131iSw42vsgDX4tVILsfLN6OLKxC4IQT 4iQRtuFpeks0BDDABHqFG/xw3YS2BJdSMIaiYs4HNHaC5QM/BGazLkoSir5dHNLz8n/A ZNIvkqGG/jUCIEK4dxLW/ZBvHvPFeplkD10HFPEXbGanXVsqK7IwCuEw3lzhWNU4m+ei YjYgKMmtVasfTCVhrkiKG9fOOGejyE3ssXUiS0t7jWcrzBtEg9RvhPntFzQDvCyz3m1H Wq7Suol40nzVyROFauOlA5JtON8D+H+hP6lahCg7Q1oMXZMCcoVRLXc2Gbr8+iReyVKw d7PQ== X-Gm-Message-State: AO0yUKWY2yVCjlxKfFlBw1lOCNBAQ8qNN42RQxv3jmiUzICX/e8ne7Ca eyv59MW0Lo90daL2dEhLwkjOWylTrGrd4DZ9BvuKUQ== X-Google-Smtp-Source: AK7set9kUga5ohzxt7w5Gb96z/aOmpO0iWv5kS6cR14MlhfXtypdYIYCaKtR0WE8j/FRi5K+ySCOo4rnWHZjnHiGiUc= X-Received: by 2002:a17:90b:38ce:b0:230:7e4f:c243 with SMTP id nn14-20020a17090b38ce00b002307e4fc243mr1990201pjb.98.1677070686171; Wed, 22 Feb 2023 04:58:06 -0800 (PST) MIME-Version: 1.0 References: <20230221161442.1554824-1-chigot@adacore.com> In-Reply-To: From: =?UTF-8?Q?Cl=C3=A9ment_Chigot?= Date: Wed, 22 Feb 2023 13:57:55 +0100 Message-ID: Subject: Re: [PATCH] testsuite: prune DOS drive letter in test outputs To: Jan Beulich Cc: amodra@gmail.com, binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Jan, On Wed, Feb 22, 2023 at 9:26 AM Jan Beulich wrote: > > On 21.02.2023 17:14, Cl=C3=A9ment Chigot wrote: > > --- a/binutils/testsuite/lib/binutils-common.exp > > +++ b/binutils/testsuite/lib/binutils-common.exp > > @@ -687,6 +687,22 @@ if ![string length [info proc prune_warnings]] { > > } > > } > > > > +# prune_dump_output OUTPUT > > +# > > +# Clean up the output from system specific or unwanted characters. > > +# This allows to simplify the regexp inside dump tests. > > +proc prune_dump_output { output } { > > + if [ishost "*-*-mingw*"] { > > Cygwin as well then? I don't think so. AFAIK, Cygwin is using Unix path not DOS like ones. Moreover, include/filenames.h seems to say the same. HAS_DRIVE_SPEC is not defined for Cygwin. > > + # Prune DOS drive letter from an absolute path if it appears > > + # at the beginning of a line. > > + regsub -all "(^|\n)\[\[:upper:\]\]:" $output "\\1" output > > Drive letters aren't guaranteed upper case, are they? I thought so, but it seems not. I'll change that. > I also think this > may end up too lax, as there may be messages which don't start with a > path. I would expect that you want to also match "warning:", "error:", > and alike infixes. Plus wouldn't you better match (but not remove) the > first \ or / following the colon? Yeah, that was my opinion too. But I had trouble with TCL regexps not wanting to detect \... So, I still submit a first patch to have your feedbacks on that. I'm not sure how common "LETTER:" can appear in binutils tests, thus it might have been false concerns on my side. But it seems not. I'll try to improve that. > > --- a/ld/testsuite/ld-elf/noinit-sections-2.l > > +++ b/ld/testsuite/ld-elf/noinit-sections-2.l > > @@ -1,5 +1,5 @@ > > #... > > -(|.:)[^:]*: warning: orphan section `.noinit.var_noinit' from \S+ bein= g placed in section `.noinit.var_noinit' > > +[^:]*: warning: orphan section `.noinit.var_noinit' from \S+ being pla= ced in section `.noinit.var_noinit' > > #... > > -(|.:)[^:]*: warning: orphan section `.gnu.linkonce.n.var_noinit2' from= \S+ being placed in section `.gnu.linkonce.n.var_noinit2' > > +[^:]*: warning: orphan section `.gnu.linkonce.n.var_noinit2' from \S+ = being placed in section `.gnu.linkonce.n.var_noinit2' > > #pass > > Did you commit the earlier patch, which now needs reverting? No, this is not the same. I submitted two commits dealing with that issue. - ld/testsuite: handle Windows drive letter in a noinit test. which was merged on Monday. - ld/testsuite: handle Windows drive letter in persistent section. which ends up with this patch. Thus I'm reverting the one that I've been already merged. Cl=C3=A9ment