Skip to content

Commit 579cce3

Browse files
committed
CI: Add config variation for MLK_CONFIG_NO_RANDOMIZED_API
The deterministic-only build (MLK_CONFIG_NO_RANDOMIZED_API) had no coverage in the config-variations matrix, which is how the test_mlkem.c build regression went unnoticed. Add a "no-randomized" variation that builds and runs func, kat, acvp, wycheproof, stack and rng_fail under the flag, mirroring the reduced-API entries. Examples are included except basic_deterministic, which already sets the flag in its own config and would otherwise trip -Wmacro-redefined. The alloc test is disabled: its exact high-watermark check assumes the randomized wrappers, whose coins buffer is absent from the deterministic-only allocation profile. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
1 parent 7a48221 commit 579cce3

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

.github/actions/config-variations/action.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ inputs:
1111
description: 'List of tests to run (space-separated IDs) or "all" for all tests. Available IDs: pct-enabled,
1212
pct-enabled-broken, custom-alloc-heap, custom-zeroize, native-cap-ON, native-cap-OFF, native-cap-ID_AA64PFR1_EL1,
1313
native-cap-CPUID_AVX2, no-asm, serial-fips202, custom-randombytes, custom-memcpy, custom-memset, custom-stdlib,
14-
nblocks-1, nblocks-2, nblocks-4, keygen-only, encaps-only, decaps-only, keygen-encaps, keygen-decaps, encaps-decaps'
14+
nblocks-1, nblocks-2, nblocks-4, keygen-only, encaps-only, decaps-only, keygen-encaps, keygen-decaps, encaps-decaps,
15+
no-randomized'
1516
required: false
1617
default: 'all'
1718
opt:
@@ -366,3 +367,26 @@ runs:
366367
rng_fail: true
367368
opt: ${{ inputs.opt }}
368369
examples: true
370+
- name: "No randomized API (deterministic only)"
371+
if: ${{ inputs.tests == 'all' || contains(inputs.tests, 'no-randomized') }}
372+
uses: ./.github/actions/multi-functest
373+
with:
374+
gh_token: ${{ inputs.gh_token }}
375+
compile_mode: native
376+
cflags: "-DMLK_CONFIG_NO_RANDOMIZED_API -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
377+
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
378+
func: true
379+
kat: true
380+
acvp: true
381+
wycheproof: true
382+
stack: true
383+
rng_fail: true
384+
opt: ${{ inputs.opt }}
385+
examples: true
386+
# basic_deterministic sets MLK_CONFIG_NO_RANDOMIZED_API in its own config,
387+
# so passing it again on the command line is a macro redefinition.
388+
extra_args: "--exclude-example basic_deterministic"
389+
# The alloc test's exact high-watermark check assumes the randomized
390+
# wrappers (which allocate the coins buffer), so it doesn't match the
391+
# deterministic-only allocation profile.
392+
alloc: false

0 commit comments

Comments
 (0)