Skip to content

Commit f644db3

Browse files
committed
[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 9a12947 commit f644db3

File tree

2 files changed

+52
-7
lines changed

2 files changed

+52
-7
lines changed

.ci/matrix_job.yaml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,21 @@ runs_on_dockers:
123123
runAsUser: '0',
124124
runAsGroup: '0'
125125
}
126+
- {
127+
file: '.ci/dockerfiles/Dockerfile.ubuntu22.04',
128+
arch: 'x86_64',
129+
name: 'vg-worker-threads',
130+
uri: 'xlio/$arch/ubuntu22.04/$name',
131+
tag: '20251022',
132+
build_args: '--no-cache --target vg',
133+
category: 'tool',
134+
annotations: [{ key: 'k8s.v1.cni.cncf.io/networks', value: 'sriov-cx6dx-p2' }],
135+
limits: '{memory: 10Gi, cpu: 10000m, hugepages-2Mi: 10Gi, nvidia.com/sriov-cx6dx-p2: 1}',
136+
requests: '{memory: 10Gi, cpu: 10000m, hugepages-2Mi: 10Gi, nvidia.com/sriov-cx6dx-p2: 1}',
137+
caps_add: '[ IPC_LOCK, SYS_RESOURCE ]',
138+
runAsUser: '0',
139+
runAsGroup: '0'
140+
}
126141
- {
127142
file: '.ci/dockerfiles/Dockerfile.ubuntu22.04',
128143
arch: 'x86_64',
@@ -199,6 +214,7 @@ steps:
199214
- "{category: 'base'}"
200215
- "{category: 'tests'}"
201216
- "{name: 'vg'}"
217+
- "{name: 'vg-worker-threads'}"
202218
agentSelector:
203219
- "{nodeLabel: 'skip-agent'}"
204220
run: |
@@ -432,7 +448,23 @@ steps:
432448
- "{nodeLabel: 'skip-agent'}"
433449
run: |
434450
[ "x${do_valgrind}" == "xtrue" ] && action=yes || action=no
435-
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_vg=${action} ./contrib/test_jenkins.sh
451+
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_vg=${action} WORKER_THREADS=false ./contrib/test_jenkins.sh
452+
parallel: false
453+
onfail: |
454+
./.ci/artifacts.sh
455+
archiveArtifacts-onfail: |
456+
jenkins/**/arch-*.tar.gz,
457+
jenkins/**/vg/*valgrind*.log
458+
459+
- name: Valgrind (Worker thread mode)
460+
enable: ${do_valgrind}
461+
containerSelector:
462+
- "{name: 'vg-worker-threads'}"
463+
agentSelector:
464+
- "{nodeLabel: 'skip-agent'}"
465+
run: |
466+
[ "x${do_valgrind}" == "xtrue" ] && action=yes || action=no
467+
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_vg=${action} WORKER_THREADS=true ./contrib/test_jenkins.sh
436468
parallel: false
437469
onfail: |
438470
./.ci/artifacts.sh

contrib/jenkins_tests/vg.sh

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,24 @@ 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_MEMORY_LIMIT=256MB 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"
60+
test_params="--nonblocked"
61+
else
62+
echo "Testing mode: R2C"
63+
test_list="tcp:--tcp udp:"
64+
test_params=""
65+
fi
5466

5567
if [ $(command -v $test_app_path >/dev/null 2>&1 || echo $?) ]; then
5668
test_app_path=sockperf
@@ -92,10 +104,11 @@ for test_link in $test_ip_list; do
92104
--undef-value-errors=yes --track-fds=yes --num-callers=32 \
93105
--fullpath-after=${WORKSPACE} --gen-suppressions=all \
94106
--suppressions=${WORKSPACE}/contrib/valgrind/valgrind_xlio.supp \
107+
--fair-sched=yes \
95108
"
96-
eval "${sudo_cmd} $timeout_exe env $test_lib_env LD_PRELOAD=$test_lib \
109+
eval "${sudo_cmd} $timeout_exe env $test_lib_env \
97110
${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 &"
111+
$test_app_path sr ${test_opt} -i ${test_ip} ${test_params} 2>&1 | tee ${vg_dir}/${test_name}-output-sr.log &"
99112

100113
wait=0
101114
while [ $wait -lt $sockperf_max_wait ]; do
@@ -108,9 +121,9 @@ for test_link in $test_ip_list; do
108121
sleep 2
109122
done
110123

111-
eval "${sudo_cmd} $timeout_exe_short env $test_lib_env LD_PRELOAD=$test_lib \
124+
eval "${sudo_cmd} $timeout_exe_short env $test_lib_env \
112125
${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 | tee ${vg_dir}/${test_name}-output-cl.log"
126+
$test_app_path pp ${test_opt} -i ${test_ip} -t 10 ${test_params} | tee ${vg_dir}/${test_name}-output-cl.log"
114127

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

0 commit comments

Comments
 (0)