linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* blktests nvme testcase error
@ 2021-09-06  6:27 Zhu, YifeiX
  2021-09-07  7:05 ` Chaitanya Kulkarni
  0 siblings, 1 reply; 3+ messages in thread
From: Zhu, YifeiX @ 2021-09-06  6:27 UTC (permalink / raw)
  To: linux-block; +Cc: Li, Philip, Ma, XinjianX, Zhu, YifeiX

Hi

execute nvme testcase,  some cases throw the same error info。

LOG:
nvme/007 (create an NVMeOF target with a file-backed ns)     [failed]
    runtime  ...  0.160s
    --- tests/nvme/007.out      2021-09-04 22:32:09.000000000 +0000
    +++ /blktests/results/nodev/nvme/007.out.bad 2021-09-06 02:20:12.999726531 +0000
    @@ -1,2 +1,3 @@
     Running nvme/007
    +tests/nvme/rc: line 236: printf: write error: Invalid argument
     Test complete

this line is enable namespace。

CODE:
    221 _create_nvmet_ns() {
    222         local nvmet_subsystem="$1"
    223         local nsid="$2"
    224         local blkdev="$3"
    225         local uuid="00000000-0000-0000-0000-000000000000"
    226         local subsys_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}"
    227         local ns_path="${subsys_path}/namespaces/${nsid}"
    228
    229         if [[ $# -eq 4 ]]; then
    230                 uuid="$4"
    231         fi
    232
    233         mkdir "${ns_path}"
    234         printf "%s" "${blkdev}" > "${ns_path}/device_path"
    235         printf "%s" "${uuid}" > "${ns_path}/device_uuid"
    236         printf 1 > "${ns_path}/enable"
    237 }

after check, enable the namespace should be with NVMe device.

Test(change device_path and reset enable):
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1# cat device_path
/blktests/results/tmpdir.nvme.007.S8p/img
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1#
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1# cat enable
0
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1#
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1# printf 1 > enable
-bash: printf: write error: Invalid argument
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1#
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1#  echo "/dev/nvme0n1" > device_path
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1#
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1# cat device_path
/dev/nvme0n1
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1#
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1#  printf 1 > enable
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1#
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1# cat enable
1
root@lkp-knm01 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1#


so  should remove L236  or change test device?

thanks  and look forward to advice.

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

* Re: blktests nvme testcase error
  2021-09-06  6:27 blktests nvme testcase error Zhu, YifeiX
@ 2021-09-07  7:05 ` Chaitanya Kulkarni
  2021-09-15  7:47   ` Zhu, YifeiX
  0 siblings, 1 reply; 3+ messages in thread
From: Chaitanya Kulkarni @ 2021-09-07  7:05 UTC (permalink / raw)
  To: Zhu, YifeiX, linux-block; +Cc: Li, Philip, Ma, XinjianX


> CODE:
>      221 _create_nvmet_ns() {
>      222         local nvmet_subsystem="$1"
>      223         local nsid="$2"
>      224         local blkdev="$3"
>      225         local uuid="00000000-0000-0000-0000-000000000000"
>      226         local subsys_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}"
>      227         local ns_path="${subsys_path}/namespaces/${nsid}"
>      228
>      229         if [[ $# -eq 4 ]]; then
>      230                 uuid="$4"
>      231         fi
>      232
>      233         mkdir "${ns_path}"
>      234         printf "%s" "${blkdev}" > "${ns_path}/device_path"
>      235         printf "%s" "${uuid}" > "${ns_path}/device_uuid"
>      236         printf 1 > "${ns_path}/enable"
>      237 }
> 

You should be able to get the error in the dmsg, please share that output..

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

* Re: blktests nvme testcase error
  2021-09-07  7:05 ` Chaitanya Kulkarni
@ 2021-09-15  7:47   ` Zhu, YifeiX
  0 siblings, 0 replies; 3+ messages in thread
From: Zhu, YifeiX @ 2021-09-15  7:47 UTC (permalink / raw)
  To: Chaitanya Kulkarni, linux-block; +Cc: Li, Philip, Ma, XinjianX

thanks for help.

here is exec testcase and this case dmsg.

exec case(nvme/017):

 ./check nvme/017
nvme/017 (create/delete many file-ns and test discovery)
nvme/017 (create/delete many file-ns and test discovery)     [failed]
    runtime  ...  52.826s
    --- tests/nvme/017.out      2021-09-07 20:22:14.000000000 +0000
    +++ /blktests/results/nodev/nvme/017.out.bad 2021-09-15 07:37:57.844363924 +0000
    @@ -1,4 +1,1004 @@
     Running nvme/017
    +tests/nvme/rc: line 236: printf: write error: Invalid argument
    +tests/nvme/rc: line 236: printf: write error: Invalid argument
    +tests/nvme/rc: line 236: printf: write error: Invalid argument
    +tests/nvme/rc: line 236: printf: write error: Invalid argument
    +tests/nvme/rc: line 236: printf: write error: Invalid argument
    +tests/nvme/rc: line 236: printf: write error: Invalid argument
    ...

===dmsg===
[  132.507288] run blktests nvme/017 at 2021-09-15 07:37:04
[  132.625368] nvmet: adding nsid 1 to subsystem blktests-subsystem-1
[  132.641069] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
[  132.672208] nvmet: adding nsid 2 to subsystem blktests-subsystem-1
[  132.689458] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
[  132.719888] nvmet: adding nsid 3 to subsystem blktests-subsystem-1
[  132.737744] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
[  132.767270] nvmet: adding nsid 4 to subsystem blktests-subsystem-1
[  132.784708] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
[  132.815045] nvmet: adding nsid 5 to subsystem blktests-subsystem-1
[  132.833484] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
[  132.865054] nvmet: adding nsid 6 to subsystem blktests-subsystem-1
[  132.882758] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
[  132.914428] nvmet: adding nsid 7 to subsystem blktests-subsystem-1
[  132.932313] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
[  132.962468] nvmet: adding nsid 8 to subsystem blktests-subsystem-1
[  132.981265] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
[  133.011579] nvmet: adding nsid 9 to subsystem blktests-subsystem-1
[  133.031565] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
.....
[  180.912375] nvmet: adding nsid 996 to subsystem blktests-subsystem-1
[  180.932275] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
[  180.961400] nvmet: adding nsid 997 to subsystem blktests-subsystem-1
[  180.979499] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
[  181.008340] nvmet: adding nsid 998 to subsystem blktests-subsystem-1
[  181.027465] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
[  181.058338] nvmet: adding nsid 999 to subsystem blktests-subsystem-1
[  181.076647] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
[  181.105358] nvmet: adding nsid 1000 to subsystem blktests-subsystem-1
[  181.123796] nvmet: failed to open file /blktests/results/tmpdir.nvme.017.pdW/img: (-22)
[  181.183335] nvmet: creating controller 1 for subsystem nqn.2014-08.org.nvmexpress.discovery for NQN nqn.2014-08.org.nvmexpress:uuid:71bd033c-1164-4503-930c-4bab1cdc09d9.
[  181.211442] nvme nvme2: new ctrl: "nqn.2014-08.org.nvmexpress.discovery"
[  181.232221] nvme nvme2: Removing ctrl: NQN "nqn.2014-08.org.nvmexpress.discovery"


________________________________________
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
Sent: Tuesday, September 7, 2021 15:05
To: Zhu, YifeiX; linux-block@vger.kernel.org
Cc: Li, Philip; Ma, XinjianX
Subject: Re: blktests nvme testcase error


> CODE:
>      221 _create_nvmet_ns() {
>      222         local nvmet_subsystem="$1"
>      223         local nsid="$2"
>      224         local blkdev="$3"
>      225         local uuid="00000000-0000-0000-0000-000000000000"
>      226         local subsys_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}"
>      227         local ns_path="${subsys_path}/namespaces/${nsid}"
>      228
>      229         if [[ $# -eq 4 ]]; then
>      230                 uuid="$4"
>      231         fi
>      232
>      233         mkdir "${ns_path}"
>      234         printf "%s" "${blkdev}" > "${ns_path}/device_path"
>      235         printf "%s" "${uuid}" > "${ns_path}/device_uuid"
>      236         printf 1 > "${ns_path}/enable"
>      237 }
>

You should be able to get the error in the dmsg, please share that output..

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

end of thread, other threads:[~2021-09-15  7:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06  6:27 blktests nvme testcase error Zhu, YifeiX
2021-09-07  7:05 ` Chaitanya Kulkarni
2021-09-15  7:47   ` Zhu, YifeiX

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).