* [scarthgap][PATCH] glibc-y2038-tests:add tests-special in run-built-tests yes
@ 2025-03-28 12:40 rajmohan r
2025-03-28 13:18 ` [OE-core] " Alexander Kanavin
0 siblings, 1 reply; 5+ messages in thread
From: rajmohan r @ 2025-03-28 12:40 UTC (permalink / raw)
To: openembedded-core
If 'run-built-tests' is 'yes' run the test binaries, else do not run
the test binaries.
Currently its taking 13min to complete do_check() for glibc-y2038-tests.
Test binaries are run in do_check() stage though 'run-built-tests' is
set 'no'. Which is wrong hence include 'tests-special' target inside
the 'run-built-tests' condition when set to 'yes' to avoid running the
test binaries.
Also remove 'tests-special' target from the 'tests' and 'xtests' list
when run-built-tests set to 'no' to avoid running test binaries.
After this change, no binary is run and time to complete do_check()
stage is 3min.
Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: rajmohan r <semc.2042@gmail.com>
---
.../glibc/glibc-y2038-tests_2.39.bb | 1 +
...tests-special-in-run-built-tests-yes.patch | 184 ++++++++++++++++++
2 files changed, 185 insertions(+)
create mode 100644 meta/recipes-core/glibc/glibc/include-tests-special-in-run-built-tests-yes.patch
diff --git a/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb b/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb
index be49ca4cb7..90c112c12f 100644
--- a/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb
+++ b/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb
@@ -5,6 +5,7 @@ inherit ptest features_check
REQUIRED_DISTRO_FEATURES = "ptest"
SRC_URI += "\
+ file://include-tests-special-in-run-built-tests-yes.patch \
file://run-ptest \
"
diff --git a/meta/recipes-core/glibc/glibc/include-tests-special-in-run-built-tests-yes.patch b/meta/recipes-core/glibc/glibc/include-tests-special-in-run-built-tests-yes.patch
new file mode 100644
index 0000000000..25777be2eb
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/include-tests-special-in-run-built-tests-yes.patch
@@ -0,0 +1,184 @@
+glibc-y2038-tests: include tests-special in run-built-tests yes
+
+If 'run-built-tests' is 'yes' run the test binaries, else do not run
+the test binaries.
+
+Currently its taking 13min to complete do_check() for glibc-y2038-tests.
+Test binaries are run in do_check() stage though 'run-built-tests' is
+set 'no'. Which is wrong hence include 'tests-special' target inside
+the 'run-built-tests' condition when set to 'yes' to avoid running the
+test binaries.
+
+Also remove 'tests-special' target from the 'tests' and 'xtests' list
+when run-built-tests set to 'no' to avoid running test binaries.
+
+After this change, no binary is run and time to complete do_check()
+stage is 3min.
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: rajmohan r <semc.2042@gmail.com>
+---
+ Makefile | 16 ++++++++++++++++
+ Makerules | 2 ++
+ Rules | 8 ++++++--
+ 3 files changed, 24 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c8b7e3f..2812e97 100644
+--- a/Makefile
++++ b/Makefile
+@@ -545,21 +545,26 @@ tests-clean: do-tests-clean
+ @$(MAKE) subdir_testclean no_deps=t
+
+ ifneq (,$(CXX))
++ifeq ($(run-built-tests),yes)
+ vpath c++-types.data $(+sysdep_dirs)
+
+ tests-special += $(objpfx)c++-types-check.out
+ $(objpfx)c++-types-check.out: c++-types.data scripts/check-c++-types.sh
+ scripts/check-c++-types.sh $< $(CXX) $(filter-out -std=gnu11 $(+gccwarn-c),$(CFLAGS)) $(CPPFLAGS) > $@; \
+ $(evaluate-test)
++endif # $(run-built-tests) = yes
+ endif
+
++ifeq ($(run-built-tests),yes)
+ tests-special += $(objpfx)check-local-headers.out
+ $(objpfx)check-local-headers.out: scripts/check-local-headers.sh
+ AWK='$(AWK)' scripts/check-local-headers.sh \
+ "$(includedir)" "$(objpfx)" < /dev/null > $@; \
+ $(evaluate-test)
++endif # $(run-built-tests) = yes
+
+ ifneq "$(headers)" ""
++ifeq ($(run-built-tests),yes)
+ # Special test of all the installed headers in this directory.
+ tests-special += $(objpfx)check-installed-headers-c.out
+ libof-check-installed-headers-c := testsuite
+@@ -569,8 +574,10 @@ $(objpfx)check-installed-headers-c.out: \
+ "$(CC) $(filter-out -std=%,$(CFLAGS)) -D_ISOMAC $(+includes)" \
+ $(headers) > $@; \
+ $(evaluate-test)
++endif # $(run-built-tests) = yes
+
+ ifneq "$(CXX)" ""
++ifeq ($(run-built-tests),yes)
+ tests-special += $(objpfx)check-installed-headers-cxx.out
+ libof-check-installed-headers-cxx := testsuite
+ $(objpfx)check-installed-headers-cxx.out: \
+@@ -579,14 +586,18 @@ $(objpfx)check-installed-headers-cxx.out: \
+ "$(CXX) $(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
+ $(headers) > $@; \
+ $(evaluate-test)
++endif # $(run-built-tests) = yes
+ endif # $(CXX)
+
++ifeq ($(run-built-tests),yes)
+ tests-special += $(objpfx)check-wrapper-headers.out
+ $(objpfx)check-wrapper-headers.out: scripts/check-wrapper-headers.py $(headers)
+ $(PYTHON) $< --root=. --subdir=. $(headers) \
+ --generated $(common-generated) > $@; $(evaluate-test)
++endif # $(run-built-tests) = yes
+ endif # $(headers)
+
++ifeq ($(run-built-tests),yes)
+ # Lint all Makefiles; including this one. Pass `pwd` as the source
+ # directory since the top-level Makefile is in the root of the source
+ # tree and these tests are run from there. We add light-weight linting
+@@ -596,7 +607,9 @@ tests-special += $(objpfx)lint-makefiles.out
+ $(objpfx)lint-makefiles.out: scripts/lint-makefiles.sh
+ $(SHELL) $< "$(PYTHON)" `pwd` > $@ ; \
+ $(evaluate-test)
++endif # $(run-built-tests) = yes
+
++ifeq ($(run-built-tests),yes)
+ # Link libc.a as a whole to verify that it does not contain multiple
+ # definitions of any symbols.
+ tests-special += $(objpfx)link-static-libc.out
+@@ -604,6 +617,7 @@ $(objpfx)link-static-libc.out:
+ $(LINK.o) $(whole-archive) -nostdlib -nostartfiles -r \
+ $(objpfx)libc.a -o /dev/null > $@ 2>&1; \
+ $(evaluate-test)
++endif # $(run-built-tests) = yes
+
+ # Print test summary for tests in $1 .sum file;
+ # $2 is optional test identifier.
+@@ -684,6 +698,7 @@ endif
+ rm -f $(symbolic-link-list)
+ touch $(objpfx)testroot.pristine/install.stamp
+
++ifeq ($(run-built-tests),yes)
+ tests-special-notdir = $(patsubst $(objpfx)%, %, $(tests-special))
+ tests: $(tests-special)
+ $(..)scripts/merge-test-results.sh -s $(objpfx) "" \
+@@ -698,6 +713,7 @@ xtests:
+ $(sort $(subdirs)) \
+ > $(objpfx)xtests.sum
+ $(call summarize-tests,xtests.sum, for extra tests)
++endif # $(run-built-tests) = yes
+
+ # The realclean target is just like distclean for the parent, but we want
+ # the subdirs to know the difference in case they care.
+diff --git a/Makerules b/Makerules
+index 00365bc..843f1c0 100644
+--- a/Makerules
++++ b/Makerules
+@@ -1225,6 +1225,7 @@ include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
+ endif
+
+ ifeq ($(build-shared),yes)
++ifeq ($(run-built-tests),yes)
+ # Generate normalized lists of symbols, versions, and data sizes.
+ # This is handy for checking against existing library binaries.
+
+@@ -1314,6 +1315,7 @@ tests-special += $(check-abi-list)
+ endif
+ endif
+
++endif # $(run-built-tests) = yes
+ endif
+ \f
+ FORCE:
+diff --git a/Rules b/Rules
+index 9010c5d..6825f63 100644
+--- a/Rules
++++ b/Rules
+@@ -93,6 +93,7 @@ $(objpfx)check-installed-headers-c.out: \
+ ifneq "$(CXX)" ""
+ # If a C++ compiler is available, also test that they can be compiled
+ # in isolation as C++.
++ifeq ($(run-built-tests),yes)
+ tests-special += $(objpfx)check-installed-headers-cxx.out
+ libof-check-installed-headers-cxx := testsuite
+ $(objpfx)check-installed-headers-cxx.out: \
+@@ -101,8 +102,10 @@ $(objpfx)check-installed-headers-cxx.out: \
+ "$(CXX) $(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
+ $(headers) > $@; \
+ $(evaluate-test)
++endif # $(run-built-tests) = yes
+ endif # $(CXX)
+
++ifeq ($(run-built-tests),yes)
+ # Test that a wrapper header exists in include/ for each non-sysdeps header.
+ # This script does not need $(py-env).
+ tests-special += $(objpfx)check-wrapper-headers.out
+@@ -120,6 +123,7 @@ $(objpfx)check-obsolete-constructs.out: \
+ $(..)scripts/check-obsolete-constructs.py $(headers)
+ $(PYTHON) $^ > $@ 2>&1; \
+ $(evaluate-test)
++endif # $(run-built-tests) = yes
+
+ endif # $(headers)
+ \f
+@@ -146,9 +150,9 @@ ifeq ($(run-built-tests),no)
+ tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \
+ $(tests) $(tests-internal) \
+ $(tests-container)) \
+- $(test-srcs)) $(tests-special) \
++ $(test-srcs)) \
+ $(tests-printers-programs)
+-xtests: tests $(xtests-special)
++xtests: tests
+ else
+ tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \
+ $(tests-container:%=$(objpfx)%.out) \
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core] [scarthgap][PATCH] glibc-y2038-tests:add tests-special in run-built-tests yes
2025-03-28 12:40 [scarthgap][PATCH] glibc-y2038-tests:add tests-special in run-built-tests yes rajmohan r
@ 2025-03-28 13:18 ` Alexander Kanavin
2025-03-31 11:13 ` rajmohan r
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kanavin @ 2025-03-28 13:18 UTC (permalink / raw)
To: semc.2042, Khem Raj; +Cc: openembedded-core
Thanks for the patch. It does need to be rebased to master, and
submitted for that branch first, then backported to scarthgap.
Also, Khem can you take a look please?
Alex
On Fri, 28 Mar 2025 at 13:40, rajmohan r via lists.openembedded.org
<semc.2042=gmail.com@lists.openembedded.org> wrote:
>
> If 'run-built-tests' is 'yes' run the test binaries, else do not run
> the test binaries.
>
> Currently its taking 13min to complete do_check() for glibc-y2038-tests.
> Test binaries are run in do_check() stage though 'run-built-tests' is
> set 'no'. Which is wrong hence include 'tests-special' target inside
> the 'run-built-tests' condition when set to 'yes' to avoid running the
> test binaries.
>
> Also remove 'tests-special' target from the 'tests' and 'xtests' list
> when run-built-tests set to 'no' to avoid running test binaries.
>
> After this change, no binary is run and time to complete do_check()
> stage is 3min.
>
> Upstream-Status: Inappropriate [oe-specific]
>
> Signed-off-by: rajmohan r <semc.2042@gmail.com>
> ---
> .../glibc/glibc-y2038-tests_2.39.bb | 1 +
> ...tests-special-in-run-built-tests-yes.patch | 184 ++++++++++++++++++
> 2 files changed, 185 insertions(+)
> create mode 100644 meta/recipes-core/glibc/glibc/include-tests-special-in-run-built-tests-yes.patch
>
> diff --git a/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb b/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb
> index be49ca4cb7..90c112c12f 100644
> --- a/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb
> +++ b/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb
> @@ -5,6 +5,7 @@ inherit ptest features_check
> REQUIRED_DISTRO_FEATURES = "ptest"
>
> SRC_URI += "\
> + file://include-tests-special-in-run-built-tests-yes.patch \
> file://run-ptest \
> "
>
> diff --git a/meta/recipes-core/glibc/glibc/include-tests-special-in-run-built-tests-yes.patch b/meta/recipes-core/glibc/glibc/include-tests-special-in-run-built-tests-yes.patch
> new file mode 100644
> index 0000000000..25777be2eb
> --- /dev/null
> +++ b/meta/recipes-core/glibc/glibc/include-tests-special-in-run-built-tests-yes.patch
> @@ -0,0 +1,184 @@
> +glibc-y2038-tests: include tests-special in run-built-tests yes
> +
> +If 'run-built-tests' is 'yes' run the test binaries, else do not run
> +the test binaries.
> +
> +Currently its taking 13min to complete do_check() for glibc-y2038-tests.
> +Test binaries are run in do_check() stage though 'run-built-tests' is
> +set 'no'. Which is wrong hence include 'tests-special' target inside
> +the 'run-built-tests' condition when set to 'yes' to avoid running the
> +test binaries.
> +
> +Also remove 'tests-special' target from the 'tests' and 'xtests' list
> +when run-built-tests set to 'no' to avoid running test binaries.
> +
> +After this change, no binary is run and time to complete do_check()
> +stage is 3min.
> +
> +Upstream-Status: Inappropriate [oe-specific]
> +
> +Signed-off-by: rajmohan r <semc.2042@gmail.com>
> +---
> + Makefile | 16 ++++++++++++++++
> + Makerules | 2 ++
> + Rules | 8 ++++++--
> + 3 files changed, 24 insertions(+), 2 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index c8b7e3f..2812e97 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -545,21 +545,26 @@ tests-clean: do-tests-clean
> + @$(MAKE) subdir_testclean no_deps=t
> +
> + ifneq (,$(CXX))
> ++ifeq ($(run-built-tests),yes)
> + vpath c++-types.data $(+sysdep_dirs)
> +
> + tests-special += $(objpfx)c++-types-check.out
> + $(objpfx)c++-types-check.out: c++-types.data scripts/check-c++-types.sh
> + scripts/check-c++-types.sh $< $(CXX) $(filter-out -std=gnu11 $(+gccwarn-c),$(CFLAGS)) $(CPPFLAGS) > $@; \
> + $(evaluate-test)
> ++endif # $(run-built-tests) = yes
> + endif
> +
> ++ifeq ($(run-built-tests),yes)
> + tests-special += $(objpfx)check-local-headers.out
> + $(objpfx)check-local-headers.out: scripts/check-local-headers.sh
> + AWK='$(AWK)' scripts/check-local-headers.sh \
> + "$(includedir)" "$(objpfx)" < /dev/null > $@; \
> + $(evaluate-test)
> ++endif # $(run-built-tests) = yes
> +
> + ifneq "$(headers)" ""
> ++ifeq ($(run-built-tests),yes)
> + # Special test of all the installed headers in this directory.
> + tests-special += $(objpfx)check-installed-headers-c.out
> + libof-check-installed-headers-c := testsuite
> +@@ -569,8 +574,10 @@ $(objpfx)check-installed-headers-c.out: \
> + "$(CC) $(filter-out -std=%,$(CFLAGS)) -D_ISOMAC $(+includes)" \
> + $(headers) > $@; \
> + $(evaluate-test)
> ++endif # $(run-built-tests) = yes
> +
> + ifneq "$(CXX)" ""
> ++ifeq ($(run-built-tests),yes)
> + tests-special += $(objpfx)check-installed-headers-cxx.out
> + libof-check-installed-headers-cxx := testsuite
> + $(objpfx)check-installed-headers-cxx.out: \
> +@@ -579,14 +586,18 @@ $(objpfx)check-installed-headers-cxx.out: \
> + "$(CXX) $(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
> + $(headers) > $@; \
> + $(evaluate-test)
> ++endif # $(run-built-tests) = yes
> + endif # $(CXX)
> +
> ++ifeq ($(run-built-tests),yes)
> + tests-special += $(objpfx)check-wrapper-headers.out
> + $(objpfx)check-wrapper-headers.out: scripts/check-wrapper-headers.py $(headers)
> + $(PYTHON) $< --root=. --subdir=. $(headers) \
> + --generated $(common-generated) > $@; $(evaluate-test)
> ++endif # $(run-built-tests) = yes
> + endif # $(headers)
> +
> ++ifeq ($(run-built-tests),yes)
> + # Lint all Makefiles; including this one. Pass `pwd` as the source
> + # directory since the top-level Makefile is in the root of the source
> + # tree and these tests are run from there. We add light-weight linting
> +@@ -596,7 +607,9 @@ tests-special += $(objpfx)lint-makefiles.out
> + $(objpfx)lint-makefiles.out: scripts/lint-makefiles.sh
> + $(SHELL) $< "$(PYTHON)" `pwd` > $@ ; \
> + $(evaluate-test)
> ++endif # $(run-built-tests) = yes
> +
> ++ifeq ($(run-built-tests),yes)
> + # Link libc.a as a whole to verify that it does not contain multiple
> + # definitions of any symbols.
> + tests-special += $(objpfx)link-static-libc.out
> +@@ -604,6 +617,7 @@ $(objpfx)link-static-libc.out:
> + $(LINK.o) $(whole-archive) -nostdlib -nostartfiles -r \
> + $(objpfx)libc.a -o /dev/null > $@ 2>&1; \
> + $(evaluate-test)
> ++endif # $(run-built-tests) = yes
> +
> + # Print test summary for tests in $1 .sum file;
> + # $2 is optional test identifier.
> +@@ -684,6 +698,7 @@ endif
> + rm -f $(symbolic-link-list)
> + touch $(objpfx)testroot.pristine/install.stamp
> +
> ++ifeq ($(run-built-tests),yes)
> + tests-special-notdir = $(patsubst $(objpfx)%, %, $(tests-special))
> + tests: $(tests-special)
> + $(..)scripts/merge-test-results.sh -s $(objpfx) "" \
> +@@ -698,6 +713,7 @@ xtests:
> + $(sort $(subdirs)) \
> + > $(objpfx)xtests.sum
> + $(call summarize-tests,xtests.sum, for extra tests)
> ++endif # $(run-built-tests) = yes
> +
> + # The realclean target is just like distclean for the parent, but we want
> + # the subdirs to know the difference in case they care.
> +diff --git a/Makerules b/Makerules
> +index 00365bc..843f1c0 100644
> +--- a/Makerules
> ++++ b/Makerules
> +@@ -1225,6 +1225,7 @@ include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
> + endif
> +
> + ifeq ($(build-shared),yes)
> ++ifeq ($(run-built-tests),yes)
> + # Generate normalized lists of symbols, versions, and data sizes.
> + # This is handy for checking against existing library binaries.
> +
> +@@ -1314,6 +1315,7 @@ tests-special += $(check-abi-list)
> + endif
> + endif
> +
> ++endif # $(run-built-tests) = yes
> + endif
> +
> + FORCE:
> +diff --git a/Rules b/Rules
> +index 9010c5d..6825f63 100644
> +--- a/Rules
> ++++ b/Rules
> +@@ -93,6 +93,7 @@ $(objpfx)check-installed-headers-c.out: \
> + ifneq "$(CXX)" ""
> + # If a C++ compiler is available, also test that they can be compiled
> + # in isolation as C++.
> ++ifeq ($(run-built-tests),yes)
> + tests-special += $(objpfx)check-installed-headers-cxx.out
> + libof-check-installed-headers-cxx := testsuite
> + $(objpfx)check-installed-headers-cxx.out: \
> +@@ -101,8 +102,10 @@ $(objpfx)check-installed-headers-cxx.out: \
> + "$(CXX) $(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
> + $(headers) > $@; \
> + $(evaluate-test)
> ++endif # $(run-built-tests) = yes
> + endif # $(CXX)
> +
> ++ifeq ($(run-built-tests),yes)
> + # Test that a wrapper header exists in include/ for each non-sysdeps header.
> + # This script does not need $(py-env).
> + tests-special += $(objpfx)check-wrapper-headers.out
> +@@ -120,6 +123,7 @@ $(objpfx)check-obsolete-constructs.out: \
> + $(..)scripts/check-obsolete-constructs.py $(headers)
> + $(PYTHON) $^ > $@ 2>&1; \
> + $(evaluate-test)
> ++endif # $(run-built-tests) = yes
> +
> + endif # $(headers)
> +
> +@@ -146,9 +150,9 @@ ifeq ($(run-built-tests),no)
> + tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \
> + $(tests) $(tests-internal) \
> + $(tests-container)) \
> +- $(test-srcs)) $(tests-special) \
> ++ $(test-srcs)) \
> + $(tests-printers-programs)
> +-xtests: tests $(xtests-special)
> ++xtests: tests
> + else
> + tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \
> + $(tests-container:%=$(objpfx)%.out) \
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#213834): https://lists.openembedded.org/g/openembedded-core/message/213834
> Mute This Topic: https://lists.openembedded.org/mt/111953097/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [scarthgap][PATCH] glibc-y2038-tests:add tests-special in run-built-tests yes
2025-03-28 13:18 ` [OE-core] " Alexander Kanavin
@ 2025-03-31 11:13 ` rajmohan r
2025-03-31 11:26 ` [OE-core] " Alexander Kanavin
0 siblings, 1 reply; 5+ messages in thread
From: rajmohan r @ 2025-03-31 11:13 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 10183 bytes --]
On Fri, Mar 28, 2025 at 01:18 PM, Alexander Kanavin wrote:
>
> Thanks for the patch. It does need to be rebased to master, and
> submitted for that branch first, then backported to scarthgap.
I have done the patch for master branch also.
Checking the time difference with and without patch.
I will upload the patch for master branch.
Since the change is in 'Make[file/rules]' and 'Rules' file,
so upstreamed for scarthgap branch.
Once the scarthgap patch is reviewed and no comment or
any comment is present, this scarthgap patch will help to
avoid extra-work for master branch. Hence upstreamed to
scarthgap branch.
>
> Also, Khem can you take a look please?
Thanks for reviewing.
>
>
> Alex
>
> On Fri, 28 Mar 2025 at 13:40, rajmohan r via lists.openembedded.org
> <semc.2042=gmail.com@lists.openembedded.org> wrote:
>
>> If 'run-built-tests' is 'yes' run the test binaries, else do not run
>> the test binaries.
>>
>> Currently its taking 13min to complete do_check() for glibc-y2038-tests.
>> Test binaries are run in do_check() stage though 'run-built-tests' is
>> set 'no'. Which is wrong hence include 'tests-special' target inside
>> the 'run-built-tests' condition when set to 'yes' to avoid running the
>> test binaries.
>>
>> Also remove 'tests-special' target from the 'tests' and 'xtests' list
>> when run-built-tests set to 'no' to avoid running test binaries.
>>
>> After this change, no binary is run and time to complete do_check()
>> stage is 3min.
>>
>> Upstream-Status: Inappropriate [oe-specific]
>>
>> Signed-off-by: rajmohan r <semc.2042@gmail.com>
>> ---
>> .../glibc/glibc-y2038-tests_2.39.bb | 1 +
>> ...tests-special-in-run-built-tests-yes.patch | 184 ++++++++++++++++++
>> 2 files changed, 185 insertions(+)
>> create mode 100644
>> meta/recipes-core/glibc/glibc/include-tests-special-in-run-built-tests-yes.patch
>>
>>
>> diff --git a/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb
>> b/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb
>> index be49ca4cb7..90c112c12f 100644
>> --- a/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb
>> +++ b/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb
>> @@ -5,6 +5,7 @@ inherit ptest features_check
>> REQUIRED_DISTRO_FEATURES = "ptest"
>>
>> SRC_URI += "\
>> + file://include-tests-special-in-run-built-tests-yes.patch \
>> file://run-ptest \
>> "
>>
>> diff --git
>> a/meta/recipes-core/glibc/glibc/include-tests-special-in-run-built-tests-yes.patch
>> b/meta/recipes-core/glibc/glibc/include-tests-special-in-run-built-tests-yes.patch
>>
>> new file mode 100644
>> index 0000000000..25777be2eb
>> --- /dev/null
>> +++
>> b/meta/recipes-core/glibc/glibc/include-tests-special-in-run-built-tests-yes.patch
>>
>> @@ -0,0 +1,184 @@
>> +glibc-y2038-tests: include tests-special in run-built-tests yes
>> +
>> +If 'run-built-tests' is 'yes' run the test binaries, else do not run
>> +the test binaries.
>> +
>> +Currently its taking 13min to complete do_check() for glibc-y2038-tests.
>> +Test binaries are run in do_check() stage though 'run-built-tests' is
>> +set 'no'. Which is wrong hence include 'tests-special' target inside
>> +the 'run-built-tests' condition when set to 'yes' to avoid running the
>> +test binaries.
>> +
>> +Also remove 'tests-special' target from the 'tests' and 'xtests' list
>> +when run-built-tests set to 'no' to avoid running test binaries.
>> +
>> +After this change, no binary is run and time to complete do_check()
>> +stage is 3min.
>> +
>> +Upstream-Status: Inappropriate [oe-specific]
>> +
>> +Signed-off-by: rajmohan r <semc.2042@gmail.com>
>> +---
>> + Makefile | 16 ++++++++++++++++
>> + Makerules | 2 ++
>> + Rules | 8 ++++++--
>> + 3 files changed, 24 insertions(+), 2 deletions(-)
>> +
>> +diff --git a/Makefile b/Makefile
>> +index c8b7e3f..2812e97 100644
>> +--- a/Makefile
>> ++++ b/Makefile
>> +@@ -545,21 +545,26 @@ tests-clean: do-tests-clean
>> + @$(MAKE) subdir_testclean no_deps=t
>> +
>> + ifneq (,$(CXX))
>> ++ifeq ($(run-built-tests),yes)
>> + vpath c++-types.data $(+sysdep_dirs)
>> +
>> + tests-special += $(objpfx)c++-types-check.out
>> + $(objpfx)c++-types-check.out: c++-types.data scripts/check-c++-types.sh
>> + scripts/check-c++-types.sh $< $(CXX) $(filter-out -std=gnu11
>> $(+gccwarn-c),$(CFLAGS)) $(CPPFLAGS) > $@; \
>> + $(evaluate-test)
>> ++endif # $(run-built-tests) = yes
>> + endif
>> +
>> ++ifeq ($(run-built-tests),yes)
>> + tests-special += $(objpfx)check-local-headers.out
>> + $(objpfx)check-local-headers.out: scripts/check-local-headers.sh
>> + AWK='$(AWK)' scripts/check-local-headers.sh \
>> + "$(includedir)" "$(objpfx)" < /dev/null > $@; \
>> + $(evaluate-test)
>> ++endif # $(run-built-tests) = yes
>> +
>> + ifneq "$(headers)" ""
>> ++ifeq ($(run-built-tests),yes)
>> + # Special test of all the installed headers in this directory.
>> + tests-special += $(objpfx)check-installed-headers-c.out
>> + libof-check-installed-headers-c := testsuite
>> +@@ -569,8 +574,10 @@ $(objpfx)check-installed-headers-c.out: \
>> + "$(CC) $(filter-out -std=%,$(CFLAGS)) -D_ISOMAC $(+includes)" \
>> + $(headers) > $@; \
>> + $(evaluate-test)
>> ++endif # $(run-built-tests) = yes
>> +
>> + ifneq "$(CXX)" ""
>> ++ifeq ($(run-built-tests),yes)
>> + tests-special += $(objpfx)check-installed-headers-cxx.out
>> + libof-check-installed-headers-cxx := testsuite
>> + $(objpfx)check-installed-headers-cxx.out: \
>> +@@ -579,14 +586,18 @@ $(objpfx)check-installed-headers-cxx.out: \
>> + "$(CXX) $(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
>> + $(headers) > $@; \
>> + $(evaluate-test)
>> ++endif # $(run-built-tests) = yes
>> + endif # $(CXX)
>> +
>> ++ifeq ($(run-built-tests),yes)
>> + tests-special += $(objpfx)check-wrapper-headers.out
>> + $(objpfx)check-wrapper-headers.out: scripts/check-wrapper-headers.py
>> $(headers)
>> + $(PYTHON) $< --root=. --subdir=. $(headers) \
>> + --generated $(common-generated) > $@; $(evaluate-test)
>> ++endif # $(run-built-tests) = yes
>> + endif # $(headers)
>> +
>> ++ifeq ($(run-built-tests),yes)
>> + # Lint all Makefiles; including this one. Pass `pwd` as the source
>> + # directory since the top-level Makefile is in the root of the source
>> + # tree and these tests are run from there. We add light-weight linting
>> +@@ -596,7 +607,9 @@ tests-special += $(objpfx)lint-makefiles.out
>> + $(objpfx)lint-makefiles.out: scripts/lint-makefiles.sh
>> + $(SHELL) $< "$(PYTHON)" `pwd` > $@ ; \
>> + $(evaluate-test)
>> ++endif # $(run-built-tests) = yes
>> +
>> ++ifeq ($(run-built-tests),yes)
>> + # Link libc.a as a whole to verify that it does not contain multiple
>> + # definitions of any symbols.
>> + tests-special += $(objpfx)link-static-libc.out
>> +@@ -604,6 +617,7 @@ $(objpfx)link-static-libc.out:
>> + $(LINK.o) $(whole-archive) -nostdlib -nostartfiles -r \
>> + $(objpfx)libc.a -o /dev/null > $@ 2>&1; \
>> + $(evaluate-test)
>> ++endif # $(run-built-tests) = yes
>> +
>> + # Print test summary for tests in $1 .sum file;
>> + # $2 is optional test identifier.
>> +@@ -684,6 +698,7 @@ endif
>> + rm -f $(symbolic-link-list)
>> + touch $(objpfx)testroot.pristine/install.stamp
>> +
>> ++ifeq ($(run-built-tests),yes)
>> + tests-special-notdir = $(patsubst $(objpfx)%, %, $(tests-special))
>> + tests: $(tests-special)
>> + $(..)scripts/merge-test-results.sh -s $(objpfx) "" \
>> +@@ -698,6 +713,7 @@ xtests:
>> + $(sort $(subdirs)) \
>> + > $(objpfx)xtests.sum
>> + $(call summarize-tests,xtests.sum, for extra tests)
>> ++endif # $(run-built-tests) = yes
>> +
>> + # The realclean target is just like distclean for the parent, but we
>> want
>> + # the subdirs to know the difference in case they care.
>> +diff --git a/Makerules b/Makerules
>> +index 00365bc..843f1c0 100644
>> +--- a/Makerules
>> ++++ b/Makerules
>> +@@ -1225,6 +1225,7 @@ include $(patsubst
>> %,$(..)libof-iterator.mk,$(cpp-srcs-left))
>> + endif
>> +
>> + ifeq ($(build-shared),yes)
>> ++ifeq ($(run-built-tests),yes)
>> + # Generate normalized lists of symbols, versions, and data sizes.
>> + # This is handy for checking against existing library binaries.
>> +
>> +@@ -1314,6 +1315,7 @@ tests-special += $(check-abi-list)
>> + endif
>> + endif
>> +
>> ++endif # $(run-built-tests) = yes
>> + endif
>> +
>> + FORCE:
>> +diff --git a/Rules b/Rules
>> +index 9010c5d..6825f63 100644
>> +--- a/Rules
>> ++++ b/Rules
>> +@@ -93,6 +93,7 @@ $(objpfx)check-installed-headers-c.out: \
>> + ifneq "$(CXX)" ""
>> + # If a C++ compiler is available, also test that they can be compiled
>> + # in isolation as C++.
>> ++ifeq ($(run-built-tests),yes)
>> + tests-special += $(objpfx)check-installed-headers-cxx.out
>> + libof-check-installed-headers-cxx := testsuite
>> + $(objpfx)check-installed-headers-cxx.out: \
>> +@@ -101,8 +102,10 @@ $(objpfx)check-installed-headers-cxx.out: \
>> + "$(CXX) $(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
>> + $(headers) > $@; \
>> + $(evaluate-test)
>> ++endif # $(run-built-tests) = yes
>> + endif # $(CXX)
>> +
>> ++ifeq ($(run-built-tests),yes)
>> + # Test that a wrapper header exists in include/ for each non-sysdeps
>> header.
>> + # This script does not need $(py-env).
>> + tests-special += $(objpfx)check-wrapper-headers.out
>> +@@ -120,6 +123,7 @@ $(objpfx)check-obsolete-constructs.out: \
>> + $(..)scripts/check-obsolete-constructs.py $(headers)
>> + $(PYTHON) $^ > $@ 2>&1; \
>> + $(evaluate-test)
>> ++endif # $(run-built-tests) = yes
>> +
>> + endif # $(headers)
>> +
>> +@@ -146,9 +150,9 @@ ifeq ($(run-built-tests),no)
>> + tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \
>> + $(tests) $(tests-internal) \
>> + $(tests-container)) \
>> +- $(test-srcs)) $(tests-special) \
>> ++ $(test-srcs)) \
>> + $(tests-printers-programs)
>> +-xtests: tests $(xtests-special)
>> ++xtests: tests
>> + else
>> + tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \
>> + $(tests-container:%=$(objpfx)%.out) \
>> --
>> 2.34.1
>
>
[-- Attachment #2: Type: text/html, Size: 10648 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [scarthgap][PATCH] glibc-y2038-tests:add tests-special in run-built-tests yes
2025-03-31 11:13 ` rajmohan r
@ 2025-03-31 11:26 ` Alexander Kanavin
2025-04-10 10:10 ` rajmohan r
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kanavin @ 2025-03-31 11:26 UTC (permalink / raw)
To: semc.2042; +Cc: openembedded-core
On Mon, 31 Mar 2025 at 13:13, rajmohan r via lists.openembedded.org
<semc.2042=gmail.com@lists.openembedded.org> wrote:
> Since the change is in 'Make[file/rules]' and 'Rules' file,
> so upstreamed for scarthgap branch.
> Once the scarthgap patch is reviewed and no comment or
> any comment is present, this scarthgap patch will help to
> avoid extra-work for master branch. Hence upstreamed to
> scarthgap branch.
That's not how the oe-core patch submission process works. Internally
you can write and test patches in any order you like, but when sending
them here for review, you must submit for master first.
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [scarthgap][PATCH] glibc-y2038-tests:add tests-special in run-built-tests yes
2025-03-31 11:26 ` [OE-core] " Alexander Kanavin
@ 2025-04-10 10:10 ` rajmohan r
0 siblings, 0 replies; 5+ messages in thread
From: rajmohan r @ 2025-04-10 10:10 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 880 bytes --]
On Mon, Mar 31, 2025 at 11:26 AM, Alexander Kanavin wrote:
>
> On Mon, 31 Mar 2025 at 13:13, rajmohan r via lists.openembedded.org
> <semc.2042=gmail.com@lists.openembedded.org> wrote:
>
>> Since the change is in 'Make[file/rules]' and 'Rules' file,
>> so upstreamed for scarthgap branch.
>> Once the scarthgap patch is reviewed and no comment or
>> any comment is present, this scarthgap patch will help to
>> avoid extra-work for master branch. Hence upstreamed to
>> scarthgap branch.
>
> That's not how the oe-core patch submission process works. Internally
> you can write and test patches in any order you like, but when sending
> them here for review, you must submit for master first.
I have send the patch to master branch and the link is https://lists.openembedded.org/g/openembedded-core/topic/patch_glibc_y2038_tests_add/112188476
>
> Alex
[-- Attachment #2: Type: text/html, Size: 1145 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-10 10:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-28 12:40 [scarthgap][PATCH] glibc-y2038-tests:add tests-special in run-built-tests yes rajmohan r
2025-03-28 13:18 ` [OE-core] " Alexander Kanavin
2025-03-31 11:13 ` rajmohan r
2025-03-31 11:26 ` [OE-core] " Alexander Kanavin
2025-04-10 10:10 ` rajmohan r
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox