public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: Yi Zhang <yi.zhang@redhat.com>
Cc: bvanassche@acm.org, linux-block@vger.kernel.org,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH blktests] nvmeof-mp/001: fix failure when CONFIG_NVME_HWMON enabled
Date: Wed, 15 Sep 2021 11:47:06 -0700	[thread overview]
Message-ID: <YUI/qlrbFw6Q89BD@relinquished.localdomain> (raw)
In-Reply-To: <20210912120336.6035-1-yi.zhang@redhat.com>

On Sun, Sep 12, 2021 at 08:03:36PM +0800, Yi Zhang wrote:
> Skip checking ng0n1/hwmon5 in count_devices
> 
> $ use_siw=1  ./check nvmeof-mp/001
> nvmeof-mp/001 (Log in and log out)                           [failed]
>     runtime  3.695s  ...  4.002s
>     --- tests/nvmeof-mp/001.out	2021-09-12 05:35:17.866892187 -0400
>     +++ /root/blktests/results/nodev/nvmeof-mp/001.out.bad	2021-09-12 06:49:25.621880616 -0400
>     @@ -1,3 +1,3 @@
>      Configured NVMe target driver
>     -count_devices(): 1 <> 1
>     +count_devices(): 3 <> 1
>      Passed
> $ ls -l /sys/class/nvme-fabrics/ctl/*/*/device
> lrwxrwxrwx. 1 root root 0 Sep 12 06:49 /sys/class/nvme-fabrics/ctl/nvme0/hwmon5/device -> ../../nvme0
> lrwxrwxrwx. 1 root root 0 Sep 12 06:49 /sys/class/nvme-fabrics/ctl/nvme0/ng0n1/device -> ../../nvme0
> lrwxrwxrwx. 1 root root 0 Sep 12 06:49 /sys/class/nvme-fabrics/ctl/nvme0/nvme0n1/device -> ../../nvme0
> 
> Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
> ---
>  tests/nvmeof-mp/001 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/nvmeof-mp/001 b/tests/nvmeof-mp/001
> index 69f1e24..3c3e8d5 100755
> --- a/tests/nvmeof-mp/001
> +++ b/tests/nvmeof-mp/001
> @@ -11,6 +11,7 @@ count_devices() {
>  	local d devs=0
>  
>  	for d in /sys/class/nvme-fabrics/ctl/*/*/device; do
> +		[[ "$d" =~ hwmon[0-9]|ng[0-9]n[0-9] ]] && continue

I'm not too familiar with NVME_HWMON, but presumably it's possible to
have more than 10 of these "ng" devices. Should this be ng[0-9]+n[0-9]?

>  		[ -d "$d" ] && ((devs++))
>  	done
>  	echo "$devs"
> -- 
> 2.21.3
> 

      reply	other threads:[~2021-09-15 18:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-12 12:03 [PATCH blktests] nvmeof-mp/001: fix failure when CONFIG_NVME_HWMON enabled Yi Zhang
2021-09-15 18:47 ` Omar Sandoval [this message]

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=YUI/qlrbFw6Q89BD@relinquished.localdomain \
    --to=osandov@osandov.com \
    --cc=bvanassche@acm.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=yi.zhang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox