This document is an overview of the Mbed TLS test framework and test tools.
This document is incomplete. You can help by expanding it.
See https://mbed-tls.readthedocs.io/en/latest/kb/development/test_suites
Each test case has a description which succinctly describes for a human audience what the test does. The first non-comment line of each paragraph in a .data file is the test description. The following rules and guidelines apply:
generate_test_code.py, outcome file tools) simple..data file. If you can't think of a better description, the convention is to append #1, #2, etc. tests/scripts/check_test_cases.py enforces some rules and warns if some guidelines are violated.
Each test case in ssl-opt.sh has a description which succinctly describes for a human audience what the test does. The test description is the first parameter to run_test.
The same rules and guidelines apply as for unit test descriptions. In addition, the description must be written on the same line as run_test, in double quotes, for the sake of check_test_cases.py.
Each test case in compat.sh has a description which succinctly describes for a human audience what the test does. The test description is $TITLE defined in run_client.
The same rules and guidelines apply as for unit test descriptions. In addition, failure cause in compat.sh is not classified as ssl-opt.sh, so the information of failed log files are followed as prompt.
Unit tests, ssl-opt.sh and compat.sh record the outcome of each test case in a test outcome file. This feature is enabled if the environment variable MBEDTLS_TEST_OUTCOME_FILE is set. Set it to the path of the desired file.
If you run all.sh --outcome-file test-outcome.csv, this collects the outcome of all the test cases in test-outcome.csv.
The outcome file is in a CSV format using ; (semicolon) as the delimiter and no quoting. This means that fields may not contain newlines or semicolons. There is no title line.
The outcome file has 6 fields:
Linux-x86_64 or Linux-x86_64-gcc7-msan.config.h).test_suite_xxx, ssl-opt or compat.PASS, SKIP or FAIL.