numam-spdk/test/nvme/cuse
Tomasz Zawadzki 14ce25ab00 test/cuse: wait for device after reset
This patch adds waitforblk() after rebinding the driver.
If timing was unfortunate, it was possible to issue
id-ctrlr command to a device that was not yet ready.
Meaning the support for fw command was not read properly.

No error was reported due to "set +e", so this patch moves
it till after id-ctrlr.

Example of the error:
# get_nvme_ctrlr_from_bdf 0000:82:00.0
# readlink -f /sys/class/nvme/nvme9
# grep 0000:82:00.0/nvme/nvme
# bdf_sysfs_path=/sys/devices/pci0000:80/0000:80:03.0/0000:82:00.0/nvme/nvme9
# [[ -z /sys/devices/pci0000:80/0000:80:03.0/0000:82:00.0/nvme/nvme9 ]]
# basename /sys/devices/pci0000:80/0000:80:03.0/0000:82:00.0/nvme/nvme9
# printf '%s\n' nvme9
# nvme_name=nvme9
# [[ -z nvme9 ]]
# set +e
# ctrlr=/dev/nvme9
# ns=/dev/nvme9n1
# /usr/local/src/nvme-cli/nvme id-ctrl /dev/nvme9
# grep oacs
# cut -d: -f2
/dev/nvme9: Resource temporarily unavailable

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5728a5062cd553eb39d18d9869fdf56319a27777
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2950
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-07-08 07:55:33 +00:00
..
.gitignore test/nvme: dynamic nvme cuse devices update test 2020-06-05 09:01:44 +00:00
cuse.c test/nvme: dynamic nvme cuse devices update test 2020-06-05 09:01:44 +00:00
Makefile test/nvme: dynamic nvme cuse devices update test 2020-06-05 09:01:44 +00:00
nvme_cuse_rpc.sh test/cuse: remove superfluous setup.sh 2020-06-17 07:20:55 +00:00
nvme_cuse.sh test/cuse: run namespace managment test if device supports it 2020-06-17 07:20:55 +00:00
nvme_ns_manage_cuse.sh test/cuse: use 512B block size on namespace revert 2020-06-23 08:04:05 +00:00
spdk_nvme_cli_cuse.sh test/cuse: wait for device after reset 2020-07-08 07:55:33 +00:00
spdk_smartctl_cuse.sh test/common: add get_nvme_ctrlr_from_bdf() 2020-06-17 07:20:55 +00:00