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: <878qnfr67l.fsf@gmail.com>
Date: Fri, 02 May 2025 09:53:42 +0530
From: Ritesh Harjani (IBM) <ritesh.list@...il.com>
To: Zorro Lang <zlang@...hat.com>
Cc: "Nirjhar Roy (IBM)" <nirjhar.roy.lists@...il.com>, fstests@...r.kernel.org, linux-ext4@...r.kernel.org, linux-xfs@...r.kernel.org, ojaswin@...ux.ibm.com, djwong@...nel.org, zlang@...nel.org, david@...morbit.com, hch@...radead.org
Subject: Re: [PATCH v3 1/2] common: Move exit related functions to a common/exit

Zorro Lang <zlang@...hat.com> writes:

> On Thu, May 01, 2025 at 08:47:46AM +0530, Ritesh Harjani wrote:
>> "Nirjhar Roy (IBM)" <nirjhar.roy.lists@...il.com> writes:
>> 
>> > Introduce a new file common/exit that will contain all the exit
>> > related functions. This will remove the dependencies these functions
>> > have on other non-related helper files and they can be indepedently
>> > sourced. This was suggested by Dave Chinner[1].
>> > While moving the exit related functions, remove _die() and die_now()
>> > and replace die_now with _fatal(). It is of no use to keep the
>> > unnecessary wrappers.
>> >
>> > [1] https://lore.kernel.org/linux-xfs/Z_UJ7XcpmtkPRhTr@dread.disaster.area/
>> > Suggested-by: Dave Chinner <david@...morbit.com>
>> > Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@...il.com>
>> > ---
>> >  check           |  2 ++
>> >  common/config   | 17 -----------------
>> >  common/exit     | 39 +++++++++++++++++++++++++++++++++++++++
>> >  common/preamble |  3 +++
>> >  common/punch    | 39 +++++++++++++++++----------------------
>> >  common/rc       | 28 ----------------------------
>> >  6 files changed, 61 insertions(+), 67 deletions(-)
>> >  create mode 100644 common/exit
>> >
>> > diff --git a/check b/check
>> > index 9451c350..bd84f213 100755
>> > --- a/check
>> > +++ b/check
>> > @@ -46,6 +46,8 @@ export DIFF_LENGTH=${DIFF_LENGTH:=10}
>> >  
>> >  # by default don't output timestamps
>> >  timestamp=${TIMESTAMP:=false}
>> > +. common/exit
>> > +. common/test_names
>> 
>> So this gets sourced at the beginning of check script here.
>> 
>> >  
>> >  rm -f $tmp.list $tmp.tmp $tmp.grep $here/$iam.out $tmp.report.* $tmp.arglist
>> >  
>> <...>
>> > diff --git a/common/preamble b/common/preamble
>> > index ba029a34..51d03396 100644
>> > --- a/common/preamble
>> > +++ b/common/preamble
>> > @@ -33,6 +33,9 @@ _register_cleanup()
>> >  # explicitly as a member of the 'all' group.
>> >  _begin_fstest()
>> >  {
>> > +	. common/exit
>> > +	. common/test_names
>> > +
>> 
>> Why do we need to source these files here again? 
>> Isn't check script already sourcing both of this in the beginning
>> itself?
>
> The _begin_fstest is called at the beginning of each test case (e.g. generic/001).
> And "check" run each test cases likes:
>
>   cmd="generic/001"
>   ./$cmd
>
> So the imported things (by "check") can't help sub-case running

aah right. Each testcase is inoked by "exec ./$seq" and it won't have
the function definitions sourced from the previous shell process. So we
will need to source the necessary files again within the test execution.

-ritesh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ