aboutsummaryrefslogtreecommitdiff
path: root/test/test_test.c
AgeCommit message (Collapse)AuthorFilesLines
2022-06-27test: placate Clang's --Wbitwise-instead-of-logicalSam James1-198/+198
``` test/test_test.c:58:9: note: cast one or both operands to int to silence this warning test/test_test.c:58:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical] if (!TEST(1, TEST_uint_eq(3u, 3u)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ test/test_test.c:58:9: note: cast one or both operands to int to silence this warning ``` Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18639)
2019-08-18Fix --strict-warnings buildPatrick Steuer1-1/+1
Appease -Wstring-plus-int. Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9608)
2019-05-09Test skip option.Pauli1-0/+22
Provide C test cases with the option to skip tests and subtests. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8695)
2018-12-06Following the license change, modify the boilerplates in test/Richard Levitte1-1/+1
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7767)
2018-08-07Relocate memcmp test.Pauli1-6/+0
The CRYPTO_memcmp test isn't testing the test framework. It would seem to better belong in the sanity tests. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6878)
2018-04-03Update copyright yearMatt Caswell1-1/+1
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5851)
2018-03-27test/test_test.c: add CRYPTO_memcmp regression test.Andy Polyakov1-0/+5
Reviewed-by: Matt Caswell <matt@openssl.org>
2017-11-28Test support for time_t comparisons.Pauli1-0/+24
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4797)
2017-11-28use size_t tests instead of int onesPauli1-14/+14
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4797)
2017-08-22Use "" not <> for internal/ includesRich Salz1-1/+1
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4217)
2017-08-18Remove tests dependence on e_os.hPauli1-1/+1
Apart from ssltest_old.c, the test suite relied on e_os.h for the OSSL_NELEM macro and nothing else. The ssltest_old.c also requires EXIT and some socket macros. Create a new header to define the OSSL_NELEM macro and use that instead. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4186)
2017-07-27Update the test framework so that the need for test_main is removed. EverythingPauli1-1/+2
that needed test_main now works using the same infrastructure as tests that used register_tests. This meant: * renaming register_tests to setup_tests and giving it a success/failure return. * renaming the init_test function to setup_test_framework. * renaming the finish_test function to pulldown_test_framework. * adding a user provided global_init function that runs before the test frame work is initialised. It returns a failure indication that stops the stest. * adding helper functions that permit tests to access their command line args. * spliting the BIO initialisation and finalisation out from the test setup and teardown. * hiding some of the now test internal functions. * fix the comments in testutil.h Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3953)
2017-06-16Add output routines to allow consistent formatting of memory, stringsPauli1-0/+34
and bignums. These have been refactored into their own file, along with their error displays. The formatting follows the output format used on error, except that bignums of sixty four bits or less are displayed in a more compact one line form. Added a TEST_note function for producing output without file and line information. Update the three tests that call BN_print so they use the new test infrastructure instead. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3655)
2017-06-15Correct Oracle copyrights & clarify.Pauli1-4/+1
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3684)
2017-05-22Reformat the string output to be more in line with the decisions made in #3465Pauli1-1/+2
Don't highlight excess when comparing unequal length strings. Clean up the NULL / empty string display. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3514)
2017-05-20test/test_test.c: fix wrong BN test [and rearrange tests a little bit].Andy Polyakov1-2/+2
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3502)
2017-05-19Reformat the output of BIGNUMS where test cases fail.Pauli1-0/+44
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3465)
2017-05-09Add test_test tests for bignums.Pauli1-0/+70
Add relative tests for bignums. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3405)
2017-05-04Test framework output improvement.Pauli1-1/+29
Format the test failure output more nicely. More vertical space is used to make things a little clearer. Tests are expected to pass so this doesn't impact the normal case. Strings and memory comparisons highlight differences. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3357)
2017-05-01Fix a stack smashRich Salz1-135/+163
It occurs when memory compares are made that are larger than the on stack temporary buffers (either malloced or supplied). Rework the test test so it doesn't use a macro with a branch. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3155)
2017-04-24Adapt all test programsRichard Levitte1-1/+0
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3243)
2017-04-13Guarantee single argument evaluation for test macros.Pauli1-0/+56
Add test case that checks some of them. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3208)
2017-03-29Test infrastructure additions.Pauli1-0/+276
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3011)