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 <fweimer@redhat.com>
This commit is contained in:
Carlos O'Donell 2024-08-15 08:12:35 -04:00
parent 3e1d8d1d1d
commit b22923abb0

View File

@ -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. */