]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: add bonnie++ to the workunits
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 8 Dec 2009 00:48:35 +0000 (16:48 -0800)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 8 Dec 2009 00:48:35 +0000 (16:48 -0800)
qa/runallonce.sh
qa/workunits/40_bonnie.sh [new file with mode: 0755]

index cf2f411693f3db9b0bc01d7e5f251c3ad0260409..19d7dfcc3d79bc113ca7acc428581f0e09e79fad 100755 (executable)
@@ -5,6 +5,8 @@ set -e
 basedir=`echo $0 | sed 's/[^/]*$//g'`.
 testdir="$1"
 
+[ ${basedir:0:1} == "." ] && basedir=`pwd`/${basedir:1}
+
 test -d $testdir || ( echo "specify test dir" && exit 1 )
 cd $testdir
 
@@ -16,4 +18,4 @@ do
   cd $test
   ${basedir}/${test}
   popd
-done
\ No newline at end of file
+done
diff --git a/qa/workunits/40_bonnie.sh b/qa/workunits/40_bonnie.sh
new file mode 100755 (executable)
index 0000000..9b860e0
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+bonnie_bin=`which bonnie++`
+[ $? -eq 1 ] && bonnie_bin=/usr/sbin/bonnie++
+
+uid_flags=""
+[ "`id -u`" == "0" ] && uid_flags="-u root"
+
+$bonnie_bin $uid_flags -n 100