bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Platform-testers] new snapshot available: grep-2.9.69-f91c


From: Jim Meyering
Subject: Re: [Platform-testers] new snapshot available: grep-2.9.69-f91c
Date: Fri, 11 Nov 2011 14:42:21 +0100

Dagobert Michelsen wrote:
> Hi Jim,
>
> Am 10.11.2011 um 18:09 schrieb Jim Meyering:
>> Dagobert Michelsen wrote:
>>> I still get failing tests similar to the ones I reported in
>>>  https://savannah.gnu.org/bugs/?29380
>>> There doesn't seem to have been any fixing in gnulib for this since.
>>> Platform is Solaris 9 Sparc with Sun Studio 12.
>> ...
>>
>> Thanks for reporting that, again.
>> If you feel like debugging it, that would be nice.
>> I think I've seen the same thing on Solaris 10.
>>
>>>> FAIL: test-exclude2.sh (exit: 1)
>>>> ================================
>>>>
>>>> *** excltmp.21000       Thu Nov 10 13:38:53 2011
>>>> --- -   Thu Nov 10 13:38:53 2011
>>>> ***************
>>>> *** 2,6 ****
>>>>  foo*: 1
>>>>  bar: 1
>>>>  foobar: 0
>>>> ! baz: 1
>>>>  bar/qux: 0
>>>> --- 2,6 ----
>>>>  foo*: 1
>>>>  bar: 1
>>>>  foobar: 0
>>>> ! baz: 0
>>>>  bar/qux: 0
>
> This test checks functionality from lib/exclude.c and that file contains
>
>> /* Non-GNU systems lack these options, so we don't need to check them.  */
>> #ifndef FNM_CASEFOLD
>> # define FNM_CASEFOLD 0
>> #endif
>> #ifndef FNM_EXTMATCH
>> # define FNM_EXTMATCH 0
>> #endif
>> #ifndef FNM_LEADING_DIR
>> # define FNM_LEADING_DIR 0
>> #endif
>
> in Solaris 9 /usr/include/fnmatch.h does not contain FNM_CASEFOLD and
> is therefore set to 0.
>
> That means test-exclude2.sh should not be run if FNM_CASEFOLD == 0.
>
>>>> FAIL: test-exclude5.sh (exit: 1)
>>>> ================================
>>>>
>>>> *** excltmp.21059       Thu Nov 10 13:38:54 2011
>>>> --- -   Thu Nov 10 13:38:54 2011
>>>> ***************
>>>> *** 1,4 ****
>>>>  bar: 1
>>>> ! bar/qux: 1
>>>>  barz: 0
>>>>  foo/bar: 1
>>>> --- 1,4 ----
>>>>  bar: 1
>>>> ! bar/qux: 0
>>>>  barz: 0
>>>>  foo/bar: 1
>
> This is similar and should not be run if FNM_LEADING_DIR == 0.
>
> Could you please forward this to the respective maintainers and ask if they
> could adjust the testsuite accordingly?

Thanks for investigating.
I've pushed the following fix to gnulib;
I'll update grep to use it before the release.

>From 39a489fa27ab3873e0fc0f65844413f46fcb2117 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 11 Nov 2011 14:37:59 +0100
Subject: [PATCH] test-exclude: skip tests rather than failing on deficient
 systems

* tests/test-exclude.c (main): Skip tests that use FNM_CASEFOLD
and FNM_LEADING_DIR on systems that lack the definitions.  This affects
at least Solaris 9.  Reported and diagnosed by Dagobert Michelsen in
http://thread.gmane.org/gmane.comp.gnu.grep.bugs/3947/focus=3950
---
 ChangeLog            |    8 ++++++++
 tests/test-exclude.c |    9 +++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0c4eff9..d35f6c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-11-11  Jim Meyering  <address@hidden>
+
+       test-exclude: skip tests rather than failing on deficient systems
+       * tests/test-exclude.c (main): Skip tests that use FNM_CASEFOLD
+       and FNM_LEADING_DIR on systems that lack the definitions.  This affects
+       at least Solaris 9.  Reported and diagnosed by Dagobert Michelsen in
+       http://thread.gmane.org/gmane.comp.gnu.grep.bugs/3947/focus=3950
+
 2011-11-10  Bruno Haible  <address@hidden>

        ptsname_r test: Avoid gcc warning on glibc systems.
diff --git a/tests/test-exclude.c b/tests/test-exclude.c
index 9c7997d..47392d9 100644
--- a/tests/test-exclude.c
+++ b/tests/test-exclude.c
@@ -104,6 +104,15 @@ main (int argc, char **argv)
             exclude_options &= ~flag;
           else
             exclude_options |= flag;
+
+          /* Skip this test if invoked with -leading-dir on a system that
+             lacks support for FNM_LEADING_DIR. */
+          if (strcmp (s, "leading-dir") == 0 && FNM_LEADING_DIR == 0)
+            exit (77);
+
+          /* Likewise for -casefold and FNM_CASEFOLD.  */
+          if (strcmp (s, "casefold") == 0 && FNM_CASEFOLD == 0)
+            exit (77);
         }
       else if (add_exclude_file (add_exclude, exclude, opt,
                                  exclude_options, '\n') != 0)
--
1.7.8.rc0.61.g8a042



reply via email to

[Prev in Thread] Current Thread [Next in Thread]