From 342b9a903d459f22226633c405c03b186978660d Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Wed, 21 Dec 2022 17:41:30 +0000 Subject: [PATCH] bignum_mod_raw.py: Added a filtering logic to `BignumModRawConvertRep.generate_function_tests()` This patch introduces a hybrid approach to input_styles, and will remove the dependency requirements from test cases with `ModulusRepresentation.OPT_RED` As a result it is reducing testing input duplication. Signed-off-by: Minos Galanakis --- scripts/mbedtls_dev/bignum_mod_raw.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/mbedtls_dev/bignum_mod_raw.py b/scripts/mbedtls_dev/bignum_mod_raw.py index ebbc970e5..98605d655 100644 --- a/scripts/mbedtls_dev/bignum_mod_raw.py +++ b/scripts/mbedtls_dev/bignum_mod_raw.py @@ -140,6 +140,11 @@ class BignumModRawConvertRep(bignum_common.ModOperationCommon, for bil in cls.limb_sizes: test_object = cls(n, a, bits_in_limb=bil) test_object.set_representation(rep) + #Filters out the duplicate + if rep == bignum_common.ModulusRepresentation.OPT_RED: + test_object.dependencies= [] + if bil == 64: + continue if test_object.is_valid: yield test_object.create_test_case()