diff mbox

[2/2] fstests: btrfs/011 add debug logs to seqres.full

Message ID 1455888329-16981-2-git-send-email-anand.jain@oracle.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Anand Jain Feb. 19, 2016, 1:25 p.m. UTC
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 tests/btrfs/011 | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff mbox

Patch

diff --git a/tests/btrfs/011 b/tests/btrfs/011
index 3bc7f0af70a3..8cf6ff265aa5 100755
--- a/tests/btrfs/011
+++ b/tests/btrfs/011
@@ -80,6 +80,9 @@  workout()
 	local target_dev="`echo ${SCRATCH_DEV_POOL} | awk '{print $NF}'`"
 	local fssize
 
+	echo >> $seqres.full
+	echo "---------workout \"$1\" $2 $3 $4-----------" >> $seqres.full
+
 	if [ "`echo $SCRATCH_DEV_POOL | wc -w`" -lt `expr $num_devs4raid + 1` ]; then
 		echo "Skip workout $1 $2 $3 $4" >> $seqres.full
 		echo "Too few devices in SCRATCH_DEV_POOL $SCRATCH_DEV_POOL, required: " `expr $num_devs4raid + 1` >> $seqres.full
@@ -114,6 +117,9 @@  workout()
 
 	_scratch_mount
 
+	echo "$BTRFS_UTIL_PROG filesystem show" >> $seqres.full
+	$BTRFS_UTIL_PROG filesystem show >> $seqres.full
+
 	# Generate metadata and some minimal user data, generate 500 times
 	# 20K extents in the data chunk and fill up metadata with inline
 	# extents.
@@ -220,8 +226,10 @@  btrfs_replace_test()
 
 	if [ "${with_cancel}Q" = "cancelQ" ]; then
 		# background the replace operation (no '-B' option given)
+		echo "$BTRFS_UTIL_PROG replace start -f $replace_options $source_dev $target_dev $SCRATCH_MNT" >> $seqres.full
 		$BTRFS_UTIL_PROG replace start -f $replace_options $source_dev $target_dev $SCRATCH_MNT >> $seqres.full 2>&1 || _fail "btrfs replace start failed"
 		sleep 1
+		echo "$BTRFS_UTIL_PROG replace cancel $SCRATCH_MNT" >> $seqres.full
 		$BTRFS_UTIL_PROG replace cancel $SCRATCH_MNT >> $seqres.full 2>&1 || _fail "btrfs replace cancel failed"
 
 		# 'replace status' waits for the replace operation to finish
@@ -236,6 +244,7 @@  btrfs_replace_test()
 			# a sync in the middle of the replace operation.
 			(sleep 1; sync) > /dev/null 2>&1 &
 		fi
+		echo "$BTRFS_UTIL_PROG replace start -Bf $replace_options $source_dev $target_dev $SCRATCH_MNT" >> $seqres.full
 		$BTRFS_UTIL_PROG replace start -Bf $replace_options $source_dev $target_dev $SCRATCH_MNT >> $seqres.full 2>&1 || _fail "btrfs replace start failed"
 
 		$BTRFS_UTIL_PROG replace status $SCRATCH_MNT > $tmp.tmp 2>&1
@@ -267,6 +276,11 @@  btrfs_replace_test()
 	_scratch_unmount > /dev/null 2>&1
 	if [ "${with_cancel}Q" != "cancelQ" ]; then
 		# after the replace operation, use the target_dev for everything
+		echo "$BTRFS_UTIL_PROG filesystem show -d" >> $seqres.full
+		$BTRFS_UTIL_PROG filesystem show -d >> $seqres.full
+		echo "$BTRFS_UTIL_PROG filesystem show" >> $seqres.full
+		$BTRFS_UTIL_PROG filesystem show >> $seqres.full
+		echo "_check_btrfs_filesystem $target_dev" >> $seqres.full
 		_check_btrfs_filesystem $target_dev
 		_mount -t $FSTYP `_scratch_mount_options | sed "s&${SCRATCH_DEV}&${target_dev}&"`
 	else