]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
254: avoid output mismatch due to space cache
authorLi Zefan <lizf@cn.fujitsu.com>
Tue, 22 Nov 2011 05:19:39 +0000 (13:19 +0800)
committerChristoph Hellwig <hch@lst.de>
Thu, 8 Dec 2011 17:11:38 +0000 (17:11 +0000)
This reverts commit a0c92a5871082c0aa6a7caae496e67a6e57bb0b6 (disable
space cache), as option nospace_cache was newly introduced in linux-3.2,
so we'll fail to mount btrfs in older kernels.

As an alternative fix, we just list subvolme names, don't assume
what ID numbers those subvolumes will have.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
254
254.out

diff --git a/254 b/254
index 1cd4832593732d016198c8048f51e9528fe0efab..7b74a02a54d6d1da27c6c8f73dd7f8e00cb913f9 100755 (executable)
--- a/254
+++ b/254
@@ -48,7 +48,7 @@ _supported_os Linux
 _require_scratch
 
 _scratch_mkfs > /dev/null 2>&1
-_scratch_mount -o nospace_cache
+_scratch_mount
 
 # First test basic snapshotting
 echo "Creating file foo in root dir"
@@ -95,7 +95,7 @@ ls $SCRATCH_MNT
 
 # Test listing the subvolumes
 echo "Listing subvolumes"
-btrfs subvolume list $SCRATCH_MNT | _filter_scratch
+btrfs subvolume list $SCRATCH_MNT | awk '{ print $NF }'
 
 # Delete the snapshot
 btrfs subvolume delete $SCRATCH_MNT/snap | _filter_scratch
diff --git a/254.out b/254.out
index 582357a378fcfee3f558d6e53a6e6c2ac9762cf4..d4b534635a007bcdb7c75a02462845dcf1172201 100644 (file)
--- a/254.out
+++ b/254.out
@@ -31,8 +31,8 @@ List root dir
 snap
 subvol
 Listing subvolumes
-ID 256 top level 5 path snap
-ID 257 top level 5 path subvol
+snap
+subvol
 Delete subvolume 'SCRATCH_MNT/snap'
 List root dir
 subvol