All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zorro Lang <zlang@redhat.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 1/2] generic/038: set a maximum runtime on this test
Date: Thu, 2 Feb 2023 17:53:15 +0800	[thread overview]
Message-ID: <20230202095315.l7f3vjv2hrcr3uou@zlang-mailbox> (raw)
In-Reply-To: <167521269515.2382722.13790661033478617605.stgit@magnolia>

On Tue, Jan 31, 2023 at 04:51:35PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> This test races multiple FITRIM calls against multiple programs creating
> 200k small files to ensure that there are no concurrency problems with
> the allocator and the FITRIM code.  This is not necessarily quick, and
> the test itself does not contain any upper bound on the runtime.  On my
> system that simulates storage with DRAM this takes ~5 minutes to run; on
> my cloud system with newly provided discard support, I killed the test
> after 27 hours.
> 
> Constrain the runtime to about the customary 30s * TIME_FACTOR.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---

Looks good to me,

Reviewed-by: Zorro Lang <zlang@redhat.com>

>  tests/generic/038 |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> 
> diff --git a/tests/generic/038 b/tests/generic/038
> index 5c014ae389..e1176292fb 100755
> --- a/tests/generic/038
> +++ b/tests/generic/038
> @@ -100,6 +100,8 @@ nr_files=$((50000 * LOAD_FACTOR))
>  create_files()
>  {
>  	local prefix=$1
> +	local now=$(date '+%s')
> +	local end_time=$(( now + (TIME_FACTOR * 30) ))
>  
>  	for ((n = 0; n < 4; n++)); do
>  		mkdir $SCRATCH_MNT/$n
> @@ -113,6 +115,10 @@ create_files()
>  				echo "Failed creating file $n/${prefix}_$i" >>$seqres.full
>  				break
>  			fi
> +			if [ "$(date '+%s')" -ge $end_time ]; then
> +				echo "runtime exceeded @ $i files" >> $seqres.full
> +				break
> +			fi
>  		done
>  		) &
>  		create_pids[$n]=$!
> 


  reply	other threads:[~2023-02-02  9:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01  0:51 [PATCHSET 0/2] fstests: random fixes for v2023.01.22 Darrick J. Wong
2023-02-01  0:51 ` [PATCH 1/2] generic/038: set a maximum runtime on this test Darrick J. Wong
2023-02-02  9:53   ` Zorro Lang [this message]
2023-02-01  0:51 ` [PATCH 2/2] generic/500: skip this test if formatting fails Darrick J. Wong
2023-02-02 10:00   ` Zorro Lang
2023-02-02 17:04     ` 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=20230202095315.l7f3vjv2hrcr3uou@zlang-mailbox \
    --to=zlang@redhat.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@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.