diff options
author | Greg Farnum <gregory.farnum@dreamhost.com> | 2011-07-05 15:57:26 -0700 |
---|---|---|
committer | Greg Farnum <gregory.farnum@dreamhost.com> | 2011-07-06 14:20:35 -0700 |
commit | e483bb6b801e600c45a854452945783c76040034 (patch) | |
tree | 1498f86992806d2409d11ee913fb58496a21a062 /qa/mds | |
parent | 528b6151122d7f2cb12351b04a2dddcafac896da (diff) | |
download | ceph-e483bb6b801e600c45a854452945783c76040034.tar.gz |
qa: mds rename: Rework so it will function in teuthology as a workunit:
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>
Diffstat (limited to 'qa/mds')
-rwxr-xr-x | qa/mds/rename/all.sh | 33 | ||||
-rwxr-xr-x | qa/mds/rename/dir_pri_nul.sh | 26 | ||||
-rw-r--r-- | qa/mds/rename/dir_pri_pri.sh | 12 | ||||
-rwxr-xr-x | qa/mds/rename/prepare.sh | 24 | ||||
-rwxr-xr-x | qa/mds/rename/pri_nul.sh | 8 | ||||
-rwxr-xr-x | qa/mds/rename/pri_pri.sh | 12 | ||||
-rwxr-xr-x | qa/mds/rename/pri_rem.sh | 8 | ||||
-rwxr-xr-x | qa/mds/rename/rem_nul.sh | 6 | ||||
-rwxr-xr-x | qa/mds/rename/rem_pri.sh | 8 | ||||
-rwxr-xr-x | qa/mds/rename/rem_rem.sh | 10 |
10 files changed, 75 insertions, 72 deletions
diff --git a/qa/mds/rename/all.sh b/qa/mds/rename/all.sh index 7df30f554e8..2049988b33d 100755 --- a/qa/mds/rename/all.sh +++ b/qa/mds/rename/all.sh @@ -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 diff --git a/qa/mds/rename/dir_pri_nul.sh b/qa/mds/rename/dir_pri_nul.sh index 130d96c9643..dd8106b63b6 100755 --- a/qa/mds/rename/dir_pri_nul.sh +++ b/qa/mds/rename/dir_pri_nul.sh @@ -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 diff --git a/qa/mds/rename/dir_pri_pri.sh b/qa/mds/rename/dir_pri_pri.sh index abb199a6320..de235fcd3dd 100644 --- a/qa/mds/rename/dir_pri_pri.sh +++ b/qa/mds/rename/dir_pri_pri.sh @@ -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 diff --git a/qa/mds/rename/prepare.sh b/qa/mds/rename/prepare.sh index 4838fbce1c9..55f8fa3d67d 100755 --- a/qa/mds/rename/prepare.sh +++ b/qa/mds/rename/prepare.sh @@ -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 diff --git a/qa/mds/rename/pri_nul.sh b/qa/mds/rename/pri_nul.sh index 0a8ece2d2e0..c40ec1d25db 100755 --- a/qa/mds/rename/pri_nul.sh +++ b/qa/mds/rename/pri_nul.sh @@ -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 diff --git a/qa/mds/rename/pri_pri.sh b/qa/mds/rename/pri_pri.sh index 4989ebc7cbd..b74985fe3f0 100755 --- a/qa/mds/rename/pri_pri.sh +++ b/qa/mds/rename/pri_pri.sh @@ -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 diff --git a/qa/mds/rename/pri_rem.sh b/qa/mds/rename/pri_rem.sh index f4daecbeaa3..a1cd03d10b4 100755 --- a/qa/mds/rename/pri_rem.sh +++ b/qa/mds/rename/pri_rem.sh @@ -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 } diff --git a/qa/mds/rename/rem_nul.sh b/qa/mds/rename/rem_nul.sh index 4b07fccfeaf..a71033108e4 100755 --- a/qa/mds/rename/rem_nul.sh +++ b/qa/mds/rename/rem_nul.sh @@ -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 diff --git a/qa/mds/rename/rem_pri.sh b/qa/mds/rename/rem_pri.sh index 6f42140989f..501ac5e1a3b 100755 --- a/qa/mds/rename/rem_pri.sh +++ b/qa/mds/rename/rem_pri.sh @@ -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 diff --git a/qa/mds/rename/rem_rem.sh b/qa/mds/rename/rem_rem.sh index d4f09622517..80028c517e1 100755 --- a/qa/mds/rename/rem_rem.sh +++ b/qa/mds/rename/rem_rem.sh @@ -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 |