This was in April 2025:
> In the weekly CI, I see a test failure:
>   FAIL: test-nstrftime-2.sh
> on NetBSD 10, Solaris 11.4, and Solaris 11 OmniOS,
> that was a PASS last week.
> 
> Since nothing in this area has changed in Gnulib since last week,
> I suspect that the cause is the diffutils commit
>   25919920377f08d6f09df804c7f8af11f5adaabe
>   diff: reduce nstrftime dependency
> 
> The obvious workaround will be to change bootstrap.conf,
> adding a gnulib-tool option --avoid=nstrftime-tests .

This unit test is now gone from the diffutils gnulib-tests
(due to the use of module 'nstrftime-limited', which does not have any
unit tests, instead of 'nstrftime').

The test failure looked like this:


FAIL: test-nstrftime-2.sh
=========================

Format as ISO 8601: 2017-10-26 06:40:03.123456789
%a directive: jeu.
%A directive: jeudi
%b directive: oct.
%B directive: octobre
%c directive: 26 octobre 2017 06:40:03
%C directive: 20
%d directive: 26
%D directive: 10/26/17
%e directive: 26
%F directive: 2017-10-26
%g directive: 17
%G directive: 2017
%h directive: oct.
%H directive: 06
%I directive: 06
%j directive: 299
%m directive: 10
%M directive: 40
%n directive: 

../../gnulib-tests/test-nstrftime.h:594: assertion 'n == 0' failed
[1]   Abort trap (core dumped) LC_ALL=${LOCALE_FR} ${CHECKER} ./test-nstrftim...
FAIL test-nstrftime-2.sh (exit status: 1)


That is, the problem is that a French locale, 'AM'/'PM' markers can be produced
by the %p directive. But fortunately, this has no effect on the 'diff' program
proper: When, on NetBSD 10.0, I build the current diffutils and run "diff -c"
in a French locale, no 'AM'/'PM' markers appear:

$ cat foo.txt
twenty funny cats
playing around in circles
are nice to watch
$ cat bar.txt
twenty funny cats
playing around in gardens
are nice to watch
$ LC_ALL=fr_FR.UTF-8 ./diff -c foo.txt bar.txt
*** foo.txt     lun. sept.  8 09:17:36 2025
--- bar.txt     lun. sept.  8 09:17:53 2025
***************
*** 1,3 ****
  twenty funny cats
! playing around in circles
  are nice to watch
--- 1,3 ----
  twenty funny cats
! playing around in gardens
  are nice to watch

So, you can close this bug report, IMO.

Bruno






Reply via email to