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-next>] [day] [month] [year] [list]
Message-Id: <f49a72d9ee4cfb621c7f3516dc388b4c80457115.1736695253.git.nirjhar.roy.lists@gmail.com>
Date: Sun, 12 Jan 2025 15:21:51 +0000
From: "Nirjhar Roy (IBM)" <nirjhar.roy.lists@...il.com>
To: fstests@...r.kernel.org
Cc: linux-ext4@...r.kernel.org,
	linux-xfs@...r.kernel.org,
	ritesh.list@...il.com,
	ojaswin@...ux.ibm.com,
	djwong@...nel.org,
	zlang@...nel.org,
	nirjhar.roy.lists@...il.com
Subject: [PATCH] check: Fix fs specfic imports when $FSTYPE!=$OLD_FSTYPE

Bug Description:

_test_mount function is failing with the following error:
./common/rc: line 4716: _xfs_prepare_for_eio_shutdown: command not found
check: failed to mount /dev/loop0 on /mnt1/test

when the second section in local.config file is xfs and the first section
is non-xfs.

It can be easily reproduced with the following local.config file

[s2]
export FSTYP=ext4
export TEST_DEV=/dev/loop0
export TEST_DIR=/mnt1/test
export SCRATCH_DEV=/dev/loop1
export SCRATCH_MNT=/mnt1/scratch

[s1]
export FSTYP=xfs
export TEST_DEV=/dev/loop0
export TEST_DIR=/mnt1/test
export SCRATCH_DEV=/dev/loop1
export SCRATCH_MNT=/mnt1/scratch

./check selftest/001

Root cause:
When _test_mount() is executed for the second section, the FSTYPE has
already changed but the new fs specific common/$FSTYP has not yet
been done. Hence _xfs_prepare_for_eio_shutdown() is not found and
the test run fails.

Fix:
call _source_specific_fs $FSTYP at the correct call site of  _test_mount()

Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@...il.com>
---
 check | 1 +
 1 file changed, 1 insertion(+)

diff --git a/check b/check
index 607d2456..8cdbb68f 100755
--- a/check
+++ b/check
@@ -776,6 +776,7 @@ function run_section()
 	if $RECREATE_TEST_DEV || [ "$OLD_FSTYP" != "$FSTYP" ]; then
 		echo "RECREATING    -- $FSTYP on $TEST_DEV"
 		_test_unmount 2> /dev/null
+		[[ "$OLD_FSTYP" != "$FSTYP" ]] && _source_specific_fs $FSTYP
 		if ! _test_mkfs >$tmp.err 2>&1
 		then
 			echo "our local _test_mkfs routine ..."
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ