diff mbox

[08/10] fstests: btrfs/104: Use _btrfs_check_scratch_qgroup to replace open codes

Message ID 20161129073303.14776-9-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/104 | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/tests/btrfs/104 b/tests/btrfs/104
index 6afaa02..a5d2070 100755
--- a/tests/btrfs/104
+++ b/tests/btrfs/104
@@ -152,14 +152,7 @@  _run_btrfs_util_prog subvolume delete $SCRATCH_MNT/snap1
 sleep 45
 
 _scratch_unmount
-
-# generate a qgroup report and look for inconsistent groups
-#  - don't use _run_btrfs_util_prog here as it captures the output and
-#    we need to grep it.
-$BTRFS_UTIL_PROG check --qgroup-report $SCRATCH_DEV 2>&1 | \
-			grep -E -q "Counts for qgroup.*are different"
-if [ $? -ne 0 ]; then
-	status=0
-fi
+_btrfs_check_scratch_qgroup
+status=0
 
 exit