diff options
author | kib <kib@FreeBSD.org> | 2012-06-27 20:34:29 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2012-06-27 20:34:29 +0000 |
commit | 8710f3e28444783f9fc78be7033895c674c8d75c (patch) | |
tree | 22cf7e6cf7d52981ca0e911528df1f06429586ae | |
parent | d4c1a42e53ebc1cf06858005a608e33c0bcc2200 (diff) | |
download | FreeBSD-src-8710f3e28444783f9fc78be7033895c674c8d75c.zip FreeBSD-src-8710f3e28444783f9fc78be7033895c674c8d75c.tar.gz |
Add a test for number of CPUs configured/online.
MFC after: 1 week
-rw-r--r-- | tools/test/auxinfo/auxinfo.c | 8 |
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); } |