[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8734dmqtpj.fsf@gmail.com>
Date: Sat, 03 May 2025 08:36:00 +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
Ritesh Harjani (IBM) <ritesh.list@...il.com> writes:
> 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
Ok. To be accurate, it is...
bash -c "<...>; exec ./$seq"
& not just
exec ./$seq
-ritesh
Powered by blists - more mailing lists