glibc: Drop 0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch
PATCH 1/2 glibc: Drop 0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch
From: Deepesh Varatharajan <[email protected]>
This patch was originally added to replace pwd-derived paths in glibc test binaries with fixed Yocto paths (e.g., $(oe_srcdir), $(libdir)/glibc-tests/ptest/tests/glibc-ptest) to fix the repro issue with run-ptest script(no longer exists in master).
In the current master:
run-ptest script and the glibc-y2038-tests recipe were dropped via the following commit
https://git.openembedded.org/openembedded-core/commit/meta?id=fbe3679ba3c12c52a502511f5dde91fb4de7a6b6
Glibc tests now run via check-test-wrapper, which dynamically configures environment, sysroot, and library paths. The hardcoded paths from this patch conflict with dynamic path resolution, causing some tests to fail like
error: xdlmopen.c:28: error: dlmopen:/usr/lib/glibc-tests/ptest/tests/glibc-ptest/*:
cannot open shared object file:No such file or directory
Reproducibility is confirmed to remain intact without this patch. Since it no longer provides benefits and interferes with correct test execution, the patch is being dropped.
Testing results:
before after diff
PASS 6937 6943 +6
XPASS 4 4 0
FAIL 72 66 -6 XFAIL 16 16 0
UNSUPPORTED 108 108 0
--- ...build-time-paths-in-the-output-binar.patch | 32 ------------------- meta/recipes-core/glibc/glibc_2.42.bb | 1 - 2 files changed, 33 deletions(-) delete mode 100644 meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch
meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch deleted +0 -32
@@ -1,32 +0,0 @@ -From 662d544fbed823b9bf917058762ddb54bcee5f07 Mon Sep 17 00:00:00 2001 -From: Richard Purdie <[email protected]> -Date: Sun, 24 Jul 2022 07:07:29 -0700 -Subject: [PATCH] Avoid hardcoded build time paths in the output binaries - -replace the compile definitions with the output locations. - -Upstream-Status: Inappropriate [would need reworking somehow to be acceptable upstream] - -Signed-off-by: Richard Purdie <[email protected]> -Signed-off-by: Khem Raj <[email protected]> ---- - support/Makefile | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/support/Makefile b/support/Makefile -index d41278eeab..657769418e 100644 ---- a/support/Makefile -+++ b/support/Makefile -@@ -238,9 +238,9 @@ libsupport-inhibit-o += .o - endif - - CFLAGS-support_paths.c = \ -- -DSRCDIR_PATH=\"`cd .. ; pwd`\" \ -- -DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \ -- -DOBJDIR_ELF_LDSO_PATH=\"`cd $(objpfx)/..; pwd`/elf/$(rtld-installed-name)\" \ -+ -DSRCDIR_PATH=\"$(oe_srcdir)\" \ -+ -DOBJDIR_PATH=\"$(libdir)/glibc-tests/ptest/tests/glibc-ptest\" \ -+ -DOBJDIR_ELF_LDSO_PATH=\"$(slibdir)/$(rtld-installed-name)\" \ - -DINSTDIR_PATH=\"$(prefix)\" \ - -DLIBDIR_PATH=\"$(libdir)\" \ - -DBINDIR_PATH=\"$(bindir)\" \
meta/recipes-core/glibc/glibc_2.42.bb +0 -1
@@ -51,7 +51,6 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0019-timezone-Make-shell-interpreter-overridable-in-tzsel.patch \ file://0020-tzselect.ksh-Use-bin-sh-default-shell-interpreter.patch \ file://0021-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ - file://0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch \ file://0023-tests-Skip-2-qemu-tests-that-can-hang-in-oe-selftest.patch \ file://0024-Propagate-ffile-prefix-map-from-CFLAGS-to-ASFLAGS.patch \ "
Signature · 1 line
2.49.0
PATCH 2/2 glibc: Enable NFS local file locking for glibc tests
From: Deepesh Varatharajan <[email protected]>
Some glibc tests in oe-selftest were failing with
error: test-container.c:837: Cannot lock testroot
The issue came from test-container.c, which creates testroot.pristine/lock.fd and uses flock() to coordinate test execution. The lock file itself was created successfully, but flock() failed only on the NFS-mounted test directory, while it worked everywhere else inside QEMU.
The root cause is that the default NFS mount options used by oe-selftest implicitly set local_lock=none, which disables local file locking on NFSv3. With this setting in place, every flock() call on the mounted directory failed with ENOLCK (“No locks available”).
Switching the mount to use local_lock=all restores local file locking on NFS and allows flock() to work as expected. With this change, the locking-dependent glibc tests run successfully.
Testing results:
before after diff
PASS 6943 6968 +25
XPASS 4 4 0
FAIL 66 46 -20 XFAIL 16 16 0
UNSUPPORTED 108 103 -5
--- meta/lib/oeqa/selftest/cases/glibc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/glibc.py +1 -1
@@ -79,7 +79,7 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase): # setup nfs mount if qemu.run("mkdir -p \"{0}\"".format(tmpdir))[0] != 0: raise Exception("Failed to setup NFS mount directory on target") - mountcmd = "mount -o noac,nfsvers=3,port={0},mountport={1} \"{2}:{3}\" \"{3}\"".format(nfsport, mountport, qemu.server_ip, tmpdir) + mountcmd = "mount -o noac,nfsvers=3,local_lock=all,port={0},mountport={1} \"{2}:{3}\" \"{3}\"".format(nfsport, mountport, qemu.server_ip, tmpdir) status, output = qemu.run(mountcmd) if status != 0: raise Exception("Failed to setup NFS mount on target ({})".format(repr(output)))
Signature · 1 line
2.49.0
LGTM
Quoted 125 lines · Deepesh via lists.openembedded.org
From: Deepesh Varatharajan <[email protected]>
This patch was originally added to replace pwd-derived paths in glibc test binaries with
fixed Yocto paths (e.g., $(oe_srcdir), $(libdir)/glibc-tests/ptest/tests/glibc-ptest) to
fix the repro issue with run-ptest script(no longer exists in master).In the current master:
run-ptest script and the glibc-y2038-tests recipe were dropped via the following commithttps://git.openembedded.org/openembedded-core/commit/meta?id=fbe3679ba3c12c52a502511f5dde91fb4de7a6b6
Glibc tests now run via check-test-wrapper, which dynamically configures environment,
sysroot, and library paths. The hardcoded paths from this patch conflict with dynamic
path resolution, causing some tests to fail likeerror: xdlmopen.c:28: error:
dlmopen:/usr/lib/glibc-tests/ptest/tests/glibc-ptest/*:
cannot open shared object file:No such file or directoryReproducibility is confirmed to remain intact without this patch. Since it no longer provides
benefits and interferes with correct test execution, the patch is being dropped.Testing results:
before after diff
PASS 6937 6943 +6
XPASS 4 4 0FAIL 72 66 -6 XFAIL 16 16 0UNSUPPORTED 108 108 0
Signed-off-by Deepesh Varatharajan <[email protected]>--- ...build-time-paths-in-the-output-binar.patch | 32 ------------------- meta/recipes-core/glibc/glibc_2.42.bb | 1 - 2 files changed, 33 deletions(-) delete mode 100644
meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patchdiff --git
a/meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patchb/meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patchdeleted file mode 100644
index 9fa5d471ad..0000000000
---a/meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch+++/dev/nullmeta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch deleted +0
-8@@ -1,32 +0,0 @@ -From 662d544fbed823b9bf917058762ddb54bcee5f07 Mon Sep 17 00:00:00 2001 -From: Richard Purdie <[email protected]> -Date: Sun, 24 Jul 2022 07:07:29 -0700 -Subject: [PATCH] Avoid hardcoded build time paths in the output binaries - -replace the compile definitions with the output locations. - -Upstream-Status: Inappropriate [would need reworking somehow to beacceptable upstream]
meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch deleted +0
-18- -Signed-off-by: Richard Purdie <[email protected]> -Signed-off-by: Khem Raj <[email protected]> ---- - support/Makefile | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/support/Makefile b/support/Makefile -index d41278eeab..657769418e 100644 ---- a/support/Makefile -+++ b/support/Makefile -@@ -238,9 +238,9 @@ libsupport-inhibit-o += .o - endif - - CFLAGS-support_paths.c = \ -- -DSRCDIR_PATH=\"`cd .. ; pwd`\" \ -- -DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \ -- -DOBJDIR_ELF_LDSO_PATH=\"`cd $(objpfx)/..;pwd`/elf/$(rtld-installed-name)\" \
-+ -DSRCDIR_PATH=\"$(oe_srcdir)\" \
-+meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch deleted +0
-6-DOBJDIR_PATH=\"$(libdir)/glibc-tests/ptest/tests/glibc-ptest\" \ -+ -DOBJDIR_ELF_LDSO_PATH=\"$(slibdir)/$(rtld-installed-name)\" \ - -DINSTDIR_PATH=\"$(prefix)\" \ - -DLIBDIR_PATH=\"$(libdir)\" \ - -DBINDIR_PATH=\"$(bindir)\" \meta/recipes-core/glibc/glibc_2.42.bb +0
-0@@ -51,7 +51,6 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0019-timezone-Make-shell-interpreter-overridable-in-tzsel.patch \ file://0020-tzselect.ksh-Use-bin-sh-default-shell-interpreter.patch \file://0021-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \
-
file://0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch \file://0023-tests-Skip-2-qemu-tests-that-can-hang-in-oe-selftest.patch \
file://0024-Propagate-ffile-prefix-map-from-CFLAGS-to-ASFLAGS.patch \
"
--
2.49.0-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#226754):
https://lists.openembedded.org/g/openembedded-core/message/226754
Mute This Topic: https://lists.openembedded.org/mt/116466215/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-