Commit de8fb128 authored by paul luse's avatar paul luse Committed by Tomasz Zawadzki
Browse files

test/unit: Add unit tests for dpdk compressdev module



Quite a few changes from the vbdev compress unit tests
mainly due to plumbing and structural changes from the
code under test now being an accel_fw module instead of
a bdev module.  Coverage of critical functions matches
what it was for the common code.

Signed-off-by: default avatarpaul luse <paul.e.luse@intel.com>
Change-Id: Ia40c7a0ed72a427e71c00607d93e215e0265fcb1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16076


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent d570ad49
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -66,6 +66,3 @@ lib/mlx5/mlx5_crypto
lib/ublk/ublk
lib/ublk/ublk_rpc
module/event/subsystems/ublk/ublk

# Temp skip checking for this file until next patch
test/unit/lib/accel/dpdk_compressdev.c/accel_dpdk_compressdev_ut
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

DIRS-y = accel.c
DIRS-$(CONFIG_CRYPTO) += dpdk_cryptodev.c
DIRS-$(CONFIG_DPDK_COMPRESSDEV) += dpdk_compressdev.c

.PHONY: all clean $(DIRS-y)

+11 −0
Original line number Diff line number Diff line
#  SPDX-License-Identifier: BSD-3-Clause
#  Copyright (C) 2016 Intel Corporation.
#  All rights reserved.
#

SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)

TEST_FILE = accel_dpdk_compressdev_ut.c
CFLAGS += $(ENV_CFLAGS)

include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk
+198 −387

File changed.

Preview size limit exceeded, changes collapsed.

+4 −0
Original line number Diff line number Diff line
@@ -215,6 +215,10 @@ if grep -q '#define SPDK_CONFIG_VBDEV_COMPRESS 1' $rootdir/include/spdk/config.h
	run_test "unittest_lib_reduce" $valgrind $testdir/lib/reduce/reduce.c/reduce_ut
fi

if grep -q '#define SPDK_CONFIG_DPDK_COMPRESSDEV 1' $rootdir/include/spdk/config.h; then
	run_test "unittest_dpdk_compressdev" $valgrind $testdir/lib/accel/dpdk_compressdev.c/accel_dpdk_compressdev_ut
fi

if grep -q '#define SPDK_CONFIG_PMDK 1' $rootdir/include/spdk/config.h; then
	run_test "unittest_bdev_pmem" $valgrind $testdir/lib/bdev/pmem/bdev_pmem_ut
fi