blktests nvme testcase error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux