Skip to contentSkip to conversation

xfstests: Prepare for config section

PATCH New Lukas Czerner 1 participant 5 messages Mar 25, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 xfstests: Prepare for config section

This stupid patch only put the indentation in place so we will be able to clearly see and review changes made in the second patch which will add a loop (instead of allways-true condition introduced in this patch) adding support for config sections. There are no changes in the logic, only indentation changes.

---
 check | 322 +++++++++++++++++++++++++++++++++---------------------------------
 1 file changed, 162 insertions(+), 160 deletions(-)
check +162 -160
index b619f6d..b33643c 100755
@@ -356,190 +356,192 @@ END	{ if (NR > 0) {
 
 trap "_wrapup; exit \$status" 0 1 2 3 15
 
-mkdir -p $RESULT_BASE
-if [ ! -d $RESULT_BASE ]; then
-	echo "failed to create results directory $RESULTS_BASE"
-	exit 1;
-fi
-
-seq="check"
-check="$RESULT_BASE/check"
-
-# don't leave old full output behind on a clean run
-rm -f $check.full
-
-[ -f $check.time ] || touch $check.time
-
-# print out our test configuration
-echo "FSTYP         -- `_full_fstyp_details`"
-echo "PLATFORM      -- `_full_platform_details`"
-if [ ! -z "$SCRATCH_DEV" ]; then
-  echo "MKFS_OPTIONS  -- `_scratch_mkfs_options`"
-  echo "MOUNT_OPTIONS -- `_scratch_mount_options`"
-fi
-echo
-
-
-if [ ! -z "$SCRATCH_DEV" ]; then
-  umount $SCRATCH_DEV 2>/dev/null
-  # call the overridden mkfs - make sure the FS is built
-  # the same as we'll create it later.
-
-  if ! _scratch_mkfs $flag >$tmp.err 2>&1
-  then
-      echo "our local _scratch_mkfs routine ..."
-      cat $tmp.err
-      echo "check: failed to mkfs \$SCRATCH_DEV using specified options"
-      exit 1
-  fi
-
-  # call the overridden mount - make sure the FS mounts with
-  # the same options that we'll mount with later.
-  if ! _scratch_mount >$tmp.err 2>&1
-  then
-      echo "our local mount routine ..."
-      cat $tmp.err
-      echo "check: failed to mount \$SCRATCH_DEV using specified options"
-      exit 1
-  fi
-fi
+if true; then
+	mkdir -p $RESULT_BASE
+	if [ ! -d $RESULT_BASE ]; then
+		echo "failed to create results directory $RESULTS_BASE"
+		exit 1;
+	fi
 
-seqres="$check"
-_check_test_fs
+	seq="check"
+	check="$RESULT_BASE/check"
 
-for seq in $list
-do
-    err=false
+	# don't leave old full output behind on a clean run
+	rm -f $check.full
 
-    # the filename for the test and the name output are different.
-    # we don't include the tests/ directory in the name output.
-    seqnum=`echo $seq | sed -e "s;$SRC_DIR/;;"`
+	[ -f $check.time ] || touch $check.time
 
-    # Similarly, the result directory needs to replace the tests/
-    # part of the test location.
-    group=`dirname $seq`
-    export RESULT_DIR=`echo $group | sed -e "s;$SRC_DIR;$RESULT_BASE;"`
-    mkdir -p $RESULT_DIR
-    seqres="$RESULT_BASE/$seqnum"
+	# print out our test configuration
+	echo "FSTYP         -- `_full_fstyp_details`"
+	echo "PLATFORM      -- `_full_platform_details`"
+	if [ ! -z "$SCRATCH_DEV" ]; then
+	  echo "MKFS_OPTIONS  -- `_scratch_mkfs_options`"
+	  echo "MOUNT_OPTIONS -- `_scratch_mount_options`"
+	fi
+	echo
 
-    echo -n "$seqnum"
 
-    if $showme
-    then
-	echo
-	continue
-    elif [ ! -f $seq ]
-    then
-	echo " - no such test?"
-    else
-	# really going to try and run this one
-	#
-	rm -f $seqres.out.bad
-
-	# check if we really should run it
-	if [ -s $tmp.xlist ]; then
-		if grep $seqnum $tmp.xlist > /dev/null 2>&1 ; then
-			echo "       [expunged]"
-			continue
-		fi
+	if [ ! -z "$SCRATCH_DEV" ]; then
+	  umount $SCRATCH_DEV 2>/dev/null
+	  # call the overridden mkfs - make sure the FS is built
+	  # the same as we'll create it later.
+
+	  if ! _scratch_mkfs $flag >$tmp.err 2>&1
+	  then
+	      echo "our local _scratch_mkfs routine ..."
+	      cat $tmp.err
+	      echo "check: failed to mkfs \$SCRATCH_DEV using specified options"
+	      exit 1
+	  fi
+
+	  # call the overridden mount - make sure the FS mounts with
+	  # the same options that we'll mount with later.
+	  if ! _scratch_mount >$tmp.err 2>&1
+	  then
+	      echo "our local mount routine ..."
+	      cat $tmp.err
+	      echo "check: failed to mount \$SCRATCH_DEV using specified options"
+	      exit 1
+	  fi
 	fi
 
-	# slashes now in names, sed barfs on them so use grep
-	lasttime=`grep -w ^$seqnum $check.time | awk '// {print $2}'`
-	if [ "X$lasttime" != X ]; then
-		echo -n " ${lasttime}s ..."
-	else
-		echo -n "	"	# prettier output with timestamps.
-	fi
-	rm -f core $seqres.notrun
+	seqres="$check"
+	_check_test_fs
 
-	start=`_wallclock`
-	$timestamp && echo -n "	["`date "+%T"`"]"
-	[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
-	$LOGGER_PROG "run xfstest $seqnum"
-	./$seq >$tmp.rawout 2>&1
-	sts=$?
-	$timestamp && _timestamp
-	stop=`_wallclock`
+	for seq in $list
+	do
+	    err=false
 
-	_fix_malloc <$tmp.rawout >$tmp.out
-	rm -f $tmp.rawout
+	    # the filename for the test and the name output are different.
+	    # we don't include the tests/ directory in the name output.
+	    seqnum=`echo $seq | sed -e "s;$SRC_DIR/;;"`
 
-	if [ -f core ]
-	then
-	    echo -n " [dumped core]"
-	    mv core $RESULT_BASE/$seqnum.core
-	    err=true
-	fi
+	    # Similarly, the result directory needs to replace the tests/
+	    # part of the test location.
+	    group=`dirname $seq`
+	    export RESULT_DIR=`echo $group | sed -e "s;$SRC_DIR;$RESULT_BASE;"`
+	    mkdir -p $RESULT_DIR
+	    seqres="$RESULT_BASE/$seqnum"
 
-	if [ -f $seqres.notrun ]
-	then
-	    $timestamp || echo -n " [not run] "
-	    $timestamp && echo " [not run]" && echo -n "	$seqnum -- "
-	    cat $seqres.notrun
-	    notrun="$notrun $seqnum"
-	else
-	    if [ $sts -ne 0 ]
+	    echo -n "$seqnum"
+
+	    if $showme
 	    then
-		echo -n " [failed, exit status $sts]"
-		err=true
-	    fi
-	    if [ ! -f $seq.out ]
+		echo
+		continue
+	    elif [ ! -f $seq ]
 	    then
-		echo " - no qualified output"
-		err=true
+		echo " - no such test?"
 	    else
+		# really going to try and run this one
+		#
+		rm -f $seqres.out.bad
+
+		# check if we really should run it
+		if [ -s $tmp.xlist ]; then
+			if grep $seqnum $tmp.xlist > /dev/null 2>&1 ; then
+				echo "       [expunged]"
+				continue
+			fi
+		fi
+
+		# slashes now in names, sed barfs on them so use grep
+		lasttime=`grep -w ^$seqnum $check.time | awk '// {print $2}'`
+		if [ "X$lasttime" != X ]; then
+			echo -n " ${lasttime}s ..."
+		else
+			echo -n "	"	# prettier output with timestamps.
+		fi
+		rm -f core $seqres.notrun
+
+		start=`_wallclock`
+		$timestamp && echo -n "	["`date "+%T"`"]"
+		[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
+		$LOGGER_PROG "run xfstest $seqnum"
+		./$seq >$tmp.rawout 2>&1
+		sts=$?
+		$timestamp && _timestamp
+		stop=`_wallclock`
 
-		# coreutils 8.16+ changed quote formats in error messages from
-		# `foo' to 'foo'. Filter old versions to match the new version.
-		sed -i "s/\`/\'/g" $tmp.out
-		if diff $seq.out $tmp.out >/dev/null 2>&1
+		_fix_malloc <$tmp.rawout >$tmp.out
+		rm -f $tmp.rawout
+
+		if [ -f core ]
+		then
+		    echo -n " [dumped core]"
+		    mv core $RESULT_BASE/$seqnum.core
+		    err=true
+		fi
+
+		if [ -f $seqres.notrun ]
 		then
-		    if $err
+		    $timestamp || echo -n " [not run] "
+		    $timestamp && echo " [not run]" && echo -n "	$seqnum -- "
+		    cat $seqres.notrun
+		    notrun="$notrun $seqnum"
+		else
+		    if [ $sts -ne 0 ]
 		    then
-			:
-		    else
-			echo "$seqnum `expr $stop - $start`" >>$tmp.time
-			echo -n " `expr $stop - $start`s"
+			echo -n " [failed, exit status $sts]"
+			err=true
 		    fi
-		    echo ""
-		else
-		    echo " - output mismatch (see $seqres.out.bad)"
-		    mv $tmp.out $seqres.out.bad
-		    $diff $seq.out $seqres.out.bad | {
-		        if test "$DIFF_LENGTH" -le 0; then
-				cat
+		    if [ ! -f $seq.out ]
+		    then
+			echo " - no qualified output"
+			err=true
+		    else
+
+			# coreutils 8.16+ changed quote formats in error messages from
+			# `foo' to 'foo'. Filter old versions to match the new version.
+			sed -i "s/\`/\'/g" $tmp.out
+			if diff $seq.out $tmp.out >/dev/null 2>&1
+			then
+			    if $err
+			    then
+				:
+			    else
+				echo "$seqnum `expr $stop - $start`" >>$tmp.time
+				echo -n " `expr $stop - $start`s"
+			    fi
+			    echo ""
 			else
-				head -n "$DIFF_LENGTH"
-				echo "..."
-				echo "(Run '$diff $seq.out $seqres.out.bad'" \
-					" to see the entire diff)"
-			fi; } | \
-			sed -e 's/^\(.\)/    \1/'
-		    err=true
+			    echo " - output mismatch (see $seqres.out.bad)"
+			    mv $tmp.out $seqres.out.bad
+			    $diff $seq.out $seqres.out.bad | {
+				if test "$DIFF_LENGTH" -le 0; then
+					cat
+				else
+					head -n "$DIFF_LENGTH"
+					echo "..."
+					echo "(Run '$diff $seq.out $seqres.out.bad'" \
+						" to see the entire diff)"
+				fi; } | \
+				sed -e 's/^\(.\)/    \1/'
+			    err=true
+			fi
+		    fi
 		fi
-	    fi
-	fi
 
-    fi
+	    fi
 
-    # come here for each test, except when $showme is true
-    #
-    if $err
-    then
-	bad="$bad $seqnum"
-	n_bad=`expr $n_bad + 1`
-	quick=false
-    fi
-    if [ ! -f $seqres.notrun ]
-    then
-	try="$try $seqnum"
-	n_try=`expr $n_try + 1`
-        _check_test_fs
-    fi
+	    # come here for each test, except when $showme is true
+	    #
+	    if $err
+	    then
+		bad="$bad $seqnum"
+		n_bad=`expr $n_bad + 1`
+		quick=false
+	    fi
+	    if [ ! -f $seqres.notrun ]
+	    then
+		try="$try $seqnum"
+		n_try=`expr $n_try + 1`
+		_check_test_fs
+	    fi
 
-    seq="after_$seqnum"
-done
+	    seq="after_$seqnum"
+	done
+fi
 
 interrupt=false
 status=`expr $n_bad`
Signature · 6 lines
1.8.3.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#1 lore raw

PATCH 2/5 xfstests: Add support for sections in config file

This patch add support for sections in the config file. Each section can contain configuration options in the format

OPTION=value

when one section is processed xfstests will proceed to next section until all secitons are processed, or an error occur.

The name of the section can consist of alphanumeric characters + '_', nothing else is allowed. Name of the section is also used to create results subdirectory for each section. After all the sections are processed summary of all runs is printed out.

If the config file does not contain sections, or we're not using config file at all, nothing is changed and xfstests will work the same way as it used to.

This is very useful for testing file system with different options. Here is an example of the config file with sections:

[ext4_4k_block_size]
TEST_DEV=/dev/sda
TEST_DIR=/mnt/test
SCRATCH_DEV=/dev/sdb
SCRATCH_MNT=/mnt/test1
MKFS_OPTIONS="-q -F -b4096"
FSTYP=ext4

[ext4_1k_block_size]
MKFS_OPTIONS="-q -F -b1024"

[ext4_nojournal]
MKFS_OPTIONS="-q -F -b4096 -O ^has_journal"

[ext4_discard_ssd]
MKFS_OPTIONS="-q -F -b4096"
TEST_DEV=/dev/sdc
SCRATCH_DEV=/dev/sdd
MOUNT_OPTIONS="-o discard"

Note that once the variable is set it remains set across the sections, so you do not have to specify all the options in all sections. However one have to make sure that unwanted options are not set from previous sections.

---
 README.config-sections | 50 ++++++++++++++++++++++++++++++++++++
 check                  | 70 ++++++++++++++++++++++++++++++++++++++++++--------
 common/config          | 49 +++++++++++++++++++++++++++++++++--
 3 files changed, 157 insertions(+), 12 deletions(-)
 create mode 100644 README.config-sections
README.config-sections new file +50 -0
new file mode 100644
index 0000000..6d88a6f
@@ -0,0 +1,50 @@
+Configuration file with sections
+================================
+
+Configuration file with sections is useful for running xfstests on multiple
+file systems, or multiple file system setups in a single run without any
+help of external scripts.
+
+Syntax for defining a section is the following:
+
+[section_name]
+
+Section name should consist of alphanumeric characters and '_'. Anything
+else is forbidden and the section will not be recognised.
+
+Each section in the configuration file should contain options in the format
+
+OPTION=value
+
+'OPTION' must not contain any white space characters. 'value' can contain
+any character you want with one simple limitation - characters ' and " can
+only appear at the start and end of the 'value', however it is not required.
+
+Note that options are carried between sections so the same options does not
+have to be specified in each and every sections. However caution should be
+exercised not to leave unwanted options set from previous sections.
+
+For every section xfstests will run with specified options and will produce
+separate results in the '$RESULT_BASE/$section_name' directory.
+
+Here is an example of config file with sections:
+
+[ext4_4k_block_size]
+TEST_DEV=/dev/sda
+TEST_DIR=/mnt/test
+SCRATCH_DEV=/dev/sdb
+SCRATCH_MNT=/mnt/test1
+MKFS_OPTIONS="-q -F -b4096"
+FSTYP=ext4
+
+[ext4_1k_block_size]
+MKFS_OPTIONS="-q -F -b1024"
+
+[ext4_nojournal]
+MKFS_OPTIONS="-q -F -b4096 -O ^has_journal"
+
+[ext4_discard_ssd]
+MKFS_OPTIONS="-q -F -b4096"
+TEST_DEV=/dev/sdc
+SCRATCH_DEV=/dev/sdd
+MOUNT_OPTIONS="-o discard"
check +60 -10

142 lines not on this page · raw message

common/config +47 -2

69 lines not on this page · raw message

Signature · 6 lines
1.8.3.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#2 lore raw

PATCH 3/5 xfstests: Allow to recreate TEST_DEV

In reply to Lukas Czerner

Add config option RECREATE_TEST_DEV to allow to recreate file system on the TEST_DEV device. Permitted values are true and false.

If RECREATE_TEST_DEV is set to true the TEST_DEV device will be unmounted and FSTYP file system will be created on it. Afterwards it will be mounted to TEST_DIR again with the default, or specified mount options.

Also recreate the file system if FSTYP differs from the previous section.

---
 README.config-sections |  43 ++++++++++++++++----
 check                  |  33 ++++++++++++---
 common/config          | 106 +++++++++++++++++++++++++++++++++++++++++++++++++
 common/rc              |  26 +++++++++---
 4 files changed, 189 insertions(+), 19 deletions(-)
README.config-sections +36 -7
index 6d88a6f..4d60272 100644
@@ -5,16 +5,20 @@ Configuration file with sections is useful for running xfstests on multiple
 file systems, or multiple file system setups in a single run without any
 help of external scripts.
 
+
+Syntax
+------
+
 Syntax for defining a section is the following:
 
-[section_name]
+	[section_name]
 
 Section name should consist of alphanumeric characters and '_'. Anything
 else is forbidden and the section will not be recognised.
 
 Each section in the configuration file should contain options in the format
 
-OPTION=value
+	OPTION=value
 
 'OPTION' must not contain any white space characters. 'value' can contain
 any character you want with one simple limitation - characters ' and " can
@@ -24,9 +28,31 @@ Note that options are carried between sections so the same options does not
 have to be specified in each and every sections. However caution should be
 exercised not to leave unwanted options set from previous sections.
 
+
+Results
+-------
+
 For every section xfstests will run with specified options and will produce
 separate results in the '$RESULT_BASE/$section_name' directory.
 
+
+Multiple file systems
+---------------------
+
+Having different file systems in different config sections is allowed. When
+FSTYP differs in the following section the FSTYP file system will be created
+automatically before running the test.
+
+Note that if MOUNT_OPTIONS, MKFS_OPTIONS, or FSCK_OPTIONS are not directly
+specified in the section it will be reset to the default for a given file
+system.
+
+You can also force the file system recreation by specifying RECREATE_TEST_DEV.
+
+
+Example
+-------
+
 Here is an example of config file with sections:
 
 [ext4_4k_block_size]
@@ -36,6 +62,7 @@ SCRATCH_DEV=/dev/sdb
 SCRATCH_MNT=/mnt/test1
 MKFS_OPTIONS="-q -F -b4096"
 FSTYP=ext4
+RESULT_BASE="`pwd`/results/`date +%d%m%y_%H%M%S`"
 
 [ext4_1k_block_size]
 MKFS_OPTIONS="-q -F -b1024"
@@ -43,8 +70,10 @@ MKFS_OPTIONS="-q -F -b1024"
 [ext4_nojournal]
 MKFS_OPTIONS="-q -F -b4096 -O ^has_journal"
 
-[ext4_discard_ssd]
-MKFS_OPTIONS="-q -F -b4096"
-TEST_DEV=/dev/sdc
-SCRATCH_DEV=/dev/sdd
-MOUNT_OPTIONS="-o discard"
+[xfs_filesystem]
+MKFS_OPTIONS="-f"
+FSTYP=xfs
+
+[ext3_filesystem]
+FSTYP=ext3
+MOUNT_OPTIONS="-o noatime"
check +27 -6
index 928c5f4..a5a6184 100755
@@ -283,8 +283,6 @@ if $have_test_arg; then
 	done
 fi
 
-_prepare_test_list
-
 # we need common/rc
 if ! . ./common/rc
 then
@@ -386,6 +384,8 @@ _summary()
 	rm -f $tmp.*
 }
 
+_prepare_test_list
+
 if $OPTIONS_HAVE_SECTIONS; then
 	trap "_summary; exit \$status" 0 1 2 3 15
 else
@@ -393,8 +393,8 @@ else
 fi
 
 for section in $HOST_OPTIONS_SECTIONS; do
+	OLD_FSTYP=$FSTYP
 	get_next_config $section
-	init_rc
 
 	mkdir -p $RESULT_BASE
 	if [ ! -d $RESULT_BASE ]; then
@@ -402,6 +402,30 @@ for section in $HOST_OPTIONS_SECTIONS; do
 		exit 1;
 	fi
 
+	if $OPTIONS_HAVE_SECTIONS; then
+		echo "SECTION       -- $section"
+	fi
+
+	if $RECREATE_TEST_DEV || [ "$OLD_FSTYP" != "$FSTYP" ]; then
+		echo "RECREATING    -- $FSTYP on $TEST_DEV"
+		umount $TEST_DEV 2> /dev/null
+		if ! _test_mkfs >$tmp.err 2>&1
+		then
+			echo "our local _test_mkfs routine ..."
+			cat $tmp.err
+			echo "check: failed to mkfs \$TEST_DEV using specified options"
+			exit 1
+		fi
+		out=`_mount_or_remount_rw "$MOUNT_OPTIONS" $TEST_DEV $TEST_DIR`
+		if [ $? -ne 1 ]; then
+			echo $out
+			exit 1
+		fi
+		_prepare_test_list
+	fi
+
+	init_rc
+
 	seq="check"
 	check="$RESULT_BASE/check"
 
@@ -411,9 +435,6 @@ for section in $HOST_OPTIONS_SECTIONS; do
 	[ -f $check.time ] || touch $check.time
 
 	# print out our test configuration
-	if $OPTIONS_HAVE_SECTIONS; then
-		echo "SECTION       -- $section"
-	fi
 	echo "FSTYP         -- `_full_fstyp_details`"
 	echo "PLATFORM      -- `_full_platform_details`"
 	if [ ! -z "$SCRATCH_DEV" ]; then
common/config +106 -0

126 lines not on this page · raw message

common/rc +20 -6
index 7f9db56..8bb4a45 100644
@@ -168,12 +168,6 @@ _fsck_opts()
     esac
 }
 
-[ -z "$FSTYP" ] && FSTYP=xfs
-[ -z "$MOUNT_OPTIONS" ] && _mount_opts
-[ -z "$MKFS_OPTIONS" ] && _mkfs_opts
-[ -z "$FSCK_OPTIONS" ] && _fsck_opts
-
-
 # we need common/config
 if [ "$iam" != "check" ]
 then
@@ -536,6 +530,7 @@ _setup_large_ext4_fs()
 	fi
 	return 0
 }
+
 _scratch_mkfs_ext4()
 {
 	local tmp_dir=/tmp/
@@ -564,6 +559,24 @@ _scratch_mkfs_ext4()
 	return $mkfs_status
 }
 
+_test_mkfs()
+{
+    case $FSTYP in
+    nfs*)
+	# do nothing for nfs
+	;;
+    udf)
+        $MKFS_UDF_PROG $MKFS_OPTIONS $* $TEST_DEV > /dev/null
+	;;
+    btrfs)
+        $MKFS_BTRFS_PROG $MKFS_OPTIONS $* $TEST_DEV > /dev/null
+	;;
+    *)
+	yes | $MKFS_PROG -t $FSTYP -- $MKFS_OPTIONS $* $TEST_DEV
+	;;
+    esac
+}
+
 _scratch_mkfs()
 {
     case $FSTYP in
@@ -998,6 +1011,7 @@ _supported_fs()
     _notrun "not suitable for this filesystem type: $FSTYP"
 }
 
+
 # tests whether $FSTYP is one of the supported OSes for a test
 #
 _supported_os()
Signature · 6 lines
1.8.3.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#3 lore raw

PATCH 4/5 xfstests: Remount file system if MOUNT_OPTIONS changed

In reply to Lukas Czerner

When MOUNT_OPTIONS change we should remount TEST_DEV to put the changes in effect. This will allow us to have different MOUNT_OPTIONS in sections in configuration file.

---
 README.config-sections | 8 ++++++++
 check                  | 8 ++++++++
 2 files changed, 16 insertions(+)
README.config-sections +8 -0
index 4d60272..2849fd5 100644
@@ -36,6 +36,14 @@ For every section xfstests will run with specified options and will produce
 separate results in the '$RESULT_BASE/$section_name' directory.
 
 
+Different mount options
+-----------------------
+
+Specifying different mount options in difference config sections is allowed.
+When MOUNT_OPTIONS differs in the following section TEST_DEV will be remounted
+with new MOUNT_OPTIONS automatically before running the test.
+
+
 Multiple file systems
 ---------------------
 
check +8 -0
index a5a6184..b3937b3 100755
@@ -394,6 +394,7 @@ fi
 
 for section in $HOST_OPTIONS_SECTIONS; do
 	OLD_FSTYP=$FSTYP
+	OLD_MOUNT_OPTIONS=$MOUNT_OPTIONS
 	get_next_config $section
 
 	mkdir -p $RESULT_BASE
@@ -422,6 +423,13 @@ for section in $HOST_OPTIONS_SECTIONS; do
 			exit 1
 		fi
 		_prepare_test_list
+	elif [ "$OLD_MOUNT_OPTIONS" != "$MOUNT_OPTIONS" ]; then
+		umount $TEST_DEV 2> /dev/null
+		out=`_mount_or_remount_rw "$MOUNT_OPTIONS" $TEST_DEV $TEST_DIR`
+		if [ $? -ne 1 ]; then
+			echo $out
+			exit 1
+		fi
 	fi
 
 	init_rc
Signature · 6 lines
1.8.3.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#4 lore raw

PATCH 5/5 xfstests: unmount TEST_DEV and SCRATCH_DEV after test run

In reply to Lukas Czerner

Unmount TEST_DEV and SCRATCH_DEV after each test run to avoid mounting multiple devices on the same mount point which might result in xfstest not being able to unmount the device later down the path.

---
 check | 3 +++
 1 file changed, 3 insertions(+)
check +3 -0
index b3937b3..a26fbf7 100755
@@ -620,6 +620,9 @@ for section in $HOST_OPTIONS_SECTIONS; do
 	done
 	_wrapup
 	echo
+
+	umount $TEST_DEV 2> /dev/null
+	umount $SCRATCH_DEV 2> /dev/null
 done
 
 interrupt=false
Signature · 6 lines
1.8.3.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs