public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fstests: Add lustre support
@ 2025-11-18  7:30 Xiao Yang
  2025-11-18 12:50 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Xiao Yang @ 2025-11-18  7:30 UTC (permalink / raw)
  To: zlang, zlang; +Cc: timday, fstests, sihara, Xiao Yang

Add basic lustre support so that we can continuously
improve lustre by fstests.

Signed-off-by: Xiao Yang <iceyangxiao@gmail.com>
---
 README                 |  2 ++
 README.config-sections |  7 +++++++
 check                  |  3 ++-
 common/config          |  5 +++++
 common/rc              | 29 ++++++++++++++++++++++++++++-
 5 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/README b/README
index 9e9afe3c..9e3ff13f 100644
--- a/README
+++ b/README
@@ -87,6 +87,8 @@ L4: Active support from the fs list, has lots of own cases.
 +------------+-------+---------------------------------------------------------+
 | 9p         |  L1   | N/A                                                     |
 +------------+-------+---------------------------------------------------------+
+| lustre     |  L1   | N/A                                                     |
++------------+-------+---------------------------------------------------------+
 
 _______________________
 BUILDING THE FSQA SUITE
diff --git a/README.config-sections b/README.config-sections
index a42d9d7b..18af445f 100644
--- a/README.config-sections
+++ b/README.config-sections
@@ -135,3 +135,10 @@ TEST_DEV=%example.com:xfstest.test
 TEST_DIR=/mnt/xfstest.test
 SCRATCH_DEV=%example.com:xfstest.scratch
 SCRATCH_MNT=/mnt/xfstest.scratch
+
+[lustre]
+FSTYP=lustre
+TEST_DIR=/mnt/test
+TEST_DEV=192.168.1.1@tcp:/test
+SCRATCH_MNT=/mnt/scratch
+SCRATCH_DEV=192.168.1.1@tcp:/scratch
diff --git a/check b/check
index ce7eacb7..a5d43d98 100755
--- a/check
+++ b/check
@@ -70,6 +70,7 @@ check options
     -pvfs2		test PVFS2
     -tmpfs		test TMPFS
     -ubifs		test ubifs
+    -lustre             test lustre
     -l			line mode diff
     -udiff		show unified diff (default)
     -n			show me, do not run tests
@@ -277,7 +278,7 @@ while [ $# -gt 0 ]; do
 	case "$1" in
 	-\? | -h | --help) usage ;;
 
-	-nfs|-afs|-glusterfs|-cifs|-9p|-fuse|-virtiofs|-pvfs2|-tmpfs|-ubifs)
+	-nfs|-afs|-glusterfs|-cifs|-9p|-fuse|-virtiofs|-pvfs2|-tmpfs|-ubifs|-lustre)
 		FSTYP="${1:1}"
 		;;
 	-overlay)
diff --git a/common/config b/common/config
index 1420e35d..9d3c36e8 100644
--- a/common/config
+++ b/common/config
@@ -394,6 +394,9 @@ _common_mount_opts()
 	ubifs)
 		echo $UBIFS_MOUNT_OPTIONS
 		;;
+	lustre)
+		echo $LUSTRE_MOUNT_OPTIONS
+		;;
 	*)
 		;;
 	esac
@@ -539,6 +542,8 @@ _source_specific_fs()
 		[ "$UBIUPDATEVOL_PROG" = "" ] && _fatal "ubiupdatevol not found"
 		. ./common/ubifs
 		;;
+	lustre)
+		;;
 	esac
 }
 
diff --git a/common/rc b/common/rc
index 8fd7876a..7f75963b 100644
--- a/common/rc
+++ b/common/rc
@@ -867,6 +867,9 @@ _test_mkfs()
     pvfs2)
 	# do nothing for pvfs2
 	;;
+    lustre)
+	# do nothing for lustre
+	;;
     udf)
         $MKFS_UDF_PROG $MKFS_OPTIONS $* $TEST_DEV > /dev/null
 	;;
@@ -981,7 +984,7 @@ _scratch_mkfs()
 	local mkfs_status
 
 	case $FSTYP in
-	nfs*|afs|cifs|ceph|overlay|glusterfs|pvfs2|9p|fuse|virtiofs)
+	nfs*|afs|cifs|ceph|overlay|glusterfs|pvfs2|9p|fuse|virtiofs|lustre)
 		# unable to re-create this fstyp, just remove all files in
 		# $SCRATCH_MNT to avoid EEXIST caused by the leftover files
 		# created in previous runs
@@ -2064,6 +2067,15 @@ _require_scratch_nocheck()
 			_notrun "this test requires a valid \$SCRATCH_MNT"
 		fi
 		;;
+	lustre)
+		echo $SCRATCH_DEV | grep -q "@.*:/" > /dev/null 2>&1
+		if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]; then
+			_notrun "this test requires a valid \$SCRATCH_DEV"
+		fi
+		if [ ! -d "$SCRATCH_MNT" ]; then
+			_notrun "this test requires a valid \$SCRATCH_MNT"
+		fi
+		;;
 	*)
 		 if [ -z "$SCRATCH_DEV" -o "`_is_block_dev "$SCRATCH_DEV"`" = "" ]
 		 then
@@ -2288,6 +2300,15 @@ _require_test()
 			_notrun "this test requires a valid \$TEST_DIR"
 		fi
 		;;
+	lustre)
+		echo $TEST_DEV | grep -q "@.*:/" > /dev/null 2>&1
+		if [ -z "$TEST_DEV" -o "$?" != "0" ]; then
+			_notrun "this test requires a valid \$TEST_DEV"
+		fi
+		if [ ! -d "$TEST_DIR" ]; then
+			_notrun "this test requires a valid \$TEST_DIR"
+		fi
+		;;
 	*)
 		 if [ -z "$TEST_DEV" ] || [ "`_is_block_dev "$TEST_DEV"`" = "" ]
 		 then
@@ -3658,6 +3679,9 @@ _check_test_fs()
 	;;
     pvfs2)
 	;;
+    lustre)
+	# no way to check consistency for lustre
+	;;
     udf)
 	# do nothing for now
 	;;
@@ -3720,6 +3744,9 @@ _check_scratch_fs()
 	;;
     pvfs2)
 	;;
+    lustre)
+	# no way to check consistency for lustre
+	;;
     btrfs)
 	_check_btrfs_filesystem $device
 	;;
-- 
2.43.7


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-11-19  6:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-18  7:30 [PATCH] fstests: Add lustre support Xiao Yang
2025-11-18 12:50 ` Christoph Hellwig
2025-11-18 15:23   ` Day, Timothy
2025-11-19  4:10     ` Xiao Yang
2025-11-19  6:15     ` Christoph Hellwig
2025-11-18 14:52 ` Day, Timothy
2025-11-19  4:32   ` Xiao Yang
2025-11-19  6:25 ` Zorro Lang
2025-11-19  6:34   ` Xiao Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox