GNU bug report logs - #71468
backref-multibyte-slow test fails on Cygwin

Previous Next

Package: grep;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Mon, 10 Jun 2024 12:33:02 UTC

Severity: normal

To reply to this bug, email your comments to 71468 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#71468; Package grep. (Mon, 10 Jun 2024 12:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruno Haible <bruno <at> clisp.org>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Mon, 10 Jun 2024 12:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Haible <bruno <at> clisp.org>
To: bug-grep <at> gnu.org
Subject: backref-multibyte-slow test fails on Cygwin
Date: Mon, 10 Jun 2024 14:08:05 +0200
[Message part 1 (text/plain, inline)]
Building the current grep (git master) with the current Gnulib
on Cygwin 3.5.3, I see a test failure:

FAIL: backref-multibyte-slow

The detailed log is attached.

Bruno
[log.gz (application/gzip, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#71468; Package grep. (Sun, 02 Mar 2025 05:39:02 GMT) Full text and rfc822 format available.

Message #8 received at 71468 <at> debbugs.gnu.org (full text, mbox):

From: Collin Funk <collin.funk1 <at> gmail.com>
To: 71468 <at> debbugs.gnu.org, Bruno Haible <bruno <at> clisp.org>
Subject: backref-multibyte-slow test fails on Cygwin
Date: Sat, 01 Mar 2025 21:38:46 -0800
Hi Bruno,

You wrote:
> Building the current grep (git master) with the current Gnulib
> on Cygwin 3.5.3, I see a test failure:

> FAIL: backref-multibyte-slow

The issue here seems to be a carriage return emitted by Perl generated
in these lines:

+ gawk 'BEGIN {for (i=0; i<13000; i++) print "aba"}' /dev/null
++ LC_ALL=C
++ perl -le 'use Time::HiRes qw(time); my $s = time();
              system q,grep -E '\''^([a-z]).\1$'\'' in > junk,;
              my $elapsed = time() - $s; print int (1 + 10 * $elapsed)'
+ max_seconds=$'1\r'
+ test $'1\r' = 1

After that, the variable is used and causes an error to be emitted in
the output. Here is the diff with expected output:

+ diff -u out-en_US.UTF-8 in
--- out-en_US.UTF-8	2024-06-10 05:17:21.428471600 +0000
+++ in	2024-06-10 05:17:21.147110300 +0000
@@ -1,2 +1,13000 @@
-timeout: invalid time interval ‘1\rs’
-Try 'timeout --help' for more information.
+aba

Do you know what Perl is being used on the Cygwin CI machines?

As far as I can tell, you don't install the Cygwin Perl package in
many-platforms.yml [1]. GitHub says Windows CI machines come with Perl
installed [2], but I assume this would be some Windows distribution like
Strawberry Perl [3].

I haven't used Windows enough to know for sure, but I assume the Native
Windows Perl distributions emit a carriage return while the Cygwin
version does not. I believe that something similar occurs with Native
Windows Python vs. Cygwin Python.

Collin

[1] https://github.com/gnu-grep/ci-check/blob/36c4af9a80f2abf8aa67ab8d4c12e9a9c51c2595/.github/workflows/many-platforms.yml#L657
[2] https://github.com/actions/runner-images/blob/a88fc4db06ae2350cb3128627b7fe4b5ee847f8e/images/windows/Windows2022-Readme.md?plain=1#L23
[3] https://strawberryperl.com/




Information forwarded to bug-grep <at> gnu.org:
bug#71468; Package grep. (Sun, 02 Mar 2025 09:17:02 GMT) Full text and rfc822 format available.

Message #11 received at 71468 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Haible <bruno <at> clisp.org>
To: 71468 <at> debbugs.gnu.org, Collin Funk <collin.funk1 <at> gmail.com>
Subject: Re: backref-multibyte-slow test fails on Cygwin
Date: Sun, 02 Mar 2025 10:16:53 +0100
Hi Collin,

> The issue here seems to be a carriage return emitted by Perl generated
> in these lines:
> 
> + gawk 'BEGIN {for (i=0; i<13000; i++) print "aba"}' /dev/null
> ++ LC_ALL=C
> ++ perl -le 'use Time::HiRes qw(time); my $s = time();
>               system q,grep -E '\''^([a-z]).\1$'\'' in > junk,;
>               my $elapsed = time() - $s; print int (1 + 10 * $elapsed)'
> + max_seconds=$'1\r'
> + test $'1\r' = 1

I see.

> Do you know what Perl is being used on the Cygwin CI machines?
> 
> As far as I can tell, you don't install the Cygwin Perl package in
> many-platforms.yml [1]. GitHub says Windows CI machines come with Perl
> installed [2], but I assume this would be some Windows distribution like
> Strawberry Perl [3].

It's a native Windows Perl (I checked some time ago). The default PATH
contains these elements:
  C:\Strawberry\c\bin
  C:\Strawberry\perl\site\bin
  C:\Strawberry\perl\bin

> I haven't used Windows enough to know for sure, but I assume the Native
> Windows Perl distributions emit a carriage return while the Cygwin
> version does not.

Quite likely, yes.

Bruno







This bug report was last modified 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.