Skip to content

Commit da6540b

Browse files
committed
ACVP: Extend test script to take --version argument for acvp tests
Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
1 parent 606aa20 commit da6540b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ run_func_1024: func_1024
5050
run_func: run_func_512 run_func_768 run_func_1024
5151

5252
run_acvp: acvp
53-
python3 ./test/acvp_client.py
53+
python3 ./test/acvp_client.py $(if $(ACVP_VERSION),--version $(ACVP_VERSION))
5454

5555
func_512: $(MLKEM512_DIR)/bin/test_mlkem512
5656
$(Q)echo " FUNC ML-KEM-512: $^"

scripts/tests

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,10 @@ class Tests:
506506
if stack_flags:
507507
env_update["STACK_ANALYSIS_FLAGS"] = " ".join(stack_flags)
508508

509+
# Add ACVP version for ACVP tests
510+
if test_type == TEST_TYPES.ACVP and hasattr(self.args, "version"):
511+
env_update["ACVP_VERSION"] = self.args.version
512+
509513
env = os.environ.copy()
510514
env.update(env_update)
511515

@@ -1054,6 +1058,11 @@ def cli():
10541058
acvp_parser = cmd_subparsers.add_parser(
10551059
"acvp", help="Run ACVP client", parents=[common_parser]
10561060
)
1061+
acvp_parser.add_argument(
1062+
"--version",
1063+
default="v1.1.0.40",
1064+
help="ACVP test vector version (default: v1.1.0.40)",
1065+
)
10571066

10581067
# examples arguments
10591068
examples_parser = cmd_subparsers.add_parser(

0 commit comments

Comments
 (0)