Commit 533fa01f authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

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: default avatarTomasz 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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent fc86e792
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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