Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop getconf check in TestGetPresent #16

Merged
merged 1 commit into from
Aug 16, 2021
Merged

Conversation

tklauser
Copy link
Owner

It seems the assumption that getconf _NPROCESSORS_CONF returns
the number of CPUs in /sys/devices/system/cpu/present is not always
true on all systems.

Inspecting the code of glibc's getconf implementation it seems the value
returned by getconf _NPROCESSORS_CONF is the total number of cpuN
directories found in /sys/devices/system/cpu while
numcpus.GetPresent reads /sys/devices/system/cpu/present. Thus, drop
the check to avoid failing tests where this might not be true (such as
on some ppc64 systems.

Fixes #15

It seems the assumption that `getconf _NPROCESSORS_CONF` returns
the number of CPUs in `/sys/devices/system/cpu/present` is not always
true on all systems.

Inspecting the code of glibc's getconf implementation it seems the value
returned by `getconf _NPROCESSORS_CONF` is the total number of `cpuN`
directories found in `/sys/devices/system/cpu` while
`numcpus.GetPresent` reads `/sys/devices/system/cpu/present`. Thus, drop
the check to avoid failing tests where this might not be true (such as
on some ppc64 systems.

Fixes #15
@tklauser tklauser merged commit cebb4e9 into master Aug 16, 2021
@tklauser tklauser deleted the test-present-drop-getconf branch August 16, 2021 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests fail on ppc64
1 participant