linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 blktests] nvmeof-mp/001: fix failure when CONFIG_NVME_HWMON enabled
@ 2021-09-17  3:09 Yi Zhang
  2021-09-18  0:03 ` Omar Sandoval
  0 siblings, 1 reply; 2+ messages in thread
From: Yi Zhang @ 2021-09-17  3:09 UTC (permalink / raw)
  To: bvanassche, osandov; +Cc: linux-block, linux-nvme

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>
---
V2: update regex to hwmon[0-9]+|ng[0-9]+n[0-9]+

---
 tests/nvmeof-mp/001 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/nvmeof-mp/001 b/tests/nvmeof-mp/001
index 69f1e24..f3e6394 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
 		[ -d "$d" ] && ((devs++))
 	done
 	echo "$devs"
-- 
2.21.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH V2 blktests] nvmeof-mp/001: fix failure when CONFIG_NVME_HWMON enabled
  2021-09-17  3:09 [PATCH V2 blktests] nvmeof-mp/001: fix failure when CONFIG_NVME_HWMON enabled Yi Zhang
@ 2021-09-18  0:03 ` Omar Sandoval
  0 siblings, 0 replies; 2+ messages in thread
From: Omar Sandoval @ 2021-09-18  0:03 UTC (permalink / raw)
  To: Yi Zhang; +Cc: bvanassche, linux-block, linux-nvme

On Fri, Sep 17, 2021 at 11:09:11AM +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>
> ---
> V2: update regex to hwmon[0-9]+|ng[0-9]+n[0-9]+
> 
> ---
>  tests/nvmeof-mp/001 | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-18  0:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17  3:09 [PATCH V2 blktests] nvmeof-mp/001: fix failure when CONFIG_NVME_HWMON enabled Yi Zhang
2021-09-18  0:03 ` Omar Sandoval

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).