Skip to content

Commit 5d270d2

Browse files
Merge pull request #762 from ldorau/Add_IPC_test_for_FSDAX
Add IPC test for FSDAX
2 parents 46ad7ac + 7a398cb commit 5d270d2

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

.github/workflows/dax.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,4 @@ jobs:
9999
run: |
100100
UMF_TESTS_FSDAX_PATH=${{env.UMF_TESTS_FSDAX_PATH}} ctest -C ${{matrix.build_type}} -R umf-provider_file_memory -V
101101
UMF_TESTS_FSDAX_PATH=${{env.UMF_TESTS_FSDAX_PATH}} ctest -C ${{matrix.build_type}} -R umf_example_dram_and_fsdax -V
102+
UMF_TESTS_FSDAX_PATH=${{env.UMF_TESTS_FSDAX_PATH}} ctest -C ${{matrix.build_type}} -R umf-ipc_file_prov_fsdax -V

test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ if(LINUX)
433433
common/ipc_common.c
434434
common/ipc_os_prov_common.c)
435435
add_umf_ipc_test(TEST ipc_file_prov)
436+
add_umf_ipc_test(TEST ipc_file_prov_fsdax)
436437
endif()
437438

438439
# TODO add IPC tests for CUDA

test/ipc_file_prov_fsdax.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# Copyright (C) 2024 Intel Corporation
3+
#
4+
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
5+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
#
7+
8+
#!/bin/bash
9+
10+
set -e
11+
12+
if [ "$UMF_TESTS_FSDAX_PATH" = "" ]; then
13+
echo "$0: Test skipped, UMF_TESTS_FSDAX_PATH is not set";
14+
exit 0
15+
fi
16+
17+
FILE_NAME="$UMF_TESTS_FSDAX_PATH"
18+
19+
# port should be a number from the range <1024, 65535>
20+
PORT=$(( 1024 + ( $$ % ( 65535 - 1024 ))))
21+
22+
UMF_LOG_VAL="level:debug;flush:debug;output:stderr;pid:yes"
23+
24+
# make sure the temp file does not exist
25+
rm -f ${FILE_NAME}
26+
27+
echo "Starting ipc_file_prov_fsdax CONSUMER on port $PORT ..."
28+
UMF_LOG=$UMF_LOG_VAL ./umf_test-ipc_file_prov_consumer $PORT $FILE_NAME &
29+
30+
echo "Waiting 1 sec ..."
31+
sleep 1
32+
33+
echo "Starting ipc_file_prov_fsdax PRODUCER on port $PORT ..."
34+
UMF_LOG=$UMF_LOG_VAL ./umf_test-ipc_file_prov_producer $PORT $FILE_NAME
35+
36+
# remove the SHM file
37+
rm -f ${FILE_NAME}

test/test_valgrind.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ for test in $(ls -1 umf_test-*); do
9494
;;
9595
umf_test-ipc_file_prov_*)
9696
echo "- SKIPPED"
97-
continue; # skip testing helper binaries used by the ipc_file_prov test
97+
continue; # skip testing helper binaries used by the ipc_file_prov_* tests
9898
;;
9999
umf_test-memspace_host_all)
100100
FILTER='--gtest_filter="-*allocsSpreadAcrossAllNumaNodes"'

0 commit comments

Comments
 (0)