All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: <linux-btrfs@vger.kernel.org>, <xfs@oss.sgi.com>
Subject: [PATCH] xfstests: change btrfs/029's golden output and it's filtering
Date: Tue, 28 Jan 2014 13:40:33 -0500	[thread overview]
Message-ID: <1390934433-22299-1-git-send-email-jbacik@fb.com> (raw)

I noticed while testing a different mkfs option that btrfs/029 was failing
because it was getting the extra output from our mkfs.btrfs.  After I fixed that
I was still failing because my version of cp will spit out the source and
destination files, not just the destination file.  So redirect _scratch_mkfs to
/dev/null like everybody does and make the golden output just expect to see "cp
failed" instead of the cp specific output.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
---
 tests/btrfs/029     | 6 +++---
 tests/btrfs/029.out | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/btrfs/029 b/tests/btrfs/029
index b93b6df..80c05e3 100644
--- a/tests/btrfs/029
+++ b/tests/btrfs/029
@@ -66,7 +66,7 @@ mkdir $SOURCE_DIR
 
 rm -f $seqres.full
 
-_scratch_mkfs
+_scratch_mkfs > /dev/null 2>&1
 $XFS_IO_PROG -f -c 'pwrite -S 0x61 0 9000' $SOURCE_DIR/original \
  >> $seqres.full
 
@@ -87,8 +87,8 @@ _create_reflinks_to()
     # always reflink, should fail outright
     rm -rf $1; mkdir $1
     echo "reflink=always:"
-    cp --reflink=always $SOURCE_DIR/original $1/copyfail \
-        2>&1 | _filter_testdirs
+    cp --reflink=always $SOURCE_DIR/original $1/copyfail > $seqres.full 2>&1 \
+	|| echo "cp reflink failed"
 
     # The failed target actually gets created by cp:
     ls $1/copyfail | _filter_testdirs
diff --git a/tests/btrfs/029.out b/tests/btrfs/029.out
index 655c081..9390d95 100644
--- a/tests/btrfs/029.out
+++ b/tests/btrfs/029.out
@@ -4,12 +4,12 @@ reflink=auto:
 42d69d1a6d333a7ebdf64792a555e392  TEST_DIR/test-029/original
 42d69d1a6d333a7ebdf64792a555e392  SCRATCH_MNT/test-029/copy
 reflink=always:
-cp: failed to clone 'SCRATCH_MNT/test-029/copyfail': Invalid cross-device link
+cp reflink failed
 SCRATCH_MNT/test-029/copyfail
 test reflinks across different mountpoints of same device
 reflink=auto:
 42d69d1a6d333a7ebdf64792a555e392  TEST_DIR/test-029/original
 42d69d1a6d333a7ebdf64792a555e392  SCRATCH_MNT/test-bis-029/copy
 reflink=always:
-cp: failed to clone 'SCRATCH_MNT/test-bis-029/copyfail': Invalid cross-device link
+cp reflink failed
 SCRATCH_MNT/test-bis-029/copyfail
-- 
1.8.3.1


WARNING: multiple messages have this Message-ID (diff)
From: Josef Bacik <jbacik@fb.com>
To: linux-btrfs@vger.kernel.org, xfs@oss.sgi.com
Subject: [PATCH] xfstests: change btrfs/029's golden output and it's filtering
Date: Tue, 28 Jan 2014 13:40:33 -0500	[thread overview]
Message-ID: <1390934433-22299-1-git-send-email-jbacik@fb.com> (raw)

I noticed while testing a different mkfs option that btrfs/029 was failing
because it was getting the extra output from our mkfs.btrfs.  After I fixed that
I was still failing because my version of cp will spit out the source and
destination files, not just the destination file.  So redirect _scratch_mkfs to
/dev/null like everybody does and make the golden output just expect to see "cp
failed" instead of the cp specific output.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
---
 tests/btrfs/029     | 6 +++---
 tests/btrfs/029.out | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/btrfs/029 b/tests/btrfs/029
index b93b6df..80c05e3 100644
--- a/tests/btrfs/029
+++ b/tests/btrfs/029
@@ -66,7 +66,7 @@ mkdir $SOURCE_DIR
 
 rm -f $seqres.full
 
-_scratch_mkfs
+_scratch_mkfs > /dev/null 2>&1
 $XFS_IO_PROG -f -c 'pwrite -S 0x61 0 9000' $SOURCE_DIR/original \
  >> $seqres.full
 
@@ -87,8 +87,8 @@ _create_reflinks_to()
     # always reflink, should fail outright
     rm -rf $1; mkdir $1
     echo "reflink=always:"
-    cp --reflink=always $SOURCE_DIR/original $1/copyfail \
-        2>&1 | _filter_testdirs
+    cp --reflink=always $SOURCE_DIR/original $1/copyfail > $seqres.full 2>&1 \
+	|| echo "cp reflink failed"
 
     # The failed target actually gets created by cp:
     ls $1/copyfail | _filter_testdirs
diff --git a/tests/btrfs/029.out b/tests/btrfs/029.out
index 655c081..9390d95 100644
--- a/tests/btrfs/029.out
+++ b/tests/btrfs/029.out
@@ -4,12 +4,12 @@ reflink=auto:
 42d69d1a6d333a7ebdf64792a555e392  TEST_DIR/test-029/original
 42d69d1a6d333a7ebdf64792a555e392  SCRATCH_MNT/test-029/copy
 reflink=always:
-cp: failed to clone 'SCRATCH_MNT/test-029/copyfail': Invalid cross-device link
+cp reflink failed
 SCRATCH_MNT/test-029/copyfail
 test reflinks across different mountpoints of same device
 reflink=auto:
 42d69d1a6d333a7ebdf64792a555e392  TEST_DIR/test-029/original
 42d69d1a6d333a7ebdf64792a555e392  SCRATCH_MNT/test-bis-029/copy
 reflink=always:
-cp: failed to clone 'SCRATCH_MNT/test-bis-029/copyfail': Invalid cross-device link
+cp reflink failed
 SCRATCH_MNT/test-bis-029/copyfail
-- 
1.8.3.1

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

             reply	other threads:[~2014-01-28 18:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28 18:40 Josef Bacik [this message]
2014-01-28 18:40 ` [PATCH] xfstests: change btrfs/029's golden output and it's filtering Josef Bacik

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=1390934433-22299-1-git-send-email-jbacik@fb.com \
    --to=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.