diff options
author | David Benjamin <davidben@chromium.org> | 2015-05-11 22:58:08 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-05-12 00:44:36 +0300 |
commit | 5c694e3fef39ac4c2d23fcaec38fc38836bb2472 (patch) | |
tree | 1a1d92049fb35ee1bf88efe55a151c3835abd786 /util | |
parent | 074e3d2dfd51b6e7fe51968cd7b6685591b8eda4 (diff) |
Add evp_test, loosely based on upstream's version.
This imports the EVP_PKEY test data of upstream's evptests.txt, but
modified to fit our test framework and with a new test driver. The
remainder of the test data will be imported separately into aead_test
and cipher_test.
Some minor changes to the test format were made to account for test
framework differences. One test has different results since we don't
support RSA signatures with omitted (rather than NULL) parameters.
Otherwise, the biggest difference in test format is that the ad-hoc
result strings are replaced with checking ERR_peek_error.
Change-Id: I758869abbeb843f5f2ac6c1cbd87333baec08ec3
Reviewed-on: https://boringssl-review.googlesource.com/4703
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/all_tests.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/util/all_tests.go b/util/all_tests.go index 87af0248..91822d15 100644 --- a/util/all_tests.go +++ b/util/all_tests.go @@ -75,6 +75,8 @@ var tests = []test{ {"crypto/ecdsa/ecdsa_test"}, {"crypto/err/err_test"}, {"crypto/evp/evp_extra_test"}, + {"crypto/evp/evp_test", "crypto/evp/evp_tests.txt"}, + {"crypto/evp/evp_test", "crypto/hmac/hmac_tests.txt"}, {"crypto/evp/pbkdf_test"}, {"crypto/hkdf/hkdf_test"}, {"crypto/hmac/hmac_test", "crypto/hmac/hmac_tests.txt"}, @@ -184,13 +186,13 @@ func runTest(test test) (passed bool, err error) { return false, nil } -// shortTestName returns the short name of a test. It assumes that any argument -// which ends in .txt is a path to a data file and not relevant to the test's -// uniqueness. +// shortTestName returns the short name of a test. Except for evp_test, it +// assumes that any argument which ends in .txt is a path to a data file and not +// relevant to the test's uniqueness. func shortTestName(test test) string { var args []string for _, arg := range test { - if !strings.HasSuffix(arg, ".txt") { + if test[0] == "crypto/evp/evp_test" || !strings.HasSuffix(arg, ".txt") { args = append(args, arg) } } |