[PVFS2-CVS] commit by pcarns in pvfs2/test/automated: bonnie++.sh single-node-kernel-test.sh

CVS commit program cvs at parl.clemson.edu
Fri May 7 13:45:29 EDT 2004


Update of /projects/cvsroot/pvfs2/test/automated
In directory parlweb:/tmp/cvs-serv12981

Modified Files:
	single-node-kernel-test.sh 
Added Files:
	bonnie++.sh 
Log Message:
integrated a slightly modified version of a bonnie++ test script written by
Justin Luck, now part of nightly kernel testing


--- /dev/null	2003-01-30 05:24:37.000000000 -0500
+++ bonnie++.sh	2004-05-07 12:45:29.000000000 -0400
@@ -0,0 +1,118 @@
+#!/bin/sh
+
+bonnie_tarballname=bonnie++-1.03a.tgz
+bonnie_url=http://www.parl.clemson.edu/~tluck/$bonnie_tarballname
+
+bonnie_srcdir=/tmp/bonnie++.${USER}
+bonnie_tarball=$bonnie_srcdir/$bonnie_tarballname
+bonnie_tarballdir=`echo $bonnie_tarball | sed -e "s/.tar.gz//" | sed -e "s/.tgz//"`
+bonnie_installdir=/tmp/bonnie++.install.${USER}
+
+usage()
+{
+    echo "USAGE: bonnie++.sh -d <scratch dir>"
+    return
+}
+
+bonnie_scratchdir=fake
+
+while getopts d: opt
+do
+    case "$opt" in
+        d) bonnie_scratchdir="$OPTARG";;
+        \?) usage; exit 1;;
+    esac
+done
+
+if [ $bonnie_scratchdir = "fake" ] ; then 
+	echo "No scratch directory specified with -d; aborting."
+	usage
+	exit 1
+fi
+
+bonnie_configureopts="--prefix=$bonnie_installdir"
+bonnie_csv=/tmp/bonnie++-1.03a.csv.$USER
+bonnie_log=/tmp/bonnie++-1.03a.log.$USER
+
+scratch_size=20
+ram_size=10
+files_to_stat=2
+min_file_size=0
+max_file_size=2
+num_directories=3
+
+
+if [ -d $bonnie_srcdir ] ; then
+	rm -rf $bonnie_srcdir
+fi
+if [ -d $bonnie_installdir ] ; then
+	rm -rf $bonnie_installdir
+fi
+if [ -d $bonnie_scratchdir ] ; then
+	rm -rf $bonnie_scratchdir
+fi
+
+mkdir -p $bonnie_srcdir
+mkdir -p $bonnie_installdir
+mkdir -p $bonnie_scratchdir
+
+# get the source (-nv keeps it kinda quiet)
+cd $bonnie_srcdir
+wget -nv $bonnie_url
+if [ $? != 0 ] ; then
+	echo "wget of $bonnie_url failed.  Aborting."
+	exit 1
+fi
+# untar the source
+tar xzf $bonnie_tarball
+if [ $? != 0 ] ; then
+	echo "Untarring of $bonnie_tarball failed."
+	exit 1
+fi
+#configure bonnie++
+cd $bonnie_tarballdir
+./configure $bonnie_configureopts &> /tmp/bonnie++_configure.log.$USER
+if [ $? != 0 ] ; then
+	echo "Configure of $bonnie_tarballdir failed."
+	echo "See log file: /tmp/bonnie++_configure.log.$USER"
+	exit 1
+fi
+
+# make and install bonnie
+make install &> /tmp/bonnie++_make.log.$USER
+if [ $? != 0 ] ; then
+	echo "Make and install of $bonnie_tarballdir failed."
+	echo "See log file: /tmp/bonnie++_make.log.$USER"
+	exit 1
+fi
+	
+# run bonnie
+rm -f $bonnie_csv $bonnie_log
+time $bonnie_installdir/sbin/bonnie++ \
+	-d $bonnie_scratchdir \
+	-s $scratch_size \
+	-r $ram_size \
+	-n $files_to_stat:$max_file_size:$min_file_size:$num_directories \
+	-q >> $bonnie_csv 2>> $bonnie_log
+if [ $? != 0 ] ; then
+	echo "Bonnie failed to execute."
+	exit 1
+fi
+
+echo "BONNIE++ RESULTS ========================================"
+cat $bonnie_log
+echo "END BONNIE++ RESULTS ===================================="
+
+#usage: bonnie++ [-d scratch-dir] [-s size(Mb)[:chunk-size(b)]]
+#                [-n number-to-stat[:max-size[:min-size][:num-directories]]]
+#								[-m machine-name]
+#								[-r ram-size-in-Mb]
+#								[-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use]
+#								[-q] [-f] [-b] [-p processes | -y]
+
+
+#clean up
+rm -f $bonnie_csv $bonnie_log
+rm -rf $bonnie_srcdir
+rm -rf $bonnie_installdir
+rm -rf $bonnie_scratchdir

Index: single-node-kernel-test.sh
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/automated/single-node-kernel-test.sh,v
diff -p -u -r1.4 -r1.5
--- single-node-kernel-test.sh	7 May 2004 14:08:16 -0000	1.4
+++ single-node-kernel-test.sh	7 May 2004 16:45:29 -0000	1.5
@@ -68,14 +68,29 @@ fi
 ###################################################
 # begin tests
 
+echo "PVFS2-SHELL-TEST RESULTS ======================================"
 bash $srcdir/test/kernel/linux-2.6/pvfs2-shell-test.sh $rootdir/INSTALL-pvfs2/mnt/pvfs2 > /tmp/pvfs2-shell-test.${USER} 2>&1
 if [ $? -ne 0 ] ; then
 	cat /tmp/pvfs2-shell-test.${USER}
+	echo "*** pvfs2-shell-test.sh failed."
 	exit 1
 else
 	# only show summary of output if it succeeds
 	cat /tmp/pvfs2-shell-test.${USER} | grep PASS
 fi
+
+echo "[END] PVFS2-SHELL-TEST RESULTS ================================"
+
+
+echo "PVFS2-SHELL-TEST RESULTS ======================================"
+./bonnie++.sh -d $rootdir/INSTALL-pvfs2/mnt/pvfs2/bonnie++ 
+if [ $? -ne 0 ] ; then
+	echo "*** bonnie++.sh failed."
+	exit 1
+fi
+
+echo "[END] PVFS2-SHELL-TEST RESULTS ================================"
+
 
 # end tests
 ###################################################



More information about the PVFS2-CVS mailing list