xstrtol, xstrtoll tests: Avoid test failure after 2024-07-25 change

2025-01-05 Thread Bruno Haible via Gnulib discussion list
On Cygwin 2.9.0 I'm seeing a test failure: FAIL: test-xstrtol.sh This patch avoids the failure, acknowledging that the results here are different on different Cygwin versions. 2025-01-05 Bruno Haible xstrtol, xstrtoll tests: Avoid test failure after 2024-07-25 c

access, euidaccess tests: Avoid test failure in Cygwin 3.5.5

2024-12-24 Thread Bruno Haible via Gnulib discussion list
ch adds a workaround. 2024-12-24 Bruno Haible access, euidaccess tests: Avoid test failure in Cygwin 3.5.5. * tests/test-access.h [__CYGWIN__]: Include , , . (is_administrator): New function. (is_root): New macro. (test_access): Reenable F_OK te

c32isprint tests: Avoid test failure on mingw/ucrt

2024-12-22 Thread Bruno Haible via Gnulib discussion list
On mingw-w64 with UCRT option, I see this test failure: FAIL: test-c32isprint.sh ../../gltests/test-c32isprint.c:178: assertion 'is != 0' failed FAIL test-c32isprint.sh (exit status: 1) This patch fixes it. 2024-12-22 Bruno Haible c32isprint te

posix_spawn_file_actions_addchdir tests: Avoid test failure on MSYS2

2024-12-22 Thread Bruno Haible via Gnulib discussion list
On MSYS2, there is also this test failure: FAIL: test-posix_spawn-chdir read output is not the expected output FAIL test-posix_spawn-chdir.exe (exit status: 1) This patch fixes it. 2024-12-22 Bruno Haible posix_spawn_file_actions_addchdir tests: Avoid

realloc-posix: Fix test failure on AIX

2024-11-01 Thread Bruno Haible via Gnulib discussion list
On AIX 7.1 and 7.3.1, I see this test failure: FAIL: test-realloc-posix ../../gltests/test-realloc-posix.c:34: assertion 'p != NULL' failed FAIL test-realloc-posix (exit status: 134) The cause is my change from 2024-10-27: <https://lists.gnu.org/arc

string-buffer tests: Avoid test failure on native Windows

2024-09-26 Thread Bruno Haible
buffer.exe (exit status: 3) Fixed as follows. Thanks for the report. 2024-09-26 Bruno Haible string-buffer tests: Avoid test failure on native Windows. Reported by Michele Locati in <https://lists.gnu.org/archive/html/bug-gnulib/2024-09/msg00135.html>. * t

unlockpt tests: Avoid test failure on Haiku

2024-09-03 Thread Bruno Haible
On Haiku, I see this test failure: FAIL: test-unlockpt === ../../gltests/test-unlockpt.c:36: assertion 'unlockpt (-1) == -1' failed Abort FAIL test-unlockpt (exit status: 149) Since POSIX does not require failure here (see <https://pubs.opengroup.org/onlinepu

utime, futimens tests: Avoid test failure on Haiku

2024-09-02 Thread Bruno Haible
st_ctime. 2024-09-02 Bruno Haible utime, futimens tests: Avoid test failure on Haiku. * tests/test-utimens-common.h (checkable_atime): On Haiku, return false. diff --git a/tests/test-utimens-common.h b/tests/test-utimens-common.h index f9fdb9a867..a59e65df8c 100644 --- a/tests/test-utime

Fix mbscasestr test failure on native Windows with MSVC

2024-09-01 Thread Bruno Haible
0x00C9) = 0x00E9 towlower(0x00E9) = 0x00E9 towupper(0x00C9) = 0x00C9 towupper(0x00E9) = 0x00C9 This is the cause for a test failure that I see with MSVC: FAIL: test-mbscasestr2.sh = C:\cygwin64\home\bruno\testdir-all-for-mingw\gltests\test-mbscasestr2.c:56: asse

posix_openpt tests: Fix test failure on Haiku

2024-08-30 Thread Bruno Haible
On Haiku, I'm seeing this test failure (in a testdir of posix_openpt grantpt pt_chown ): FAIL: test-posix_openpt === ../../gltests/test-posix_openpt.c:58: assertion '0 <= slave' failed Abort FAIL test-posix_openpt (exit status: 149) This patch fixes it:

pthread-rwlock: Attempt to avoid test failure on some more machines

2024-08-12 Thread Bruno Haible
ts. 2024-08-12 Bruno Haible pthread-rwlock: Attempt to avoid test failure on some more machines. * tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Bump the minimum interval to 20 ms on macOS. >From ef4c430e2d012bf2edaa13f28fd0042169845222 Mon Sep 17 00:00:00 2001

getopt-posix, getopt-gnu tests: Avoid test failure on mingw

2024-07-23 Thread Bruno Haible
_GETOPT_PREFIX gets defined in config.h. So, this patch fixes it. I don't remember why I had added this special casing of mingw in 2009. 2024-07-23 Bruno Haible getopt-posix, getopt-gnu tests: Avoid test failure on mingw. * tests/test-getopt.h (test_getopt): Don't

time: Fix test failure on FreeBSD

2024-06-28 Thread Bruno Haible
The test-time test fails on FreeBSD 14.0/x86_64, in a VirtualBox VM, but only if 2 or more CPUs are assigned to the VM. This patch fixes it. 2024-06-28 Bruno Haible time: Fix test failure on FreeBSD. * m4/time.m4 (gl_FUNC_TIME): Guess no for FreeBSD in general. * doc

Re: bug#71470: test failure on CentOS 7

2024-06-19 Thread Bruno Haible
[Ccing bug-gnulib] Collin Funk wrote: > > CentOS 7 will be supported until 2028. > > I've updated Gnulib's end-of-life.txt: > > I remember we based our Python 3.7 dependency on CentOS almost being > almost end of life [1]. Does this change anything there? Or will > installing some python-3.7 packa

Re: c32ispunct tests: Avoid a test failure on Solaris 11 OmniOS

2024-06-09 Thread Collin Funk
Bruno Haible writes: >> Would it make sense to use __illumos__ here? > > No, it is too new. [1] Makes sense. Feel free to change the ones I added previously to __sun if you would like. Collin

c32width tests: Avoid a test failure on Solaris 11 OpenIndiana, OmniOS

2024-06-09 Thread Bruno Haible
On Solaris 11 OpenIndiana and Solaris 11 OmniOS, I now (after the c32rtomb sanity check addition) see a test failure: FAIL: test-c32width === ../../tests/test-c32width.c:98: assertion 'c32width (0x20369) == 2' failed ../../build-aux/test-driver: line 114: 15481: Abor

Re: c32ispunct tests: Avoid a test failure on Solaris 11 OmniOS

2024-06-09 Thread Bruno Haible
Hi Collin, > > -#if !(defined __FreeBSD__ || defined __DragonFly__) > > +#if !(defined __FreeBSD__ || defined __DragonFly__ || defined > > __sun) > > Would it make sense to use __illumos__ here? No, it is too new. [1] Bruno [1] https://lists.gnu.org/archive/html/bug-gnulib/202

Re: c32ispunct tests: Avoid a test failure on Solaris 11 OmniOS

2024-06-09 Thread Collin Funk
Hi Bruno, Bruno Haible writes: > -#if !(defined __FreeBSD__ || defined __DragonFly__) > +#if !(defined __FreeBSD__ || defined __DragonFly__ || defined __sun) Would it make sense to use __illumos__ here? Not sure if you tested this on regular Oracle Solaris. Collin

c32ispunct tests: Avoid a test failure on Solaris 11 OmniOS

2024-06-09 Thread Bruno Haible
On a Solaris 11 OmniOS machine with a zh_CN.GB18030 locale, libunistring (or a testdir without module 'uchar-c23') also shows this test failure: FAIL: test-c32ispunct.sh ../../gltests/test-c32ispunct.c:283: assertion 'is != 0' failed ../../gltests/t

c32isblank tests: Avoid test failure on NetBSD 10.0

2024-06-08 Thread Bruno Haible
FAIL test-c32isblank.sh (exit status: 1) The cause is that here, iswblank (L'\f') returns true, not false (as expected). This patch avoids the failure. 2024-06-08 Bruno Haible c32isblank tests: Avoid test failure on NetBSD 10.0. * tests/test-c32isblank.c (main): Disable

mbfile tests: Avoid test failure on mingw

2024-05-29 Thread Bruno Haible
On mingw, I see this test failure: FAIL: test-mbfile.sh ../../gltests/test-mbfile.c:49: assertion 'mb_len (next) == 2' failed Stack trace: 0xbd502c13 main ../../gltests/test-mbfile.c:49 The cause is that setlocale has not installed an UTF-8 locale, bu

euidaccess: Fix test failure on mingw

2024-05-25 Thread Bruno Haible
ss.c:37 FAIL test-euidaccess.exe (exit status: 1) Likewise on MSVC. This patch fixes it. 2024-05-25 Bruno Haible euidaccess: Fix test failure on native Windows. * lib/euidaccess.c: Don't include . (euidaccess): On native Windows, invoke access, not _access. diff

sethostname tests: Avoid test failure on Cygwin

2024-05-23 Thread Bruno Haible
On the GitHub Cygwin machines (Cygwin 3.3.6 and 3.5.3), I see this test failure: FAIL: test-sethostname2 === setting a too long hostname succeeded. FAIL test-sethostname2.exe (exit status: 1) The cause: Cygwin apparently does not reject a too long hostname argument. While

poll tests: Avoid test failure on Cygwin

2024-05-23 Thread Bruno Haible
On Cygwin 3.4.6 and older, but not on Cygwin 3.5.3, I see this test failure: FAIL: test-poll.exe This patch works around it, like we already did for AIX and native Windows. 2024-05-23 Bruno Haible poll tests: Avoid test failure on Cygwin. * tests/test-poll.c (test_pipe

Re: access, euidaccess tests: Avoid test failure for root user on Solaris

2024-05-21 Thread Bruno Haible
Collin Funk wrote: > I didn't know they were run as root (CI is new to me). That's why I start all CI runs with these commands: uname -a id env | LC_ALL=C sort pwd It helps understanding the environment :) Sometimes I need to add echo $PA

Re: access, euidaccess tests: Avoid test failure for root user on Solaris

2024-05-21 Thread Collin Funk
On 5/21/24 6:45 AM, Bruno Haible wrote: > The CI runs the Solaris 11 and Solaris 11 OmniOS tests as root, and shows > these two test failures: > > FAIL: test-access > FAIL: test-euidaccess > > This occurs because although the file does not have the 'x' bit set, > for root faccessat() returns 0. >

access, euidaccess tests: Avoid test failure for root user on Solaris

2024-05-21 Thread Bruno Haible
5-21 Bruno Haible access, euidaccess tests: Avoid test failure for root user on Solaris. * tests/test-access.h (test_access): On Solaris, for the root user, don't expect X_OK permissions to be absent. * doc/posix-functions/access.texi: Mention the Solar

Re: unistr/u8-strstr tests: Avoid test failure with ASAN

2024-05-09 Thread Bruno Haible
Simon Josefsson wrote: > > + int alarm_value = 50; > >signal (SIGALRM, SIG_DFL); > > - alarm (10); > > + alarm (alarm_value); > > Nice trick, but doesn't the compiler optimize away this? When I'm compiling for debugging, I use CFLAGS="-ggdb", that is, implicitly -O0. (Debugging at -O2 is s

Re: unistr/u8-strstr tests: Avoid test failure with ASAN

2024-05-09 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: > + int alarm_value = 50; >signal (SIGALRM, SIG_DFL); > - alarm (10); > + alarm (alarm_value); Nice trick, but doesn't the compiler optimize away this? Maybe a 'volatile' is needed. /Simon signature.asc Description: PGP signature

unistr/u8-strstr tests: Avoid test failure with ASAN

2024-05-09 Thread Bruno Haible
for QEMU-emulated environments, and using the gdb-overridable idiom from https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=a8d9f4635238f845bb76269a54fbb2c55255d365 . 2024-05-09 Bruno Haible unistr/u8-strstr tests: Avoid test failure with ASAN. * tests/unistr/test

free tests: Avoid test failure with ASAN

2024-05-09 Thread Bruno Haible
723==ABORTING FAIL test-free (exit status: 134) The cause: this test assumes glibc malloc(), not some ASAN wrappers. 2024-05-09 Bruno Haible free tests: Avoid test failure with ASAN. * tests/test-free.c (main): Skip mmap/munmap based test if ASAN is enabled. diff --git

expl tests: Avoid test failure on NetBSD 10.0/i386

2024-04-05 Thread Bruno Haible
On NetBSD 10.0/i386, I see this test failure: FAIL: test-expl === ../../gltests/test-exp.h:81: assertion 'err > - err_bound / TWO_MANT_DIG && err < err_bound / TWO_MANT_DIG' failed FAIL test-expl (exit status: 134) The expl() function is just more impreci

mcel tests: Fix test failure with Oracle cc 12.6

2024-03-28 Thread Bruno Haible
With cc from Oracle Developer Studio 12.6 on Linux, I see a test failure: FAIL: test-mcel === FAIL test-mcel (exit status: 1) This compiler does not implement the rule (from ISO C 99 § 5.1.2.2.3) that the implicit return value from main() is 0. How to reproduce

strtod, strtold tests: Avoid a test failure on native Windows

2024-02-21 Thread Bruno Haible
Bruno Haible strtod, strtold tests: Avoid a test failure on native Windows. * modules/strtod-tests (Depends-on): Add setlocale. * modules/strtold-tests (Depends-on): Likewise. diff --git a/modules/strtod-tests b/modules/strtod-tests index cbc8030ca4..b6fc4585bf 100644 --- a

fenv-rounding: Avoid a test failure on OpenBSD/arm64

2024-01-18 Thread Bruno Haible
On OpenBSD 7.4/arm64, I'm seeing this test failure: $ ./test-fenv-round ../../gltests/test-fenv-round.c:53: assertion 'p < a' failed Abort trap (core dumped) As usual, the problem is that the soft-float functions (__divtf3, __eqtf2

get-rusage-data: Avoid test failure on NetBSD 9.3

2024-01-18 Thread Bruno Haible
On NetBSD 9.3 (x86_64, arm64, powerpc) I see a test failure: ../../gltests/test-get-rusage-data.c:66: assertion 'value3 > value1' failed FAIL test-get-rusage-data (exit status: 134) This patch acknowledges the NetBSD behaviour, like the one on FreeBSD and OpenBSD. 2024-01-18

time: Fix test failure on FreeBSD 12.2/sparc64

2024-01-11 Thread Bruno Haible
On FreeBSD 12.2/sparc64 I see this test failure: $ ./test-time ../../gltests/test-time.c:46: assertion 'tt3 >= tv2.tv_sec' failed Abort trap (core dumped) This patch fixes it. 2024-01-11 Bruno Haible time: Fix test failure on FreeBSD 12.2/sparc64. * m4/time.m4

Re: jit/cache tests: Avoid test failure on hppa CPUs

2024-01-10 Thread Bruno Haible
Yesterday I did: > (structptr_to_funcptr, funcptr_to_structptr): New functions/macros. > (xcopy_structptr): Renamed from xcopy_funcptr. Mark as inline. > (COPY_FUNCPTR, CODE): Use structptr_to_funcptr, funcptr_to_structptr. This produces gcc -Wstrict-aliasing warnings on Linux/po

Re: jit/cache tests: Avoid test failure on OpenBSD

2024-01-10 Thread Bruno Haible
That patch caused some compiler warnings. Fixed like this: 2024-01-10 Bruno Haible jit/cache tests: Avoid compiler warnings on OpenBSD. * tests/jit/test-cache.c (main): New variables size_of_return1, size_of_return2. diff --git a/tests/jit/test-cache.c b/tests/jit/tes

jit/cache tests: Avoid test failure on OpenBSD

2024-01-09 Thread Bruno Haible
ant), the best workaround is to include the precompiled code of 'return1' (and 'return2') in the test program. Done as follows: 2024-01-09 Bruno Haible jit/cache tests: Avoid test failure on OpenBSD. * tests/jit/test-cache.c (return1_code, return2_code): N

jit/cache tests: Avoid test failure on hppa CPUs

2024-01-09 Thread Bruno Haible
This patch fixes a test failure on Linux/hppa and NetBSD/hppa. The cause of the failure was that on 32-bit hppa platforms, a function pointer is not merely a 'struct func *', but a 'struct func *' + 2. 2024-01-09 Bruno Haible jit/cache tests: Avoid test

jit/cache tests: Avoid test failure on OpenBSD

2024-01-08 Thread Bruno Haible
for this specific compilation unit. [1] https://lwn.net/Articles/732201/ [2] https://lwn.net/Articles/732202/ [3] https://news.ycombinator.com/item?id=17246537 2024-01-08 Bruno Haible jit/cache tests: Avoid test failure on OpenBSD. * modules/jit/cache-tests (Files): Add m4/

jit/cache tests: Avoid test failure on CentOS, *BSD, macOS

2024-01-08 Thread Bruno Haible
memory. Also, some of the #if conditions were incorrect: - '#if defined __hppa__' is needed instead of '#if __hppa__'. - Allow for __hppa__ to be set in __hppa64__ mode, and allow for __ia64__ to be set in 32-bit ia64 mode. 2024-01-08 Bruno Haible jit/cac

fenv-exceptions-trapping: Avoid test failure on NetBSD/sparc

2023-11-05 Thread Bruno Haible
On NetBSD 8.0/sparc I see a test failure of test-fenv-except-trapping-2.sh. This patch avoids the failure. 2023-11-05 Bruno Haible fenv-exceptions-trapping: Avoid test failure on NetBSD/sparc. * tests/test-fenv-except-trapping-2.c (main): Skip the 'long double'

fenv-exceptions-trapping: Avoid test failure on older systems

2023-11-05 Thread Bruno Haible
On some older Linux distros, I see the fenv-exceptions-trapping-2 test fail. The reason are older versions of gcc, which generate different code for floating-point comparisons. 2023-11-05 Bruno Haible fenv-exceptions-trapping: Avoid test failure on older systems. * tests/test

update-copyright tests: Fix test failure

2023-10-03 Thread Bruno Haible
In a testdir of all of gnulib, on Mac OS X 10.5.8, I see this test failure: FAIL: test-update-copyright.sh This is the log file: $ cat test-update-copyright.sh.log --- - 2023-10-03 10:28:56.0 +0200 +++ update-copyright.test-ex-stderr 2023-10-03 10:28:56.0 +0200 @@ -1,2

aligned_alloc: Fix test failure on AIX 7.3 with ibm-clang

2023-08-18 Thread Bruno Haible
On AIX 7.3.1, with ibm-clang as compiler, I see a unit test failure: FAIL: test-aligned_alloc ../../gltests/test-aligned_alloc.c:52: assertion 'aligned2_blocks[i] != NULL' failed FAIL test-aligned_alloc (exit status: 134) The problem here is that ibm-clang, w

mbmemcasecmp, mbmemcasecoll: Avoid test failure on MSVC

2023-07-28 Thread Bruno Haible
This patch avoids two long-standing test failures on MSVC. 2023-07-28 Bruno Haible mbmemcasecmp, mbmemcasecoll: Avoid test failure on MSVC. * tests/test-mbmemcasecmp.h (test_utf_8): Disable two tests on platforms that don't have the upper/lower mappings for &

Re: argp test failure: test-argp-2.sh

2023-07-11 Thread Bruno Haible
Andrew Schulman wrote: > So hooray for automated testing! It found a problem. And that wasn't the only bug that this unit test found. A bigger one was reported in [1] and fixed in [2]. Bruno [1] https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00085.html [2] https://lists.gnu.org/archive

Re: argp test failure: test-argp-2.sh

2023-07-11 Thread Andrew Schulman
> Hi, > > Andrew Schulman wrote: > > I'm building argp for Cygwin. The build succeeds, and all of the tests > > pass except for one, test-argp-2.sh. > > For me, on Cygwin, this test passes. > > > The contents of test-suite.log are below. > > ... > > The error is pretty trivial, and I think it's

Re: argp test failure: test-argp-2.sh

2023-07-10 Thread Bruno Haible
Hi, Andrew Schulman wrote: > I'm building argp for Cygwin. The build succeeds, and all of the tests > pass except for one, test-argp-2.sh. For me, on Cygwin, this test passes. > The contents of test-suite.log are below. > ... > The error is pretty trivial, and I think it's incorrect. If I > unde

argp test failure: test-argp-2.sh

2023-07-09 Thread Andrew Schulman
I'm building argp for Cygwin. The build succeeds, and all of the tests pass except for one, test-argp-2.sh. The contents of test-suite.log are below. The error is pretty trivial, and I think it's incorrect. If I understand the source in lib/argp-help.c correctly (https://git.savannah.gnu.org/gitwe

sigdescr_np tests: Avoid test failure on glibc/sparc

2023-06-25 Thread Bruno Haible
On cfarm105.cfarm.net, I'm seeing this test failure: ../../build-aux/test-driver: line 112: 3135129 Aborted "$@" >> "$log_file" 2>&1 FAIL: test-sigdescr_np This patch fixes it. 2023-06-25 Bruno Haible sigdescr_np te

Re: fdopendir: Fix fd leak and test failure on native Windows

2023-05-14 Thread KO Myung-Hun
Hi/2. Bruno Haible wrote: > KO Myung-Hun wrote: >>> dirfd is specified at >>> https://pubs.opengroup.org/onlinepubs/9699919799/functions/dirfd.html >>> Which says that if "The dirp argument does not refer to a valid directory >>> stream" >>> the function may fail with error EINVAL. It may alterna

Re: fdopendir: Fix fd leak and test failure on native Windows

2023-05-10 Thread Bruno Haible
KO Myung-Hun wrote: > > dirfd is specified at > > https://pubs.opengroup.org/onlinepubs/9699919799/functions/dirfd.html > > Which says that if "The dirp argument does not refer to a valid directory > > stream" > > the function may fail with error EINVAL. It may alternatively simply crash > > ("the

Re: fdopendir: Fix fd leak and test failure on native Windows

2023-05-10 Thread KO Myung-Hun
Bruno Haible wrote: > KO Myung-Hun wrote: >>> @@ -78,11 +82,17 @@ _gl_unregister_dirp_fd (int fd) >>> int >>> dirfd (DIR *dir_p) >>> { >>> +#if GNULIB_defined_DIR >>> + int fd = dir_p->fd_to_close; >> >> dirfd() allows to take an invalid `dir_p' ? > > No; this must be a misunderstanding. >

Re: fdopendir: Fix fd leak and test failure on native Windows

2023-05-09 Thread Bruno Haible
KO Myung-Hun wrote: > > @@ -78,11 +82,17 @@ _gl_unregister_dirp_fd (int fd) > > int > > dirfd (DIR *dir_p) > > { > > +#if GNULIB_defined_DIR > > + int fd = dir_p->fd_to_close; > > dirfd() allows to take an invalid `dir_p' ? No; this must be a misunderstanding. dirfd is specified at https://p

Re: fdopendir: Fix fd leak and test failure on native Windows

2023-05-08 Thread KO Myung-Hun
Hi/2. Bruno Haible wrote: > On native Windows, I see a test failure: > > FAIL: test-fdopendir > > > ../../gltests/test-fdopendir.c:76: assertion 'dup2 (fd, fd) == -1' failed > FAIL test-fdopendir.exe (exit status: 3) > > The cause

hamt tests: Fix test failure with Sun C on Solaris 10/SPARC

2023-04-28 Thread Bruno Haible
Running a testdir on Solaris 10/SPARC with Sun C, I see a test failure: $ ./test-hamt $ echo

fdopendir: Fix fd leak and test failure on native Windows

2023-04-26 Thread Bruno Haible
On native Windows, I see a test failure: FAIL: test-fdopendir ../../gltests/test-fdopendir.c:76: assertion 'dup2 (fd, fd) == -1' failed FAIL test-fdopendir.exe (exit status: 3) The cause of the problem is that POSIX [1] says: "Upon calling closedir() the

fchdir tests: Fix test failure on native Windows

2023-04-26 Thread Bruno Haible
On native Windows, in a testdir of module 'fchdir' (but not in a testdir of all of Gnulib), I'm seeing a test failure: test-fchdir.c:74: assertion 'fchdir (fd) == 0' failed What happens? fchdir.c contains logic for keeping track which file descriptor corresponds to which

expm1 tests: Avoid test failure on 32-bit mingw

2023-04-25 Thread Bruno Haible
On 32-bit mingw I see this test failure: FAIL: test-expm1 ../../gltests/test-expm1.h:49: assertion 'y >= - x' failed FAIL test-expm1.exe (exit status: 3) The failure disappears when compiling without -O2. This is a hint that, again, it's an issue w.r.t. the 6

poll tests: Avoid test failure on native Windows

2023-04-25 Thread Bruno Haible
1) Since our documentation says that POLLHUP is not fixed by this module anyway (it does not work on AIX either), let me disable this part of the test. 2023-04-25 Bruno Haible poll tests: Avoid test failure on native Windows. * tests/test-poll.c (test_pipe): Disable the POL

Re: dfa tests: Fix test failure on mingw

2023-04-25 Thread Bruno Haible
I did: > + set_binary_mode (STDOUT_FILENO, O_BINARY); Oops, that produces a compilation error (reported by the 'grep' CI and the 'sed' CI): ../../gltests/test-dfa-match-aux.c: In function ‘main’: ../../gltests/test-dfa-match-aux.c:61:20: error: ‘STDOUT_FILENO’ undeclared (first use in this func

select, pselect: Fix test failure on native Windows

2023-04-24 Thread Bruno Haible
test-select.exe (exit status: 1) Note that only the first test ("Invalid nfd test") fails. For both functions, the implementation is Gnulib's override. So, the fix is easy. It makes these two tests succeed. 2023-04-24 Bruno Haible select, pselect: Fix test failure on

string-desc tests: Avoid test failure on native Windows

2023-04-22 Thread Bruno Haible
On mingw 10, I see this test failure: FAIL: test-string-desc.sh = ../../gltests/test-string-desc.c:113: assertion 'string_desc_write (3, s1) == 0' failed FAIL test-string-desc.sh (exit status: 1) Apparently, in the Cygwin environment, it is not possible to pa

Re: dfa tests: Fix test failure on mingw

2023-04-22 Thread Bruno Haible
one: 2023-04-22 Bruno Haible dfa tests: Fix test failure on mingw differently. Suggested by Paul Eggert. * tests/test-dfa-invalid-char-class.sh: Revert last change. * tests/test-dfa-match-aux.c: Include binary-io.h. (main): Put stdout into binary mode.

Re: debugging a nstrftime test failure

2023-04-21 Thread Paul Eggert
On 4/20/23 15:20, Bruno Haible wrote: How to get further? Should I add this specific mktime call as a test case to the 'mktime' module's tests? If you're interested in pursuing that I suppose it wouldn't hurt. The Microsoft documentation https://learn.microsoft.com/en-us/cpp/c-runtime-library

debugging a nstrftime test failure

2023-04-20 Thread Bruno Haible
Hi Paul, As the nstrftime test is failing on several platforms [1], I'm trying to debug it. Now I'm on mingw 10. The output of test-nstrftime is sometimes PST8PDT,M3.2.0,M11.1.0: expected "1969-12-31 16:00:00 -0800 (PST)", got "1969-12-31 16:00:00 (PST)" MST7: expected "1969-12-31 17:00:00 -07

Re: dfa tests: Fix test failure on mingw

2023-04-20 Thread Bruno Haible
Paul Eggert wrote: > > +LC_ALL=C ${CHECKER} test-dfa-match-aux '[[:foo:]]' a > tmp 2>&1 > > +LC_ALL=C tr -d '\r' < tmp > out > > This sort of change means we won't catch stray CRs in the output. > > Is there some way we can instead compile or run MinGW apps so that they > instead follow the POSI

Re: dfa tests: Fix test failure on mingw

2023-04-20 Thread Paul Eggert
On 4/20/23 09:39, Bruno Haible wrote: +LC_ALL=C ${CHECKER} test-dfa-match-aux '[[:foo:]]' a > tmp 2>&1 +LC_ALL=C tr -d '\r' < tmp > out This sort of change means we won't catch stray CRs in the output. Is there some way we can instead compile or run MinGW apps so that they instead follow the

readtokens tests: Fix test failure on mingw

2023-04-20 Thread Bruno Haible
On mingw 10, I see this test failure: FAIL: test-readtokens.sh --- exp 2023-04-20 06:20:32.200323300 +0200 +++ out 2023-04-20 06:20:32.232259800 +0200 @@ -1 +1 @@ -a:b:c: +a:b:c: --- exp 2023-04-20 06:20:32.278874900 +0200 +++ out 2023-04-20 06:20:32.310364100 +0200

parse-duration tests: Fix test failure on mingw

2023-04-20 Thread Bruno Haible
On mingw 10, I see this test failure: FAIL: test-parse-duration.sh ../../gltests/test-parse-duration.sh: line 64: test: 38898367 : integer expression expected test-parse-duration fatal error: 38898367 is not 38898367 FAIL test-parse-duration.sh (exit status: 1

dfa tests: Fix test failure on mingw

2023-04-20 Thread Bruno Haible
On mingw 10, I see this test failure: FAIL: test-dfa-invalid-char-class.sh --- exp 2023-04-20 06:15:56.778614400 +0200 +++ out 2023-04-20 06:15:56.857719400 +0200 @@ -1 +1 @@ -dfaerror: invalid character class +dfaerror: invalid character class FAIL test-dfa

c32isgraph: Avoid test failure on Cygwin 3.4.6

2023-04-18 Thread Bruno Haible
On Cygwin 3.4.6, I see this test failure: FAIL: test-c32isgraph.sh ../../gltests/test-c32isgraph.c:125: assertion 'is != 0' failed ../../gltests/test-c32isgraph.sh: line 13: 57088 Aborted (core dumped) LC_ALL=$LOCALE_FR ${CHECKER} ./test-

posix_spawn_file_actions_addclose tests: Avoid test failure on Cygwin

2023-04-16 Thread Bruno Haible
ilures is a problem in Gnulib's test. Fixed like this: 2023-04-16 Bruno Haible posix_spawn_file_actions_addclose tests: Avoid test failure on Cygwin. * tests/test-posix_spawn_file_actions_addclose.c (main): Skip an unportable test also on Cygwin.

striconveh tests: Avoid test failure on glibc 2.15

2023-04-08 Thread Bruno Haible
On Slackware 14, I see this test failure: FAIL: test-striconveh = ../../gltests/test-striconveh.c:510: assertion 'length == strlen (expected)' failed FAIL test-striconveh (exit status: 134) The conversion produces a question mark instead of the expected U+FFFD

vasnwprintf-posix tests: Avoid test failure on mingw

2023-04-07 Thread Bruno Haible
On mingw, in a testdir of vasnwprintf-posix, I see a test failure: ../../gltests/test-vasnwprintf-posix.c:4209: assertion 'wcscmp (result, L"000303c 33") == 0' failed FAIL test-vasnwprintf-posix.exe (exit status: 3) This patch fixes it. 2023-04-07 Bruno Haible

string-desc-quotearg tests: Avoid a test failure on Haiku

2023-04-05 Thread Bruno Haible
On Haiku, I see a test failure of test-string-desc-quotearg. The reason is that on this platform, the C locale has UTF-8 encoding, and therefore the quotearg.c logic uses U+2018 and U+2019 as quotation marks, instead of the ASCII double-quote. 2023-04-05 Bruno Haible string-desc

vasnwprintf: Fix test failure on OpenBSD

2023-03-17 Thread Bruno Haible
On OpenBSD 7.2, I see a test failure for vasnwprintf. The cause is that we use %n in the swprintf format string, and OpenBSD disabled that in 2021. We have already stopped using %n on OpenBSD in the snprintf format string in 2020, see https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00013

time: Fix test failure on AIX 7.2

2023-03-17 Thread Bruno Haible
Also on AIX 7.2, I see the 'time' test fail. Here too, for ca. 5 milliseconds after gettimeofday() reports a new second, time(NULL) reports the previous one. This patch fixes it. 2023-03-17 Bruno Haible time: Fix test failure on AIX 7.2. * m4/time.m4 (gl_FUNC_TI

time: Fix test failure on native Windows

2023-03-17 Thread Bruno Haible
rts a new second, it takes about 5 msec until time(NULL) reports that new second as well. This patch fixes it, by implementing time(NULL) based on gettimeofday(). Note that the mingw gettimeofday() and the gnulib replacement are equivalent. 2023-03-17 Bruno Haible time: Fix test failu

nl_langinfo tests: Avoid test failure on Solaris 11

2023-03-02 Thread Bruno Haible
On Solaris 11, I see a test failure: ../../gnulib-tests/test-nl_langinfo2.c:100: assertion 'strlen (fr_T_FMT_AMPM) == 0 || strcmp (fr_T_FMT_AMPM, "%I:%M:%S") == 0' failed ../../gnulib-tests/test-nl_langinfo2.sh: line 12: 17260: Abort(coredump) The problem is that

chown, lchown, fchownat tests: Avoid test failure on macOS 12

2023-02-10 Thread Bruno Haible
d in through ssh: getgid() and getegid() both return (gid_t)(-1). But the st_gid of freshly created files is reasonable. This patch avoids the test failures. I could also make the entire test SKIPped, but that would be exaggerated. 2023-02-10 Bruno Haible chown, lchown, fchownat tests:

Re: nstrftime test failure on Android

2023-01-17 Thread Paul Eggert
On 1/17/23 06:43, Bruno Haible wrote: On Android 11, within Termux, I see this test failure: FAIL: test-nstrftime PST8PDT,M3.2.0,M11.1.0: expected "1969-12-31 16:00:00 -0800 (PST)", got "1969-12-31 17:00:00 -0700 (PDT)" CET-1CEST,M3.5.0,M10.5.0/3: exp

Re: execute tests: Avoid test failure on Android

2023-01-17 Thread Bruno Haible
Eric Blake wrote: > > Apparently the SIGPIPE handler gets set to SIG_IGN, either by 'make' or > > by the test-driver. > > Known regression in make 4.4: > https://savannah.gnu.org/bugs/index.php?63307 Thanks. Indeed, I can reproduce the test failure also on a glibc

Re: execute tests: Avoid test failure on Android

2023-01-17 Thread Eric Blake
On Tue, Jan 17, 2023 at 03:21:52PM +0100, Bruno Haible wrote: > On Android 11, I'm seeing a test failure: > > > Apparently the SIGPIPE handler gets set to SIG_IGN, either by 'make' or > by the test-driver. Known regression in make 4.4: https://savannah.gnu.org/b

nstrftime test failure on Android

2023-01-17 Thread Bruno Haible
Hi Paul, On Android 11, within Termux, I see this test failure: FAIL: test-nstrftime PST8PDT,M3.2.0,M11.1.0: expected "1969-12-31 16:00:00 -0800 (PST)", got "1969-12-31 17:00:00 -0700 (PDT)" CET-1CEST,M3.5.0,M10.5.0/3: expected "1970-01-01 01:00:00

execute tests: Avoid test failure on Android

2023-01-17 Thread Bruno Haible
On Android 11, I'm seeing a test failure: FAIL: test-execute.sh = test-execute-main: test-execute-child subprocess failed ../../gltests/test-execute-main.c:138: assertion 'ret == 127' failed Aborted test-execute.sh: test case 3 failed ../../gltests/test-exe

spawn-pipe tests: Fix test failure on Android

2023-01-11 Thread Bruno Haible
On Android 11, I'm seeing this test failure: FAIL: test-spawn-pipe.sh ../../gltests/test-spawn-pipe-child.c:134: assertion '! is_open (STDERR_FILENO)' failed test-spawn-pipe.sh: iteration 4 failed ../../gltests/test-spawn-pipe-child.c:134: asser

posix_spawn_file_actions_addfchdir tests: Fix test failure on Android

2023-01-11 Thread Bruno Haible
On Android 11 with Termux, I see this test failure: FAIL: test-posix_spawn-fchdir = cannot open directory: Permission denied FAIL test-posix_spawn-fchdir (exit status: 1) The reason is that the "/" directory cannot be opened. But other directories, like

posix_spawn-* tests: Fix test failure on mingw when libtool is in use

2022-09-14 Thread Bruno Haible
in the libtool wrapper's find_executable function.) 2022-09-14 Bruno Haible posix_spawn-* tests: Fix test failure on mingw when libtool is in use. * tests/test-posix_spawn-inherit0.c (CHILD_PROGRAM_FILENAME): Add the EXEEXT suffix. * tes

pipe-filter-gi: Fix test failure on native Windows

2022-09-10 Thread Bruno Haible
In a testdir of nearly all of gnulib, I see a test failure: FAIL: test-pipe-filter-gi2.sh The logs reveal that the test-pipe-filter-gi2 test 3 fails, with status 141. 141 being 128 + SIGPIPE, the suspicion falls on the 'sigpipe' module. And indeed, the failure occurs only if t

count-leading-zeros: Fix a link error on 32-bit MSVC and a test failure

2022-09-04 Thread Bruno Haible
fails. This patch fixes both issues. 2022-09-04 Bruno Haible count-leading-zeros: Fix a link error on 32-bit MSVC and a test failure. * lib/count-leading-zeros.h: Correct syntax for #pragma intrinsic. (COUNT_LEADING_ZEROS): Fix the return value

unictype/category-byname: Fix test failure

2022-02-09 Thread Bruno Haible
27; gets linked against an old libunistring under /usr, and the symbol uc_general_category_byname is taken from there, whereas the UC_CATEGORY_* variables are linked statically from the local libgnu.a. This patch fixes it. 2022-02-09 Bruno Haible unictype/category-byname: Fix test failu

log tests: Avoid test failure with nvc 22.1

2022-01-15 Thread Bruno Haible
With nvc 22.1, I observe a test failure: FAIL: test-log == ../../gltests/test-log.h:68: assertion 'err > - err_bound / TWO_MANT_DIG && err < err_bound / TWO_MANT_DIG' failed This patch works around it, by allowing a slightly larger error bound.

Re: timespec test failure on Linux/s390x

2021-09-12 Thread Bruno Haible
Paul Eggert wrote: > > I can't determine whether it's a GCC or a QEMU bug. > > Surely it is a QEMU bug, as QEMU isn't properly implementing the > z/Architecture Principles of Operation (POP). Thanks; I didn't know about this document. > Page 7-25 of the current > edition (SA22-7832-12) says th

Re: timespec test failure on Linux/s390x

2021-09-12 Thread Paul Eggert
On 9/12/21 8:28 AM, Bruno Haible wrote: I can't determine whether it's a GCC or a QEMU bug. Surely it is a QEMU bug, as QEMU isn't properly implementing the z/Architecture Principles of Operation (POP). Page 7-25 of the current edition (SA22-7832-12) says that the AGR instruction treats its o

Re: timespec test failure on Linux/s390x

2021-09-12 Thread Bruno Haible
Paul Eggert wrote: > That value of 'sum' is wrong; it should be most-negative value {tv_sec = > -9223372036854775808, tv_nsec = 0} because A and B are both that value, > and 'sum = timespec_add (a, b)' is supposed to be saturated addition. > > My guess is that timespec-add.c's line 49 'INT_ADD_W

Re: timespec test failure on Linux/s390x

2021-08-29 Thread Bruno Haible
Paul Eggert wrote: > Which version of GCC are you using? s390x-linux-gnu-gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 > I suspect the bug is in the earlier call to timespec_add, as mentioned > above. I'll debug that call... Bruno

  1   2   3   4   >