ut/compress: remove extra success test case
By moving the success test case to the end we avoid the scan-build issue however the last test case was already testing success so just udpated the comment and free the memory at the end. Fixes issue #933 Change-Id: I0ca81f240d3af32c414b0c886fda5b14ba37e490 Signed-off-by: paul luse <paul.e.luse@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467302 Reviewed-by: yidong0635 <dongx.yi@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
03578a3d25
commit
b28aa25e61
@ -782,12 +782,6 @@ test_initdrivers(void)
|
||||
/* This is not an error condition, we already have one */
|
||||
CU_ASSERT(rc == 0);
|
||||
|
||||
/* success */
|
||||
MOCK_SET(rte_vdev_init, 0);
|
||||
rc = vbdev_init_compress_drivers();
|
||||
CU_ASSERT(rc == 0);
|
||||
spdk_mempool_free((struct spdk_mempool *)g_mbuf_mp);
|
||||
|
||||
/* error */
|
||||
MOCK_SET(rte_vdev_init, -2);
|
||||
rc = vbdev_init_compress_drivers();
|
||||
@ -848,11 +842,11 @@ test_initdrivers(void)
|
||||
rc = vbdev_init_compress_drivers();
|
||||
CU_ASSERT(rc == -2);
|
||||
|
||||
/* rte_compressdev_private_xform_create()succeeds */
|
||||
ut_rte_compressdev_start = 0;
|
||||
/* success */
|
||||
ut_rte_compressdev_private_xform_create = 0;
|
||||
rc = vbdev_init_compress_drivers();
|
||||
CU_ASSERT(rc == 0);
|
||||
spdk_mempool_free((struct spdk_mempool *)g_mbuf_mp);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user