summaryrefslogtreecommitdiffstats
path: root/tools/test/auxinfo/auxinfo.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-06-27 20:34:29 +0000
committerkib <kib@FreeBSD.org>2012-06-27 20:34:29 +0000
commit8710f3e28444783f9fc78be7033895c674c8d75c (patch)
tree22cf7e6cf7d52981ca0e911528df1f06429586ae /tools/test/auxinfo/auxinfo.c
parentd4c1a42e53ebc1cf06858005a608e33c0bcc2200 (diff)
downloadFreeBSD-src-8710f3e28444783f9fc78be7033895c674c8d75c.zip
FreeBSD-src-8710f3e28444783f9fc78be7033895c674c8d75c.tar.gz
Add a test for number of CPUs configured/online.
MFC after: 1 week
Diffstat (limited to 'tools/test/auxinfo/auxinfo.c')
-rw-r--r--tools/test/auxinfo/auxinfo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/test/auxinfo/auxinfo.c b/tools/test/auxinfo/auxinfo.c
index 374bed8..a855b54 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);
}
OpenPOWER on IntegriCloud