aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_test.c
Commit message (Collapse)AuthorAgeFilesLines
* 4.0-POST-CLANG-FORMAT-WEBKIT4.0-POST-CLANG-FORMAT-WEBKITBob Beck2025-12-091-49/+49
| | | | | | | Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> (Merged from https://github.com/openssl/openssl/pull/29242)
* test: placate Clang's --Wbitwise-instead-of-logicalSam James2022-06-271-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 <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from https://github.com/openssl/openssl/pull/18639)
* Fix --strict-warnings buildPatrick Steuer2019-08-181-1/+1
| | | | | | | | | | Appease -Wstring-plus-int. Signed-off-by: Patrick Steuer <[email protected]> Reviewed-by: Kurt Roeckx <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from https://github.com/openssl/openssl/pull/9608)
* Test skip option.Pauli2019-05-091-0/+22
| | | | | | | Provide C test cases with the option to skip tests and subtests. Reviewed-by: Matt Caswell <[email protected]> (Merged from https://github.com/openssl/openssl/pull/8695)
* Following the license change, modify the boilerplates in test/Richard Levitte2018-12-061-1/+1
| | | | | Reviewed-by: Matt Caswell <[email protected]> (Merged from https://github.com/openssl/openssl/pull/7767)
* Relocate memcmp test.Pauli2018-08-071-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 <[email protected]> (Merged from https://github.com/openssl/openssl/pull/6878)
* Update copyright yearMatt Caswell2018-04-031-1/+1
| | | | | Reviewed-by: Richard Levitte <[email protected]> (Merged from https://github.com/openssl/openssl/pull/5851)
* test/test_test.c: add CRYPTO_memcmp regression test.Andy Polyakov2018-03-271-0/+5
| | | | Reviewed-by: Matt Caswell <[email protected]>
* Test support for time_t comparisons.Pauli2017-11-271-0/+24
| | | | | | Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Andy Polyakov <[email protected]> (Merged from https://github.com/openssl/openssl/pull/4797)
* use size_t tests instead of int onesPauli2017-11-271-14/+14
| | | | | | Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Andy Polyakov <[email protected]> (Merged from https://github.com/openssl/openssl/pull/4797)
* Use "" not <> for internal/ includesRich Salz2017-08-221-1/+1
| | | | | Reviewed-by: Richard Levitte <[email protected]> (Merged from https://github.com/openssl/openssl/pull/4217)
* Remove tests dependence on e_os.hPauli2017-08-181-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 <[email protected]> (Merged from https://github.com/openssl/openssl/pull/4186)
* Update the test framework so that the need for test_main is removed. EverythingPauli2017-07-261-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 <[email protected]> (Merged from https://github.com/openssl/openssl/pull/3953)
* Add output routines to allow consistent formatting of memory, stringsPauli2017-06-161-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 <[email protected]> Reviewed-by: Rich Salz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/3655)
* Correct Oracle copyrights & clarify.Pauli2017-06-151-4/+1
| | | | Reviewed-by: Tim Hudson <[email protected]> (Merged from https://github.com/openssl/openssl/pull/3684)
* Reformat the string output to be more in line with the decisions made in #3465Pauli2017-05-221-1/+2
| | | | | | | | | Don't highlight excess when comparing unequal length strings. Clean up the NULL / empty string display. Reviewed-by: Andy Polyakov <[email protected]> Reviewed-by: Rich Salz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/3514)
* test/test_test.c: fix wrong BN test [and rearrange tests a little bit].Andy Polyakov2017-05-211-2/+2
| | | | | Reviewed-by: Rich Salz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/3502)
* Reformat the output of BIGNUMS where test cases fail.Pauli2017-05-191-0/+44
| | | | | | Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Andy Polyakov <[email protected]> (Merged from https://github.com/openssl/openssl/pull/3465)
* Add test_test tests for bignums.Pauli2017-05-091-0/+70
| | | | | | | Add relative tests for bignums. Reviewed-by: Rich Salz <[email protected]> Reviewed-by: Richard Levitte <[email protected]> (Merged from https://github.com/openssl/openssl/pull/3405)
* Test framework output improvement.Pauli2017-05-041-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 <[email protected]> Reviewed-by: Richard Levitte <[email protected]> (Merged from https://github.com/openssl/openssl/pull/3357)
* Fix a stack smashRich Salz2017-05-011-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 <[email protected]> Reviewed-by: Rich Salz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/3155)
* Adapt all test programsRichard Levitte2017-04-241-1/+0
| | | | | Reviewed-by: Rich Salz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/3243)
* Guarantee single argument evaluation for test macros.Pauli2017-04-131-0/+56
| | | | | | | Add test case that checks some of them. Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Rich Salz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/3208)
* Test infrastructure additions.Pauli2017-03-291-0/+276
Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Emilia Käsper <[email protected]> Reviewed-by: Tim Hudson <[email protected]> Reviewed-by: Rich Salz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/3011)