btrfs/048: fix test failure when fs mounted with v2 space cache option
[xfstests-dev.git] / tests / btrfs / 048
index 7294f231e4ed0a327cce4c23129275fdc856b328..7c9eaa05cab101e5b686938dd4e7d7f8801c0b8e 100755 (executable)
@@ -221,10 +221,11 @@ $BTRFS_UTIL_PROG property get $SCRATCH_MNT compression
 
 echo -e "\nTesting generation is unchanged after failed validation"
 $BTRFS_UTIL_PROG filesystem sync $SCRATCH_MNT
-$BTRFS_UTIL_PROG inspect-internal dump-super $SCRATCH_DEV | grep '^generation'
+gen_before=$($BTRFS_UTIL_PROG inspect-internal dump-super $SCRATCH_DEV | grep '^generation')
 $BTRFS_UTIL_PROG property set $SCRATCH_MNT compression 'lz' 2>&1 | _filter_scratch
 $BTRFS_UTIL_PROG filesystem sync $SCRATCH_MNT
-$BTRFS_UTIL_PROG inspect-internal dump-super $SCRATCH_DEV | grep '^generation'
+gen_after=$($BTRFS_UTIL_PROG inspect-internal dump-super $SCRATCH_DEV | grep '^generation')
+[ "$gen_after" == "$gen_before" ] || echo "filesystem generation changed"
 
 echo -e "\nTesting argument validation with options"
 $BTRFS_UTIL_PROG property set $SCRATCH_MNT compression 'zlib:3'