All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Zorro Lang <zlang@redhat.com>
Cc: fstests <fstests@vger.kernel.org>
Subject: Re: [PATCH 3/4] xfs/{422,517}: add missing killall to _cleanup()
Date: Fri, 24 Jun 2022 09:41:34 +0300	[thread overview]
Message-ID: <CAOQ4uxitptR97n9fV5vPEd_HEVKABg-L=R-2kRNLoi8Ds7eK5A@mail.gmail.com> (raw)
In-Reply-To: <20220624063149.4ssefnfi5tboogp4@zlang-mailbox>

On Fri, Jun 24, 2022 at 9:31 AM Zorro Lang <zlang@redhat.com> wrote:
>
> On Fri, Jun 24, 2022 at 07:36:51AM +0300, Amir Goldstein wrote:
> > On Thu, Jun 23, 2022 at 9:04 PM Darrick J. Wong <djwong@kernel.org> wrote:
> > >
> > > On Tue, Jun 21, 2022 at 07:02:02AM +0300, Amir Goldstein wrote:
> > > > On Sun, Jun 19, 2022 at 4:47 PM Amir Goldstein <amir73il@gmail.com> wrote:
> > > > >
> > > > > Those tests failed to cleanup background jobs after test
> > > > > is interrupted.
> > > > >
> > > > > Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> > > > > ---
> > > > >  tests/xfs/422 | 8 ++++++++
> > > > >  tests/xfs/517 | 1 +
> > > > >  2 files changed, 9 insertions(+)
> > > > >
> > > > > diff --git a/tests/xfs/422 b/tests/xfs/422
> > > > > index a83a66df..8e9a3576 100755
> > > > > --- a/tests/xfs/422
> > > > > +++ b/tests/xfs/422
> > > > > @@ -13,6 +13,14 @@ _begin_fstest dangerous_scrub dangerous_online_repair freeze
> > > > >
> > > > >  _register_cleanup "_cleanup" BUS
> > > > >
> > > > > +# Override the default cleanup function.
> > > > > +_cleanup()
> > > > > +{
> > > > > +       $KILLALL_PROG -9 $XFS_IO_PROG $FSSTRESS_PROG > /dev/null 2>&1
> > > > > +       cd /
> > > > > +       rm -rf $tmp.*
> > > > > +}
> > > > > +
> > > > >  # Import common functions.
> > > > >  . ./common/filter
> > > > >  . ./common/fuzzy
> > > > > diff --git a/tests/xfs/517 b/tests/xfs/517
> > > > > index 961668e3..18404248 100755
> > > > > --- a/tests/xfs/517
> > > > > +++ b/tests/xfs/517
> > > > > @@ -14,6 +14,7 @@ _register_cleanup "_cleanup" BUS
> > > > >  # Override the default cleanup function.
> > > > >  _cleanup()
> > > > >  {
> > > > > +       $KILLALL_PROG -9 $XFS_IO_PROG $FSSTRESS_PROG > /dev/null 2>&1
> > > >
> > > > Besides the missing wait, this cleanup is still racy, because stress_loop
> > > > can spawn a new fstress process after killall /proc iteration.
> > > >
> > > > Worst, freeze_loop can freeze after killall /proc iteration.
> > > >
> > > > The correct solution (I think) is to record the pid of the XXX_loop
> > > > sub-shells and kill those, which should also solve the "Terminated"
> > > > false positive error.
> > > >
> > > > Will give that a shot.
> > >
> > > FWIW I already have patches reworking 422 and all the other
> > > scrub-related stress tests:
> > >
> > > https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfstests-dev.git/log/?h=race-scrub-and-mount-state-changes
> > >
> >
> > That looks very nice.
> > The cleanup looks very similar to the one I posted for v2,
> > but instead of "killall xfs_io fsstress" you would be better off with
> > "kill  $__SCRUB_STRESS_FREEZE_PID"
> >
> > killing the child process and waiting for its parent bash
> > process has the side effect of the bash parent emitting
> > "Terminated" or "Killed" message with breaks golden output
> > if the inner loop did not already exit, which is the behavior
> > that got me started on doing this cleanup.
> >
> > > I swear I'll send all these some day, if I ever get caught up...
> > > Delegating LTS maintenance is a big help, but as it is I still can't
> > > stay abreast of all the mainline patchsets /and/ send my own stuff. :(
> > >
> >
> > I will respond to that in another email.
>
> Hi Amir,
>
> So ... will you singly resend a V3 patch to remove the xfs/422 changes in this patch?
>

I don't understand.

V2 patch should be reviewed

https://lore.kernel.org/fstests/20220621173729.2135249-1-amir73il@gmail.com/

The fact that Darrick has future work pending to cleanup xfs/422
should not stop a cleanup patch to be applied now.

Am I missing something?

Thanks,
Amir.

  reply	other threads:[~2022-06-24  6:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-19 13:46 [PATCH 0/4] aborted fstests may leave frozen fs behind Amir Goldstein
2022-06-19 13:46 ` [PATCH 1/4] fstests: add missing _require_freeze() to tests Amir Goldstein
2022-06-23 18:00   ` Darrick J. Wong
2022-06-24  4:05     ` Amir Goldstein
2022-06-24  6:27       ` Zorro Lang
2022-06-19 13:46 ` [PATCH 2/4] fstests: make sure to unfreeze test and scratch mounts Amir Goldstein
2022-06-20 11:17   ` Zorro Lang
2022-06-20 12:13     ` Amir Goldstein
2022-06-20 14:21       ` Zorro Lang
2022-06-20 15:08         ` Amir Goldstein
2022-06-20 22:34         ` Dave Chinner
2022-06-21  2:53           ` Amir Goldstein
2022-06-20 22:06   ` Dave Chinner
2022-06-21  2:57     ` Amir Goldstein
2022-06-19 13:46 ` [PATCH 3/4] xfs/{422,517}: add missing killall to _cleanup() Amir Goldstein
2022-06-21  4:02   ` Amir Goldstein
2022-06-23 18:04     ` Darrick J. Wong
2022-06-24  4:36       ` Amir Goldstein
2022-06-24  6:31         ` Zorro Lang
2022-06-24  6:41           ` Amir Goldstein [this message]
2022-06-24 15:09             ` Zorro Lang
2022-06-24  4:49       ` Delegating fstests maintenance work (Was: Re: [PATCH 3/4] xfs/{422,517}: add missing killall to _cleanup()) Amir Goldstein
2022-06-25  3:11         ` Darrick J. Wong
2022-06-19 13:46 ` [PATCH 4/4] xfs/{422,517}: fix false positive failure Amir Goldstein

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='CAOQ4uxitptR97n9fV5vPEd_HEVKABg-L=R-2kRNLoi8Ds7eK5A@mail.gmail.com' \
    --to=amir73il@gmail.com \
    --cc=fstests@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.