All of lore.kernel.org
 help / color / mirror / Atom feed
From: Filipe David Borba Manana <fdmanana@gmail.com>
To: xfs@oss.sgi.com
Cc: linux-btrfs@vger.kernel.org, jbacik@fb.com,
	Filipe David Borba Manana <fdmanana@gmail.com>
Subject: [PATCH] xfstests: more tests for test case btrfs/030
Date: Sat,  1 Feb 2014 02:05:32 +0000	[thread overview]
Message-ID: <1391220332-22118-1-git-send-email-fdmanana@gmail.com> (raw)

This change adds some new tests for btrfs' incremental send feature.
These are all related with inverting the parent-child relationship
of directories, and cover the cases:

* when the new parent didn't get renamed (just moved)
* when a child file of the former parent gets renamed too

These new cases are fixed by the following btrfs linux kernel patches:

* "Btrfs: more send support for parent/child dir relationship inversion"
* "Btrfs: fix send dealing with file renames and directory moves"

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
---
 tests/btrfs/030 |   86 +++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 65 insertions(+), 21 deletions(-)

diff --git a/tests/btrfs/030 b/tests/btrfs/030
index 6678ed8..6b52a0d 100755
--- a/tests/btrfs/030
+++ b/tests/btrfs/030
@@ -73,22 +73,41 @@ mkdir $SCRATCH_MNT/a/b/www
 echo "hey" > $SCRATCH_MNT/a/b/foobar.txt
 mkdir -p $SCRATCH_MNT/a/b/c3/x/y
 
+mkdir -p $SCRATCH_MNT/a/b/foo1/foo2
+echo "hey" > $SCRATCH_MNT/a/b/foo1/foo2/f.txt
+mkdir $SCRATCH_MNT/a/b/foo3
+
+mkdir -p $SCRATCH_MNT/a/b/bar1/bar2/bar3/bar4
+echo "ola" > $SCRATCH_MNT/a/b/bar1/bar2/bar3/bar4/hello.txt
+
 # Directory tree looks like:
 #
-# .                         (ino 256)
-# |-- a/                    (ino 257)
-#     |-- b/                (ino 258)
-#         |-- c/            (ino 259)
-#         |   |-- file.txt  (ino 260)
-#         |   |-- d/        (ino 261)
+# .                                      (ino 256)
+# |-- a/                                 (ino 257)
+#     |-- b/                             (ino 258)
+#         |-- c/                         (ino 259)
+#         |   |-- file.txt               (ino 260)
+#         |   |-- d/                     (ino 261)
+#         |
+#         |-- c2/                        (ino 262)
+#         |-- www/                       (ino 263)
+#         |-- foobar.txt                 (ino 264)
+#         |
+#         |-- c3/                        (ino 265)
+#         |   |-- x/                     (ino 266)
+#         |       |-- y/                 (ino 267)
+#         |
+#         |-- foo1/                      (ino 268)
+#         |    |---foo2/                 (ino 269)
+#         |         |---f.txt            (ino 270)
 #         |
-#         |-- c2/           (ino 262)
-#         |-- www/          (ino 263)
-#         |-- foobar.txt    (ino 264)
+#         |-- foo3/                      (ino 271)
 #         |
-#         |-- c3/           (ino 265)
-#             |-- x/        (ino 266)
-#                 |-- y/    (ino 267)
+#         |-- bar1/                      (ino 272)
+#              |-- bar2/                 (ino 273)
+#                  |-- bar3/             (ino 274)
+#                      |-- bar4          (ino 275)
+#                           |--hello.txt (ino 276)
 
 run_check $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT \
     $SCRATCH_MNT/mysnap1
@@ -104,21 +123,46 @@ mv $SCRATCH_MNT/a/b/foobar.txt $SCRATCH_MNT/a/b/c2/y2/x2/qwerty.txt
 ln $SCRATCH_MNT/a/b/c2/d2/cc/file.txt $SCRATCH_MNT/a/b/c2/y2/x2/Z/file_link.txt
 mv $SCRATCH_MNT/a/b/c2/d2/cc/file.txt $SCRATCH_MNT/a/b/c2/y2/x2
 
+mv $SCRATCH_MNT/a/b/foo3 $SCRATCH_MNT/a/b/foo1/foo33
+mv $SCRATCH_MNT/a/b/foo1/foo2 $SCRATCH_MNT/a/b/foo1/foo33/foo22
+mv $SCRATCH_MNT/a/b/foo1/foo33/foo22/f.txt \
+    $SCRATCH_MNT/a/b/foo1/foo33/foo22/fff.txt
+
+echo " hello" >> $SCRATCH_MNT/a/b/bar1/bar2/bar3/bar4/hello.txt
+mv $SCRATCH_MNT/a/b/bar1/bar2/bar3/bar4/hello.txt \
+    $SCRATCH_MNT/a/b/bar1/bar2/bar3/bar4/hello2.txt
+mv $SCRATCH_MNT/a/b/bar1/bar2/bar3/bar4 $SCRATCH_MNT/a/b/k44
+mv $SCRATCH_MNT/a/b/bar1/bar2/bar3 $SCRATCH_MNT/a/b/k44
+mv $SCRATCH_MNT/a/b/bar1/bar2 $SCRATCH_MNT/a/b/k44/bar3
+mv $SCRATCH_MNT/a/b/bar1 $SCRATCH_MNT/a/b/k44/bar3/bar2/k11
+
 # Directory tree now looks like:
 #
 # .                                         (ino 256)
 # |-- a/                                    (ino 257)
 #     |-- b/                                (ino 258)
 #         |-- c2/                           (ino 262)
-#             |-- d2/                       (ino 261)
-#             |   |-- cc/                   (ino 259)
-#             |        |-- file.txt         (ino 260)
-#             |-- y2/                       (ino 267)
-#                 |-- x2/                   (ino 266)
-#                     |-- qwerty.txt        (ino 264)
-#                     |-- WWW/              (ino 263)
-#                     |-- Z/                (ino 265)
-#                         |-- file_link.txt
+#         |   |-- d2/                       (ino 261)
+#         |   |   |-- cc/                   (ino 259)
+#         |   |
+#         |   |-- y2/                       (ino 267)
+#         |       |-- x2/                   (ino 266)
+#         |           |-- file.txt          (ino 260)
+#         |           |-- qwerty.txt        (ino 264)
+#         |           |-- WWW/              (ino 263)
+#         |           |-- Z/                (ino 265)
+#         |               |-- file_link.txt
+#         |
+#         |-- foo1/                         (ino 268)
+#         |    |---foo33/                   (ino 271)
+#         |          |---foo22/             (ino 269)
+#         |                |---fff.txt      (ino 270)
+#         |
+#         |-- k44/                          (ino 275)
+#              |-- hello2.txt               (ino 276)
+#              |-- bar3/                    (ino 274)
+#                   |-- bar2/               (ino 273)
+#                        |-- k11/           (ino 272)
 
 run_check $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT \
     $SCRATCH_MNT/mysnap2
-- 
1.7.9.5


WARNING: multiple messages have this Message-ID (diff)
From: Filipe David Borba Manana <fdmanana@gmail.com>
To: xfs@oss.sgi.com
Cc: jbacik@fb.com, Filipe David Borba Manana <fdmanana@gmail.com>,
	linux-btrfs@vger.kernel.org
Subject: [PATCH] xfstests: more tests for test case btrfs/030
Date: Sat,  1 Feb 2014 02:05:32 +0000	[thread overview]
Message-ID: <1391220332-22118-1-git-send-email-fdmanana@gmail.com> (raw)

This change adds some new tests for btrfs' incremental send feature.
These are all related with inverting the parent-child relationship
of directories, and cover the cases:

* when the new parent didn't get renamed (just moved)
* when a child file of the former parent gets renamed too

These new cases are fixed by the following btrfs linux kernel patches:

* "Btrfs: more send support for parent/child dir relationship inversion"
* "Btrfs: fix send dealing with file renames and directory moves"

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
---
 tests/btrfs/030 |   86 +++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 65 insertions(+), 21 deletions(-)

diff --git a/tests/btrfs/030 b/tests/btrfs/030
index 6678ed8..6b52a0d 100755
--- a/tests/btrfs/030
+++ b/tests/btrfs/030
@@ -73,22 +73,41 @@ mkdir $SCRATCH_MNT/a/b/www
 echo "hey" > $SCRATCH_MNT/a/b/foobar.txt
 mkdir -p $SCRATCH_MNT/a/b/c3/x/y
 
+mkdir -p $SCRATCH_MNT/a/b/foo1/foo2
+echo "hey" > $SCRATCH_MNT/a/b/foo1/foo2/f.txt
+mkdir $SCRATCH_MNT/a/b/foo3
+
+mkdir -p $SCRATCH_MNT/a/b/bar1/bar2/bar3/bar4
+echo "ola" > $SCRATCH_MNT/a/b/bar1/bar2/bar3/bar4/hello.txt
+
 # Directory tree looks like:
 #
-# .                         (ino 256)
-# |-- a/                    (ino 257)
-#     |-- b/                (ino 258)
-#         |-- c/            (ino 259)
-#         |   |-- file.txt  (ino 260)
-#         |   |-- d/        (ino 261)
+# .                                      (ino 256)
+# |-- a/                                 (ino 257)
+#     |-- b/                             (ino 258)
+#         |-- c/                         (ino 259)
+#         |   |-- file.txt               (ino 260)
+#         |   |-- d/                     (ino 261)
+#         |
+#         |-- c2/                        (ino 262)
+#         |-- www/                       (ino 263)
+#         |-- foobar.txt                 (ino 264)
+#         |
+#         |-- c3/                        (ino 265)
+#         |   |-- x/                     (ino 266)
+#         |       |-- y/                 (ino 267)
+#         |
+#         |-- foo1/                      (ino 268)
+#         |    |---foo2/                 (ino 269)
+#         |         |---f.txt            (ino 270)
 #         |
-#         |-- c2/           (ino 262)
-#         |-- www/          (ino 263)
-#         |-- foobar.txt    (ino 264)
+#         |-- foo3/                      (ino 271)
 #         |
-#         |-- c3/           (ino 265)
-#             |-- x/        (ino 266)
-#                 |-- y/    (ino 267)
+#         |-- bar1/                      (ino 272)
+#              |-- bar2/                 (ino 273)
+#                  |-- bar3/             (ino 274)
+#                      |-- bar4          (ino 275)
+#                           |--hello.txt (ino 276)
 
 run_check $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT \
     $SCRATCH_MNT/mysnap1
@@ -104,21 +123,46 @@ mv $SCRATCH_MNT/a/b/foobar.txt $SCRATCH_MNT/a/b/c2/y2/x2/qwerty.txt
 ln $SCRATCH_MNT/a/b/c2/d2/cc/file.txt $SCRATCH_MNT/a/b/c2/y2/x2/Z/file_link.txt
 mv $SCRATCH_MNT/a/b/c2/d2/cc/file.txt $SCRATCH_MNT/a/b/c2/y2/x2
 
+mv $SCRATCH_MNT/a/b/foo3 $SCRATCH_MNT/a/b/foo1/foo33
+mv $SCRATCH_MNT/a/b/foo1/foo2 $SCRATCH_MNT/a/b/foo1/foo33/foo22
+mv $SCRATCH_MNT/a/b/foo1/foo33/foo22/f.txt \
+    $SCRATCH_MNT/a/b/foo1/foo33/foo22/fff.txt
+
+echo " hello" >> $SCRATCH_MNT/a/b/bar1/bar2/bar3/bar4/hello.txt
+mv $SCRATCH_MNT/a/b/bar1/bar2/bar3/bar4/hello.txt \
+    $SCRATCH_MNT/a/b/bar1/bar2/bar3/bar4/hello2.txt
+mv $SCRATCH_MNT/a/b/bar1/bar2/bar3/bar4 $SCRATCH_MNT/a/b/k44
+mv $SCRATCH_MNT/a/b/bar1/bar2/bar3 $SCRATCH_MNT/a/b/k44
+mv $SCRATCH_MNT/a/b/bar1/bar2 $SCRATCH_MNT/a/b/k44/bar3
+mv $SCRATCH_MNT/a/b/bar1 $SCRATCH_MNT/a/b/k44/bar3/bar2/k11
+
 # Directory tree now looks like:
 #
 # .                                         (ino 256)
 # |-- a/                                    (ino 257)
 #     |-- b/                                (ino 258)
 #         |-- c2/                           (ino 262)
-#             |-- d2/                       (ino 261)
-#             |   |-- cc/                   (ino 259)
-#             |        |-- file.txt         (ino 260)
-#             |-- y2/                       (ino 267)
-#                 |-- x2/                   (ino 266)
-#                     |-- qwerty.txt        (ino 264)
-#                     |-- WWW/              (ino 263)
-#                     |-- Z/                (ino 265)
-#                         |-- file_link.txt
+#         |   |-- d2/                       (ino 261)
+#         |   |   |-- cc/                   (ino 259)
+#         |   |
+#         |   |-- y2/                       (ino 267)
+#         |       |-- x2/                   (ino 266)
+#         |           |-- file.txt          (ino 260)
+#         |           |-- qwerty.txt        (ino 264)
+#         |           |-- WWW/              (ino 263)
+#         |           |-- Z/                (ino 265)
+#         |               |-- file_link.txt
+#         |
+#         |-- foo1/                         (ino 268)
+#         |    |---foo33/                   (ino 271)
+#         |          |---foo22/             (ino 269)
+#         |                |---fff.txt      (ino 270)
+#         |
+#         |-- k44/                          (ino 275)
+#              |-- hello2.txt               (ino 276)
+#              |-- bar3/                    (ino 274)
+#                   |-- bar2/               (ino 273)
+#                        |-- k11/           (ino 272)
 
 run_check $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT \
     $SCRATCH_MNT/mysnap2
-- 
1.7.9.5

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2014-02-01  2:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-01  2:05 Filipe David Borba Manana [this message]
2014-02-01  2:05 ` [PATCH] xfstests: more tests for test case btrfs/030 Filipe David Borba Manana
2014-02-02 21:57 ` Dave Chinner
2014-02-02 21:57   ` Dave Chinner
2014-02-02 22:08   ` Filipe David Manana
2014-02-02 22:08     ` Filipe David Manana
2014-02-02 22:25     ` Dave Chinner
2014-02-02 22:25       ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391220332-22118-1-git-send-email-fdmanana@gmail.com \
    --to=fdmanana@gmail.com \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.