diff --git a/mk/spdk.lib_deps.mk b/mk/spdk.lib_deps.mk index 1b5f75040..128f60aa5 100644 --- a/mk/spdk.lib_deps.mk +++ b/mk/spdk.lib_deps.mk @@ -148,6 +148,7 @@ DEPDIRS-bdev_passthru := $(BDEV_DEPS_CONF_THREAD) DEPDIRS-bdev_pmem := $(BDEV_DEPS_CONF_THREAD) DEPDIRS-bdev_raid := $(BDEV_DEPS_CONF_THREAD) DEPDIRS-bdev_rbd := $(BDEV_DEPS_CONF_THREAD) +DEPDIRS-bdev_uring := $(BDEV_DEPS_CONF_THREAD) DEPDIRS-bdev_virtio := $(BDEV_DEPS_CONF_THREAD) virtio # module/event diff --git a/scripts/vagrant/autorun-spdk.conf b/scripts/vagrant/autorun-spdk.conf index fa40d1dca..067522c6f 100644 --- a/scripts/vagrant/autorun-spdk.conf +++ b/scripts/vagrant/autorun-spdk.conf @@ -16,6 +16,7 @@ SPDK_TEST_OCF=0 SPDK_TEST_VHOST=0 SPDK_TEST_VHOST_INIT=0 SPDK_TEST_BLOCKDEV=1 +SPDK_TEST_URING=0 # doesn't work on vm SPDK_TEST_IOAT=0 SPDK_TEST_BLOBFS=0 diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 14995624d..912f4bf36 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -126,6 +126,8 @@ export SPDK_TEST_OPAL export SPDK_AUTOTEST_X : ${SPDK_TEST_RAID5=0} export SPDK_TEST_RAID5 +: ${SPDK_TEST_URING=0} +export SPDK_TEST_URING # Export PYTHONPATH with addition of RPC framework. New scripts can be created # specific use cases for tests. @@ -413,6 +415,11 @@ function get_config_params() { config_params+=' --with-raid5' fi + # Check whether liburing library header exists + if [ -f /usr/include/liburing/io_uring.h ] && [ $SPDK_TEST_URING -eq 1 ]; then + config_params+=' --with-uring' + fi + # By default, --with-dpdk is not set meaning the SPDK build will use the DPDK submodule. # If a DPDK installation is found in a well-known location though, WITH_DPDK_DIR will be # set which will override the default and use that DPDK installation instead. diff --git a/test/unit/unittest.sh b/test/unit/unittest.sh index 955ddb7f9..39bfdbb4a 100755 --- a/test/unit/unittest.sh +++ b/test/unit/unittest.sh @@ -100,6 +100,10 @@ function unittest_scsi() { function unittest_sock() { $valgrind $testdir/lib/sock/sock.c/sock_ut $valgrind $testdir/lib/sock/posix.c/posix_ut + # Check whether uring is configured + if grep -q '#define SPDK_CONFIG_URING 1' $rootdir/include/spdk/config.h; then + $valgrind $testdir/lib/sock/uring.c/uring_ut + fi } function unittest_util() {