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: <20250409152207.GO6283@frogsfrogsfrogs>
Date: Wed, 9 Apr 2025 08:22:07 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: "Nirjhar Roy (IBM)" <nirjhar.roy.lists@...il.com>
Cc: fstests@...r.kernel.org, linux-ext4@...r.kernel.org,
	linux-xfs@...r.kernel.org, ritesh.list@...il.com,
	ojaswin@...ux.ibm.com, zlang@...nel.org, david@...morbit.com
Subject: Re: [PATCH v4 4/6] check,common{rc,preamble}: Decouple init_rc()
 call from sourcing common/rc

On Wed, Apr 09, 2025 at 07:00:50AM +0000, Nirjhar Roy (IBM) wrote:
> Silently executing scripts during sourcing common/rc isn't good practice
> and also causes unnecessary script execution. Decouple init_rc() call
> and call init_rc() explicitly where required.
> 
> Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@...il.com>
> Reviewed-by: Dave Chinner <dchinner@...hat.com>
> Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@...il.com>

Sounds good to me
Reviewed-by: "Darrick J. Wong" <djwong@...nel.org>

--D

> ---
>  check           | 2 ++
>  common/preamble | 1 +
>  common/rc       | 2 --
>  3 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/check b/check
> index 3d621210..9451c350 100755
> --- a/check
> +++ b/check
> @@ -364,6 +364,8 @@ if ! . ./common/rc; then
>  	exit 1
>  fi
>  
> +init_rc
> +
>  # If the test config specified a soak test duration, see if there are any
>  # unit suffixes that need converting to an integer seconds count.
>  if [ -n "$SOAK_DURATION" ]; then
> diff --git a/common/preamble b/common/preamble
> index 0c9ee2e0..c92e55bb 100644
> --- a/common/preamble
> +++ b/common/preamble
> @@ -50,6 +50,7 @@ _begin_fstest()
>  	_register_cleanup _cleanup
>  
>  	. ./common/rc
> +	init_rc
>  
>  	# remove previous $seqres.full before test
>  	rm -f $seqres.full $seqres.hints
> diff --git a/common/rc b/common/rc
> index 16d627e1..038c22f6 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -5817,8 +5817,6 @@ _require_program() {
>  	_have_program "$1" || _notrun "$tag required"
>  }
>  
> -init_rc
> -
>  ################################################################################
>  # make sure this script returns success
>  /bin/true
> -- 
> 2.34.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ