Skip to content

Commit 3835320

Browse files
NirWolfergalnoam
authored andcommitted
[CI] issue: HPCINFRA-3936 Valgrind worker threads mode
Today we are running the Valgrind test in R2C mode only, meaning we are not testing the new worker threads mode in our CI process. Add Worker threads mode test to the vg.sh based on WORKER_THREADS env var Signed-off-by: NirWolfer <[email protected]>
1 parent e398cd3 commit 3835320

File tree

2 files changed

+54
-13
lines changed

2 files changed

+54
-13
lines changed

.ci/matrix_job.yaml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ runs_on_dockers:
123123
runAsUser: '0',
124124
runAsGroup: '0'
125125
}
126+
- {
127+
arch: 'x86_64',
128+
name: 'vg-worker-threads',
129+
url: 'harbor.mellanox.com/swx-infra/media/xlio/x86_64/ubuntu22.04/vg:20250219',
130+
category: 'tool',
131+
annotations: [{ key: 'k8s.v1.cni.cncf.io/networks', value: 'sriov-cx6dx-p2' }],
132+
limits: '{memory: 10Gi, cpu: 10000m, hugepages-2Mi: 10Gi, nvidia.com/sriov-cx6dx-p2: 1}',
133+
requests: '{memory: 10Gi, cpu: 10000m, hugepages-2Mi: 10Gi, nvidia.com/sriov-cx6dx-p2: 1}',
134+
caps_add: '[ IPC_LOCK, SYS_RESOURCE ]',
135+
runAsUser: '0',
136+
runAsGroup: '0'
137+
}
126138
- {
127139
file: '.ci/dockerfiles/Dockerfile.ubuntu22.04',
128140
arch: 'x86_64',
@@ -139,12 +151,9 @@ runs_on_dockers:
139151
runAsGroup: '0'
140152
}
141153
- {
142-
file: '.ci/dockerfiles/Dockerfile.ubuntu22.04',
143154
arch: 'x86_64',
144155
name: 'sockperf-worker-threads',
145-
uri: 'xlio/$arch/ubuntu22.04/$name',
146-
tag: '20251015',
147-
build_args: '--no-cache --target test',
156+
url: 'harbor.mellanox.com/swx-infra/media/xlio/x86_64/ubuntu22.04/sockperf:20251015',
148157
category: 'tests',
149158
annotations: [{ key: 'k8s.v1.cni.cncf.io/networks', value: 'sriov-cx6dx-p1' }],
150159
limits: '{memory: 10Gi, cpu: 10000m, hugepages-2Mi: 10Gi, nvidia.com/sriov-cx6dx-p1: 1}',
@@ -208,6 +217,7 @@ steps:
208217
- "{category: 'base'}"
209218
- "{category: 'tests'}"
210219
- "{name: 'vg'}"
220+
- "{name: 'vg-worker-threads'}"
211221
agentSelector:
212222
- "{nodeLabel: 'skip-agent'}"
213223
run: |
@@ -441,7 +451,23 @@ steps:
441451
- "{nodeLabel: 'skip-agent'}"
442452
run: |
443453
[ "x${do_valgrind}" == "xtrue" ] && action=yes || action=no
444-
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_vg=${action} ./contrib/test_jenkins.sh
454+
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_vg=${action} WORKER_THREADS=false ./contrib/test_jenkins.sh
455+
parallel: false
456+
onfail: |
457+
./.ci/artifacts.sh
458+
archiveArtifacts-onfail: |
459+
jenkins/**/arch-*.tar.gz,
460+
jenkins/**/vg/*valgrind*.log
461+
462+
- name: Valgrind (Worker thread mode)
463+
enable: ${do_valgrind}
464+
containerSelector:
465+
- "{name: 'vg-worker-threads'}"
466+
agentSelector:
467+
- "{nodeLabel: 'skip-agent'}"
468+
run: |
469+
[ "x${do_valgrind}" == "xtrue" ] && action=yes || action=no
470+
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_vg=${action} WORKER_THREADS=true ./contrib/test_jenkins.sh
445471
parallel: false
446472
onfail: |
447473
./.ci/artifacts.sh
@@ -469,6 +495,7 @@ steps:
469495
containerSelector:
470496
- "{category: 'base'}"
471497
- "{name: 'vg'}"
498+
- "{name: 'vg-worker-threads'}"
472499
- "{category: 'tests'}"
473500
agentSelector:
474501
- "{nodeLabel: 'beni09'}"

contrib/jenkins_tests/vg.sh

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/bash -eExl
22

3+
ulimit -n 50000
4+
ulimit -l unlimited
35
source $(dirname $0)/globals.sh
46

57
# Fix hugepages for docker environments
68
do_hugepages
79

810
echo "Checking for valgrind ..."
911

10-
#do_module "tools/valgrind-3.12.0"
11-
1212
set +eE
1313

1414
cd $WORKSPACE
@@ -45,12 +45,25 @@ if [ "$test_ip_list" == "eth_ip4: eth_ip6:" ] || [ -z "${test_ip_list}" ]; then
4545
exit 1
4646
fi
4747

48-
test_list="tcp:--tcp udp:"
4948
test_lib=${vg_dir}/install/lib/${prj_lib}
50-
test_lib_env="XLIO_MEM_ALLOC_TYPE=ANON XLIO_MEMORY_LIMIT=256MB XLIO_TX_WRE=2000 XLIO_RX_WRE=2000 XLIO_STRQ=off"
49+
test_lib_env="XLIO_MEM_ALLOC_TYPE=ANON XLIO_TX_WRE=2000 XLIO_RX_WRE=2000 XLIO_STRQ=off LD_PRELOAD=$test_lib"
5150
test_app=sockperf
5251
test_app_path=${test_dir}/sockperf/install/bin/sockperf
5352
vg_tool=/bin/valgrind
53+
WORKER_THREADS=${WORKER_THREADS:-"false"}
54+
55+
# Enable params based on the mode choice - given by WORKER_THREADS variable
56+
if [[ "$WORKER_THREADS" == "true" ]]; then
57+
echo "Testing mode: Worker Threads"
58+
test_list="tcp:--tcp"
59+
test_lib_env="${test_lib_env} XLIO_WORKER_THREADS=1 XLIO_MEMORY_LIMIT=512MB"
60+
test_params="--nonblocked"
61+
else
62+
echo "Testing mode: R2C"
63+
test_list="tcp:--tcp udp:"
64+
test_lib_env="${test_lib_env} XLIO_MEMORY_LIMIT=256MB"
65+
test_params=""
66+
fi
5467

5568
if [ $(command -v $test_app_path >/dev/null 2>&1 || echo $?) ]; then
5669
test_app_path=sockperf
@@ -92,10 +105,11 @@ for test_link in $test_ip_list; do
92105
--undef-value-errors=yes --track-fds=yes --num-callers=32 \
93106
--fullpath-after=${WORKSPACE} --gen-suppressions=all \
94107
--suppressions=${WORKSPACE}/contrib/valgrind/valgrind_xlio.supp \
108+
--fair-sched=yes \
95109
"
96-
eval "${sudo_cmd} $timeout_exe env $test_lib_env LD_PRELOAD=$test_lib \
110+
eval "${sudo_cmd} $timeout_exe env $test_lib_env \
97111
${vg_tool} --log-file=${vg_dir}/${test_name}-valgrind-sr.log $vg_args \
98-
$test_app_path sr ${test_opt} -i ${test_ip} 2>&1 | tee ${vg_dir}/${test_name}-output-sr.log &"
112+
$test_app_path sr ${test_opt} -i ${test_ip} ${test_params} 2>&1 | tee ${vg_dir}/${test_name}-output-sr.log &"
99113

100114
wait=0
101115
while [ $wait -lt $sockperf_max_wait ]; do
@@ -108,9 +122,9 @@ for test_link in $test_ip_list; do
108122
sleep 2
109123
done
110124

111-
eval "${sudo_cmd} $timeout_exe_short env $test_lib_env LD_PRELOAD=$test_lib \
125+
eval "${sudo_cmd} $timeout_exe_short env $test_lib_env \
112126
${vg_tool} --log-file=${vg_dir}/${test_name}-valgrind-cl.log $vg_args \
113-
$test_app_path pp ${test_opt} -i ${test_ip} -t 10 2>&1 | tee ${vg_dir}/${test_name}-output-cl.log"
127+
$test_app_path pp ${test_opt} -i ${test_ip} -t 10 ${test_params} 2>&1 | tee ${vg_dir}/${test_name}-output-cl.log"
114128

115129
if [ `ps -ef | grep $test_app | wc -l` -gt 1 ];
116130
then

0 commit comments

Comments
 (0)