[PATCH v1.1] tests: Verify inheritance of cpu affinity

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Tue Jan 7 22:54:21 GMT 2025



On 07/01/25 19:01, Siddhesh Poyarekar wrote:
> On 2025-01-07 15:51, Adhemerval Zanella Netto wrote:
>>> +  /* Less CPUS for the first level, if that's possible.  */
>>> +  if (entry && cpus > 1)
>>> +    cpus--;
>>
>> I think this will always fail on CPUs with one core (there are still
>> some for non-usual architectures).
>>
> 
> For single CPU systems this should end up having the same mask for the first and second level tests, which shouldn't actually cause a failure. I admittedly haven't tested this though; I'll try and get a box to confirm.

I meant that with only cpu, cnpus will be zero and the test

  if (CPU_COUNT_S (param->size, param->set) == 0)
    FAIL_EXIT1 ("Failed to add any CPUs to the affinity set\n");

will fail because no cpu will be added.


More information about the Libc-alpha mailing list