Linux block layer
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH 2/2] blktests/033: add test to cover gendisk leak
Date: Thu, 16 Feb 2023 17:02:47 +0800	[thread overview]
Message-ID: <Y+3xN1vuhwQNyfiv@T590> (raw)
In-Reply-To: <20230216082929.j4wgi27cu2rtkp5a@shindev>

On Thu, Feb 16, 2023 at 08:29:29AM +0000, Shinichiro Kawasaki wrote:
> 
> 
> 
> I suggest the commit title:
> 
>     block/033: add test to cover gendisk leak

OK.

> 
> On Feb 16, 2023 / 11:01, Ming Lei wrote:
> > So far only sync ublk removal is supported, and the device's
> > last reference is dropped in gendisk's ->free_disk(), so it
> > can be used to test gendisk leak issue.
> > 
> > Signed-off-by: Ming Lei <ming.lei@redhat.com>
> > ---
> >  common/ublk         | 32 ++++++++++++++++++++++++++++++++
> >  tests/block/033     | 33 +++++++++++++++++++++++++++++++++
> >  tests/block/033.out |  2 ++
> >  3 files changed, 67 insertions(+)
> >  create mode 100644 common/ublk
> >  create mode 100755 tests/block/033
> >  create mode 100644 tests/block/033.out
> > 
> > diff --git a/common/ublk b/common/ublk
> > new file mode 100644
> > index 0000000..66b3a58
> > --- /dev/null
> > +++ b/common/ublk
> > @@ -0,0 +1,32 @@
> > +#!/bin/bash
> > +# SPDX-License-Identifier: GPL-3.0+
> > +# Copyright (C) 2023 Ming Lei
> > +#
> > +# null_blk helper functions.
> 
> I think you meant s/null_blk/ublk/

Sure, :-)

> 
> > +
> > +. common/shellcheck
> > +
> > +_have_ublk() {
> > +	_have_driver ublk_drv
> 
> The _init_ublk() below looks assuming the ublk_drv modules is loadable. If so,
> the live above should be:
> 
>     _have_module ublk_drv

OK

> 
> Of note is that some of the blkteste users run tests with all drivers as
> built-in modules. So it is the better that the new test case can run with
> built-in ublk_drv, if possible. (Or it can be a left work.)

The test doesn't care if it is builtin or module, and I think the choice
should be in hand of user.


Thanks, 
Ming


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

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16  3:01 [PATCH 0/2] blktests: add mini ublk source and blktests/033 Ming Lei
2023-02-16  3:01 ` [PATCH 1/2] blktests/src: add mini ublk source code Ming Lei
2023-02-16  8:19   ` Shinichiro Kawasaki
2023-02-16  8:58     ` Ming Lei
2023-02-16 11:10       ` Ming Lei
2023-02-16 11:53         ` Shinichiro Kawasaki
2023-02-16  3:01 ` [PATCH 2/2] blktests/033: add test to cover gendisk leak Ming Lei
2023-02-16  8:29   ` Shinichiro Kawasaki
2023-02-16  9:02     ` Ming Lei [this message]
2023-02-16  8:35 ` [PATCH 0/2] blktests: add mini ublk source and blktests/033 Shinichiro Kawasaki
2023-02-16  9:05   ` Ming Lei

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=Y+3xN1vuhwQNyfiv@T590 \
    --to=ming.lei@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=shinichiro.kawasaki@wdc.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