linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfstests: fix set-default test in btrfs/001
@ 2013-09-18 20:48 Josef Bacik
  2013-09-19 13:30 ` David Sterba
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Josef Bacik @ 2013-09-18 20:48 UTC (permalink / raw)
  To: xfs, linux-btrfs

We were actually testing this improperly, there was a bug in the set default
code so we weren't actually honoring the 0 subvolid properly.  To fix this we
need to get the subvolid for the subvol we want to set as the default and use
that in the command.  With this patch we now pass again with the fix for the 0
subvolid.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
---
 tests/btrfs/001 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/btrfs/001 b/tests/btrfs/001
index 9aa2431..c05d772 100755
--- a/tests/btrfs/001
+++ b/tests/btrfs/001
@@ -77,7 +77,8 @@ 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_UTIL_PROG subvolume set-default 0 $SCRATCH_MNT/subvol | _filter_scratch
+subvolid=$(_btrfs_get_subvolid $SCRATCH_MNT subvol)
+$BTRFS_UTIL_PROG subvolume set-default $subvolid $SCRATCH_MNT | _filter_scratch
 _scratch_remount
 echo "List root dir which is now subvol"
 ls $SCRATCH_MNT
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-16 19:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 20:48 [PATCH] xfstests: fix set-default test in btrfs/001 Josef Bacik
2013-09-19 13:30 ` David Sterba
2013-10-16 19:56 ` Rich Johnston
2013-10-16 19:59 ` Rich Johnston

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).