]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: fix set-default test in btrfs/001
authorJosef Bacik <jbacik@fusionio.com>
Wed, 18 Sep 2013 20:48:27 +0000 (20:48 +0000)
committerRich Johnston <rjohnston@sgi.com>
Wed, 16 Oct 2013 19:57:28 +0000 (14:57 -0500)
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>
Tested-by: David Sterba <dsterba@suse.cz>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
tests/btrfs/001

index 9aa24317c1c712f4ac50494ee270a291d5b45d0d..c05d772897305f78fa24fd53e42066aff81216ab 100755 (executable)
@@ -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