Skip to content

Commit 1f3f0cd

Browse files
committed
ACVP: Filter unsupported functions from test cases
The previous encapDecap-file gate only loaded the file when all four sub-functions (encapsulation, decapsulation, encapsulationKeyCheck, decapsulationKeyCheck) were compiled in. Under encaps-only, decaps-only, keygen-encaps, and keygen-decaps configurations that skipped the entire prompt file, so ACVP reported OK while driving zero test cases through the binary. This commit intead loads the encapDecap file whenever _any_ of its sub-functions are supported, and drops unsupported test cases via a filter that mutates both the prompt and the expectedResults data consistently. This mirrors the filter_test_cases machinery introduced for the same reason in mldsa-native (PR #1140). Reduced-API runs also now emit a labelled stderr summary block after "ALL GOOD!" for both whole-prompt skips and per-test drops, so coverage gaps aren't buried in scrollback. Full-API runs stay silent. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
1 parent 7813dd1 commit 1f3f0cd

27 files changed

Lines changed: 95 additions & 42 deletions

File tree

examples/basic_deterministic/mlkem_native/mlkem_native_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@
151151
*/
152152
/* #define MLK_CONFIG_NO_DECAPS_API */
153153

154-
155154
/**
156155
* MLK_CONFIG_NO_RANDOMIZED_API
157156
*

examples/bring_your_own_fips202/mlkem_native/mlkem_native_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@
151151
*/
152152
/* #define MLK_CONFIG_NO_DECAPS_API */
153153

154-
155154
/**
156155
* MLK_CONFIG_NO_RANDOMIZED_API
157156
*

examples/bring_your_own_fips202_static/mlkem_native/mlkem_native_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152
*/
153153
/* #define MLK_CONFIG_NO_DECAPS_API */
154154

155-
156155
/**
157156
* MLK_CONFIG_NO_RANDOMIZED_API
158157
*

examples/custom_backend/mlkem_native/mlkem_native_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@
153153
*/
154154
/* #define MLK_CONFIG_NO_DECAPS_API */
155155

156-
157156
/**
158157
* MLK_CONFIG_NO_RANDOMIZED_API
159158
*

examples/monolithic_build/mlkem_native/mlkem_native_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@
150150
*/
151151
/* #define MLK_CONFIG_NO_DECAPS_API */
152152

153-
154153
/**
155154
* MLK_CONFIG_NO_RANDOMIZED_API
156155
*

examples/monolithic_build_multilevel/mlkem_native/mlkem_native_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152
*/
153153
/* #define MLK_CONFIG_NO_DECAPS_API */
154154

155-
156155
/**
157156
* MLK_CONFIG_NO_RANDOMIZED_API
158157
*

examples/monolithic_build_multilevel_native/mlkem_native/mlkem_native_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@
156156
*/
157157
/* #define MLK_CONFIG_NO_DECAPS_API */
158158

159-
160159
/**
161160
* MLK_CONFIG_NO_RANDOMIZED_API
162161
*

examples/monolithic_build_native/mlkem_native/mlkem_native_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@
150150
*/
151151
/* #define MLK_CONFIG_NO_DECAPS_API */
152152

153-
154153
/**
155154
* MLK_CONFIG_NO_RANDOMIZED_API
156155
*

examples/multilevel_build/mlkem_native/mlkem_native_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@
151151
*/
152152
/* #define MLK_CONFIG_NO_DECAPS_API */
153153

154-
155154
/**
156155
* MLK_CONFIG_NO_RANDOMIZED_API
157156
*

examples/multilevel_build_native/mlkem_native/mlkem_native_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@
153153
*/
154154
/* #define MLK_CONFIG_NO_DECAPS_API */
155155

156-
157156
/**
158157
* MLK_CONFIG_NO_RANDOMIZED_API
159158
*

0 commit comments

Comments
 (0)