diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2011-06-07 20:49:45 -0700 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2011-06-07 20:49:45 -0700 |
commit | 21795aaf5d16745cfce7478d773b969277ebb669 (patch) | |
tree | a30cd784c577691e770f5b72248bf009aed22d3b /qa/mds | |
parent | 00ec86a20412988238320c71b8cf054ca06537d8 (diff) | |
download | ceph-21795aaf5d16745cfce7478d773b969277ebb669.tar.gz |
qa: add dir rename tests
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Diffstat (limited to 'qa/mds')
-rwxr-xr-x | qa/mds/rename/all.sh | 7 | ||||
-rwxr-xr-x | qa/mds/rename/dir_pri_nul.sh | 21 | ||||
-rw-r--r-- | qa/mds/rename/dir_pri_pri.sh | 11 | ||||
-rwxr-xr-x | qa/mds/rename/pri_nul.sh | 19 | ||||
-rwxr-xr-x | qa/mds/rename/pri_pri.sh | 9 |
5 files changed, 39 insertions, 28 deletions
diff --git a/qa/mds/rename/all.sh b/qa/mds/rename/all.sh index a5838c46e6c..7df30f554e8 100755 --- a/qa/mds/rename/all.sh +++ b/qa/mds/rename/all.sh @@ -18,3 +18,10 @@ rm mnt/?/* || true $dir/rem_rem.sh rm mnt/?/* || true + +$dir/pri_nul.sh +rm -r mnt/?/* || true + +$dir/pri_pri.sh +rm -r mnt/?/* || true + diff --git a/qa/mds/rename/dir_pri_nul.sh b/qa/mds/rename/dir_pri_nul.sh new file mode 100755 index 00000000000..c768fe33d7e --- /dev/null +++ b/qa/mds/rename/dir_pri_nul.sh @@ -0,0 +1,21 @@ +#!/bin/sh -ex + +# dir: srcdn=destdn +mkdir mnt/a/dir1 +mv mnt/a/dir1 mnt/a/dir1.renamed + +# dir: diff +mkdir mnt/a/dir2 +mv mnt/a/dir2 mnt/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 +sleep 5 +mv mnt/a/dir3 mnt/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 +sleep 5 +mv mnt/a/dir4 mnt/b/dir4 diff --git a/qa/mds/rename/dir_pri_pri.sh b/qa/mds/rename/dir_pri_pri.sh new file mode 100644 index 00000000000..abb199a6320 --- /dev/null +++ b/qa/mds/rename/dir_pri_pri.sh @@ -0,0 +1,11 @@ +#!/bin/sh -ex + +# dir, srcdn=destdn +mkdir mnt/a/dir1 +mkdir mnt/a/dir2 +mv -T mnt/a/dir1 mnt/a/dir2 + +# dir, different +mkdir mnt/a/dir3 +mkdir mnt/b/dir4 +mv -T mnt/a/dir3 mnt/b/dir4 diff --git a/qa/mds/rename/pri_nul.sh b/qa/mds/rename/pri_nul.sh index b3e407d046c..0a8ece2d2e0 100755 --- a/qa/mds/rename/pri_nul.sh +++ b/qa/mds/rename/pri_nul.sh @@ -8,23 +8,4 @@ mv mnt/a/file1 mnt/a/file1.renamed touch mnt/a/file2 mv mnt/a/file2 mnt/b -# dir: srcdn=destdn -mkdir mnt/a/dir1 -mv mnt/a/dir1 mnt/a/dir1.renamed - -# dir: diff -mkdir mnt/a/dir2 -mv mnt/a/dir2 mnt/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 -sleep 5 -mv mnt/a/dir3 mnt/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 -sleep 5 -mv mnt/a/dir4 mnt/b/dir4 diff --git a/qa/mds/rename/pri_pri.sh b/qa/mds/rename/pri_pri.sh index 86ea43da143..4989ebc7cbd 100755 --- a/qa/mds/rename/pri_pri.sh +++ b/qa/mds/rename/pri_pri.sh @@ -10,12 +10,3 @@ touch mnt/a/file3 touch mnt/b/file4 mv mnt/a/file3 mnt/b/file4 -# dir, srcdn=destdn -mkdir mnt/a/dir1 -mkdir mnt/a/dir2 -mv -T mnt/a/dir1 mnt/a/dir2 - -# dir, different -mkdir mnt/a/dir3 -mkdir mnt/b/dir4 -mv -T mnt/a/dir3 mnt/b/dir4 |