]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: add rename dir checks
authorSage Weil <sage.weil@dreamhost.com>
Tue, 7 Jun 2011 20:34:57 +0000 (13:34 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Tue, 7 Jun 2011 20:34:57 +0000 (13:34 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
qa/mds/rename/pri_nul.sh
qa/mds/rename/pri_pri.sh

index 42743b85e0623bda662c12de47ee721fb6cc21e0..b3e407d046ca8406979a8d927ce2e442c291e835 100755 (executable)
@@ -1,11 +1,30 @@
 #!/bin/sh -ex
 
-touch mnt/a/file1
-touch mnt/a/file2
-
 # srcdn=destdn
+touch mnt/a/file1
 mv mnt/a/file1 mnt/a/file1.renamed
 
 # different
+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 c5c550c9eb6569d5644847dd9154adca0c3a45d9..86ea43da143244bf76e05211fa84d50956a5f77d 100755 (executable)
@@ -1,13 +1,21 @@
 #!/bin/sh -ex
 
+# srcdn=destdn
 touch mnt/a/file1
 touch mnt/a/file2
-touch mnt/a/file3
-touch mnt/b/file4
-
-# srcdn=destdn
 mv mnt/a/file1 mnt/a/file2
 
 # different (srcdn != destdn)
+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