From patchwork Sun Jun 30 21:52:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Gomez via B4 Relay X-Patchwork-Id: 13718234 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3651C1607BC for ; Mon, 1 Jul 2024 14:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719845523; cv=none; b=aBSFdfVlmFTjMol1JM4vz6Gm6gExl+LaC9QfbRxUudoil2OIx/qLsHgwKyk8y4dEVSDkK7lIrcXn+7G9FWBoa/5jnoaHZOqVTOxAtITfW94vEPedgSOYGzRKjV1Lf9zF5L9EmcqklvYpXIMpXAdS53pZ/Ou9sfjfji+fQ1YtwhQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719845523; c=relaxed/simple; bh=iEQh3A6ebmSPauoPzDsyENd/8vTE7Uwu/TkFmIBfxPQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YRPa0iFrYuQoGBOTK4hjLwdrRiUTAKWaogd52sZShCBW/bCdx8J9fu4+tctmL9u7lwrzPgJlHrdXjz+uZQCb7FmV16rQxIAD0u0CTUh0U0vcFcP3c15LnhRfTMaPv+CukkXFxgMYPB57UQ+vgZQ6g3woeC+om8NKbqEL5Vq8VbI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jdl8WjDE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jdl8WjDE" Received: by smtp.kernel.org (Postfix) with ESMTPS id DC30FC2BD10; Mon, 1 Jul 2024 14:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719845522; bh=iEQh3A6ebmSPauoPzDsyENd/8vTE7Uwu/TkFmIBfxPQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=jdl8WjDEkfuV847SXBqlJtv9VajqO9smtMy36eiM2w8UPFrXh2xlMVbnQjRird6/c aI9dAXTA4B12M6iFroDECb8uGPhEuyvwsIbuoawEA/KleJ5V1uNRegkTLnok/TNz7z AGT4jZ1wH2mQBWSjyJBDog235m765cAv4tq2oaa3xPq1OdyHniM7pL/NI4jO3PvuoF ZfhLca0j/R5kNzti6owkJqtLsJnlNY28URKRQBgVPrPn0KR5SANExAHTaVwGCRE9fZ 7GWG2d9PdLLfjtbPiT9QsXBepqhoBx2YdhHNEhkiXlAkUNTQdntLqnsgmQzu0sDYhP B5Lap/XE4ftig== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8F1BC3065A; Mon, 1 Jul 2024 14:52:02 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Sun, 30 Jun 2024 23:52:40 +0200 Subject: [PATCH v2 1/5] common/config: fix RECREATE_TEST_DEV initialization Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240630-common-fixes-v2-1-16d26fb1dee0@samsung.com> References: <20240630-common-fixes-v2-0-16d26fb1dee0@samsung.com> In-Reply-To: <20240630-common-fixes-v2-0-16d26fb1dee0@samsung.com> To: fstests@vger.kernel.org Cc: "Darrick J. Wong" , Zorro Lang , mcgrof@kernel.org, gost.dev@samsung.com, Samsung Samsung <"Daniel Gomez d+samsung"@kruces.com>, Daniel Gomez X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1719784382; l=996; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=CZBncsstQuBprsTkh+ba7qAwTYuluS865arve8XzUjg=; b=x0nrkTnmEGQsXr88t+voL8wIX+aZVsb4Z6MqR8eeX++5XJfaL9vK86soHVvdp7dlM96TyD3B+ lE2yZztDPUhD2VhVioh/UVSZTNDeL71HWiIO3TrLFCFB9KOrnHQij1+ X-Developer-Key: i=da.gomez@samsung.com; a=ed25519; pk=BqYk31UHkmv0WZShES6pIZcdmPPGay5LbzifAdZ2Ia4= X-Endpoint-Received: by B4 Relay for da.gomez@samsung.com/20240621 with auth_id=175 X-Original-From: Daniel Gomez Reply-To: da.gomez@samsung.com From: Daniel Gomez Do not allow the overwriting of the RECREATE_TEST_DEV variable. When this variable is enabled, common/rc -> common/config will reset it to false after the test device recreation process. This allows for differentiation in mount options for SCRATCH and TEST. Signed-off-by: Daniel Gomez Reviewed-by: Darrick J. Wong Reviewed-by: Zorro Lang --- common/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/config b/common/config index a1cd14de6..43b32b93d 100644 --- a/common/config +++ b/common/config @@ -94,7 +94,7 @@ export PWD=`pwd` export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a} export LOCAL_CONFIGURE_OPTIONS=${LOCAL_CONFIGURE_OPTIONS:=--enable-readline=yes} -export RECREATE_TEST_DEV=false +export RECREATE_TEST_DEV=${RECREATE_TEST_DEV:=false} # Handle mkfs.$fstyp which does (or does not) require -f to overwrite set_mkfs_prog_path_with_opts() From patchwork Sun Jun 30 21:52:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Gomez via B4 Relay X-Patchwork-Id: 13718235 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 490771649A8 for ; Mon, 1 Jul 2024 14:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719845523; cv=none; b=a4BImtsPK9pa64iratR8XF+EFkAAse9wwjivj7rc6/NFpivmLQ/DRm0Qpx/LKTuhUBo00DmPBWyw17k1I3asyvex6MNHb+zxpwjaMkg7L/8umF1cNaDg+o4kYJhs2l2LMyrND8uHzGZm+cR1QCi9yGpMnnRUC8HSEF2cSOlblcM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719845523; c=relaxed/simple; bh=6iOMRTWMwN1CICgLmdW6RtuLUZr17rQ71VUnU3x2zpY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ou9HE0iR7y+gIdT5E91sO+Es9g/5W9/1/QHiesFp4c8JPKJYa2XFHL2HSSFnoYhE/2lYadM3m2DcetajrDYs158RckCIrxF8PXZsqEbA6GqOS5ZvuxZMTBc/k/YTUzsA4XuGHilWoivrJSRRsiDptIJZ7vTYlZU+XLg8syZWXIM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LMfdo6I9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LMfdo6I9" Received: by smtp.kernel.org (Postfix) with ESMTPS id EAE2BC32781; Mon, 1 Jul 2024 14:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719845523; bh=6iOMRTWMwN1CICgLmdW6RtuLUZr17rQ71VUnU3x2zpY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=LMfdo6I9JWc4HGDB3nuJGkWHp6k+u4J9fp79lM/Q4NJgd14S4wNEK81rkjcZAuvc7 aBpCJIlArSyKlU8rVjZJvEvp/P61I46cHQfLIRdJpaaj7RCFz/XUoh9MVXKhUX2Y3h futpBL6AYxFQQRhTpwQJ44pNdAp6Hi7ZH5xK8UBtrF9IYhkrEW2ujILMY6D9xsSbdq g4kbs0knkhorFLY2U9FluJ255kztow3Vs9d8nSvc3QPPpMhi2gqa8Qlbv6C/YaO1MK bAgSaCop1x9aMxJrfhAgKXBAQ04HBswhQA1vxDrZI5E2U5hNEetIcF9rg0q6TaSbCS pzSGii8J045Xg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5915C3065D; Mon, 1 Jul 2024 14:52:02 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Sun, 30 Jun 2024 23:52:41 +0200 Subject: [PATCH v2 2/5] common/rc: add recreation support for tmpfs Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240630-common-fixes-v2-2-16d26fb1dee0@samsung.com> References: <20240630-common-fixes-v2-0-16d26fb1dee0@samsung.com> In-Reply-To: <20240630-common-fixes-v2-0-16d26fb1dee0@samsung.com> To: fstests@vger.kernel.org Cc: "Darrick J. Wong" , Zorro Lang , mcgrof@kernel.org, gost.dev@samsung.com, Samsung Samsung <"Daniel Gomez d+samsung"@kruces.com>, Daniel Gomez X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1719784382; l=514; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=NED506XPkdb3zAZGDWJkQ1ARWG9uUpz/0FpeqV97NdA=; b=aPBqOoxZ6flCITUcxmd7dJJFfjq+wEpbQWzMi6IVc43UoJuYHYFA4+rK8mSvyu2cmGTpvEncF w7gyh1pe+DTAq7eSG/9kXn22939pMx6eryhPQtv8MLqIo4Mx7WQr9G7 X-Developer-Key: i=da.gomez@samsung.com; a=ed25519; pk=BqYk31UHkmv0WZShES6pIZcdmPPGay5LbzifAdZ2Ia4= X-Endpoint-Received: by B4 Relay for da.gomez@samsung.com/20240621 with auth_id=175 X-Original-From: Daniel Gomez Reply-To: da.gomez@samsung.com From: Daniel Gomez Add support for test device recreation (RECREATE_TEST_DEV=true) for tmpfs. Signed-off-by: Daniel Gomez --- common/rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/rc b/common/rc index 163041fea..51827119c 100644 --- a/common/rc +++ b/common/rc @@ -604,6 +604,9 @@ _test_mkfs() pvfs2) # do nothing for pvfs2 ;; + tmpfs) + # do nothing for tmpfs + ;; udf) $MKFS_UDF_PROG $MKFS_OPTIONS $* $TEST_DEV > /dev/null ;; From patchwork Sun Jun 30 21:52:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Gomez via B4 Relay X-Patchwork-Id: 13718237 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 490CD16A396 for ; Mon, 1 Jul 2024 14:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719845523; cv=none; b=CO60lkDCHM1DbJtKjvJzlyLIrfULbktik33SPi+EoWaNsBbLkAWi6lnkz/T2Il0TzfClyNd5wc0DbN5DUgNVQJfUpxjiQXAL7A/YfVn6gs/K+HxpYvbKMFNeQkCNNosRlZfoENyEoucCmMI0WmKxRjo6338NlS2QyByFWp7UUzw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719845523; c=relaxed/simple; bh=c036HfecGkCQQnRZiI3XZzw+POggcXKkyATf2qyrYG0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pnmAJc5LerGdOa3Mvl1NnqlA/odby/IyCT2lVFmsAR6q/kQ0sos+4KkO/NjSMG+eCCFXpPHA/R3oZELevBlCG4XgWx3kmo+vTss6mf4cOoUWvbtQR2xadmfK6kFxHgfmdpf+X1DmbIpoF5eC4jq400HmOwqvOiwAnie6fIR+0ZM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mk0R366H; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mk0R366H" Received: by smtp.kernel.org (Postfix) with ESMTPS id F1EB2C4AF0D; Mon, 1 Jul 2024 14:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719845523; bh=c036HfecGkCQQnRZiI3XZzw+POggcXKkyATf2qyrYG0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=mk0R366H+ivYa/fd+WNWXNVgeuEkM7x80raM4ftAOxvGgS64e2OIWtizTIny+KpS/ bwtS/dNPdnqEcEG1+RFtoO13J50heaUKs7HOTR2hcSLCm6WJMFi+S21n4vD891b/Ae ri70QQV096N8yEMCE3QBSZmogkfuOk+PW+kMk5m0GaasgI+Z+KDcuhMLiCAZ6gRb+C dr0brD5L1r70m945hjv23nN+zCusYbWG7+/HqMUsg2NKt1f12eRoMVBXEI+l0uqVIc CnYoU2WBdfSD/WCOYBUdvy1o7aV5RcN2TN8EsTLCH+8FGLhLWUcOuNzi9AAd+2scd0 L4CavQsBA1Rvg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E027BC3065E; Mon, 1 Jul 2024 14:52:02 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Sun, 30 Jun 2024 23:52:42 +0200 Subject: [PATCH v2 3/5] common/config: enable section parsing when recreation Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240630-common-fixes-v2-3-16d26fb1dee0@samsung.com> References: <20240630-common-fixes-v2-0-16d26fb1dee0@samsung.com> In-Reply-To: <20240630-common-fixes-v2-0-16d26fb1dee0@samsung.com> To: fstests@vger.kernel.org Cc: "Darrick J. Wong" , Zorro Lang , mcgrof@kernel.org, gost.dev@samsung.com, Samsung Samsung <"Daniel Gomez d+samsung"@kruces.com>, Daniel Gomez X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1719784382; l=1040; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=CweM8hFKTR+/uaj1ksPTKot0K1j7X/HoaXPstHW9eK4=; b=6B4XAtAkwHvME4dbL0MLn062ggfwvqLlTfHhmwrkYArXkq0Z1VSXywhzAgot9Og3yTpusGlzi toGbeazCZlSDITOlIZ/XOzyUtbxL9Bat7VKDLKhx9wt5RWb3S0elUla X-Developer-Key: i=da.gomez@samsung.com; a=ed25519; pk=BqYk31UHkmv0WZShES6pIZcdmPPGay5LbzifAdZ2Ia4= X-Endpoint-Received: by B4 Relay for da.gomez@samsung.com/20240621 with auth_id=175 X-Original-From: Daniel Gomez Reply-To: da.gomez@samsung.com From: Daniel Gomez When RECREATE_TEST_DEV is enabled, specific fs mount options such as TMPFS_MOUNT_OPTIONS are ignored during section parsing unless the FSTYP is modified. This allows the filesystem type to remain the same while only specific fs mount options are changed during the parsing of section parameters for test device recreation or when the section with speciic fs mount options are different from the default. Signed-off-by: Daniel Gomez --- common/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/config b/common/config index 43b32b93d..c739c4578 100644 --- a/common/config +++ b/common/config @@ -802,7 +802,7 @@ get_next_config() { fi parse_config_section $1 - if [ ! -z "$OLD_FSTYP" ] && [ $OLD_FSTYP != $FSTYP ]; then + if $RECREATE_TEST_DEV || ([ ! -z "$OLD_FSTYP" ] && [ $OLD_FSTYP != $FSTYP ]); then [ -z "$MOUNT_OPTIONS" ] && _mount_opts [ -z "$TEST_FS_MOUNT_OPTS" ] && _test_mount_opts [ -z "$MKFS_OPTIONS" ] && _mkfs_opts From patchwork Sun Jun 30 21:52:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Gomez via B4 Relay X-Patchwork-Id: 13718236 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4911316B3A3 for ; Mon, 1 Jul 2024 14:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719845523; cv=none; b=eSLQ/FkzaS+L2mKmt2vhsRArA6FcZ/90aaH4Knh+G5Q3fNtedfkK5K/6ljcsZeM8d69Gz3S+TvYiuHSHvyoUEASYnvSs3GpZn1e5zF5CbX3HigIpskas5uiENZ+ngdBJsQMZ68MWbOuOlUWbvfAJivsbIoQBb4T+BYoYeUQK8VY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719845523; c=relaxed/simple; bh=UO+aCQx6URI5GnD+mRUicgGgUdR0otIjO5rPIgpz7iU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fMpNkng8utlvR16MfkYgwE500wB1vx07iaeMvgQTDd1GOfwyqjKDBNI6Wh/o9T6D97qKuwK/PW9G2WZb0lf5lZaz5ThlDdZ90347PyEdxx+c4hcSEtYg9ymuzry1AD2Z4k6VSBIbFfQ0jQ5GtRk9Ceu/9/IWpOjjDkk2bg6NuFE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z+TDigG8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z+TDigG8" Received: by smtp.kernel.org (Postfix) with ESMTPS id 025BCC4AF12; Mon, 1 Jul 2024 14:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719845523; bh=UO+aCQx6URI5GnD+mRUicgGgUdR0otIjO5rPIgpz7iU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Z+TDigG8OSQYRLRm8rmhgZBN6atXDAQH1avbXL/5FwZUyeZeBEris3CMeK0zA52D3 Cj31pGOXfthf0BHxhHXFQ4IPbL1k2jrtZ3RpTtxvnievuMiI2JOrGTGGPGW9dNCcwf m5b80SBOJwZfJz+G0FYLv5W5eC7a65U0k4U+CcCvs23N2RAFv7cH3HY0UqrDzldOII W7rVSDF6Iw6HKz22euzOw6zyE4e+x+dusNu4230VNVesMugJH1a4pgJksG5NQXnNi1 Vo2RwhvAJK/qH8LgVGtkoq7Q0YYg4rgBHROaREmLswv8CdH0gfXqxLkZEI17Rkc78c jHZp31M5aTIdw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECAC9C2BD09; Mon, 1 Jul 2024 14:52:02 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Sun, 30 Jun 2024 23:52:43 +0200 Subject: [PATCH v2 4/5] common/rc: read config section mount options for scratch devs Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240630-common-fixes-v2-4-16d26fb1dee0@samsung.com> References: <20240630-common-fixes-v2-0-16d26fb1dee0@samsung.com> In-Reply-To: <20240630-common-fixes-v2-0-16d26fb1dee0@samsung.com> To: fstests@vger.kernel.org Cc: "Darrick J. Wong" , Zorro Lang , mcgrof@kernel.org, gost.dev@samsung.com, Samsung Samsung <"Daniel Gomez d+samsung"@kruces.com>, Daniel Gomez X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1719784382; l=921; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=MX1imlIj5wPkWMzNR8hoaaX8VaXzFw2Asr5Fz/o5nGY=; b=sZz/YXpGLXnqglUBlMLprRd857skhUZFF4h9qsrcaP+g8raHaTR9bt4iBvhYEgIxZCvS59uth pkBi6FswA49D0EMaHHpSQBne5q53TZiFolBkHIWsIRNf5foPlcuI5lx X-Developer-Key: i=da.gomez@samsung.com; a=ed25519; pk=BqYk31UHkmv0WZShES6pIZcdmPPGay5LbzifAdZ2Ia4= X-Endpoint-Received: by B4 Relay for da.gomez@samsung.com/20240621 with auth_id=175 X-Original-From: Daniel Gomez Reply-To: da.gomez@samsung.com From: Daniel Gomez MOUNT_OPTIONS for scratch devices do not have specific fs mount options values (such as TMPFS_MOUNT_OPTIONS) from the config section. So, allow the scratch mount options to inherit section config values by reading them from _common_mount_opts(). Move $* to the end so scratch device can be umount/mount. Otherwise, we end up with multiple mounts in the same scratch directory. Signed-off-by: Daniel Gomez --- common/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index 51827119c..627dbaaaa 100644 --- a/common/rc +++ b/common/rc @@ -231,8 +231,8 @@ _scratch_mount_options() { _scratch_options mount - echo `_common_dev_mount_options $*` $SCRATCH_OPTIONS \ - $SCRATCH_DEV $SCRATCH_MNT + echo `_common_mount_opts` $SCRATCH_OPTIONS \ + $SCRATCH_DEV $SCRATCH_MNT $* } _supports_filetype() From patchwork Sun Jun 30 21:52:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Gomez via B4 Relay X-Patchwork-Id: 13718238 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6047D16C6A5 for ; Mon, 1 Jul 2024 14:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719845523; cv=none; b=F6HipRLTskQrbyIQnNUeVS2GbbtnkB6M+wUKOW98mmR1qKCbJY61ea7EAbEj9yaB1/lndY6cTf4LvNG+oi+Kt6HP2SiewUwElgRcDFceBFKyhIVjr3trIyA71cjL0EGTc4I3mC5lbDFd439MIu/VTnUxCqrOidu8UpEXidmcekk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719845523; c=relaxed/simple; bh=uGyFHuxkn0ENH/WQGALQ85rAlCvXRBx5Pc41sOiBuvE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mRkabT4zYTkX+wKhoW5k8R+yjhUOT+5bKw0srrDQd3PGIi8unQsTljlDMPO94KVJbscTip6MggYtqSomWKsbdcKXn2ZrxU1ncm7PbQSXpRDNQoln5UWF5SG9qx65y7oZ/9pOvBadScIfSxmPBqNY91DCRR9rV/1nQBXqgfGptFw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CmQSKX2f; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CmQSKX2f" Received: by smtp.kernel.org (Postfix) with ESMTPS id 1719FC4AF15; Mon, 1 Jul 2024 14:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719845523; bh=uGyFHuxkn0ENH/WQGALQ85rAlCvXRBx5Pc41sOiBuvE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=CmQSKX2fyUXQamKgBWgu2LzEGz4lgwpwHjj/QXDFHDzaT+CJQJCwaRCh1ZWyBKwMa elM+I0Tm6rHEpMG9djZ/nS3E5D+4PkRxYBhFb6ateHxs9rZNFOcJB2rhtzlglGVPyz 4ZulQJOrB3sSdn0WU1Z/3ek93/g+GEy0//rk7t6Tx6q3hVkuZeTDYUePQxI68aT0pj qcHut+aUra0AyQ3wBkcylL+iL32e/xIjVVlQ2SAtCFCKKC9YiAzu1AraNmKIPt9qau +XnBbnX31TrVEB74RmNFjiBIbgLXtSlswi+X76Tg98SGMs9qmq5v0e5VJ8TgjahJnt OTI8ECklRIu6A== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 043F7C3065B; Mon, 1 Jul 2024 14:52:03 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Sun, 30 Jun 2024 23:52:44 +0200 Subject: [PATCH v2 5/5] common/rc: print test mount options Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240630-common-fixes-v2-5-16d26fb1dee0@samsung.com> References: <20240630-common-fixes-v2-0-16d26fb1dee0@samsung.com> In-Reply-To: <20240630-common-fixes-v2-0-16d26fb1dee0@samsung.com> To: fstests@vger.kernel.org Cc: "Darrick J. Wong" , Zorro Lang , mcgrof@kernel.org, gost.dev@samsung.com, Samsung Samsung <"Daniel Gomez d+samsung"@kruces.com>, Daniel Gomez X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1719784382; l=2734; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=NkZG9YGxsIk1iK1q+OR884fD08LAqJ4Ql3wlQbinl1o=; b=1b9VZWGWwZU+PkQz3IMf3M4LrEaiHUkU2GTjkVX2ETo6y6GemZmPgtXTFMuiB5xmatqRu6RlL B7nTKREM/JjAVYxKCF2VfmkV/cWFCtdLH3RnDLzJpRaKXycu3Zzjtdi X-Developer-Key: i=da.gomez@samsung.com; a=ed25519; pk=BqYk31UHkmv0WZShES6pIZcdmPPGay5LbzifAdZ2Ia4= X-Endpoint-Received: by B4 Relay for da.gomez@samsung.com/20240621 with auth_id=175 X-Original-From: Daniel Gomez Reply-To: da.gomez@samsung.com From: Daniel Gomez Mount options for a SCRATCH device might not be the same for a TEST device if RECREATE_TEST_DEV is not enabled. Add mount options for TEST devices when printing fstest header to clarify this. Add mount and mkfs info for TEST devices so we get the same information being printed for both devices. Export new TEST_{MKFS/MOUNT}_OPTIONS and include them in the report. Signed-off-by: Daniel Gomez --- check | 2 ++ common/rc | 19 ++++++++++++++++++- common/report | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/check b/check index 9222cd7e4..ca30771c5 100755 --- a/check +++ b/check @@ -819,6 +819,8 @@ function run_section() # print out our test configuration echo "FSTYP -- `_full_fstyp_details`" echo "PLATFORM -- `_full_platform_details`" + echo "TEST_MKFS_OPTIONS -- `_test_mkfs_options`" + echo "TEST_MOUNT_OPTIONS -- `_test_mount_options`" if [ ! -z "$SCRATCH_DEV" ]; then echo "MKFS_OPTIONS -- `_scratch_mkfs_options`" echo "MOUNT_OPTIONS -- `_scratch_mount_options`" diff --git a/common/rc b/common/rc index 627dbaaaa..bbbd274a7 100644 --- a/common/rc +++ b/common/rc @@ -235,6 +235,15 @@ _scratch_mount_options() $SCRATCH_DEV $SCRATCH_MNT $* } +_test_mount_options() +{ + _test_options mount + + export TEST_MOUNT_OPTIONS="$TEST_OPTIONS $TEST_FS_MOUNT_OPTS \ + $SELINUX_MOUNT_OPTIONS $* $TEST_DEV $TEST_DIR" + echo $TEST_MOUNT_OPTIONS +} + _supports_filetype() { local dir=$1 @@ -457,7 +466,7 @@ _test_mount() fi _test_options mount - _mount -t $FSTYP$FUSE_SUBTYP $TEST_OPTIONS $TEST_FS_MOUNT_OPTS $SELINUX_MOUNT_OPTIONS $* $TEST_DEV $TEST_DIR + _mount -t $FSTYP$FUSE_SUBTYP `_test_mount_options $*` mount_ret=$? [ $mount_ret -ne 0 ] && return $mount_ret _idmapped_mount $TEST_DEV $TEST_DIR @@ -571,6 +580,14 @@ _metadump_dev() { esac } +_test_mkfs_options() +{ + _test_options mkfs + + export TEST_MKFS_OPTIONS="$TEST_OPTIONS $MKFS_OPTIONS $* $TEST_DEV" + echo $TEST_MKFS_OPTIONS +} + _test_mkfs() { case $FSTYP in diff --git a/common/report b/common/report index 0e91e481f..44de33e61 100644 --- a/common/report +++ b/common/report @@ -5,6 +5,7 @@ # List of xfstests's enviroment variables to include reports ## TODO automate list population inside common/conf REPORT_ENV_LIST=("SECTION" "FSTYP" "PLATFORM" "MKFS_OPTIONS" "MOUNT_OPTIONS" \ + "TEST_MKFS_OPTIONS" "TEST_MOUNT_OPTIONS" \ "HOST_OPTIONS" "CHECK_OPTIONS" "XFS_MKFS_OPTIONS" \ "TIME_FACTOR" "LOAD_FACTOR" "TEST_DIR" "TEST_DEV" \ "SCRATCH_DEV" "SCRATCH_MNT" "OVL_UPPER" "OVL_LOWER" "OVL_WORK")