diff mbox

[09/10] fstests: btrfs/122: Use _btrfs_check_scratch_qgroup to replace open code

Message ID 20161129073303.14776-10-quwenruo@cn.fujitsu.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Qu Wenruo Nov. 29, 2016, 7:33 a.m. UTC
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 tests/btrfs/122 | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/tests/btrfs/122 b/tests/btrfs/122
index 82252ab..899ede5 100755
--- a/tests/btrfs/122
+++ b/tests/btrfs/122
@@ -77,12 +77,7 @@  _run_btrfs_util_prog subvolume snapshot $SCRATCH_MNT "$SCRATCH_MNT/snaps/snap1"
 _run_btrfs_util_prog subvolume snapshot $SCRATCH_MNT "$SCRATCH_MNT/snaps/snap2"
 
 _scratch_unmount
-
-# generate a qgroup report and look for inconsistent groups
-$BTRFS_UTIL_PROG check --qgroup-report $SCRATCH_DEV 2>&1 | \
-			grep -q -E "Counts for qgroup.*are different"
-if [ $? -ne 0 ]; then
-	status=0
-fi
+_btrfs_check_scratch_qgroup
+status=0
 
 exit