test/cuse: verify proper device after unregister
${nvme_name} refers to device name when bound to kernel nvme driver. One of the checks modified by this patch would return true for case when original device name was anything other than "/dev/nvme0". Any higher number id would not exist in /dev/spdk path anyway. Meanwhile devices under /dev/spdk are created in order by the SPDK, so we are sure they will start from 0. This test only registers single nvme_cuse device so that would be the only one. So this patch replaces ${nvme_name} with hardcoded value of ctrlr="/dev/spdk/nvme0" as this is always the outcome of this test. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I521ebe68685234774e8b94175553c8c8609c0bd1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1919 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: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
fc86e792e4
commit
533fa01fab
@ -106,7 +106,7 @@ fi
|
||||
|
||||
$rpc_py bdev_nvme_cuse_unregister -n Nvme0
|
||||
sleep 1
|
||||
if [ -c /dev/spdk/${nvme_name} ]; then
|
||||
if [ -c "$ctrlr" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
@ -119,7 +119,7 @@ fi
|
||||
|
||||
$rpc_py bdev_nvme_detach_controller Nvme0
|
||||
sleep 1
|
||||
if [ -c /dev/spdk/nvme0 ]; then
|
||||
if [ -c "$ctrlr" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user