Skip to content

Commit 6843001

Browse files
Use UMF_TESTS_FAIL_ON_SKIP in IPC tests
Now, we can treat IPC tests skip as a fail. Set proper value for ptrace, to properly run this IPC tests in all workflows.
1 parent 4d82e41 commit 6843001

File tree

7 files changed

+29
-5
lines changed

7 files changed

+29
-5
lines changed

.github/workflows/basic.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
- name: Install Python requirements
4343
run: python3 -m pip install -r third_party/requirements.txt
4444

45+
- name: Set ptrace value for IPC test
46+
run: bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
47+
4548
- name: Configure build
4649
run: >
4750
cmake
@@ -137,6 +140,9 @@ jobs:
137140
- name: Install libhwloc
138141
run: .github/scripts/install_hwloc.sh
139142

143+
- name: Set ptrace value for IPC test
144+
run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
145+
140146
- name: Configure build
141147
run: >
142148
cmake

.github/workflows/pr_push.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ jobs:
6363
sudo apt-get update
6464
sudo apt-get install -y cmake libjemalloc-dev libhwloc-dev libnuma-dev libtbb-dev
6565
66+
- name: Set ptrace value for IPC test (on Linux only)
67+
if: matrix.os == 'ubuntu-latest'
68+
run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
69+
6670
- name: Configure CMake
6771
run: >
6872
cmake

.github/workflows/proxy_lib.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
sudo apt-get update
2828
sudo apt-get install -y cmake libhwloc-dev libjemalloc-dev libtbb-dev
2929
30+
- name: Set ptrace value for IPC test
31+
run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
32+
3033
- name: Configure build
3134
run: >
3235
cmake

.github/workflows/sanitizers.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
apt-get update
3535
apt-get install -y cmake libnuma-dev libjemalloc-dev libtbb-dev libhwloc-dev sudo
3636
37+
- name: Set ptrace value for IPC test
38+
run: bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
39+
3740
- name: Configure build
3841
run: >
3942
cmake
@@ -79,6 +82,9 @@ jobs:
7982
sudo apt-get update
8083
sudo apt-get install -y clang cmake libhwloc-dev libnuma-dev libjemalloc-dev libtbb-dev
8184
85+
- name: Set ptrace value for IPC test
86+
run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
87+
8288
- name: Configure build
8389
run: >
8490
cmake

examples/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ if(LINUX AND UMF_BUILD_LIBUMF_POOL_SCALABLE)
137137
COMMAND ${BASE_NAME}.sh
138138
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
139139

140-
set_tests_properties(
141-
${EXAMPLE_NAME} PROPERTIES
142-
SKIP_RETURN_CODE 125
143-
LABELS "example")
140+
set_tests_properties(${EXAMPLE_NAME} PROPERTIES LABELS "example")
141+
if(NOT UMF_TESTS_FAIL_ON_SKIP)
142+
set_tests_properties(${EXAMPLE_NAME} PROPERTIES SKIP_RETURN_CODE 125)
143+
endif()
144144
else()
145145
message(
146146
STATUS

scripts/qemu/run-build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ branch=$2
1212
echo password | sudo -Sk apt update
1313
echo password | sudo -Sk apt install -y git cmake gcc g++ numactl libnuma-dev libhwloc-dev libjemalloc-dev libtbb-dev pkg-config valgrind hwloc
1414

15+
# Set ptrace value for IPC test
16+
echo password | sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
17+
1518
numactl -H
1619

1720
git clone $repo umf

test/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ if(LINUX)
257257
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
258258

259259
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "umf")
260-
set_tests_properties(${TEST_NAME} PROPERTIES SKIP_RETURN_CODE 125)
260+
if(NOT UMF_TESTS_FAIL_ON_SKIP)
261+
set_tests_properties(${TEST_NAME} PROPERTIES SKIP_RETURN_CODE 125)
262+
endif()
261263
else()
262264
message(
263265
STATUS "IPC shared memory test is supported on Linux only - skipping")

0 commit comments

Comments
 (0)