Skip to contentSkip to conversation

Tmpfs support and fixes for tmpfs/nfs

PATCH In review [email protected] 1 participant 5 messages May 2, 2013 – May 13, 2013

lore
Share & tools
lore
#0 lore raw

cover Tmpfs support and fixes for tmpfs/nfs

Hi all,

This series contains three patches related to support of tmpfs file system in xfstests.

First patch provides the support itself. Second patch fixes a regression where ./check -nfs -n -g auto stopped working for nfs (and tmpfs) and the last patch changes the failure on empty exclude group to warning to simplify automated testing.

Regards,
Boris

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

#1 lore raw

PATCH 1/3 xfstests: Add tmpfs support

From: Boris Ranto <[email protected]>

This is just a simple patch to get the tmpfs working as a target file system. The patch copies the way nfs is handled in xfstests.

I didn't change the xfstests logic to recognize a proper SCRATCH_DEV. Hence, the SCRATCH_DEV for tmpfs should be in nfs form (with ':' sign in it) in order for this to work properly.

---
 check     |    2 ++
 common/rc |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 0 deletions(-)
check +2 -0
index 966fbe5..fc335ec 100755
@@ -76,6 +76,7 @@ check options
     -xfs                test XFS (default)
     -udf                test UDF
     -nfs                test NFS
+    -tmpfs              test TMPFS
     -l			line mode diff
     -udiff		show unified diff (default)
     -n			show me, do not run tests
@@ -162,6 +163,7 @@ while [ $# -gt 0 ]; do
 	-udf)	FSTYP=udf ;;
 	-xfs)	FSTYP=xfs ;;
 	-nfs)	FSTYP=nfs ;;
+	-tmpfs)	FSTYP=tmpfs ;;
 
 	-g)	group=$2 ; shift ;
 		group_list=$(get_group_list $group)
common/rc +55 -0

109 lines not on this page · raw message

Signature · 6 lines
1.7.1

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

PATCH 2/3 xfstests: Do not fail on non-existing tests/FSTYP directory

In reply to [email protected]

From: Boris Ranto <[email protected]>

Currently, if a user runs ./check -n to get the list of tests to run on a file system such as nfs or tmpfs, then the ./check script will fail since there are no tests/nfs and tests/tmpfs subdirectories (and hence, no group files and no specific tests for the directories). This patch will conditionally add FSTYP to SRC_GROUPS and remove all further additions of FSTYP to the variable.

---
 check |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
check +9 -4
index fc335ec..4af2dbd 100755
@@ -64,7 +64,12 @@ fi
 export FSTYP
 
 SUPPORTED_TESTS="[0-9][0-9][0-9] [0-9][0-9][0-9][0-9]"
-SRC_GROUPS="generic shared"
+# Include FSTYP to SRC_GROUPS if a directory for it exists
+if [ -d $SRC_DIR/$d ]; then
+	SRC_GROUPS="generic shared $FSTYP"
+else
+	SRC_GROUPS="generic shared"
+fi
 export SRC_DIR="tests"
 export RESULT_BASE=${RESULT_BASE:="$here/results"}
 
@@ -97,7 +102,7 @@ get_group_list()
 {
 	grp=$1
 
-	for d in $SRC_GROUPS $FSTYP; do
+	for d in $SRC_GROUPS; do
 		l=$(sed -n < $SRC_DIR/$d/group \
 			-e 's/#.*//' \
 			-e 's/$/ /' \
@@ -113,7 +118,7 @@ get_group_list()
 get_all_tests()
 {
 	touch $tmp.list
-	for d in $SRC_GROUPS $FSTYP; do
+	for d in $SRC_GROUPS; do
 		ls $SRC_DIR/$d/* | \
 			grep -v "\..*" | \
 			grep -v group >> $tmp.list 2>/dev/null
@@ -198,7 +203,7 @@ while [ $# -gt 0 ]; do
 		;;
 
 	-X)	xfile=$2; shift ;
-		for d in $SRC_GROUPS $FSTYP; do
+		for d in $SRC_GROUPS; do
 			[ -f $SRC_DIR/$d/$xfile ] || continue
 			for f in `cat $SRC_DIR/$d/$xfile`; do
 				echo $d/$f >> $tmp.xlist
Signature · 6 lines
1.7.1

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

PATCH 3/3 xfstests: Do not fail on empty exclude groups

In reply to [email protected]

From: Boris Ranto <[email protected]>

Currently, xfstests will fail as soon as it detects an empty exclude group. However, this may cause problems in automated testing. For example, if one wishes to exclude otherwise valid group dmapi for file system like tmpfs or nfs, the ./check script will hit the error about empty group and fail. This simple patch changes the error to warning, prints the warning to stderr and simply continue without excluding anything as there are no tests to be excluded.

---
 check |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
check +4 -3
index 4af2dbd..b888030 100755
@@ -194,12 +194,13 @@ while [ $# -gt 0 ]; do
 		[ ! -s $tmp.list ] && get_all_tests
 
 		group_list=$(get_group_list $xgroup)
+		# Trim the test list only if there is something to trim it with
 		if [ -z "$group_list" ]; then
-		    echo "Group \"$xgroup\" is empty or not defined?"
-		    exit 1
+		    echo "Warning: Group \"$xgroup\" seems empty." 1>&2
+		else
+		    trim_test_list $group_list
 		fi
 
-		trim_test_list $group_list
 		;;
 
 	-X)	xfile=$2; shift ;
Signature · 6 lines
1.7.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#4 lore raw
In reply to [email protected]
Quoted 9 lines · On Thu, 2013-05-02 at 16:03 +0200, [email protected] wrote:

Hi all,

This series contains three patches related to support of tmpfs file system in xfstests.

First patch provides the support itself. Second patch fixes a regression where ./check -nfs -n -g auto stopped working for nfs (and tmpfs) and the last patch changes the failure on empty exclude group to warning to simplify automated testing.

Regards,
Boris

Could this small patchset get any review, please?

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