Skip to content

Add IPC test for FSDAX #762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/dax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 37 additions & 0 deletions test/ipc_file_prov_fsdax.sh
Original file line number Diff line number Diff line change
@@ -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}
2 changes: 1 addition & 1 deletion test/test_valgrind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"'
Expand Down
Loading