[compiler-rt] Relax pthread_getaffinity test to account for cgroups/docker
authorDavid Spickett <david.spickett@linaro.org>
Tue, 11 Oct 2022 14:44:11 +0000 (14:44 +0000)
committerDavid Spickett <david.spickett@linaro.org>
Mon, 17 Oct 2022 10:45:30 +0000 (10:45 +0000)
commitd231efe1ee1102e10cef1dd294778ccbea103e9c
tree305e5c30f7fdc8a7b28cf172efddd4a8b82ddf6e
parenta7cccb9cbb2b9954684cbea37615303a59719973
[compiler-rt] Relax pthread_getaffinity test to account for cgroups/docker

Fixes #58283

When running in a docker container you can have fewer cores assigned
to you than get_nrpoc would suggest.

Since the test just wants to know that interception worked, allow
any result > 0 and <= the global core count.

Reviewed By: MaskRay, vitalybuka

Differential Revision: https://reviews.llvm.org/D135677
compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_getaffinity_np.cpp