test.c: Improved testing#10404
Open
SparkiDev wants to merge 1 commit intowolfSSL:masterfrom
Open
Conversation
70ded0a to
f6b2b20
Compare
Top-level test extraction into typed sub-functions - Digest tests (MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256, SHA-3 224/256/384/512, SHAKE128/256): each test category (KAT, large-hash, copy-cleanup, unaligned-memory, interleave, copy-Sha3 heap-allocation pattern) is now its own static wc_test_ret_t function rather than inline blocks inside one giant top-level test. - rsa_test: extracted rsa_pkcs1_test, rsa_cert_parse_test, rsa_pub_key_decode_test, rsa_certreq_test. - ecc_test: extracted ecc_test_all_curves, ecc_test_all_deterministic_k from the dispatcher; ecc_encrypt_combos_test from ecc_encrypt_test; ecc_buffers_encrypt_test, ecc_buffers_sign_verify_test, ecc_buffers_pub_key_decode_test from ecc_test_buffers. - dh_test: extracted dh_keyagree_test, dh_check_priv_key_test, dh_agree_ct_test, dh_key_import_export_test, dh_set_check_key_test. - Curve25519 / Ed25519 / Curve448 / Ed448: extracted KAT, key-agreement, ASN, and rare-sig sub-tests from each top-level dispatcher. - Cipher tests: extracted streaming sub-tests from aesofb_test, aescfb_test, aes_cts_test (aes_cts_192/256_stream_test). Coverage additions - Added state-copy testing inside the SHA-3 KAT loops (matching the existing pattern in SHA-1/224/256/etc. KAT loops). - Added a SHA-224 large-hash test (parity with the other digest families). - Added copy-cleanup tests for SHA-512/224 and SHA-512/256. - Added Unaligned memory access testing to all *_large_hash_test functions (MD5, SHA-1/224/256/384, SHA3-224/256/384/512), matching the pattern that previously only existed for SHA-512/224/256.
f6b2b20 to
ff828a5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Top-level test extraction into typed sub-functions
SHA-512/224, SHA-512/256, SHA-3 224/256/384/512, SHAKE128/256): each
test category (KAT, large-hash, copy-cleanup, unaligned-memory,
interleave, copy-Sha3 heap-allocation pattern) is now its own static
wc_test_ret_t function rather than inline blocks inside one giant
top-level test.
rsa_pub_key_decode_test, rsa_certreq_test.
from the dispatcher; ecc_encrypt_combos_test from ecc_encrypt_test;
ecc_buffers_encrypt_test, ecc_buffers_sign_verify_test,
ecc_buffers_pub_key_decode_test from ecc_test_buffers.
dh_agree_ct_test, dh_key_import_export_test, dh_set_check_key_test.
ASN, and rare-sig sub-tests from each top-level dispatcher.
aescfb_test, aes_cts_test (aes_cts_192/256_stream_test).
Coverage additions
Testing
/configure --disable-shared --enable-all --enable-aescts