]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: mds rename: Rework so it will function in teuthology as a workunit:
authorGreg Farnum <gregory.farnum@dreamhost.com>
Tue, 5 Jul 2011 22:57:26 +0000 (15:57 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 6 Jul 2011 21:20:35 +0000 (14:20 -0700)
work in current directory, not hardcoded mnt path
use CEPH_TOOL variable rather than hardcoded local executable
pass CEPH_ARGS to scripts so you don't need to export it into the environment.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
qa/mds/rename/all.sh
qa/mds/rename/dir_pri_nul.sh
qa/mds/rename/dir_pri_pri.sh
qa/mds/rename/prepare.sh
qa/mds/rename/pri_nul.sh
qa/mds/rename/pri_pri.sh
qa/mds/rename/pri_rem.sh
qa/mds/rename/rem_nul.sh
qa/mds/rename/rem_pri.sh
qa/mds/rename/rem_rem.sh

index 7df30f554e89f300355fcdcd18feb31ffad1045f..2049988b33dcbd08ec21432efacbb599bf55f5bc 100755 (executable)
@@ -2,26 +2,29 @@
 
 dir=`dirname $0`
 
-$dir/prepare.sh
+CEPH_TOOL='./ceph'
+$CEPH_TOOL || CEPH_TOOL='ceph'
 
-$dir/pri_nul.sh
-rm mnt/?/* || true
+CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/prepare.sh
 
-$dir/rem_nul.sh
-rm mnt/?/* || true
+CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/pri_nul.sh
+rm ./?/* || true
 
-$dir/pri_pri.sh
-rm mnt/?/* || true
+CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/rem_nul.sh
+rm ./?/* || true
 
-$dir/rem_pri.sh
-rm mnt/?/* || true
+CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/pri_pri.sh
+rm ./?/* || true
 
-$dir/rem_rem.sh
-rm mnt/?/* || true
+CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/rem_pri.sh
+rm ./?/* || true
 
-$dir/pri_nul.sh
-rm -r mnt/?/* || true
+CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/rem_rem.sh
+rm ./?/* || true
 
-$dir/pri_pri.sh
-rm -r mnt/?/* || true
+CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/pri_nul.sh
+rm -r ./?/* || true
+
+CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/pri_pri.sh
+rm -r ./?/* || true
 
index 130d96c9643ba8ece9032ed89ea1c9664239b8fc..dd8106b63b6a9f9ae7c8205afcf8045147168d22 100755 (executable)
@@ -1,28 +1,28 @@
 #!/bin/sh -ex
 
 # dir: srcdn=destdn
-mkdir mnt/a/dir1
-mv mnt/a/dir1 mnt/a/dir1.renamed
+mkdir ./a/dir1
+mv ./a/dir1 ./a/dir1.renamed
 
 # dir: diff
-mkdir mnt/a/dir2
-mv mnt/a/dir2 mnt/b/dir2
+mkdir ./a/dir2
+mv ./a/dir2 ./b/dir2
 
 # dir: diff, child subtree on target
-mkdir -p mnt/a/dir3/child/foo
-./ceph mds tell 0 export_dir /a/dir3/child 1
+mkdir -p ./a/dir3/child/foo
+$CEPH_TOOL mds tell 0 export_dir /a/dir3/child 1
 sleep 5
-mv mnt/a/dir3 mnt/b/dir3
+mv ./a/dir3 ./b/dir3
 
 # dir: diff, child subtree on other
-mkdir -p mnt/a/dir4/child/foo
-./ceph mds tell 0 export_dir /a/dir4/child 2
+mkdir -p ./a/dir4/child/foo
+$CEPH_TOOL mds tell 0 export_dir /a/dir4/child 2
 sleep 5
-mv mnt/a/dir4 mnt/b/dir4
+mv ./a/dir4 ./b/dir4
 
 # dir: witness subtree adjustment
-mkdir -p mnt/a/dir5/1/2/3/4
-./ceph mds tell 0 export_dir /a/dir5/1/2/3 2
+mkdir -p ./a/dir5/1/2/3/4
+$CEPH_TOOL mds tell 0 export_dir /a/dir5/1/2/3 2
 sleep 5
-mv mnt/a/dir5 mnt/b
+mv ./a/dir5 ./b
 
index abb199a63200dd14034ef2884f70401c6760719e..de235fcd3dd0cb8eaa34b7a6a92ba9649b065af4 100644 (file)
@@ -1,11 +1,11 @@
 #!/bin/sh -ex
 
 # dir, srcdn=destdn
-mkdir mnt/a/dir1
-mkdir mnt/a/dir2
-mv -T mnt/a/dir1 mnt/a/dir2
+mkdir ./a/dir1
+mkdir ./a/dir2
+mv -T ./a/dir1 ./a/dir2
 
 # dir, different
-mkdir mnt/a/dir3
-mkdir mnt/b/dir4
-mv -T mnt/a/dir3 mnt/b/dir4
+mkdir ./a/dir3
+mkdir ./b/dir4
+mv -T ./a/dir3 ./b/dir4
index 4838fbce1c965987d7ae837e249991d365cd38d0..55f8fa3d67d3279bbaa2612a31b1e2c564870968 100755 (executable)
@@ -1,18 +1,18 @@
 #!/bin/sh -ex
 
-./ceph mds tell 0 injectargs '--mds-bal-interval 0'
-./ceph mds tell 1 injectargs '--mds-bal-interval 0'
-./ceph mds tell 2 injectargs '--mds-bal-interval 0'
-./ceph mds tell 3 injectargs '--mds-bal-interval 0'
-#./ceph mds tell 4 injectargs '--mds-bal-interval 0'
+$CEPH_TOOL mds tell 0 injectargs '--mds-bal-interval 0'
+$CEPH_TOOL mds tell 1 injectargs '--mds-bal-interval 0'
+$CEPH_TOOL mds tell 2 injectargs '--mds-bal-interval 0'
+$CEPH_TOOL mds tell 3 injectargs '--mds-bal-interval 0'
+#$CEPH_TOOL mds tell 4 injectargs '--mds-bal-interval 0'
 
-mkdir -p mnt/a/a
-mkdir -p mnt/b/b
-mkdir -p mnt/c/c
-mkdir -p mnt/d/d
+mkdir -p ./a/a
+mkdir -p ./b/b
+mkdir -p ./c/c
+mkdir -p ./d/d
 
-./ceph mds tell 0 export_dir /b 1
-./ceph mds tell 0 export_dir /c 2
-./ceph mds tell 0 export_dir /d 3
+$CEPH_TOOL mds tell 0 export_dir /b 1
+$CEPH_TOOL mds tell 0 export_dir /c 2
+$CEPH_TOOL mds tell 0 export_dir /d 3
 sleep 5
 
index 0a8ece2d2e0e2e38c917af1074afb1de123370ac..c40ec1d25db607da1f7eac7a7340da8a54edf615 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/sh -ex
 
 # srcdn=destdn
-touch mnt/a/file1
-mv mnt/a/file1 mnt/a/file1.renamed
+touch ./a/file1
+mv ./a/file1 ./a/file1.renamed
 
 # different
-touch mnt/a/file2
-mv mnt/a/file2 mnt/b
+touch ./a/file2
+mv ./a/file2 ./b
 
 
index 4989ebc7cbddf03b64c274706042f5eaf63bfb74..b74985fe3f0e5c22b24ebe5b7e1438abb797bf5f 100755 (executable)
@@ -1,12 +1,12 @@
 #!/bin/sh -ex
 
 # srcdn=destdn
-touch mnt/a/file1
-touch mnt/a/file2
-mv mnt/a/file1 mnt/a/file2
+touch ./a/file1
+touch ./a/file2
+mv ./a/file1 ./a/file2
 
 # different (srcdn != destdn)
-touch mnt/a/file3
-touch mnt/b/file4
-mv mnt/a/file3 mnt/b/file4
+touch ./a/file3
+touch ./b/file4
+mv ./a/file3 ./b/file4
 
index f4daecbeaa305fb4653f592a96bec30c20cb3a1b..a1cd03d10b4e79e6dcbcf7a0076d7e65cf9653ab 100755 (executable)
@@ -6,11 +6,11 @@ dotest() {
     destdn=$3
     n=$4
 
-    touch mnt/$src/src$n
-    touch mnt/$desti/desti$n
-    ln mnt/$desti/desti$n mnt/$destdn/destdn$n
+    touch ./$src/src$n
+    touch ./$desti/desti$n
+    ln ./$desti/desti$n ./$destdn/destdn$n
 
-    mv mnt/$src/src$n mnt/$destdn/destdn$n
+    mv ./$src/src$n ./$destdn/destdn$n
 }
 
 
index 4b07fccfeafe114f5016081dc896f75096bd28a4..a71033108e46f64e1c98e78ec80fc44a66a9e956 100755 (executable)
@@ -6,10 +6,10 @@ dotest() {
     dest=$3
     n=$4
 
-    touch mnt/$srci/srci$n
-    ln mnt/$srci/srci$n mnt/$srcdn/srcdn$n
+    touch ./$srci/srci$n
+    ln ./$srci/srci$n ./$srcdn/srcdn$n
 
-    mv mnt/$srcdn/srcdn$n mnt/$dest/dest$n
+    mv ./$srcdn/srcdn$n ./$dest/dest$n
 }
 
 # srci=srcdn=destdn
index 6f42140989f5832254908d76f85c2a33c14fe917..501ac5e1a3b11a679e714e5079c5f410af54e065 100755 (executable)
@@ -6,11 +6,11 @@ dotest() {
     dest=$3
     n=$4
 
-    touch mnt/$srci/srci$n
-    ln mnt/$srci/srci$n mnt/$srcdn/srcdn$n
-    touch mnt/$dest/dest$n
+    touch ./$srci/srci$n
+    ln ./$srci/srci$n ./$srcdn/srcdn$n
+    touch ./$dest/dest$n
 
-    mv mnt/$srcdn/srcdn$n mnt/$dest/dest$n
+    mv ./$srcdn/srcdn$n ./$dest/dest$n
 }
 
 # srci=srcdn=destdn
index d4f096225171d80df68deae7c11602981881228c..80028c517e1d2b66b69dbf43b95d8e5773bead2b 100755 (executable)
@@ -7,12 +7,12 @@ dotest() {
     destdn=$4
     n=$5
 
-    touch mnt/$srci/srci$n
-    ln mnt/$srci/srci$n mnt/$srcdn/srcdn$n
-    touch mnt/$desti/desti$n
-    ln mnt/$desti/desti$n mnt/$destdn/destdn$n
+    touch ./$srci/srci$n
+    ln ./$srci/srci$n ./$srcdn/srcdn$n
+    touch ./$desti/desti$n
+    ln ./$desti/desti$n ./$destdn/destdn$n
 
-    mv mnt/$srcdn/srcdn$n mnt/$destdn/destdn$n
+    mv ./$srcdn/srcdn$n ./$destdn/destdn$n
 }
 
 #  srci=srcdn=destdn=desti