Skip to content

Commit aa7c7f9

Browse files
committed
Fixes #1750: Added asan and tsan to the new arm64 runner
1 parent ae8a8a2 commit aa7c7f9

12 files changed

+149
-316
lines changed

.github/workflows/build.yaml

Lines changed: 10 additions & 171 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
strategy:
5353
fail-fast: false
5454
matrix:
55-
os: [ubuntu-24.04]
55+
os: [ubuntu-24.04, ubuntu-24.04-arm]
5656
buildType: [Debug, RelWithDebInfo]
5757
runtimeCheck: [asan, tsan]
5858
protonGitRef:
@@ -140,13 +140,6 @@ jobs:
140140
- name: Create Build and Install directories
141141
run: mkdir -p "${ProtonBuildDir}" "${RouterBuildDir}" "${InstallPrefix}"
142142

143-
- name: Setup python
144-
uses: actions/setup-python@v5
145-
with:
146-
python-version: 3.9
147-
architecture: x64
148-
check-latest: true
149-
150143
- name: Install Linux build dependencies
151144
run: |
152145
sudo apt update; sudo apt install -y libdw-dev swig libpython3-dev libsasl2-dev libjsoncpp-dev libwebsockets-dev libnghttp2-dev ccache ninja-build pixz libbenchmark-dev nginx libunwind-dev
@@ -178,8 +171,8 @@ jobs:
178171
cmake "${{github.workspace}}/skupper-router" \
179172
"-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" \
180173
"-DCMAKE_BUILD_TYPE=${BuildType}" \
181-
"-DPYTHON_TEST_COMMAND='-m;pytest;-vs;--timeout=400;--junit-prefix=pytest.\${py_test_module};--junit-xml=junitxmls/\${py_test_module}.xml;--pyargs;\${py_test_module}'" \
182-
"-DPYTHON_TEST_COMMAND='-m;pytest;-vs;--timeout=400;--junit-prefix=pytest.\${py_test_module};--junit-xml=junitxmls/\${py_test_module}.xml;--pyargs;\${py_test_module}'" \
174+
"-DPYTHON_TEST_COMMAND='-m;pytest;-vs;--timeout=500;--junit-prefix=pytest.\${py_test_module};--junit-xml=junitxmls/\${py_test_module}.xml;--pyargs;\${py_test_module}'" \
175+
"-DPYTHON_TEST_COMMAND='-m;pytest;-vs;--timeout=500;--junit-prefix=pytest.\${py_test_module};--junit-xml=junitxmls/\${py_test_module}.xml;--pyargs;\${py_test_module}'" \
183176
"-GNinja" \
184177
${RouterCMakeExtraArgs}
185178
@@ -221,7 +214,7 @@ jobs:
221214
strategy:
222215
fail-fast: false
223216
matrix:
224-
os: [ubuntu-24.04]
217+
os: [ubuntu-24.04, ubuntu-24.04-arm]
225218
buildType: [Debug, RelWithDebInfo]
226219
runtimeCheck: [asan, tsan]
227220
protonGitRef:
@@ -267,13 +260,6 @@ jobs:
267260
with:
268261
name: skupper_router_wrk_${{env.JOB_IDENTIFIER}}
269262

270-
- name: Setup python
271-
uses: actions/setup-python@v5
272-
with:
273-
python-version: 3.9
274-
architecture: x64
275-
check-latest: true
276-
277263
- name: Install Linux runtime/test dependencies
278264
run: |
279265
sudo apt update; sudo apt install -y libdw1 libsasl2-2 libsasl2-modules sasl2-bin libjsoncpp25 libwebsockets19t64 libbenchmark1.8.3 pixz curl ncat gdb elfutils findutils file python3-dbg
@@ -293,163 +279,17 @@ jobs:
293279
sudo sysctl -w kernel.core_pattern="coredump.%e.%p"
294280
ulimit -c unlimited
295281
sudo sysctl -w vm.mmap_rnd_bits=28
296-
ctest --timeout 1200 -V --output-junit Testing/Test.xml --no-compress-output -I ${{matrix.shard}},,${{matrix.shards}} -j12 ${{env.RouterCTestExtraArgs}}
297-
298-
- name: Report coredump stacktraces (if any tests failed)
299-
if: ${{ failure() }}
300-
run: |
301-
find -name 'coredump*' -exec ${{github.workspace}}/skupper-router/scripts/gha_analyze_coredump.sh {} \;
302-
303-
- name: Upload test results
304-
uses: actions/upload-artifact@v4
305-
if: ${{ ! cancelled() }}
306-
with:
307-
name: Test_Results_${{env.JOB_IDENTIFIER}}_${{matrix.shard}}
308-
path: ${{env.RouterBuildDir}}/tests/junitxmls/*.xml
309-
310-
- name: Delete logs from passing tests
311-
if: ${{ failure() }}
312-
continue-on-error: true
313-
run: python3 ${{github.workspace}}/skupper-router/scripts/gha_purge_successful_test_logs.py --build-dir=${{env.RouterBuildDir}} --no-dry-run
314-
315-
- name: Upload log files (if any tests failed)
316-
uses: actions/upload-artifact@v4
317-
if: failure()
318-
with:
319-
name: testLogs_${{env.JOB_IDENTIFIER}}_${{matrix.shard}}
320-
path: |
321-
${{env.RouterBuildDir}}/tests
322-
323-
- name: Upload core files (if any)
324-
uses: actions/upload-artifact@v4
325-
if: failure()
326-
with:
327-
name: cores_${{env.JOB_IDENTIFIER}}_${{matrix.shard}}
328-
path: |
329-
**/coredump*
330-
331-
332-
####################
333-
### ARM runner ###
334-
####################
335-
336-
compile_and_test_pi5:
337-
name: "Compile and Test on ubuntu-24.04-arm"
338-
runs-on: ubuntu-24.04-arm
339-
env:
340-
CC: 'gcc-12'
341-
CXX: 'g++-12'
342-
BuildType: RelWithDebInfo
343-
ProtonBuildDir: ${{github.workspace}}/qpid-proton/build
344-
RouterBuildDir: ${{github.workspace}}/skupper-router/build
345-
InstallPrefix: ${{github.workspace}}/install
346-
VERBOSE: 1
347-
protonRepository: "${{ github.event.inputs.protonRepository || 'apache/qpid-proton' }}"
348-
protonBranch: "${{ github.event.inputs.protonBranch || 'main' }}"
349-
ProtonCMakeExtraArgs: >
350-
-DCMAKE_C_COMPILER_LAUNCHER=ccache
351-
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
352-
-DBUILD_BINDINGS=python
353-
-DPython_EXECUTABLE=/usr/bin/python3
354-
-DBUILD_TOOLS=OFF
355-
-DBUILD_EXAMPLES=OFF
356-
-DBUILD_TESTING=OFF
357-
-DENABLE_FUZZ_TESTING=OFF
358-
-DRUNTIME_CHECK=OFF
359-
-DBUILD_TLS=ON
360-
RouterCMakeExtraArgs: >
361-
-DCMAKE_C_COMPILER_LAUNCHER=ccache
362-
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
363-
-DPython_EXECUTABLE=/usr/bin/python3
364-
-DRUNTIME_CHECK=OFF
365-
-DENABLE_PROFILE_GUIDED_OPTIMIZATION=OFF
366-
steps:
367-
- uses: actions/checkout@v4
368-
with:
369-
repository: ${{ env.protonRepository }}
370-
ref: main
371-
path: 'qpid-proton'
372-
- uses: actions/checkout@v4
373-
with:
374-
path: 'skupper-router'
375-
- name: Install Linux build dependencies
376-
run: |
377-
sudo apt update; sudo apt install -y flake8 mypy pylint python3-qpid-proton libpython3-dev ninja-build ccache libwebsockets-dev libnghttp2-dev nginx python3-build python3-cffi python3-pip python3-setuptools python3-wheel tox
378-
# https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
379-
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files
380-
- name: Prepare ccache timestamp
381-
id: ccache_cache_timestamp
382-
shell: cmake -P {0}
383-
run: |
384-
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
385-
file(APPEND "$ENV{GITHUB_OUTPUT}" "timestamp=${current_date}")
386-
- uses: actions/cache@v4
387-
env:
388-
cache-name: cache-ccache
389-
with:
390-
path: .ccache
391-
key: ${{ github.workflow }}-main-${{ env.cache-name }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
392-
restore-keys: |
393-
${{ github.workflow }}-main-${{ env.cache-name }}
394-
395-
- name: Create Build and Install directories
396-
run: mkdir -p "${ProtonBuildDir}" "${RouterBuildDir}" "{InstallPrefix}"
397-
398-
- name: Zero ccache stats
399-
run: ccache -z
400-
401-
- name: qpid-proton cmake configure
402-
working-directory: ${{env.ProtonBuildDir}}
403-
run: >
404-
cmake "${{github.workspace}}/qpid-proton" \
405-
"-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" \
406-
"-DCMAKE_BUILD_TYPE=${BuildType}" \
407-
${ProtonCMakeExtraArgs}
408-
409-
- name: qpid-proton cmake build/install
410-
run: cmake --build "${ProtonBuildDir}" --config ${BuildType} --target install --parallel 2
411-
412-
- name: Display ccache stats
413-
run: ccache -s
414-
415-
- name: skupper-router cmake configure
416-
working-directory: ${{env.RouterBuildDir}}
417-
run: |
418-
cmake "${{github.workspace}}/skupper-router" \
419-
"-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" \
420-
"-DCMAKE_BUILD_TYPE=${BuildType}" \
421-
"-DPYTHON_TEST_COMMAND='-m;pytest;-vs;--timeout=400;--junit-prefix=pytest.\${py_test_module};--junit-xml=junitxmls/\${py_test_module}.xml;--pyargs;\${py_test_module}'" \
422-
${RouterCMakeExtraArgs}
423-
424-
- name: skupper-router cmake build/install
425-
run: cmake --build "${RouterBuildDir}" --config ${BuildType} --target install --parallel 6
426-
427-
- name: Install Python runtime/test dependencies
428-
run: python3 -m pip install --break-system-packages -r ${{github.workspace}}/skupper-router/requirements-dev.txt
429-
430-
- name: Install Linux runtime/test dependencies
431-
run: |
432-
sudo apt update; sudo apt install -y libdw1 libsasl2-2 libsasl2-modules sasl2-bin libjsoncpp25 pixz curl libwebsockets-dev ncat gdb elfutils findutils file python3-dbg
433-
434-
- name: install qpid-proton python wheel
435-
run: python3 -m pip install --break-system-packages $(find ${ProtonBuildDir}/python/dist -name 'python_qpid_proton*.whl')
436-
437-
- name: CTest
438-
working-directory: ${{env.RouterBuildDir}}
439-
run: |
440-
ulimit -c unlimited
441-
threads=4
442-
ctest --timeout 1200 -V --output-junit Testing/Test.xml --output-on-failure --no-compress-output -j${threads}
282+
if [[ ${{ matrix.runtimeCheck == 'asan'}} ]] && [[ ${{ matrix.os == 'ubuntu-24.04-arm'}} ]]; then
283+
echo "SKIP_HTTP_METRICS_TEST=true" >> $GITHUB_ENV
284+
export SKIP_HTTP_METRICS_TEST="true"
285+
fi
286+
ctest --timeout 1300 -V --output-junit Testing/Test.xml --no-compress-output -I ${{matrix.shard}},,${{matrix.shards}} -j12 ${{env.RouterCTestExtraArgs}}
443287
444288
- name: Report coredump stacktraces (if any tests failed)
445289
if: ${{ failure() }}
446290
run: |
447291
find -name 'coredump*' -exec ${{github.workspace}}/skupper-router/scripts/gha_analyze_coredump.sh {} \;
448292
449-
- name: Dump dmesg (on failure)
450-
if: ${{ failure() }}
451-
run: dmesg
452-
453293
- name: Upload test results
454294
uses: actions/upload-artifact@v4
455295
if: ${{ ! cancelled() }}
@@ -478,7 +318,6 @@ jobs:
478318
path: |
479319
**/coredump*
480320
481-
482321
####################
483322
### Fedora Tests ###
484323
####################
@@ -802,7 +641,7 @@ jobs:
802641
threads=6
803642
fi
804643
805-
ctest --timeout 1200 -V --output-junit Testing/Test.xml --output-on-failure --no-compress-output -I ${{matrix.shard}},,${{matrix.shards}} -j${threads} ${{env.RouterCTestExtraArgs}}
644+
ctest --timeout 1300 -V --output-junit Testing/Test.xml --output-on-failure --no-compress-output -I ${{matrix.shard}},,${{matrix.shards}} -j${threads} ${{env.RouterCTestExtraArgs}}
806645
807646
- name: Process C Coverage
808647
if: ${{ !cancelled() && matrix.buildType == 'Coverage' }}

tests/message_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def __init__(self, receiver_host, sender_host, address):
246246

247247
self.logger = Logger()
248248

249-
self.normal_count = 300
249+
self.normal_count = 150
250250
self.extra_count = 50
251251
self.n_rcvd = 0
252252
self.n_sent = 0
@@ -512,7 +512,7 @@ def __init__(self, receiver1_host, receiver2_host, receiver3_host,
512512
self.received_all = False
513513

514514
if self.large_msg:
515-
self.body = "0123456789101112131415" * 5000
515+
self.body = "0123456789101112131415" * 2500
516516
self.properties = {'big field': 'X' * 3200}
517517

518518
def on_released(self, event):

tests/system_tests_distribution.py

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,7 @@ def test_14_multicast_linear(self):
630630
self.A_addr,
631631
self.B_addr,
632632
self.C_addr,
633-
"addr_14"
634-
)
633+
"addr_14")
635634
test.run()
636635
self.assertIsNone(test.error)
637636

@@ -1389,8 +1388,7 @@ def __init__(self,
13891388
router_1,
13901389
router_2,
13911390
router_3,
1392-
addr_suffix
1393-
):
1391+
addr_suffix):
13941392
super(MulticastTest, self).__init__(prefetch=0)
13951393
self.error = None
13961394
self.router_1 = router_1
@@ -1399,7 +1397,7 @@ def __init__(self,
13991397
self.addr_suffix = addr_suffix
14001398
self.dest = "multicast/" + addr_suffix
14011399

1402-
self.n_to_send = 100
1400+
self.n_to_send = 50
14031401
self.n_sent = 0
14041402

14051403
self.n_received = 0
@@ -1411,6 +1409,18 @@ def __init__(self,
14111409
self.count_3_a = 0
14121410
self.count_3_b = 0
14131411

1412+
self.timer = None
1413+
self.send_cnx = None
1414+
self.cnx_1 = None
1415+
self.cnx_2 = None
1416+
self.cnx_3 = None
1417+
self.recv_1_a = None
1418+
self.recv_1_b = None
1419+
self.recv_2_a = None
1420+
self.recv_2_b = None
1421+
self.recv_3_a = None
1422+
self.recv_3_b = None
1423+
14141424
self.addr_check_timer = None
14151425
self.addr_check_receiver = None
14161426
self.addr_check_sender = None
@@ -1477,17 +1487,12 @@ def on_link_opened(self, event):
14771487
def on_sendable(self, event):
14781488
if self.sender and self.n_sent < self.n_to_send :
14791489
msg = Message(body="Hello, closest.",
1480-
address=self.dest
1481-
)
1490+
address=self.dest)
14821491
dlv = self.sender.send(msg)
14831492
self.n_sent += 1
14841493
dlv.settle()
14851494

14861495
def on_message(self, event):
1487-
1488-
# if self.bailed is True :
1489-
# return
1490-
14911496
if event.receiver == self.addr_check_receiver:
14921497
# This is a response to one of my address-readiness checking messages.
14931498
response = self.addr_checker.parse_address_query_response(event.message)
@@ -1505,7 +1510,7 @@ def on_message(self, event):
15051510
else:
15061511
# If the latest check did not find the link-attack route ready,
15071512
# schedule another check a little while from now.
1508-
self.addr_check_timer = event.reactor.schedule(0.25, AddressCheckerTimeout(self))
1513+
self.addr_check_timer = event.reactor.schedule(1, AddressCheckerTimeout(self))
15091514
else :
15101515
# This is a payload message.
15111516
self.n_received += 1

tests/system_tests_edge_router1.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ def spawn_receiver(self, router, count, address, expect=None):
10591059
"-d"]
10601060
self._container_index += 1
10611061
env = dict(os.environ, PN_TRACE_FRM="1")
1062-
return self.popen(cmd, expect=expect, env=env)
1062+
return self.popen(cmd, expect=expect, env=env, abort=True)
10631063

10641064
def spawn_sender(self, router, count, address, expect=None, size=None):
10651065
if expect is None:
@@ -1075,7 +1075,7 @@ def spawn_sender(self, router, count, address, expect=None, size=None):
10751075
"-d"]
10761076
self._container_index += 1
10771077
env = dict(os.environ, PN_TRACE_FRM="1")
1078-
return self.popen(cmd, expect=expect, env=env)
1078+
return self.popen(cmd, expect=expect, env=env, abort=True)
10791079

10801080
def spawn_clogger(self, router, count, address,
10811081
size, pause_ms, expect=None):
@@ -1089,7 +1089,7 @@ def spawn_clogger(self, router, count, address,
10891089
"-D",
10901090
"-P", str(pause_ms)]
10911091
env = dict(os.environ, PN_TRACE_FRM="1")
1092-
return self.popen(cmd, expect=expect, env=env)
1092+
return self.popen(cmd, expect=expect, env=env, abort=True)
10931093

10941094
def _streaming_test(self, address):
10951095

@@ -1326,7 +1326,6 @@ def test_13_streaming_balanced_parallel(self):
13261326
self.EB1.wait_address("balanced/test-address", subscribers=2)
13271327

13281328
# this will block one of the above receivers with a streaming message
1329-
13301329
clogger = self.spawn_clogger(self.EA1,
13311330
count=0,
13321331
address="balanced/test-address",
@@ -1350,11 +1349,6 @@ def test_13_streaming_balanced_parallel(self):
13501349
rx.teardown()
13511350
clogger.teardown()
13521351

1353-
self._wait_address_gone(self.EA1, "balanced/test-address")
1354-
self._wait_address_gone(self.EB1, "balanced/test-address")
1355-
self._wait_address_gone(self.INT_A, "balanced/test-address")
1356-
self._wait_address_gone(self.INT_B, "balanced/test-address")
1357-
13581352

13591353
if __name__ == '__main__':
13601354
unittest.main(main_module())

0 commit comments

Comments
 (0)