lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240623121103.974270-8-hch@lst.de>
Date: Sun, 23 Jun 2024 14:10:36 +0200
From: Christoph Hellwig <hch@....de>
To: Zorro Lang <zlang@...nel.org>
Cc: fstests@...r.kernel.org,
	"Theodore Ts'o" <tytso@....edu>,
	linux-ext4@...r.kernel.org
Subject: [PATCH 7/8] generic/746: clean up fs support

Use a single case statement for fs-specific options and to check if
this test is supported at all.

Signed-off-by: Christoph Hellwig <hch@....de>
---
 tests/generic/746 | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/tests/generic/746 b/tests/generic/746
index 0e6387fe4..b13fd98a1 100755
--- a/tests/generic/746
+++ b/tests/generic/746
@@ -9,23 +9,32 @@
 . ./common/preamble
 _begin_fstest auto trim fiemap
 
-_supported_fs ext4 xfs btrfs
+_supported_fs generic
 _require_test
 _require_loop
 _require_fstrim
 _require_xfs_io_command "fiemap"
-if [ "$FSTYP" = "btrfs" ]; then
+
+_require_fs_space $TEST_DIR 307200
+fssize=$(_small_fs_size_mb 300)           # 200m phys/virt size
+
+case "$FSTYP" in
+btrfs)
+	_require_btrfs_command inspect-internal dump-super
+	_require_btrfs_command inspect-internal dump-tree
+
 	# 3g for btrfs to have distinct bgs
 	_require_fs_space $TEST_DIR 3145728
 	fssize=3000
-else
-	_require_fs_space $TEST_DIR 307200
-	fssize=$(_small_fs_size_mb 300)           # 200m phys/virt size
-fi
-
-[ "$FSTYP" = "ext4" ] && _require_dumpe2fs
-[ "$FSTYP" = "btrfs" ] && _require_btrfs_command inspect-internal dump-super
-[ "$FSTYP" = "btrfs" ] && _require_btrfs_command inspect-internal dump-tree
+	;;
+ext4)
+	_require_dumpe2fs
+	;;
+xfs)
+	;;
+*)
+	_notrun "Requires fs-specific way to check discard ranges"
+esac
 
 # Override the default cleanup function.
 _cleanup()
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ