]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: test mdstable failures
authorSage Weil <sage@newdream.net>
Wed, 2 Dec 2009 00:18:23 +0000 (16:18 -0800)
committerSage Weil <sage@newdream.net>
Wed, 2 Dec 2009 00:19:19 +0000 (16:19 -0800)
qa/client/30_subdir_mount.sh
qa/client/common.sh
qa/mds/test_mdstable_failures.sh [new file with mode: 0644]

index 03a8623b036e5a65e0de18a7bc8ce1136ec16366..00f4f020e5d267284c80ee57f9d57f59e1ad5a16 100755 (executable)
@@ -3,10 +3,10 @@
 basedir=`echo $0 | sed 's/[^/]*$//g'`.
 . $basedir/common.sh
 
-mount
+client_mount
 mkdir -p $mnt/sub
 echo sub > $mnt/sub/file
-umount
+client_umount
 
 mkdir -p $mnt/1
 mkdir -p $mnt/2
index d032d26102e9b35c7c4343e2a2690fedeebdbe54..d06368e6ea758a52960d66b8ebc7923f12ba64a8 100644 (file)
@@ -1,6 +1,6 @@
 
 # defaults
-[ -z "$bindir" ] && bindir="."       # location of init-ceph
+[ -z "$bindir" ] && bindir=$PWD       # location of init-ceph
 [ -z "$conf" ] && conf="$basedir/ceph.conf"
 [ -z "$mnt" ] && mnt="/c"
 [ -z "$monhost" ] && monhost="cosd0"
@@ -9,12 +9,12 @@ set -e
 
 mydir=`hostname`_`echo $0 | sed 's/\//_/g'`
 
-mount()
+client_mount()
 {
     /bin/mount -t ceph $monhost:/ $mnt
 }
 
-umount()
+client_umount()
 {
     /bin/umount $mnt
     # look for VFS complaints
@@ -24,22 +24,27 @@ umount()
     fi
 }
 
-start()
+ceph_start()
 {
     $bindir/init-ceph -c $conf start ${1}
 }
 
-stop()
+ceph_stop()
 {
     $bindir/init-ceph -c $conf stop ${1}
 }
 
-restart()
+ceph_restart()
 {
     $bindir/init-ceph -c $conf restart ${1}
 }
 
-enter_mydir()
+ceph_command()
+{
+    $bindir/ceph -c $conf $*
+}
+
+client_enter_mydir()
 {
     pushd .
     test -d $mnt/$mydir && rm -r $mnt/$mydir
@@ -47,7 +52,7 @@ enter_mydir()
     cd $mnt/$mydir
 }
 
-leave_mydir()
+client_leave_mydir()
 {
     popd
 }
diff --git a/qa/mds/test_mdstable_failures.sh b/qa/mds/test_mdstable_failures.sh
new file mode 100644 (file)
index 0000000..5073952
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -x
+
+for f in `seq 1 8`
+do
+    echo testing failure point $f
+    $bindir/ceph -c $conf mds injectargs 0 "--mds_kill_mdstable_at $f"
+    sleep 1  # wait for mds command to go thru
+    pushd . ; cd $bindir ; ./init-ceph -c $conf start mds ; popd
+    touch $f
+    ln $f $f.link
+done
+