]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: add dir rename tests
authorSage Weil <sage.weil@dreamhost.com>
Wed, 8 Jun 2011 03:49:45 +0000 (20:49 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Wed, 8 Jun 2011 03:49:45 +0000 (20:49 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
qa/mds/rename/all.sh
qa/mds/rename/dir_pri_nul.sh [new file with mode: 0755]
qa/mds/rename/dir_pri_pri.sh [new file with mode: 0644]
qa/mds/rename/pri_nul.sh
qa/mds/rename/pri_pri.sh

index a5838c46e6c249cc3f018b266a6e2fbdabf6927e..7df30f554e89f300355fcdcd18feb31ffad1045f 100755 (executable)
@@ -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 (executable)
index 0000000..c768fe3
--- /dev/null
@@ -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 (file)
index 0000000..abb199a
--- /dev/null
@@ -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
index b3e407d046ca8406979a8d927ce2e442c291e835..0a8ece2d2e0e2e38c917af1074afb1de123370ac 100755 (executable)
@@ -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
 
index 86ea43da143244bf76e05211fa84d50956a5f77d..4989ebc7cbddf03b64c274706042f5eaf63bfb74 100755 (executable)
@@ -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