diff --git a/.github/workflows/dax.yml b/.github/workflows/dax.yml index d3455df79..04c36cf80 100644 --- a/.github/workflows/dax.yml +++ b/.github/workflows/dax.yml @@ -99,3 +99,4 @@ jobs: run: | UMF_TESTS_FSDAX_PATH=${{env.UMF_TESTS_FSDAX_PATH}} ctest -C ${{matrix.build_type}} -R umf-provider_file_memory -V UMF_TESTS_FSDAX_PATH=${{env.UMF_TESTS_FSDAX_PATH}} ctest -C ${{matrix.build_type}} -R umf_example_dram_and_fsdax -V + UMF_TESTS_FSDAX_PATH=${{env.UMF_TESTS_FSDAX_PATH}} ctest -C ${{matrix.build_type}} -R umf-ipc_file_prov_fsdax -V diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index dc2554b32..a10562038 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -433,6 +433,7 @@ if(LINUX) common/ipc_common.c common/ipc_os_prov_common.c) add_umf_ipc_test(TEST ipc_file_prov) + add_umf_ipc_test(TEST ipc_file_prov_fsdax) endif() # TODO add IPC tests for CUDA diff --git a/test/ipc_file_prov_fsdax.sh b/test/ipc_file_prov_fsdax.sh new file mode 100755 index 000000000..f2c799f11 --- /dev/null +++ b/test/ipc_file_prov_fsdax.sh @@ -0,0 +1,37 @@ +# +# Copyright (C) 2024 Intel Corporation +# +# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# + +#!/bin/bash + +set -e + +if [ "$UMF_TESTS_FSDAX_PATH" = "" ]; then + echo "$0: Test skipped, UMF_TESTS_FSDAX_PATH is not set"; + exit 0 +fi + +FILE_NAME="$UMF_TESTS_FSDAX_PATH" + +# port should be a number from the range <1024, 65535> +PORT=$(( 1024 + ( $$ % ( 65535 - 1024 )))) + +UMF_LOG_VAL="level:debug;flush:debug;output:stderr;pid:yes" + +# make sure the temp file does not exist +rm -f ${FILE_NAME} + +echo "Starting ipc_file_prov_fsdax CONSUMER on port $PORT ..." +UMF_LOG=$UMF_LOG_VAL ./umf_test-ipc_file_prov_consumer $PORT $FILE_NAME & + +echo "Waiting 1 sec ..." +sleep 1 + +echo "Starting ipc_file_prov_fsdax PRODUCER on port $PORT ..." +UMF_LOG=$UMF_LOG_VAL ./umf_test-ipc_file_prov_producer $PORT $FILE_NAME + +# remove the SHM file +rm -f ${FILE_NAME} diff --git a/test/test_valgrind.sh b/test/test_valgrind.sh index c52243b40..4b8b25b3b 100755 --- a/test/test_valgrind.sh +++ b/test/test_valgrind.sh @@ -94,7 +94,7 @@ for test in $(ls -1 umf_test-*); do ;; umf_test-ipc_file_prov_*) echo "- SKIPPED" - continue; # skip testing helper binaries used by the ipc_file_prov test + continue; # skip testing helper binaries used by the ipc_file_prov_* tests ;; umf_test-memspace_host_all) FILTER='--gtest_filter="-*allocsSpreadAcrossAllNumaNodes"'