From daee39c6e10b501187ceda0a46b3abc88ce016b5 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Fri, 20 Sep 2024 00:03:24 +0200 Subject: [PATCH] Fix core_count chaos mode test to reflect that rr with or without chaos mode always returns the true number of processors configured --- src/chaos-test/core_count.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/chaos-test/core_count.c b/src/chaos-test/core_count.c index 78eee6643d7..438eff0902f 100644 --- a/src/chaos-test/core_count.c +++ b/src/chaos-test/core_count.c @@ -7,12 +7,13 @@ int main(__attribute__((unused)) int argc, char** argv) { int cores = atoi(argv[1]); + int sysconf_onln = sysconf(_SC_NPROCESSORS_ONLN); - if (sysconf(_SC_NPROCESSORS_ONLN) == cores && - sysconf(_SC_NPROCESSORS_CONF) == cores) { + if (sysconf_onln == cores) { caught_test_failure("got core count: %d", cores); } + atomic_printf("Found %d cores online\n", sysconf_onln); atomic_puts("EXIT-SUCCESS"); return 0; }