From f499ef7191f23d38ad94ba54edea7ad85e950eff Mon Sep 17 00:00:00 2001 From: paul luse Date: Sat, 29 Jun 2019 18:22:55 -0400 Subject: [PATCH] ut/compress: misc unit test fixes Required due to recent changes to functional code, unclear how the UT passed without these. Signed-off-by: paul luse Change-Id: I3ea4401ee1842ef577793338f1567d20d73ad8bc Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459868 Tested-by: SPDK CI Jenkins Reviewed-by: Seth Howell Reviewed-by: Darek Stojaczyk Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker --- test/unit/lib/bdev/compress.c/compress_ut.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit/lib/bdev/compress.c/compress_ut.c b/test/unit/lib/bdev/compress.c/compress_ut.c index 34b739f4a..dd96c7ff6 100644 --- a/test/unit/lib/bdev/compress.c/compress_ut.c +++ b/test/unit/lib/bdev/compress.c/compress_ut.c @@ -46,6 +46,7 @@ struct rte_comp_op g_comp_op[2]; struct vbdev_compress g_comp_bdev; struct comp_device_qp g_device_qp; struct compress_dev g_device; +struct rte_compressdev_capabilities g_cdev_cap; static struct rte_mbuf *g_src_mbufs[2]; static struct rte_mbuf *g_dst_mbufs[2]; static struct rte_mbuf g_expected_src_mbufs[2]; @@ -95,6 +96,8 @@ void __rte_experimental mock_rte_compressdev_info_get(uint8_t dev_id, struct rte_compressdev_info *dev_info) { dev_info->max_nb_queue_pairs = ut_max_nb_queue_pairs; + dev_info->capabilities = &g_cdev_cap; + dev_info->driver_name = "compress_isal"; } int ut_rte_compressdev_configure = 0; @@ -452,6 +455,9 @@ test_setup(void) }; g_device.comp_xform = &g_comp_xform; g_device.decomp_xform = &g_decomp_xform; + g_cdev_cap.comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM; + g_device.cdev_info.driver_name = "compress_isal"; + g_device.cdev_info.capabilities = &g_cdev_cap; g_src_mbufs[0] = calloc(1, sizeof(struct rte_mbuf)); g_src_mbufs[1] = calloc(1, sizeof(struct rte_mbuf));