bug-gnulib
[Top][All Lists]
Advanced

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

Re: grep-3.3.42-088f test results on AIX


From: Paul Eggert
Subject: Re: grep-3.3.42-088f test results on AIX
Date: Thu, 26 Dec 2019 01:34:46 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 12/26/19 1:16 AM, Bruno Haible wrote:
> Setting LC_ALL=C in the test setup greatly reduces the test coverage. As far 
> as
> I can see, so far, all the grep tests that work on plain ASCII inputs and
> patterns were tested in the locale the user happens to be in. But with your
> patch, these tests will only be tested in the C locale.

You're right that it reduces test coverage. However, the patch to grep that you
proposed wouldn't suffice, because the test scripts have several other uses of
printf with octal escapes outside of ASCII range, and they'd all have to be
changed. And some of these others contain code like this:

e_acute=$(printf '\303\251')
printf "$e_acute\n" > exp || framework_failure_

which cwould seem to require that the shell itself, not merely the printf
command, be in a locale that is compatible with the byte sequence in question.

Also, I worry that for platforms where printf is a builtin, "LC_ALL=C printf
'\202'" won't work as POSIX requires because historically setting environment
variables has been buggy for shell builtins.

I had forgotten that init.sh was copied from Gnulib into grep. So I guess that
I'm thinking we should install the attached patch into Gnulib. The basic idea is
that running these test scripts in random locales is likely more trouble than
it's worth.

Attachment: 0001-tests-default-to-the-C-locale-in-tests.patch
Description: Text Data


reply via email to

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