bdev/compress: add missing mocks and re-enable UT build for comp

Disabled temporarily earlier to get to basic functionality, circling
back now to begin work on UT again.

Change-Id: Ie7606f91072257f392727bdecc5f1eac26380453
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451063
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
paul luse 2019-04-12 13:25:46 -04:00 committed by Jim Harris
parent 2b0ae30bf1
commit 766c536184
2 changed files with 7 additions and 1 deletions

View File

@ -42,7 +42,7 @@ endif
ifeq ($(CONFIG_REDUCE),y)
# enable once new mocks are added for compressdev
#DIRS-y += compress.c
DIRS-y += compress.c
endif
DIRS-$(CONFIG_PMDK) += pmem

View File

@ -152,6 +152,12 @@ DEFINE_STUB(rte_socket_id, unsigned, (void), 0);
DEFINE_STUB(rte_eal_get_configuration, struct rte_config *, (void), NULL);
DEFINE_STUB(rte_vdev_init, int, (const char *name, const char *args), 0);
DEFINE_STUB_V(rte_mempool_free, (struct rte_mempool *mp));
DEFINE_STUB(rte_compressdev_dequeue_burst, uint16_t,
(uint8_t dev_id, uint16_t qp_id, struct rte_comp_op **ops, uint16_t nb_ops), 0);
DEFINE_STUB(rte_compressdev_enqueue_burst, uint16_t,
(uint8_t dev_id, uint16_t qp_id, struct rte_comp_op **ops, uint16_t nb_ops), 0);
DEFINE_STUB_V(rte_comp_op_free, (struct rte_comp_op *op));
DEFINE_STUB(rte_comp_op_alloc, struct rte_comp_op *, (struct rte_mempool *mempool), NULL);
struct spdk_bdev_io *g_bdev_io;
struct spdk_io_channel *g_io_ch;