All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH 4/8] generic/038: kill background threads on interrupt
Date: Wed, 1 Jun 2022 17:51:39 -0700	[thread overview]
Message-ID: <YpgJm3HURM3qVssn@magnolia> (raw)
In-Reply-To: <20220602003126.2903779-5-david@fromorbit.com>

On Thu, Jun 02, 2022 at 10:31:22AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> When I ctrl-c g/038, it either does nothing or it leaves processes
> running in the background. It is not cleaning up it's background
> processes correctly, so add kill vectors into the cleanup. Make sure
> we only kill in the cleanup trap if the background processes are
> running.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> Reviewed-by: Amir Goldstein <amir73il@gmail.com>

Looks ok,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  tests/generic/038 | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/generic/038 b/tests/generic/038
> index c6cea94e..e9b49967 100755
> --- a/tests/generic/038
> +++ b/tests/generic/038
> @@ -36,6 +36,10 @@ _begin_fstest auto stress trim
>  # Override the default cleanup function.
>  _cleanup()
>  {
> +	[ -n "${create_pids}" ] && kill ${create_pids[@]}
> +	[ -n "${fallocate_pids}" ] && kill ${fallocate_pids[@]}
> +	[ -n "${trim_pids}" ] && kill ${trim_pids[@]}
> +	wait
>  	rm -fr $tmp
>  }
>  
> @@ -47,6 +51,8 @@ _supported_fs generic
>  _require_scratch
>  _require_xfs_io_command "falloc"
>  
> +echo "Silence is golden"
> +
>  # Keep allocating and deallocating 1G of data space with the goal of creating
>  # and deleting 1 block group constantly. The intention is to race with the
>  # fstrim loop below.
> @@ -113,7 +119,7 @@ create_files()
>  	done
>  
>  	wait ${create_pids[@]}
> -
> +	unset create_pids
>  }
>  
>  _scratch_mkfs >>$seqres.full 2>&1
> @@ -136,12 +142,8 @@ create_files "foobar"
>  kill ${fallocate_pids[@]}
>  kill ${trim_pids[@]}
>  wait
> +unset fallocate_pids
> +unset trim_pids
>  
> -# The fstests framework will now check for fs consistency with fsck.
> -# The trimming was racy and caused some btree nodes to get full of zeroes on
> -# disk, which obviously caused fs metadata corruption. The race often lead
> -# to missing free space entries in a block group's free space cache too.
> -
> -echo "Silence is golden"
>  status=0
>  exit
> -- 
> 2.35.1
> 

  reply	other threads:[~2022-06-02  0:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02  0:31 fstests: new tests and various fixes Dave Chinner
2022-06-02  0:31 ` [PATCH 1/8] xfstests: Add Log Attribute Replay test Dave Chinner
2022-06-02  1:05   ` Darrick J. Wong
2022-06-03  1:41   ` [PATCH 1/8 v2] fstests: " Dave Chinner
2022-06-03  2:43     ` Darrick J. Wong
2022-06-03  4:55       ` Zorro Lang
2022-06-03  5:29         ` Dave Chinner
2022-06-02  0:31 ` [PATCH 2/8] README: document _begin_fstests better Dave Chinner
2022-06-02  0:51   ` Darrick J. Wong
2022-06-02  0:31 ` [PATCH 3/8] generic/081: don't run on DAX capable devices Dave Chinner
2022-06-02  2:03   ` Darrick J. Wong
2022-06-02  0:31 ` [PATCH 4/8] generic/038: kill background threads on interrupt Dave Chinner
2022-06-02  0:51   ` Darrick J. Wong [this message]
2022-06-02  0:31 ` [PATCH 5/8] xfs/538: fix fsstress scaling Dave Chinner
2022-06-02  0:52   ` Darrick J. Wong
2022-06-02  0:31 ` [PATCH 6/8] xfs/070: filter the bad sb magic number error Dave Chinner
2022-06-02  0:52   ` Darrick J. Wong
2022-06-02  0:31 ` [PATCH 7/8] xfs/167: adjust runtime with TIME_FACTOR Dave Chinner
2022-06-02  0:53   ` Darrick J. Wong
2022-06-02  0:31 ` [PATCH 8/8] xfs/189: systemd monitoring of /etc/fstab sucks Dave Chinner
2022-06-02  1:04   ` Darrick J. Wong
2022-06-03  1:54   ` [PATCH 8/8 v2] " Dave Chinner
2022-06-03  2:41     ` Darrick J. Wong

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=YpgJm3HURM3qVssn@magnolia \
    --to=djwong@kernel.org \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    /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.