From b22923abb046311ac9097a36b97b9b97342bac44 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 15 Aug 2024 08:12:35 -0400 Subject: [PATCH] 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 --- sysdeps/unix/sysv/linux/tst-skeleton-affinity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c b/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c index 31a15b3ad7..2f921ed397 100644 --- a/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c +++ b/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c @@ -157,7 +157,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. */ -- 2.43.5