Skip to content

Commit 2d43ddd

Browse files
NirWolfergalnoam
authored andcommitted
[CI] issue: HPCINFRA-3931 Sockperf test Worker threads mode
Today we are running the Sockperf 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 test.sh run, running both R2C mode and worker threads mode one after the other. Signed-off-by: NirWolfer <[email protected]>
1 parent 9eacbac commit 2d43ddd

File tree

2 files changed

+47
-7
lines changed

2 files changed

+47
-7
lines changed

.ci/matrix_job.yaml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,24 @@ runs_on_dockers:
126126
- {
127127
file: '.ci/dockerfiles/Dockerfile.ubuntu22.04',
128128
arch: 'x86_64',
129-
name: 'test',
129+
name: 'sockperf',
130130
uri: 'xlio/$arch/ubuntu22.04/$name',
131-
tag: '20250219',
131+
tag: '20251015',
132+
build_args: '--no-cache --target test',
133+
category: 'tests',
134+
annotations: [{ key: 'k8s.v1.cni.cncf.io/networks', value: 'sriov-cx6dx-p1' }],
135+
limits: '{memory: 10Gi, cpu: 10000m, hugepages-2Mi: 10Gi, nvidia.com/sriov-cx6dx-p1: 1}',
136+
requests: '{memory: 10Gi, cpu: 10000m, hugepages-2Mi: 10Gi, nvidia.com/sriov-cx6dx-p1: 1}',
137+
caps_add: '[ IPC_LOCK, SYS_RESOURCE ]',
138+
runAsUser: '0',
139+
runAsGroup: '0'
140+
}
141+
- {
142+
file: '.ci/dockerfiles/Dockerfile.ubuntu22.04',
143+
arch: 'x86_64',
144+
name: 'sockperf-worker-threads',
145+
uri: 'xlio/$arch/ubuntu22.04/$name',
146+
tag: '20251015',
132147
build_args: '--no-cache --target test',
133148
category: 'tests',
134149
annotations: [{ key: 'k8s.v1.cni.cncf.io/networks', value: 'sriov-cx6dx-p1' }],
@@ -351,12 +366,27 @@ steps:
351366
- name: Test
352367
enable: ${do_test}
353368
containerSelector:
354-
- "{name: 'test'}"
369+
- "{name: 'sockperf'}"
370+
agentSelector:
371+
- "{nodeLabel: 'skip-agent'}"
372+
run: |
373+
[ "x${do_test}" == "xtrue" ] && action=yes || action=no
374+
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_run=${action} WORKER_THREADS=false ./contrib/test_jenkins.sh
375+
parallel: false
376+
onfail: |
377+
./.ci/artifacts.sh
378+
archiveArtifacts-onfail: |
379+
jenkins/**/arch-*.tar.gz
380+
381+
- name: Test (Worker thread mode)
382+
enable: ${do_test}
383+
containerSelector:
384+
- "{name: 'sockperf-worker-threads'}"
355385
agentSelector:
356386
- "{nodeLabel: 'skip-agent'}"
357387
run: |
358388
[ "x${do_test}" == "xtrue" ] && action=yes || action=no
359-
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_run=${action} ./contrib/test_jenkins.sh
389+
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_run=${action} WORKER_THREADS=true ./contrib/test_jenkins.sh
360390
parallel: false
361391
onfail: |
362392
./.ci/artifacts.sh

contrib/jenkins_tests/test.sh

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

3+
ulimit -n 50000
34
source $(dirname $0)/globals.sh
45

56
# Fix hugepages for docker environments
@@ -42,6 +43,7 @@ fi
4243

4344
test_list="tcp-pp tcp-tp tcp-ul"
4445
test_lib=$install_dir/lib/${prj_lib}
46+
WORKER_THREADS=${WORKER_THREADS:-"false"}
4547

4648
if [[ -f /.dockerenv ]] || [[ -f /run/.containerenv ]] || [[ -n "${KUBERNETES_SERVICE_HOST}" ]]; then
4749
test_ip_list_v4=$(ip -f inet addr show net1 | awk '/inet / {print $2}' | cut -d/ -f1)
@@ -70,6 +72,15 @@ fi
7072

7173
nerrors=0
7274

75+
# Enable params based on the mode choice - given by WORKER_THREADS variable
76+
if [[ "$WORKER_THREADS" = "true" ]]; then
77+
echo "Testing mode: Worker Threads"
78+
test_params='-x "--nonblocked" -e "XLIO_WORKER_THREADS=2"'
79+
else
80+
echo "Testing mode: R2C"
81+
test_params='-x "--debug" '
82+
fi
83+
7384
for test_link in ${test_ip_list}; do
7485
for test in ${test_list}; do
7586
IFS=':' read test_in test_ip <<< "$test_link"
@@ -79,9 +90,8 @@ for test_link in ${test_ip_list}; do
7990
for i in $(seq 3); do
8091
rm -fv ${test_dir}/${test_name}.log ${test_dir}/${test_name}.dump || :
8192
set +e
82-
${sudo_cmd} ${timeout_exe} ${PWD}/tests/verifier/verifier.pl -a ${test_app} -x " --debug " \
83-
-t ${test}:tc[1-9]$ -s ${test_ip} -l ${test_dir}/${test_name}.log \
84-
-e " LD_PRELOAD=${test_lib} " --progress=0
93+
${sudo_cmd} ${timeout_exe} ${PWD}/tests/verifier/verifier.pl ${test_params} -e "LD_PRELOAD=${test_lib}" \
94+
-a ${test_app} -t ${test}:tc[1-9]$ -s ${test_ip} -l ${test_dir}/${test_name}.log --progress=0
8595
# make sure to catch the error
8696
ret=$?
8797
set -e

0 commit comments

Comments
 (0)