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: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/399590
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Dariusz Stojaczyk 2018-02-13 13:13:29 +01:00 committed by Jim Harris
parent e3f2a3949d
commit 2c1912f64b

View File

@ -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);
}