On Sat, 2019-09-14 at 16:19 -0400, Dmitry Goncharov wrote:
> On Sat, Sep 14, 2019 at 10:22 AM Paul Smith <psm...@gnu.org> wrote:
> > and, I've checked with a makefile invoked by the test suite and
> > this setting is in effect, even if the shell invoking
> > run_make_tests.pl has a different setting for LC_ALL.
> 
> This should be sufficient.

It should be, yes, but based on your results below it is not.  This is
why I'm confused.

> > Furthermore, we clear out the environment so that only a set number
> > of variables are actually reserved, and LANG is not one of them
> > (nor is LC_MESSAGES), so setting LANG in the run_make_tests shell
> > script should not have any effect.
> 
> LANG and LC_MESSAGES both affect tests on certain hosts.

Well, first the LC_ALL value is supposed to supersede ALL other LC_*
values and also LANG.  So simply setting LC_ALL (as we do) should be
sufficient to make the values of both LANG and LC_MESSAGES irrelevant.

Second, the test framework throws out everything in the user's
environment other than a few specific values when it runs make from
within a test.  So it shouldn't matter that you have set either LANG or
LC_MESSAGES, or anything else, before you started the tests.

> > I need to understand your failure situation better before applying
> > this change.
> 
> Here is an example from a host which honors env variables
> $ export LC_MESSAGES=fr_CA.UTF-8; echo 'all: ; ./asdf' | ../l64/make
> -f-
> ./asdf
> make: ./asdf: Aucun fichier ou dossier de ce type
> make: *** [/tmp/GmvTj9K1;1: all] Error 127

Sure, but none of those instances of make are invoked from within our
test suite.

> What does
> export LC_MESSAGES=fr_CA.UTF-8; echo 'all: ; ./asdf' | ../l64/make -f-
> print on your host?

I don't have French installed but I do have German:

  $ echo 'all:;./asdf' | LC_MESSAGES=de_DE.UTF-8 ./make -f-
  ./asdf
  make: ./asdf: Datei oder Verzeichnis nicht gefunden
  make: *** [/tmp/GmIlXXqu;1: all] Fehler 127

> Below are a couple of examples of failures on aix and linux.
> These tests pass when LANG and LC_MESSAGES are unset or set to C.

This is what I can't understand.  Your setting of LANG or LC_MESSAGES
cannot make any difference to the test suite because the test suite
does not pass those values to the make that it invokes.

> $ LC_MESSAGES=ru_RU ./run_make_tests -make_path ../l32/make

I'm surprised that even works; on my system if I use a shorthand like
"de_DE" instead of the full "de_DE.UTF-8", then it isn't recognized and
I get the default.

> features/errors; cat work/features/errors.diff.3
> 
> 3 Tests in 1 Category Failed (See .diff* files in work dir for
> details) :-(
> 
> *** work/features/errors.base.3 Sat Sep 14 15:19:22 2019
> --- work/features/errors.log.3  Sat Sep 14 15:19:22 2019
> ***************
> *** 1,3 ****
>   ./foobarbazbozblat xx yy
> ! make: ./foobarbazbozblat: ??? ?????? ????? ??? ????????
>   make: [work/features/errors.mk.2;2: one] Error 127 (ignored)
> --- 1,3 ----
>   ./foobarbazbozblat xx yy
> ! make: ./foobarbazbozblat: No such file or directory
>   make: [work/features/errors.mk.2;2: one] Error 127 (ignored)

I can't understand this.  If I run my tests like this they pass just as
expected:

  $ LC_MESSAGES=de_DE.UTF-8 ./run_make_tests -make ../make features/errors
    ...
  9 Tests in 1 Category Complete ... No Failures :-)

Can you apply the attached patch, then re-run the test features/errors
and send me the diff output?

FYI, this is what I get:

$ cat work/features/errors.diff.3
*** work/features/errors.base.3 Sat Sep 14 18:19:42 2019
--- work/features/errors.log.3  Sat Sep 14 18:19:42 2019
***************
*** 1,3 ****
--- 1,13 ----
+ env
+ LC_ALL=C
+ MAKEFLAGS=
+ MFLAGS=
+ SHELL=/bin/bash
+ PATH=/...
+ LOGNAME=psmith
+ USER=psmith
+ HOME=/home/psmith
+ MAKELEVEL=1
  ./foobarbazbozblat xx yy
  make: ./foobarbazbozblat: No such file or directory
  make: [work/features/errors.mk.2;2: one] Error 127 (ignored)
diff --git a/m4/.gitignore b/m4/.gitignore
index 244385a..9a65f61 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -3,3 +3,4 @@
 !/aclocal.m4
 !/dospaths.m4
 
+/gnulib-comp.m4
diff --git a/tests/scripts/features/errors b/tests/scripts/features/errors
index 1e15562..d92c144 100644
--- a/tests/scripts/features/errors
+++ b/tests/scripts/features/errors
@@ -41,8 +41,9 @@ unlink($unk);
 my $err = $ERR_no_such_file;
 
 run_make_test(qq!
-one: ; -$unk xx yy
+one: env ; -$unk xx yy
 two: ; $unk aa bb
+env:;env
 !,
               'one', "$unk xx yy\n#MAKE#: $unk: $err\n#MAKE#: [#MAKEFILE#;2: one] Error 127 (ignored)\n");
 
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make
  • patch locale ... Dmitry Goncharov via Bug reports and discussion for GNU make
    • Re: patc... Paul Smith
      • Re: ... Dmitry Goncharov via Bug reports and discussion for GNU make
        • ... Paul Smith
          • ... Paul Smith
          • ... Dmitry Goncharov via Bug reports and discussion for GNU make
            • ... Paul Smith
              • ... Dmitry Goncharov via Bug reports and discussion for GNU make
                • ... Paul Smith
                • ... Dmitry Goncharov via Bug reports and discussion for GNU make
                • ... Paul Smith
          • ... Andreas Schwab

Reply via email to