]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: start new qa dir, add some client tests
authorSage Weil <sage@newdream.net>
Fri, 9 Oct 2009 19:19:35 +0000 (12:19 -0700)
committerSage Weil <sage@newdream.net>
Fri, 9 Oct 2009 19:19:35 +0000 (12:19 -0700)
qa/client/1.sh [new file with mode: 0755]
qa/client/10_iozone.sh [new file with mode: 0755]
qa/client/11_kernel_untar_build.sh [new file with mode: 0755]
qa/client/common.sh [new file with mode: 0644]

diff --git a/qa/client/1.sh b/qa/client/1.sh
new file mode 100755 (executable)
index 0000000..89eed2e
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+basedir=`echo $0 | sed 's/[^/]*$//g'`.
+. $basedir/common.sh
+
+mount
+enter_mydir
+
+mkdir foo
+echo foo > bar
+sync
+
+leave_mydir
+umount
diff --git a/qa/client/10_iozone.sh b/qa/client/10_iozone.sh
new file mode 100755 (executable)
index 0000000..8389b22
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+basedir=`echo $0 | sed 's/[^/]*$//g'`.
+. $basedir/common.sh
+
+mount
+enter_mydir
+
+iozone -c -e -s 1024M -r 16K -t 1 -F f1 -i 0 -i 1
+iozone -c -e -s 1024M -r 1M -t 1 -F f2 -i 0 -i 1
+iozone -c -e -s 10240M -r 1M -t 1 -F f3 -i 0 -i 1
+
+leave_mydir
+umount
diff --git a/qa/client/11_kernel_untar_build.sh b/qa/client/11_kernel_untar_build.sh
new file mode 100755 (executable)
index 0000000..ae7fded
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+basedir=`echo $0 | sed 's/[^/]*$//g'`
+basedir="${basedir}."
+. $basedir/common.sh
+
+mount
+enter_mydir
+
+tar jxvf /root/linux*
+cd linux*
+make defconfig
+make
+cd ..
+rm -r linux*
+
+leave_mydir
+umount
diff --git a/qa/client/common.sh b/qa/client/common.sh
new file mode 100644 (file)
index 0000000..063effb
--- /dev/null
@@ -0,0 +1,53 @@
+
+# defaults
+[ -z "$bindir" ] && bindir="."       # location of init-ceph
+[ -z "$conf" ] && conf="$basedir/ceph.conf"
+[ -z "$mnt" ] && mnt="/c"
+[ -z "$monhost" ] && monhost="cephbooter"
+
+set -e
+
+mydir=`hostname`_`echo $0 | sed 's/\//_/g'`
+
+mount()
+{
+    /bin/mount -t ceph $monhost:/ $mnt
+}
+
+umount()
+{
+    /bin/umount $mnt
+    # look for VFS complaints
+    if dmesg | tail -n 50 | grep -c "VFS: Busy inodes" ; then
+       echo "looks like we left inodes pinned"
+       exit 1
+    fi
+}
+
+start()
+{
+    $bindir/init-ceph -c $conf start ${1}
+}
+
+stop()
+{
+    $bindir/init-ceph -c $conf stop ${1}
+}
+
+restart()
+{
+    $bindir/init-ceph -c $conf restart ${1}
+}
+
+enter_mydir()
+{
+    pushd .
+    test -d $mnt/$mydir && rm -r $mnt/$mydir
+    mkdir $mnt/$mydir
+    cd $mnt/$mydir
+}
+
+leave_mydir()
+{
+    popd
+}