Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a script for generating bignum tests #5921

Closed
gilles-peskine-arm opened this issue Jun 16, 2022 · 0 comments · Fixed by #6093
Closed

Create a script for generating bignum tests #5921

gilles-peskine-arm opened this issue Jun 16, 2022 · 0 comments · Fixed by #6093
Assignees
Labels
component-test Test framework and CI scripts size-s Estimated task size: small (~2d)

Comments

@gilles-peskine-arm
Copy link
Contributor

Create a script for generating unit tests in a systematic way. This is similar to tests/scripts/generate_psa_tests.py.

To start with, generate a few bignum simple test cases (into a new file test_suite_bignum.generated.data) for one or more existing test function, just to get the framework started. There will be follow-ups to generate useful bignum and crypto test cases.

Make sure that the new test data file is taken into account wherever they need to be. New data files will be added later, so call tests/scripts/generate_bignum_tests.py --list, don't hard-code the list of generated files if not absolutely necessary. Check where generate_psa_tests.py is called; generate_bignum_tests.py will likely need to be called in the same places. In particular, both with make (**/Makefile) and with CMake (**/CMakeLists.txt):

  • Building the unit test must build the new test suite.
  • Running the unit tests must run the new test suite.
  • make generated_files must generate the new data file.
  • tests/scripts/check_generated_files.sh must take the new generated file into account.
  • In 2.28, the new file must be checked into git. In development, it must be .gitignored.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-test Test framework and CI scripts size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants