Commit 2c1912f6 authored by Dariusz Stojaczyk's avatar Dariusz Stojaczyk Committed by Jim Harris
Browse files

ut/vhost: remove test case `Remove nonexistent device`



This test case doesn't work. The title suggests
that unregistering non-registered device should
fail - but in fact we don't check against that.
The test expects failure, but fails due to a
different issue - the device is in use. And there
is already a separate test for this case.

Device is considered in use when it's vid is != -1,
and we always init the vid to 10 inside alloc_vdev.

Change-Id: I8de1afce8f6bcbd2a6bfbb30870265e30b2a9a41
Signed-off-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/399590


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent e3f2a394
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -303,15 +303,6 @@ remove_controller_test(void)
	/* Remove device when controller is in use */
	ret = spdk_vhost_dev_unregister(vdev);
	CU_ASSERT(ret != 0);
	if (ret == 0) {
		vdev->name = strdup("vdev_name_0");
	}

	/* Remove nonexistent device */
	vdev->lcore = -1;
	ret = spdk_vhost_dev_unregister(vdev);
	CU_ASSERT(ret != 0);

	free_vdev(vdev);
}