Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jul 2012 15:41:31 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r238139 - stable/9/tools/test/auxinfo
Message-ID:  <201207051541.q65FfVC1081927@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207051541.q65FfVC1081927>