From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Zorro Lang <zlang@redhat.com>
Cc: "Nirjhar Roy (IBM)" <nirjhar.roy.lists@gmail.com>,
fstests@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-xfs@vger.kernel.org, ojaswin@linux.ibm.com,
djwong@kernel.org, zlang@kernel.org, david@fromorbit.com,
hch@infradead.org
Subject: Re: [PATCH v3 1/2] common: Move exit related functions to a common/exit
Date: Sat, 03 May 2025 08:36:00 +0530 [thread overview]
Message-ID: <8734dmqtpj.fsf@gmail.com> (raw)
In-Reply-To: <878qnfr67l.fsf@gmail.com>
Ritesh Harjani (IBM) <ritesh.list@gmail.com> writes:
> Zorro Lang <zlang@redhat.com> writes:
>
>> On Thu, May 01, 2025 at 08:47:46AM +0530, Ritesh Harjani wrote:
>>> "Nirjhar Roy (IBM)" <nirjhar.roy.lists@gmail.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@fromorbit.com>
>>> > Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.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
next prev parent reply other threads:[~2025-05-03 3:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 12:45 [PATCH v3 0/2] common: Move exit related functions to common/exit Nirjhar Roy (IBM)
2025-04-30 12:45 ` [PATCH v3 1/2] common: Move exit related functions to a common/exit Nirjhar Roy (IBM)
2025-05-01 3:17 ` Ritesh Harjani
2025-05-01 9:10 ` Zorro Lang
2025-05-02 4:23 ` Ritesh Harjani
2025-05-03 3:06 ` Ritesh Harjani [this message]
2025-04-30 12:45 ` [PATCH v3 2/2] check: Replace exit with _fatal and _exit in check Nirjhar Roy (IBM)
2025-05-01 3:31 ` Ritesh Harjani
2025-05-02 6:10 ` Nirjhar Roy (IBM)
2025-05-06 8:49 ` [PATCH v3 0/2] common: Move exit related functions to common/exit Nirjhar Roy (IBM)
2025-05-06 15:03 ` Zorro Lang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734dmqtpj.fsf@gmail.com \
--to=ritesh.list@gmail.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hch@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=nirjhar.roy.lists@gmail.com \
--cc=ojaswin@linux.ibm.com \
--cc=zlang@kernel.org \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox