From 044eae4c80122d134b594eeb51618be0268f4767 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 27 Jun 2012 20:34:29 +0000 Subject: [PATCH] Add a test for number of CPUs configured/online. MFC after: 1 week --- tools/test/auxinfo/auxinfo.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/test/auxinfo/auxinfo.c b/tools/test/auxinfo/auxinfo.c index 374bed8b4299..a855b543f270 100644 --- a/tools/test/auxinfo/auxinfo.c +++ b/tools/test/auxinfo/auxinfo.c @@ -47,6 +47,13 @@ test_osreldate(void) printf("OSRELDATE: %d\n", getosreldate()); } +static void +test_ncpus(void) +{ + + printf("NCPUs: %ld\n", sysconf(_SC_NPROCESSORS_CONF)); +} + int main(int argc __unused, char *argv[] __unused) { @@ -54,5 +61,6 @@ main(int argc __unused, char *argv[] __unused) test_pagesizes(); test_pagesize(); test_osreldate(); + test_ncpus(); return (0); }