From: David Sterba <dsterba@suse.cz>
To: xfs@oss.sgi.com
Cc: linux-fsdevel@vger.kernel.org, josef@redhat.com,
David Sterba <dsterba@suse.cz>
Subject: [PATCH] xfstests: fix hardcoded path in output of 254
Date: Fri, 3 Jun 2011 15:52:42 +0200 [thread overview]
Message-ID: <1307109162-21811-1-git-send-email-dsterba@suse.cz> (raw)
Add filters after btrfs commands, else the test would incorrectly appear
failed.
Signed-off-by: David Sterba <dsterba@suse.cz>
---
254 | 13 +++++++------
254.out | 6 +++---
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/254 b/254
index 3c1a5a1..6320291 100755
--- a/254
+++ b/254
@@ -40,6 +40,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
# get standard environment, filters and checks
. ./common.rc
+. ./common.filter
# real QA test starts here
_supported_fs btrfs
@@ -55,7 +56,7 @@ dd if=/dev/zero of=$SCRATCH_MNT/foo bs=1M count=1 &> /dev/null
echo "List root dir"
ls $SCRATCH_MNT
echo "Creating snapshot of root dir"
-btrfs subvolume snapshot $SCRATCH_MNT $SCRATCH_MNT/snap
+btrfs subvolume snapshot $SCRATCH_MNT $SCRATCH_MNT/snap | _filter_scratch
echo "List root dir after snapshot"
ls $SCRATCH_MNT
echo "List snapshot dir"
@@ -67,7 +68,7 @@ echo "List snapshot dir"
ls $SCRATCH_MNT/snap
# Test creating a normal subvolme
-btrfs subvolume create $SCRATCH_MNT/subvol
+btrfs subvolume create $SCRATCH_MNT/subvol | _filter_scratch
echo "Listing root dir"
ls $SCRATCH_MNT
echo "Listing subvol"
@@ -77,7 +78,7 @@ ls $SCRATCH_MNT/subvol
echo "Creating file bar in subvol"
dd if=/dev/zero of=$SCRATCH_MNT/subvol/bar bs=1M count=1 &> /dev/null
echo "Setting subvol to the default"
-btrfs subvolume set-default $SCRATCH_MNT/subvol $SCRATCH_MNT/subvol
+btrfs subvolume set-default $SCRATCH_MNT/subvol $SCRATCH_MNT/subvol | _filter_scratch
_scratch_remount
echo "List root dir which is now subvol"
ls $SCRATCH_MNT
@@ -87,17 +88,17 @@ _scratch_mount "-o subvolid=0"
echo "List root dir"
ls $SCRATCH_MNT
echo "Setting the root dir as the default again"
-btrfs subvolume set-default $SCRATCH_MNT $SCRATCH_MNT
+btrfs subvolume set-default $SCRATCH_MNT $SCRATCH_MNT | _filter_scratch
_scratch_remount
echo "List root dir"
ls $SCRATCH_MNT
# Test listing the subvolumes
echo "Listing subvolumes"
-btrfs subvolume list $SCRATCH_MNT
+btrfs subvolume list $SCRATCH_MNT | _filter_scratch
# Delete the snapshot
-btrfs subvolume delete $SCRATCH_MNT/snap
+btrfs subvolume delete $SCRATCH_MNT/snap | _filter_scratch
echo "List root dir"
ls $SCRATCH_MNT
_scratch_remount
diff --git a/254.out b/254.out
index e1c19ee..582357a 100644
--- a/254.out
+++ b/254.out
@@ -3,7 +3,7 @@ Creating file foo in root dir
List root dir
foo
Creating snapshot of root dir
-Create a snapshot of '/mnt/scratch' in '/mnt/scratch/snap'
+Create a snapshot of 'SCRATCH_MNT' in 'SCRATCH_MNT/snap'
List root dir after snapshot
foo
snap
@@ -13,7 +13,7 @@ List root dir after rm of foo
snap
List snapshot dir
foo
-Create subvolume '/mnt/scratch/subvol'
+Create subvolume 'SCRATCH_MNT/subvol'
Listing root dir
snap
subvol
@@ -33,7 +33,7 @@ subvol
Listing subvolumes
ID 256 top level 5 path snap
ID 257 top level 5 path subvol
-Delete subvolume '/mnt/scratch/snap'
+Delete subvolume 'SCRATCH_MNT/snap'
List root dir
subvol
List root dir
--
1.7.5.2.353.g5df3e
next reply other threads:[~2011-06-03 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 13:52 David Sterba [this message]
2011-06-03 14:08 ` [PATCH] xfstests: fix hardcoded path in output of 254 Josef Bacik
2011-06-03 15:27 ` Alex Elder
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=1307109162-21811-1-git-send-email-dsterba@suse.cz \
--to=dsterba@suse.cz \
--cc=josef@redhat.com \
--cc=linux-fsdevel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).