Disable failing subtest of elf/tst-dl_find_object-static (RHEL-108221)

Resolves: RHEL-108221
This commit is contained in:
Florian Weimer 2025-08-11 10:49:51 +02:00
parent ad8f8253fd
commit 598d4ec8e6
2 changed files with 41 additions and 1 deletions

36
glibc-RHEL-108221.patch Normal file
View File

@ -0,0 +1,36 @@
In glibc-RHEL-93320-9.patch, the elf/tst-dl_find_object test was
added. It was later disabled in glibc-RHEL-93320-19.patch,
as noted in the patch description. This was missed when the
patch was re-added in glibc-RHEL-107564.patch. The test remains
valuable because we do not test _dl_find_object in libc.a elsewhere
in the glibc build, so this patch disables just the failing subtest,
and puts an explanation directly into the test.
diff --git a/elf/tst-dl_find_object.c b/elf/tst-dl_find_object.c
index d8c217545d116453..6bfda7bd23a34c0d 100644
--- a/elf/tst-dl_find_object.c
+++ b/elf/tst-dl_find_object.c
@@ -231,6 +231,7 @@ do_test (void)
check (map_start, &expected, __LINE__);
check (map_end, &expected, __LINE__);
+#ifndef FOR_STATIC
/* Check that _dl_find_object works from a shared object (mostly for
static dlopen). */
__typeof (_dl_find_object) *find_object
@@ -238,6 +239,15 @@ do_test (void)
struct dl_find_object actual;
TEST_COMPARE (find_object (&main_program_data, &actual), 0);
check (&main_program_data, &actual, __LINE__); /* Reversed check. */
+#else
+ /* Downstream, _dl_find_object does not work after static dlopen
+ because the ld.so copy loaded as part of static dlopen is not
+ initialized. Upstream, we redirect _dl_find_object to the
+ statically version from the main program by patching a function
+ pointer in _rtld_global_ro. Downstream, we have not changed the
+ layout of _rtld_global_ro, so this patching is missing. */
+ printf ("info: skipping dlopen-based test for static build\n");
+#endif
return 0;
}

View File

@ -157,7 +157,7 @@ end \
Summary: The GNU libc libraries
Name: glibc
Version: %{glibcversion}
Release: 226%{?dist}
Release: 227%{?dist}
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
# libraries.
@ -1335,6 +1335,7 @@ Patch1019: glibc-RHEL-50086-1.patch
Patch1020: glibc-RHEL-50086-2.patch
Patch1021: glibc-RHEL-107564.patch
Patch1022: glibc-RHEL-105965.patch
Patch1023: glibc-RHEL-108221.patch
##############################################################################
# Continued list of core "glibc" package information:
@ -3422,6 +3423,9 @@ update_gconv_modules_cache ()
%endif
%changelog
* Mon Aug 11 2025 Florian Weimer <fweimer@redhat.com> - 2.34-227
- Disable failing subtest of elf/tst-dl_find_object-static (RHEL-108221)
* Thu Aug 07 2025 Florian Weimer <fweimer@redhat.com> - 2.34-226
- Prevent inlining of _dl_debug_state (RHEL-105965)