Switch to upstream approach for building xtest during make check (RHEL-59494)

Upstream unconditionally builds xtests during make check after
the backported commit, so the spec file change is no longer necessary.

Resolves: RHEL-59494
This commit is contained in:
Florian Weimer 2024-09-24 14:56:53 +02:00
parent ecd5a531a3
commit ff10577abe
2 changed files with 86 additions and 15 deletions

79
glibc-RHEL-59494-3.patch Normal file
View File

@ -0,0 +1,79 @@
commit d5a3ca4061f7adc59196fa58e34eacebbebcbcfe
Author: Florian Weimer <fweimer@redhat.com>
Date: Thu Sep 19 15:40:05 2024 +0200
Implement run-built-tests=no for make xcheck, always build xtests
Previously, the second occurrence of the xtests target
expected all xtests to run (as the result of specifying
$(xtests)), but these tests have not been run due to
the the first xtests target is set up for run-built-tests=no:
it only runs tests in $(xtests-special). Consequently,
xtests are reported as UNSUPPORTED with “make xcheck
run-built-tests=no”. The xtests were not built, either.
After this change always, xtests are built regardless
of the $(run-built-tests) variable (except for xtests listed
in $(tests-unsupported)). To fix the UNSUPPORTED issue,
introduce xtests-expected and use that manage test
expectations in the second xtests target.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Conflicts:
Rules
(Missing malloc hugetlb support downstream)
diff --git a/Rules b/Rules
index b1137afe71fbfe59..0516f4762c69bbe0 100644
--- a/Rules
+++ b/Rules
@@ -146,37 +146,42 @@ endif
others: $(py-const)
ifeq ($(run-built-tests),no)
+# The $(xtests) dependency ensures that xtests are always built.
tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \
- $(tests) $(tests-internal) \
+ $(tests) $(tests-internal) $(xtests) \
$(tests-container)) \
$(test-srcs)) $(tests-special) \
$(tests-printers-programs)
xtests: tests $(xtests-special)
-else
+else # $(run-built-tests) != no
+# The $(xtests) dependency ensures that xtests are always built.
tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \
+ $(addprefix $(objpfx),$(filter-out $(tests-unsupported), $(xtests))) \
$(tests-container:%=$(objpfx)%.out) \
$(tests-mcheck:%=$(objpfx)%-mcheck.out) \
$(tests-malloc-check:%=$(objpfx)%-malloc-check.out) \
$(tests-special) $(tests-printers-out)
xtests: tests $(xtests:%=$(objpfx)%.out) $(xtests-special)
-endif
+endif # $(run-built-tests) != no
tests-special-notdir = $(patsubst $(objpfx)%, %, $(tests-special))
xtests-special-notdir = $(patsubst $(objpfx)%, %, $(xtests-special))
ifeq ($(run-built-tests),no)
tests-expected =
-else
+xtests-expected =
+else # $(run-built-tests) != no
tests-expected = $(tests) $(tests-internal) $(tests-printers) \
$(tests-container) $(tests-malloc-check:%=%-malloc-check) \
$(tests-mcheck:%=%-mcheck)
-endif
+xtests-expected = $(xtests)
+endif # $(run-built-tests) != no
tests:
$(..)scripts/merge-test-results.sh -s $(objpfx) $(subdir) \
$(sort $(tests-expected) $(tests-special-notdir:.out=)) \
> $(objpfx)subdir-tests.sum
xtests:
$(..)scripts/merge-test-results.sh -s $(objpfx) $(subdir) \
- $(sort $(xtests) $(xtests-special-notdir:.out=)) \
+ $(sort $(xtests-expected) $(xtests-special-notdir:.out=)) \
> $(objpfx)subdir-xtests.sum
ifeq ($(build-programs),yes)

View File

@ -157,7 +157,7 @@ end \
Summary: The GNU libc libraries
Name: glibc
Version: %{glibcversion}
Release: 126%{?dist}
Release: 127%{?dist}
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
# libraries.
@ -871,6 +871,7 @@ Patch632: glibc-RHEL-46979-3.patch
Patch633: glibc-RHEL-46979-4.patch
Patch634: glibc-RHEL-59494-1.patch
Patch635: glibc-RHEL-59494-2.patch
Patch636: glibc-RHEL-59494-3.patch
##############################################################################
# Continued list of core "glibc" package information:
@ -2668,22 +2669,10 @@ run_tests () {
done <rpmbuild.tests.sum.not-passing
fi
# Compile and run the xtests, so that they can be run separately later.
# Reduce timeout factor to complete the tests in a reasonable time
# (in case something was made an xtest due to excessive run time).
# Do not look at the test results; they are expected to fail in most
# cases.
set -x
TIMEOUT_FACTOR=1 %make_build xcheck > rpmbuild.xcheck.log 2>&1 || true
if ! grep -q '^Summary of test results for extra tests:$' rpmbuild.xcheck.log ; then
echo "FAIL: xcheck test suite build of target: $(basename "$(pwd)")" >& 2
cat rpmbuild.xcheck.log
exit 1
fi
# Unconditonally dump differences in the system call list.
: "* System call consistency checks:"
echo "* System call consistency checks:" >&2
cat misc/tst-syscall-list.out >&2
set -x
}
# Increase timeouts
@ -3042,6 +3031,9 @@ update_gconv_modules_cache ()
%endif
%changelog
* Tue Sep 24 2024 Florian Weimer <fweimer@redhat.com> - 2.34-127
- Switch to upstream approach for building xtest during make check (RHEL-59494)
* Thu Sep 19 2024 Florian Weimer <fweimer@redhat.com> - 2.34-126
- Ensure that xtests can be built (RHEL-59494)