"Nirjhar Roy (IBM)" <nirjhar.roy.lists@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx/ > Suggested-by: Dave Chinner <david@xxxxxxxxxxxxx> > Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@xxxxxxxxx> > --- > 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? -ritesh