svn commit: r238139 - stable/9/tools/test/auxinfo
Konstantin Belousov
kib at FreeBSD.org
Thu Jul 5 15:41:32 UTC 2012
Author: kib
Date: Thu Jul 5 15:41:31 2012
New Revision: 238139
URL: http://svn.freebsd.org/changeset/base/238139
Log:
MFC r237661:
Add a test for number of CPUs configured/online.
Approved by: re (kensmith)
Modified:
stable/9/tools/test/auxinfo/auxinfo.c
Directory Properties:
stable/9/tools/test/auxinfo/ (props changed)
Modified: stable/9/tools/test/auxinfo/auxinfo.c
==============================================================================
--- stable/9/tools/test/auxinfo/auxinfo.c Thu Jul 5 15:40:41 2012 (r238138)
+++ stable/9/tools/test/auxinfo/auxinfo.c Thu Jul 5 15:41:31 2012 (r238139)
@@ -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[] __u
test_pagesizes();
test_pagesize();
test_osreldate();
+ test_ncpus();
return (0);
}
More information about the svn-src-stable-9
mailing list