Skip to content

Commit b35aa57

Browse files
committed
CI: Disable namespace checking when asan is enabled
With the update to clang16, we see some CI failures on MacOS when our namespace checking script is used in combination with address sanitizer as asan inserts some symbols which are then not appropriately namespaced. This commit adds a configuration option to functest and multi-functests that allows disabling the namespacing check. This check is then disabled for the offending workflows where asan is used. Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
1 parent 1edd506 commit b35aa57

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

.github/actions/functest/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ inputs:
4646
examples:
4747
description: Determine whether to run examples or not
4848
default: "true"
49+
check_namespace:
50+
description: Determine whether to check namespacing or not
51+
default: "true"
4952
runs:
5053
using: composite
5154
steps:
@@ -95,6 +98,7 @@ runs:
9598
make clean
9699
./scripts/tests all --exec-wrapper="${{ inputs.exec_wrapper }}" --cross-prefix="${{ inputs.cross_prefix }}" --cflags="${{ inputs.cflags }}" --opt=${{ inputs.opt }} --${{ env.FUNC }} --${{ env.KAT }} --${{ env.NISTKAT }} --${{ env.ACVP }} --${{ env.EXAMPLES }} -v
97100
- name: Check namespacing ${{ env.MODE }} ${{ inputs.opt }} tests (${{ env.FUNC }}, ${{ env.KAT }}, ${{ env.NISTKAT }}, ${{ env.EXAMPLES }})
101+
if: ${{ inputs.check_namespace == 'true' }}
98102
shell: ${{ env.SHELL }}
99103
run: |
100104
./scripts/check-namespace

.github/actions/multi-functest/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ inputs:
4343
examples:
4444
description: Determine whether to run examples or not
4545
default: "true"
46+
check_namespace:
47+
description: Determine whether to check namespacing or not
48+
default: "true"
4649
runs:
4750
using: composite
4851
steps:
@@ -62,6 +65,7 @@ runs:
6265
nistkat: ${{ inputs.nistkat }}
6366
acvp: ${{ inputs.acvp }}
6467
examples: ${{ inputs.examples }}
68+
check_namespace: ${{ inputs.check_namespace }}
6569
- name: Cross x86_64 Tests
6670
if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'cross-x86_64') && (success() || failure()) }}
6771
uses: ./.github/actions/functest
@@ -80,6 +84,7 @@ runs:
8084
nistkat: ${{ inputs.nistkat }}
8185
acvp: ${{ inputs.acvp }}
8286
examples: ${{ inputs.examples }}
87+
check_namespace: ${{ inputs.check_namespace }}
8388
- name: Cross aarch64 Tests
8489
if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'cross-aarch64') && (success() || failure()) }}
8590
uses: ./.github/actions/functest
@@ -98,6 +103,7 @@ runs:
98103
nistkat: ${{ inputs.nistkat }}
99104
acvp: ${{ inputs.acvp }}
100105
examples: ${{ inputs.examples }}
106+
check_namespace: ${{ inputs.check_namespace }}
101107
- name: Cross aarch64_be Tests
102108
if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'cross-aarch64_be') && (success() || failure()) }}
103109
uses: ./.github/actions/functest
@@ -116,6 +122,7 @@ runs:
116122
nistkat: ${{ inputs.nistkat }}
117123
acvp: ${{ inputs.acvp }}
118124
examples: ${{ inputs.examples }}
125+
check_namespace: ${{ inputs.check_namespace }}
119126
- name: Cross riscv64 Tests
120127
if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'cross-riscv64') && (success() || failure()) }}
121128
uses: ./.github/actions/functest
@@ -134,3 +141,4 @@ runs:
134141
nistkat: ${{ inputs.nistkat }}
135142
acvp: ${{ inputs.acvp }}
136143
examples: ${{ inputs.examples }}
144+
check_namespace: ${{ inputs.check_namespace }}

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ jobs:
110110
gh_token: ${{ secrets.GITHUB_TOKEN }}
111111
compile_mode: native
112112
cflags: "-DMLKEM_DEBUG -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
113+
check_namespace: 'false'
113114
backend_tests:
114115
name: AArch64 FIPS202 backends (${{ matrix.backend }})
115116
strategy:
@@ -129,6 +130,7 @@ jobs:
129130
opt: 'opt'
130131
examples: 'false'
131132
cflags: "-DMLKEM_DEBUG -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -DMLK_FORCE_AARCH64 -DMLK_FIPS202_BACKEND_FILE=\\\\\\\"fips202/native/aarch64/${{ matrix.backend }}.h\\\\\\\""
133+
check_namespace: 'false'
132134
compiler_tests:
133135
name: Compiler tests (${{ matrix.compiler.name }}, ${{ matrix.target.name }})
134136
strategy:

0 commit comments

Comments
 (0)