svn commit: r253418 - user/pho/stress2/misc
Peter Holm
pho at FreeBSD.org
Wed Jul 17 11:03:56 UTC 2013
Author: pho
Date: Wed Jul 17 11:03:55 2013
New Revision: 253418
URL: http://svnweb.freebsd.org/changeset/base/253418
Log:
Rewrote test to use libMicro from ports.
Sponsored by: EMC / Isilon storage division
Modified:
user/pho/stress2/misc/libMicro.sh
Modified: user/pho/stress2/misc/libMicro.sh
==============================================================================
--- user/pho/stress2/misc/libMicro.sh Wed Jul 17 10:56:21 2013 (r253417)
+++ user/pho/stress2/misc/libMicro.sh Wed Jul 17 11:03:55 2013 (r253418)
@@ -28,44 +28,26 @@
# $FreeBSD$
#
-# Test using OpenSolaris libmicro-0.4.0.tar.gz benchmark
+# Test using the OpenSolaris libmicro benchmark
# Has shown page fault with the cascade_lockf test
-. ../default.cfg
+if [ $# -eq 0 ]; then
+ . ../default.cfg
-odir=`pwd`
+ [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
-cd $RUNDIR
-ftp http://www.opensolaris.org/os/project/libmicro/files/libmicro-0.4.0.tar.gz
-[ ! -r libmicro-0.4.0.tar.gz ] && exit 1
-tar zxfv libmicro-0.4.0.tar.gz
-cat > $RUNDIR/libMicro-0.4.0/Makefile.FreeBSD <<2EOF
-CC= gcc
-
-CFLAGS= -pthread
-CPPFLAGS= -DUSE_SEMOP -D_REENTRANT
-MATHLIB= -lm
-
-ELIDED_BENCHMARKS= \
- cachetocache \
- atomic
-
-
-include ../Makefile.com
-2EOF
-
-cd libMicro-0.4.0
-gmake
-ed bench <<3EOF
-/ARCH
-s/arch -k/uname -m/
-w
-q
-3EOF
-./bench > output &
-for i in `jot $((30 * 60))`; do
- ps | grep -q bench || break
- sleep 1
-done
-ps | grep bin/connection | grep -v grep | awk '{print $1}' | xargs kill # hack
-cd ..;rm -rf libMicro-0.4.0
+ [ -x /usr/local/bin/libmicro-bench ] ||
+ { echo "ports/benchmarks/libmicro is not installed"; exit 1; }
+
+ [ `id -un` = $testuser ] &&
+ { echo "\$testuser is identical to current id"; exit 1; }
+
+ rm -f /tmp/libmicro.log
+ su $testuser -c "$0 x"
+ echo ""
+else
+ /usr/local/bin/libmicro-bench > /tmp/libmicro.log &
+ # Temp. work-around for hanging "c_lockf_10" test.
+ sleep 60
+ kill 0
+fi
More information about the svn-src-user
mailing list