On 5/21/25 15:47, Dave Chinner wrote:
On Wed, May 07, 2025 at 02:19:31PM +0530, Nirjhar Roy (IBM) wrote:
On Thu, 2025-04-17 at 13:00 +1000, Dave Chinner wrote:
From: Dave Chinner <dchinner@xxxxxxxxxx>
Add a CLI option to specify the initial FSTYP to test. If this is
not specified the the default of "xfs" will be used. This option is
different to the way check has FSTYP specified as check-parallel
has no infrastructure to support non block device based filesystems
and hence we have to reject virtual or network based filesysetms
are this point in time.
Note: This patch only implements default mkfs parameter support for
the test device. Config sections can be used to override this as
check will then format the test device when the section that defines
non-default test device mkfs options is selected.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
check-parallel | 44 +++++++++++++++++++++++++++++++++++++-------
1 file changed, 37 insertions(+), 7 deletions(-)
diff --git a/check-parallel b/check-parallel
index 5fee62f37..19f2d2b0c 100755
--- a/check-parallel
+++ b/check-parallel
@@ -18,7 +18,7 @@ run_section=""
tmp=/tmp/check-parallel.$$
-export FSTYP=xfs
+FSTYP=
. ./common/exit
. ./common/test_names
@@ -35,6 +35,7 @@ check options
-r randomize test order
--exact-order run tests in the exact order specified
-s section run only specified section from config file
+ -f <FSTYPE> specify the filesystem type to test
testlist options
-g group[,group...] include tests from these groups
@@ -66,16 +67,39 @@ external_file argument is a path to a single file containing a list of tests
to exclude in the form of <test dir>/<test name>.
examples:
- check-parallel -D /mnt xfs/001
- check-parallel -D /mnt -g quick
+ check-parallel -f xfs -D /mnt xfs/001
+ check-parallel -f ext4 -D /mnt -g quick
check-parallel -D /mnt -g xfs/quick
check-parallel -D /mnt -x stress xfs/*
- check-parallel -D /mnt -X .exclude -g auto
- check-parallel -D /mnt -E ~/.xfstests.exclude
+ check-parallel -f btrfs -D /mnt -X .exclude -g auto
+ check-parallel -f udf -D /mnt -E ~/.xfstests.exclude
'
exit 1
}
+# Only support block device based filesystems with generic mkfs support
+# at the moment.
+is_supported_fstype()
+{
+ local fstype=$1
+
+ case $fstype in
+ xfs) ;;
+ ext2|ext3|ext4) ;;
+ udf) ;;
+ jfs) ;;
+ f2fs) ;;
+ btrfs) ;;
+ bcachefs) ;;
+ gfs2) ;;
+ ocfs2) ;;
Extremely minor: Maybe list the test in alphabetical order?
I copied the list from a case statement somewhere in common/rc that
was already in that order. I don't it's worth the time and brain
cells to order it, let alone require anyone to maintain that order
over the long term. It's just a simple string check....
Yes, that's fine.
--NR
-Dave.
--
Nirjhar Roy
Linux Kernel Developer
IBM, Bangalore