From 56deeec87794e5b7f4044aebcd105d5763ee350c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20B=C3=A9rat?= Date: Wed, 4 Jun 2025 16:20:17 +0200 Subject: [PATCH] Report error if setaffinity wrapper fails - Backport: Report error if setaffinity wrapper fails (Bug 32040) Resolves: RHEL-94634 --- glibc-RHEL-94634.patch | 29 +++++++++++++++++++++++++++++ glibc.spec | 6 +++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 glibc-RHEL-94634.patch diff --git a/glibc-RHEL-94634.patch b/glibc-RHEL-94634.patch new file mode 100644 index 0000000..e9a194f --- /dev/null +++ b/glibc-RHEL-94634.patch @@ -0,0 +1,29 @@ +commit b22923abb046311ac9097a36b97b9b97342bac44 +Author: Carlos O'Donell +Date: Thu Aug 15 08:12:35 2024 -0400 + + Report error if setaffinity wrapper fails (Bug 32040) + + Previously if the setaffinity wrapper failed the rest of the subtest + would not execute and the current subtest would be reported as passing. + Now if the setaffinity wrapper fails the subtest is correctly reported + as faling. Tested manually by changing the conditions of the affinity + call including setting size to zero, or checking the wrong condition. + + No regressions on x86_64. + + Reviewed-by: Florian Weimer + +diff --git a/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c b/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c +index 55ddcda2ce24e186..6871ac73fd69a935 100644 +--- a/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c ++++ b/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c +@@ -158,7 +158,7 @@ test_size (const struct conf *conf, size_t size) + if (setaffinity (kernel_size, initial_set) < 0) + { + printf ("error: size %zu: setaffinity: %m\n", size); +- return true; ++ return false; + } + + /* Use one-CPU set to test switching between CPUs. */ diff --git a/glibc.spec b/glibc.spec index 3b9a2dd..23787ed 100644 --- a/glibc.spec +++ b/glibc.spec @@ -157,7 +157,7 @@ end \ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 200%{?dist} +Release: 201%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1224,6 +1224,7 @@ Patch915: glibc-RHEL-72017-5.patch Patch916: glibc-RHEL-57671-1.patch Patch917: glibc-RHEL-57671-2.patch Patch918: glibc-RHEL-57671-3.patch +Patch919: glibc-RHEL-94634.patch ############################################################################## # Continued list of core "glibc" package information: @@ -3217,6 +3218,9 @@ update_gconv_modules_cache () %endif %changelog +* Wed Jun 04 2025 Frédéric Bérat - 2.34-201 +- Report error if setaffinity wrapper fails (RHEL-94634) + * Tue Jun 03 2025 Florian Weimer - 2.34-200 - manual: Document the clock_nanosleep function (RHEL-57671)