I've seen this once during an RPM build on ppc64le:
../scripts/evaluate-test.sh posix/tst-spawn $? false false > /builddir/build/BUILD/glibc-2.28/build-ppc64le-redhat-linux/posix/tst-spawn.test-result
/builddir/build/BUILD/glibc-2.28/build-ppc64le-redhat-linux/posix/tst-spawn: file 2 not in right position
error: tst-spawn.c:262: not true: WEXITSTATUS (status) == 0
error: 1 test failures
original exit status 1
There is an upstream patch which improves the diagnostics slightly:
Author: Adhemerval Zanella <firstname.lastname@example.org>
Date: Wed Sep 19 11:12:05 2018 -0700
Use libsupport for tst-spawn.c
No function changes is done. Checked on x86_64-linux-gnu.
* posix/tst-spawn.c (do_prepare, handle_restart, do_test):
Maybe this will allow us to see what is going on.
The test does not seem to have file system races. The ppc64le uses tmpfs, so maybe this is a contributing issue.
Bug 1659512 comment 1 suggests that the diagnostics do not really help. In any case, it's not architecture-specific.
This was fixed upstream in this commit, I think:
Author: Stefan Liebler <email@example.com>
Date: Fri Feb 1 11:03:35 2019 +0100
posix/tst-spawn: Fix racy tests in spawned processes.
Verified, posix/tst-spawn passed on all architectures
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.