GNU bug report logs - #27555
cygwin surrogate-pair test now fails (since grep-2.22, and no one noticed)

Previous Next

Package: grep;

Reported by: Jim Meyering <jim <at> meyering.net>

Date: Sun, 2 Jul 2017 15:58:01 UTC

Severity: minor

Merged with 49983, 51698

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27555 in the body.
You can then email your comments to 27555 AT debbugs.gnu.org in the normal way.

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#27555; Package grep. (Sun, 02 Jul 2017 15:58:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Meyering <jim <at> meyering.net>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Sun, 02 Jul 2017 15:58:02 GMT) Full text and rfc822 format available.

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

From: Jim Meyering <jim <at> meyering.net>
To: Aharon Robbins <arnold <at> skeeve.com>, bug-grep <at> gnu.org
Cc: Paul Eggert <eggert <at> cs.ucla.edu>
Subject: cygwin surrogate-pair test now fails (since grep-2.22,
 and no one noticed)
Date: Sun, 2 Jul 2017 08:57:00 -0700
On Sun, Jul 2, 2017 at 12:11 AM,  <arnold <at> skeeve.com> wrote:
> Jim Meyering <jim <at> meyering.net> wrote:
>
>> On Fri, Jun 30, 2017 at 12:55 AM,  <arnold <at> skeeve.com> wrote:
>> > Jim Meyering <jim <at> meyering.net> wrote:
>> >
>> >> > Do you still want the log? If so I'll send it...
>> >>
>> >> Yes, please, in case it's easy to fix.
>> >
>> > Attached. Thanks!
>>
>> Thanks.
>> I've determined the cause, at least. The sole caller of mbstoupper
>> (which contained the relevant __CYGWIN__-specific
>> surrogate-pair-handling code) was removed by the improvements of
>> v2.21-63-g8a33cde, and not long after, I noticed that mbstoupper was
>> no longer used, so removed it altogether.
>>
>> Since this affects surrogate-pairs only on cygwin, I'm not going to do
>> anything about this prior to release. After release, I'll make that
>> test skip or maybe even remove it altogether.
>
> OK, glad the log was helpful. In the future I will try to remember to
> send it along if I see failures.
>
> Do you want to document this cygwin issue as a known issue somewhere? :-)

Sure. I've adjusted the subject and added bug-grep@ so we get an
auto-assigned issue number in the tracker.




Merged 27555 51698. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Tue, 16 Nov 2021 18:13:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-grep <at> gnu.org:
bug#27555; Package grep. (Wed, 24 Nov 2021 01:33:01 GMT) Full text and rfc822 format available.

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

From: Duncan Roe <duncan_roe <at> optusnet.com.au>
To: eggert <at> cs.ucla.edu,
	27555 <at> debbugs.gnu.org
Cc: Duncan Roe <duncan_roe <at> optusnet.com.au>
Subject: Re: bug#27555: cygwin surrogate-pair test now fails
Date: Wed, 24 Nov 2021 12:31:42 +1100
Patch is in the next email. Here is a comparison between surrogate-pair.log
under Linux and Cygwin (only the relevant part of the diff)

*** 145,217 ****
  + case $io_pair in
  ++ cut -c1-6
  ++ uname -s
! + '[' Linux '!=' CYGWIN ']'
! + for opt in ''\'''\''' -i -E -F -iE -iF
! + grep --file=in in
! + compare out in
! + compare_dev_null_ out in
! + test 2 = 2
! + test xout = x/dev/null
! + test xin = x/dev/null
! + return 2
! + case $? in
! + compare_ out in
! + diff -u out in
! + for opt in ''\'''\''' -i -E -F -iE -iF
! + grep --file=in -i in
! + compare out in
! + compare_dev_null_ out in
! + test 2 = 2
! + test xout = x/dev/null
! + test xin = x/dev/null
! + return 2
! + case $? in
! + compare_ out in
! + diff -u out in
! + for opt in ''\'''\''' -i -E -F -iE -iF
! + grep --file=in -E in
! + compare out in
! + compare_dev_null_ out in
! + test 2 = 2
! + test xout = x/dev/null
! + test xin = x/dev/null
! + return 2
! + case $? in
! + compare_ out in
! + diff -u out in
! + for opt in ''\'''\''' -i -E -F -iE -iF
! + grep --file=in -F in
! + compare out in
! + compare_dev_null_ out in
! + test 2 = 2
! + test xout = x/dev/null
! + test xin = x/dev/null
! + return 2
! + case $? in
! + compare_ out in
! + diff -u out in
! + for opt in ''\'''\''' -i -E -F -iE -iF
! + grep --file=in -iE in
! + compare out in
! + compare_dev_null_ out in
! + test 2 = 2
! + test xout = x/dev/null
! + test xin = x/dev/null
! + return 2
! + case $? in
! + compare_ out in
! + diff -u out in
! + for opt in ''\'''\''' -i -E -F -iE -iF
! + grep --file=in -iF in
! + compare out in
! + compare_dev_null_ out in
! + test 2 = 2
! + test xout = x/dev/null
! + test xin = x/dev/null
! + return 2
! + case $? in
! + compare_ out in
! + diff -u out in
  + Exit 0
  + set +e
  + exit 0
--- 123,129 ----
  + case $io_pair in
  ++ cut -c1-6
  ++ uname -s
! + '[' CYGWIN '!=' CYGWIN ']'
  + Exit 0
  + set +e
  + exit 0

Duncan Roe (1):
  tests: make surrogate-pair pass under Cygwin

 NEWS                 | 4 ++++
 tests/surrogate-pair | 2 ++
 2 files changed, 6 insertions(+)

-- 
2.17.5





Information forwarded to bug-grep <at> gnu.org:
bug#27555; Package grep. (Wed, 24 Nov 2021 01:33:02 GMT) Full text and rfc822 format available.

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

From: Duncan Roe <duncan_roe <at> optusnet.com.au>
To: eggert <at> cs.ucla.edu,
	27555 <at> debbugs.gnu.org
Cc: Duncan Roe <duncan_roe <at> optusnet.com.au>
Subject: [PATCH 1/1] tests: make surrogate-pair pass under Cygwin
Date: Wed, 24 Nov 2021 12:31:43 +1100
* NEWS: Add to "Bug fixes" (3 bugs fixed)
* tests/surrogate-pair: Skip 3rd test if cygwin

Signed-off-by: Duncan Roe <duncan_roe <at> optusnet.com.au>
---
 NEWS                 | 4 ++++
 tests/surrogate-pair | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/NEWS b/NEWS
index 5015580..e440932 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,10 @@ GNU grep NEWS                                    -*- outline -*-
   The -s option no longer suppresses "binary file matches" messages.
   [Bug#51860 introduced in grep 3.5]
 
+  The last test in surrogate-pair would fail under Cygwin owing to a permanent
+  restriction. Skip this test so the rest of surrogate-pair passes.
+  [Bug#27555, Bug#49983, Bug#51698]
+
 
 * Noteworthy changes in release 3.7 (2021-08-14) [stable]
 
diff --git a/tests/surrogate-pair b/tests/surrogate-pair
index a91fa36..784b8f0 100755
--- a/tests/surrogate-pair
+++ b/tests/surrogate-pair
@@ -52,6 +52,8 @@ case $io_pair in
 esac
 
 # Also test whether a surrogate-pair in the search string works.
+# This never works under cygwin, so skip it there.
+[ "$(uname -s | cut -c1-6)" != CYGWIN ] || Exit $fail
 for opt in '' -i -E -F -iE -iF; do
   grep --file=in $opt in > out 2>&1 || fail=1
   compare out in || fail=1
-- 
2.17.5





Severity set to 'minor' from 'normal' Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Wed, 24 Nov 2021 02:30:02 GMT) Full text and rfc822 format available.

Merged 27555 49983 51698. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Wed, 24 Nov 2021 02:30:02 GMT) Full text and rfc822 format available.

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Wed, 24 Nov 2021 02:36:02 GMT) Full text and rfc822 format available.

Notification sent to Jim Meyering <jim <at> meyering.net>:
bug acknowledged by developer. (Wed, 24 Nov 2021 02:36:02 GMT) Full text and rfc822 format available.

Message #22 received at 27555-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Duncan Roe <duncan_roe <at> optusnet.com.au>
Cc: 27555-done <at> debbugs.gnu.org
Subject: Re: [PATCH 1/1] tests: make surrogate-pair pass under Cygwin
Date: Tue, 23 Nov 2021 18:34:51 -0800
[Message part 1 (text/plain, inline)]
I installed the attached fancier patch instead; please give it a try.

I'm boldly marking the bug as fixed; we can unmark it later if I'm wrong.
[0001-tests-skip-surrogate-search-test-on-Cygwin.patch (text/x-patch, attachment)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Wed, 24 Nov 2021 02:36:02 GMT) Full text and rfc822 format available.

Notification sent to Gary Johnson <garyjohn <at> spocom.com>:
bug acknowledged by developer. (Wed, 24 Nov 2021 02:36:02 GMT) Full text and rfc822 format available.

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Wed, 24 Nov 2021 02:36:02 GMT) Full text and rfc822 format available.

Notification sent to Duncan Roe <duncan_roe <at> optusnet.com.au>:
bug acknowledged by developer. (Wed, 24 Nov 2021 02:36:02 GMT) Full text and rfc822 format available.

Removed tag(s) moreinfo. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Wed, 24 Nov 2021 02:38:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-grep <at> gnu.org:
bug#27555; Package grep. (Wed, 24 Nov 2021 08:51:01 GMT) Full text and rfc822 format available.

Message #37 received at 27555-done <at> debbugs.gnu.org (full text, mbox):

From: Duncan Roe <duncan_roe <at> optusnet.com.au>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 27555-done <at> debbugs.gnu.org
Subject: Re: [PATCH 1/1] tests: make surrogate-pair pass under Cygwin
Date: Wed, 24 Nov 2021 19:50:32 +1100
On Tue, Nov 23, 2021 at 06:34:51PM -0800, Paul Eggert wrote:
> I installed the attached fancier patch instead; please give it a try.
>
> I'm boldly marking the bug as fixed; we can unmark it later if I'm wrong.

> From 1ef60a1566e6c2df610bf29bd2c2994d58dd1e89 Mon Sep 17 00:00:00 2001
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Tue, 23 Nov 2021 18:28:10 -0800
> Subject: [PATCH] tests: skip surrogate-search test on Cygwin
>
> Cygwin does not support surrogate-pair search strings, so
> skip the test there (Bug#27555).
> * tests/Makefile.am (TESTS): Add surrogate-search.
> * tests/surrogate-pair: Remove surrogate-search test,
> which is now done by surrogate-search.
> * tests/surrogate-search: New test, which is skipped on Cygwin.
[...]
All good. New surrogate-search test is skipped under Cygwin.

What about Bug#49983? It's complaining about the same issue.

Cheers ... Duncan.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 22 Dec 2021 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 124 days ago.

Previous Next


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