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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon,  7 Feb 2022 15:55:41 +0900
From:   Shin'ichiro Kawasaki <shinichiro.kawasaki@....com>
To:     fstests@...r.kernel.org, linux-btrfs@...r.kernel.org
Cc:     linux-xfs@...r.kernel.org, linux-ext4@...r.kernel.org,
        Naohiro Aota <naohiro.aota@....com>,
        Johannes Thumshirn <johannes.thumshirn@....com>,
        Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
        Shin'ichiro Kawasaki <shinichiro.kawasaki@....com>
Subject: [PATCH 7/7] generic/204: do xfs unique preparation only for xfs

The test case generic/204 formats the scratch device to get block size
as a part of preparation. However, this preparation is required only for
xfs. To simplify preparation for other filesystems, do the preparation
only for xfs.

Suggested-by: Naohiro Aota <naohiro.aota@....com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@....com>
---
 tests/generic/204 | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/tests/generic/204 b/tests/generic/204
index 40d524d1..ea267760 100755
--- a/tests/generic/204
+++ b/tests/generic/204
@@ -16,17 +16,18 @@ _cleanup()
 	sync
 }
 
-# Import common functions.
-. ./common/filter
-
 # real QA test starts here
 _supported_fs generic
 
 _require_scratch
 
-# get the block size first
-_scratch_mkfs 2> /dev/null | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
-. $tmp.mkfs
+dbsize=4096
+isize=256
+if [ $FSTYP = "xfs" ]; then
+	# get the block size first
+	_scratch_mkfs 2> /dev/null | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
+	. $tmp.mkfs
+fi
 
 # For xfs, we need to handle the different default log sizes that different
 # versions of mkfs create. All should be valid with a 16MB log, so use that.
@@ -37,11 +38,15 @@ _scratch_mkfs 2> /dev/null | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 SIZE=`expr 115 \* 1024 \* 1024`
 _scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw \
 	|| _fail "mkfs failed"
-cat $tmp.mkfs.raw | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
+
+if [ $FSTYP = "xfs" ]; then
+	cat $tmp.mkfs.raw | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
+	# Source $tmp.mkfs to get geometry
+	. $tmp.mkfs
+fi
+
 _scratch_mount
 
-# Source $tmp.mkfs to get geometry
-. $tmp.mkfs
 
 # fix the reserve block pool to a known size so that the enospc calculations
 # work out correctly. Space usages is based 22500 files and 1024 reserved blocks
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ