Re: factor/factor-parallel test fails due to 'split' changes
From:
Collin Funk
Subject:
Re: factor/factor-parallel test fails due to 'split' changes
Date:
Wed, 29 Oct 2025 00:49:50 -0700
User-agent:
Gnus/5.13 (Gnus v5.13)
Bruno Haible <bruno@clisp.org> writes:
> In the CI, I see a test failure
> FAIL: tests/factor/factor-parallel
> on Solaris 11.4 and OpenBSD, yesterday (Oct 27) that was not present
> a week earlier (Oct 20).
>
> Guessing from the error message in the log below, it's caused by the
> 'split' changes last week.
Thanks.
That would have certainly be easier to debug if posix_spawn could have
the child exit with an exit code other than 127. I spent a little too
long thinking $PATH was ignored or something like that.
The actual issue was that Gnulib's posix_spawn calls sigismember in the
child process with NSIG. On OpenBSD and Solaris this causes it to return
-1 and set errno to EINVAL. The child process has nothing to do but
_exit (127) in that case. Here is the test program I used:
$ cat main.c
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
int
main (void)
{
sigset_t set;
sigemptyset (&set);
errno = 0;
if (sigismember (&set, NSIG) != 0)
{
fprintf (stderr, "%s\n", strerror (errno));
return 0;
}
return 0;
}
$ cc main.c
$ ./a.out
Invalid argument
That was the result I saw on both OpenBSD and Solaris.
I pushed the attatched patch to Gnulib and updated the submodule in
Coreutils [1] after confirming it fixed things on OpenBSD. I didn't test
it on Solaris, but based on the test program I'm 99% sure it was the
same issue.
Collin
[1]
https://github.com/coreutils/coreutils/commit/7bd932c34e76cdb146c72d47c23c51c7065a3b3d