scripts/patches/xfstests-0001-generic-531-D...

61 lines
1.6 KiB
Diff

From 9a035433e54362015a8e2f2acff85e7f658b0400 Mon Sep 17 00:00:00 2001
From: Anna Schumaker <Anna.Schumaker@Netapp.com>
Date: Mon, 12 Jul 2021 11:57:51 -0400
Subject: [PATCH 1/3] generic/531: Disable on NFS
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
---
common/rc | 15 +++++++++++++++
tests/generic/531 | 2 ++
2 files changed, 17 insertions(+)
diff --git a/common/rc b/common/rc
index a419b3ba53f6..91f0fc7b555c 100644
--- a/common/rc
+++ b/common/rc
@@ -1535,6 +1535,21 @@ _supported_fs()
_notrun "not suitable for this filesystem type: $FSTYP"
}
+# tests whether $FSTYP is one of the unsupported filesystems for a test
+#
+_unsupported_fs()
+{
+ local f
+
+ for f
+ do
+ if [ "$f" = "$FSTYP" -o "$f" = "generic" ]
+ then
+ _notrun "not suitable for this filesystem type: $FSTYP"
+ fi
+ done
+}
+
# check if a FS on a device is mounted
# if so, verify that it is mounted on mount point
# if fstype is given as argument, verify that it is also
diff --git a/tests/generic/531 b/tests/generic/531
index 5e84ca977b44..3a696a526bde 100755
--- a/tests/generic/531
+++ b/tests/generic/531
@@ -19,6 +19,7 @@ testfile=$TEST_DIR/$seq.txt
# real QA test starts here
_supported_fs generic
+_unsupported_fs nfs
_require_scratch
_require_test_program "t_open_tmpfiles"
@@ -35,6 +36,7 @@ max_allowable_files=$(( $(cat /proc/sys/fs/file-max) / $nr_cpus / 2 ))
test $max_allowable_files -gt 0 && test $max_files -gt $max_allowable_files && \
max_files=$max_allowable_files
ulimit -n $max_files
+nr_cpus=1
# Open a lot of unlinked files
echo create >> $seqres.full
--
2.34.1