Modify generate_errors.pl such that it can now handle
opening files where the file path includes a directory
name containing spaces.
Raised in issue #6879. Fix provided by
@tom-cosgrove-arm in aforementioned issue.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
Only remove the MBEDTLS_HAVE_INTnn dependency, not any other dependency that
might be present.
No behavior change, this is just robustness.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Explain what's going on in BignumModRawConvertRep.test_case_for_values.
Simplify the logic and the interdependencies related to limb sizes:
* Montgomery is the special case, so base the decisions on it.
* As soon as we've encountered one limb size, no matter what it is,
give up.
No behavior change, other than changing the numbering of test cases (which
previously included more skipped test cases).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
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 <minos.galanakis@arm.com>
This patch adjusts the test generating method to calculate all possible combinations for
(modulo, input, limb_sizes, representation).
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This patch adds the default representation attribute through a
setter() method in `BignumModRawConvertRep()`
It also adds standard common template properties:
symbol = ""
input_style = "arch_split"
arity = 1
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
The Montgomery representation depends on the limb size. So the
representation conversion test cases need separate 64-bit and 32-bit cases
when the representation is Montgomery.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Add a class for modulus representations (mbedtls_mpi_mod_rep_selector).
Add a method to convert a number to any representation.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
With the default input style (which is "variable"), fill all bignum test
case arguments to the same width as the modulus.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Ideally the result of the generator would conform to the code style, but
this would be difficult, especially with respect to the placement of line
breaks in long logical lines. So, to avoid surprises when checking the style
of generated files (which happens in releases and in long-time support
branches), systematically skip generated files.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Tests are refactored to generate separate cases for 32-bit and 64-bit
limbs using arch_split. Duplicate arguments and branching in the test
function is removed.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
This patch adds autogenerated inputs for the
`mpi_mod_raw_neg()` test in the bignum_mod_raw suite.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>