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: <41edde3b32602dbbad028eec4568875427987cea.1607078368.git.riteshh@linux.ibm.com>
Date:   Fri,  4 Dec 2020 16:13:53 +0530
From:   Ritesh Harjani <riteshh@...ux.ibm.com>
To:     fstests@...r.kernel.org
Cc:     guan@...u.me, linux-ext4@...r.kernel.org, anju@...ux.vnet.ibm.com,
        Eryu Guan <eguan@...hat.com>,
        Ritesh Harjani <riteshh@...ux.ibm.com>
Subject: [PATCH 1/2] check: source common/rc again if TEST_DEV was recreated

From: Eryu Guan <eguan@...hat.com>

If TEST_DEV is recreated by check, FSTYP derived from TEST_DEV
previously could be changed too and might not reflect the reality.
So source common/rc again with correct FSTYP to get fs-specific
configs, e.g. common/xfs.

For example, using this config-section config file, and run section
ext4 first then xfs, you can see:

our local _scratch_mkfs routine ...
./common/rc: line 825: _scratch_mkfs_xfs: command not found
check: failed to mkfs $SCRATCH_DEV using specified options

local.config:
[default]
RECREATE_TEST_DEV=true
TEST_DEV=/dev/sda5
SCRATCH_DEV=/dev/sda6
TEST_DIR=/mnt/test
SCRATCH_MNT=/mnt/scratch

[ext4]
MKFS_OPTIONS="-b 4096"
FSTYP=ext4

[xfs]
FSTYP=xfs
MKFS_OPTIONS="-f -b size=4k"

Tested-by: Ritesh Harjani <riteshh@...ux.ibm.com>
Signed-off-by: Eryu Guan <eguan@...hat.com>
Signed-off-by: Ritesh Harjani <riteshh@...ux.ibm.com>
---
 check | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/check b/check
index 83f6fc8bdf3e..c6ad1d6c0733 100755
--- a/check
+++ b/check
@@ -630,6 +630,10 @@ function run_section()
 			status=1
 			exit
 		fi
+		# TEST_DEV has been recreated, previous FSTYP derived from
+		# TEST_DEV could be changed, source common/rc again with
+		# correct FSTYP to get FSTYP specific configs, e.g. common/xfs
+		. common/rc
 		_prepare_test_list
 	elif [ "$OLD_TEST_FS_MOUNT_OPTS" != "$TEST_FS_MOUNT_OPTS" ]; then
 		_test_unmount 2> /dev/null
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ