Switch to the upstream way of building xtests
Backport the upstream changes that allow us to build the xtests without running them during the build. They can be very slow, so this saves a bit of build time.
This commit is contained in:
parent
bf426e9f02
commit
0cf6b2eb0a
28
glibc-build-xtests-1.patch
Normal file
28
glibc-build-xtests-1.patch
Normal file
@ -0,0 +1,28 @@
|
||||
commit 734e7f91e752f44984fe42c2384c23a0290b6e56
|
||||
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
Date: Tue Aug 20 16:22:07 2024 +0200
|
||||
|
||||
Rules: Also build memcheck tests even when not running them
|
||||
|
||||
This will avoid in the future cases like a57cbbd85379 ("malloc: Link
|
||||
threading tests with $(shared-thread-library") missing the memcheck
|
||||
cases added in 251843e16fce ("malloc: Link threading tests with
|
||||
$(shared-thread-library)")
|
||||
|
||||
diff --git a/Rules b/Rules
|
||||
index 9010c5d5b269a805..27846abf82b65f60 100644
|
||||
--- a/Rules
|
||||
+++ b/Rules
|
||||
@@ -145,7 +145,11 @@ others: $(py-const)
|
||||
ifeq ($(run-built-tests),no)
|
||||
tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \
|
||||
$(tests) $(tests-internal) \
|
||||
- $(tests-container)) \
|
||||
+ $(tests-container) \
|
||||
+ $(tests-mcheck:%=%-mcheck) \
|
||||
+ $(tests-malloc-check:%=%-malloc-check) \
|
||||
+ $(tests-malloc-hugetlb1:%=%-malloc-hugetlb1) \
|
||||
+ $(tests-malloc-hugetlb2:%=%-malloc-hugetlb2)) \
|
||||
$(test-srcs)) $(tests-special) \
|
||||
$(tests-printers-programs)
|
||||
xtests: tests $(xtests-special)
|
82
glibc-build-xtests-2.patch
Normal file
82
glibc-build-xtests-2.patch
Normal file
@ -0,0 +1,82 @@
|
||||
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>
|
||||
|
||||
diff --git a/Rules b/Rules
|
||||
index 27846abf82b65f60..713c225d2ebf5506 100644
|
||||
--- a/Rules
|
||||
+++ b/Rules
|
||||
@@ -143,8 +143,9 @@ 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) \
|
||||
$(tests-mcheck:%=%-mcheck) \
|
||||
$(tests-malloc-check:%=%-malloc-check) \
|
||||
@@ -153,8 +154,10 @@ tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \
|
||||
$(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) \
|
||||
@@ -162,26 +165,28 @@ tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \
|
||||
$(tests-malloc-hugetlb2:%=$(objpfx)%-malloc-hugetlb2.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-malloc-hugetlb1:%=%-malloc-hugetlb1) \
|
||||
$(tests-malloc-hugetlb2:%=%-malloc-hugetlb2) \
|
||||
$(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)
|
20
glibc.spec
20
glibc.spec
@ -170,7 +170,7 @@ Version: %{glibcversion}
|
||||
# - It allows using the Release number without the %%dist tag in the dependency
|
||||
# generator to make the generated requires interchangeable between Rawhide
|
||||
# and ELN (.elnYY < .fcXX).
|
||||
%global baserelease 23
|
||||
%global baserelease 24
|
||||
Release: %{baserelease}%{?dist}
|
||||
|
||||
# Licenses:
|
||||
@ -431,6 +431,8 @@ Patch118: glibc-upstream-2.39-93.patch
|
||||
Patch119: glibc-upstream-2.39-94.patch
|
||||
Patch120: RHEL-18039-1.patch
|
||||
Patch121: RHEL-18039-2.patch
|
||||
Patch122: glibc-build-xtests-1.patch
|
||||
Patch123: glibc-build-xtests-2.patch
|
||||
|
||||
##############################################################################
|
||||
# Continued list of core "glibc" package information:
|
||||
@ -2336,19 +2338,6 @@ 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 -Eq '^\s+=== Summary of 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:"
|
||||
cat misc/tst-syscall-list.out >&2
|
||||
@ -2674,6 +2663,9 @@ update_gconv_modules_cache ()
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Nov 4 2024 Florian Weimer <fweimer@redhat.com> - 2.39-24
|
||||
- Switch to the upstream way of building xtests
|
||||
|
||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2.39-23
|
||||
- Bump release for October 2024 mass rebuild:
|
||||
Resolves: RHEL-64018
|
||||
|
Loading…
Reference in New Issue
Block a user