summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/mlkem/parse_test_file.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* parse_test_file()tb13 days1-1/+3
| | | | | | gcc 14 needs a hint that ld != NULL beyond the use of ld->data in the previous line. I guess aggressive inlining is becoming too aggressive. What a pile of junk.
* parse test file: add helper to skip to end of linetb2024-12-271-8/+12
|
* mlkem tests: whitespace tweak and fix an error messagetb2024-12-261-5/+7
|
* Overhaul ML-KEM regress once moretb2024-12-261-0/+752
Implement a file parser that drives a state machine to extract the test data from the .txt files and manages the parsed data. Comments and empty lines are ignored. The code currently assumes that instruction lines are at the start of the file (which isn't generally true) and only supports two line types for now. This is good enough for all the ML-KEM tests but should be easy enough to extend. Once all data for a test case is parsed in the expected order, a test handler is called which can retrieve the test data via a simple API and throw warnings and errors with information on the test case line number, etc. Merge the tests into three programs: one parsing the .txt files and running the corresponding test cases, a unit test and the iteration tests. Deduplicate the actual test code and let the caller pass in an object containing the API functions, private keys and arrays that need to be different between the 768 version and the 1024 version. This way we don't have two sets of half a dozen .c files differing only in 3 or 4 occurrences of 768 and 1024. All this will also make it a lot easier to hook these tests into portable.