Added the fix for the failing tests on ppc64le by working around the

libtool wrapper that adds the `lt-` prefix to binaries not yet installed
on the system which causes the (namely the bsdcpio test_basic.c test)
tests to fail since they expect exact error output which cannot be
achieved if the binary name conatins the prefix

Author: Kiran Belle

Related: RHEL-157397
This commit is contained in:
Pavol Sloboda 2026-04-14 08:38:46 +02:00
parent 3c301e67f9
commit e257340a1e

View File

@ -181,6 +181,17 @@ cat_logs ()
run_testsuite ()
{
rc=0
# Workaround: libtool wrappers (e.g. ./bsdcpio) copy the real binary from
# .libs/bsdcpio to .libs/lt-bsdcpio and execute that, so argv[0] becomes
# "lt-bsdcpio". On filesystems with large inode numbers (e.g. ppc64le),
# cpio newc format tests emit truncation warnings containing the program
# name and fail because they expect "bsdcpio:" but get "lt-bsdcpio:".
# Fix by patching the wrapper scripts to not use the lt- prefix.
for f in bsdcpio bsdtar bsdcat bsdunzip; do
if [ -f "$f" ] && grep -q "lt-$f" "$f" 2>/dev/null; then
sed -i "s|lt-$f|$f|g" "$f"
fi
done
%make_build check -j1 || {
# error happened - try to extract in koji as much info as possible
cat_logs