public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org,
	Uday Shankar <ushankar@purestorage.com>
Subject: Re: [PATCH 2/2] selftests: ublk: don't take same backing file for more than one ublk devices
Date: Tue, 24 Jun 2025 09:13:03 +0800	[thread overview]
Message-ID: <aFn7n_GN4y3Y1WgD@fedora> (raw)
In-Reply-To: <CADUfDZq4_463nageZgzH8hMtr_gTMhvMxHfVCSuzVoBCWbgsww@mail.gmail.com>

On Mon, Jun 23, 2025 at 10:54:58AM -0700, Caleb Sander Mateos wrote:
> On Sun, Jun 22, 2025 at 6:19 PM Ming Lei <ming.lei@redhat.com> wrote:
> >
> > Don't use same backing file for more than one ublk devices, and avoid
> > concurrent write on same file from more ublk disks.
> >
> > Fixes: 8ccebc19ee3d ("selftests: ublk: support UBLK_F_AUTO_BUF_REG")
> > Signed-off-by: Ming Lei <ming.lei@redhat.com>
> > ---
> >  tools/testing/selftests/ublk/test_stress_03.sh | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/testing/selftests/ublk/test_stress_03.sh b/tools/testing/selftests/ublk/test_stress_03.sh
> > index 6eef282d569f..3ed4c9b2d8c0 100755
> > --- a/tools/testing/selftests/ublk/test_stress_03.sh
> > +++ b/tools/testing/selftests/ublk/test_stress_03.sh
> > @@ -32,22 +32,23 @@ _create_backfile 2 128M
> >  ublk_io_and_remove 8G -t null -q 4 -z &
> >  ublk_io_and_remove 256M -t loop -q 4 -z "${UBLK_BACKFILES[0]}" &
> >  ublk_io_and_remove 256M -t stripe -q 4 -z "${UBLK_BACKFILES[1]}" "${UBLK_BACKFILES[2]}" &
> > +wait
> 
> Why is wait necessary here? It looks like __run_io_and_remove, which
> is called from run_io_and_remove, already ends with a wait. Am I
> missing something?

All tests share the three backing files, this way just avoids concurrent
write to the same file from each test/ublk device.



Thanks,
Ming


  reply	other threads:[~2025-06-24  1:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23  1:19 [PATCH 0/2] ublk: fix ublk_queue_rqs() and selftests test_stress_03 Ming Lei
2025-06-23  1:19 ` [PATCH 1/2] ublk: build per-io-ring-ctx batch list Ming Lei
2025-06-23 17:51   ` Caleb Sander Mateos
2025-06-24  1:24     ` Ming Lei
2025-06-24 15:26       ` Caleb Sander Mateos
2025-06-25  1:22         ` Ming Lei
2025-06-25  2:44           ` Jens Axboe
2025-06-23  1:19 ` [PATCH 2/2] selftests: ublk: don't take same backing file for more than one ublk devices Ming Lei
2025-06-23 17:54   ` Caleb Sander Mateos
2025-06-24  1:13     ` Ming Lei [this message]
2025-06-24 15:20       ` Caleb Sander Mateos
2025-06-24 14:51 ` [PATCH 0/2] ublk: fix ublk_queue_rqs() and selftests test_stress_03 Jens Axboe

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=aFn7n_GN4y3Y1WgD@fedora \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ushankar@purestorage.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