diff options
| author | Theo Buehler <tb@openbsd.org> | 2023-04-14 06:24:22 -0600 |
|---|---|---|
| committer | Theo Buehler <tb@openbsd.org> | 2023-04-14 07:42:59 -0600 |
| commit | 76b135953a6c9885fa1fde0038262debff36639a (patch) | |
| tree | 085f78c3f1c22518ce65965aea8ee58dcf0efeca | |
| parent | 4c75669d35ca742854ee1076d6d389e61d7a7941 (diff) | |
| download | portable-76b135953a6c9885fa1fde0038262debff36639a.tar.gz portable-76b135953a6c9885fa1fde0038262debff36639a.tar.bz2 portable-76b135953a6c9885fa1fde0038262debff36639a.zip | |
Hook a few more tests to the build
| -rw-r--r-- | tests/CMakeLists.txt | 50 | ||||
| -rw-r--r-- | tests/Makefile.am | 46 | ||||
| -rwxr-xr-x | update.sh | 2 |
3 files changed, 97 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9a6242c..f53495f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
| @@ -40,6 +40,13 @@ add_executable(aes_wrap aes_wrap.c) | |||
| 40 | target_link_libraries(aes_wrap ${OPENSSL_TEST_LIBS}) | 40 | target_link_libraries(aes_wrap ${OPENSSL_TEST_LIBS}) |
| 41 | add_test(aes_wrap aes_wrap) | 41 | add_test(aes_wrap aes_wrap) |
| 42 | 42 | ||
| 43 | # apitest | ||
| 44 | add_executable(apitest apitest.c) | ||
| 45 | target_link_libraries(apitest ${OPENSSL_TEST_LIBS}) | ||
| 46 | set_source_files_properties(apitest.c PROPERTIES COMPILE_FLAGS | ||
| 47 | -DCERTSDIR=\\"${CMAKE_CURRENT_SOURCE_DIR}\\") | ||
| 48 | add_test(apitest apitest) | ||
| 49 | |||
| 43 | # arc4randomforktest | 50 | # arc4randomforktest |
| 44 | # Windows/mingw does not have fork, but Cygwin does. | 51 | # Windows/mingw does not have fork, but Cygwin does. |
| 45 | if(NOT (WIN32 OR (CMAKE_SYSTEM_NAME MATCHES "MINGW"))) | 52 | if(NOT (WIN32 OR (CMAKE_SYSTEM_NAME MATCHES "MINGW"))) |
| @@ -146,6 +153,8 @@ add_executable(bn_gcd bn_cmp.c) | |||
| 146 | target_link_libraries(bn_gcd ${OPENSSL_TEST_LIBS}) | 153 | target_link_libraries(bn_gcd ${OPENSSL_TEST_LIBS}) |
| 147 | add_test(bn_gcd bn_gcd) | 154 | add_test(bn_gcd bn_gcd) |
| 148 | 155 | ||
| 156 | # bn_general is a benchmark | ||
| 157 | |||
| 149 | # bn_isqrt | 158 | # bn_isqrt |
| 150 | add_executable(bn_isqrt bn_isqrt.c) | 159 | add_executable(bn_isqrt bn_isqrt.c) |
| 151 | target_link_libraries(bn_isqrt ${OPENSSL_TEST_LIBS}) | 160 | target_link_libraries(bn_isqrt ${OPENSSL_TEST_LIBS}) |
| @@ -215,6 +224,9 @@ add_executable(bytestringtest bytestringtest.c) | |||
| 215 | target_link_libraries(bytestringtest ${OPENSSL_TEST_LIBS}) | 224 | target_link_libraries(bytestringtest ${OPENSSL_TEST_LIBS}) |
| 216 | add_test(bytestringtest bytestringtest) | 225 | add_test(bytestringtest bytestringtest) |
| 217 | 226 | ||
| 227 | # callback | ||
| 228 | # callbackfailures | ||
| 229 | |||
| 218 | # casttest | 230 | # casttest |
| 219 | add_executable(casttest casttest.c) | 231 | add_executable(casttest casttest.c) |
| 220 | target_link_libraries(casttest ${OPENSSL_TEST_LIBS}) | 232 | target_link_libraries(casttest ${OPENSSL_TEST_LIBS}) |
| @@ -260,6 +272,13 @@ add_executable(cts128test cts128test.c) | |||
| 260 | target_link_libraries(cts128test ${OPENSSL_TEST_LIBS}) | 272 | target_link_libraries(cts128test ${OPENSSL_TEST_LIBS}) |
| 261 | add_test(cts128test cts128test) | 273 | add_test(cts128test cts128test) |
| 262 | 274 | ||
| 275 | # cttest | ||
| 276 | add_executable(cttest cttest.c) | ||
| 277 | target_link_libraries(cttest ${OPENSSL_TEST_LIBS}) | ||
| 278 | set_source_files_properties(cttest.c PROPERTIES COMPILE_FLAGS | ||
| 279 | -DCTPATH=\\"${CMAKE_CURRENT_SOURCE_DIR}\\") | ||
| 280 | add_test(cttest cttest) | ||
| 281 | |||
| 263 | # destest | 282 | # destest |
| 264 | add_executable(destest destest.c) | 283 | add_executable(destest destest.c) |
| 265 | target_link_libraries(destest ${OPENSSL_TEST_LIBS}) | 284 | target_link_libraries(destest ${OPENSSL_TEST_LIBS}) |
| @@ -339,6 +358,13 @@ add_executable(evptest evptest.c) | |||
| 339 | target_link_libraries(evptest ${OPENSSL_TEST_LIBS}) | 358 | target_link_libraries(evptest ${OPENSSL_TEST_LIBS}) |
| 340 | add_test(evptest evptest ${CMAKE_CURRENT_SOURCE_DIR}/evptests.txt) | 359 | add_test(evptest evptest ${CMAKE_CURRENT_SOURCE_DIR}/evptests.txt) |
| 341 | 360 | ||
| 361 | # evp_test | ||
| 362 | add_executable(evp_test evp_test.c) | ||
| 363 | target_link_libraries(evp_test ${OPENSSL_TEST_LIBS}) | ||
| 364 | add_test(evp_test evp_test) | ||
| 365 | |||
| 366 | # expirecallback.c | ||
| 367 | |||
| 342 | # explicit_bzero | 368 | # explicit_bzero |
| 343 | # explicit_bzero relies on SA_ONSTACK, which is unavailable on Windows | 369 | # explicit_bzero relies on SA_ONSTACK, which is unavailable on Windows |
| 344 | if(NOT WIN32) | 370 | if(NOT WIN32) |
| @@ -351,6 +377,11 @@ if(NOT WIN32) | |||
| 351 | add_test(explicit_bzero explicit_bzero) | 377 | add_test(explicit_bzero explicit_bzero) |
| 352 | endif() | 378 | endif() |
| 353 | 379 | ||
| 380 | # exportertest | ||
| 381 | add_executable(exportertest exportertest.c) | ||
| 382 | target_link_libraries(exportertest ${OPENSSL_TEST_LIBS}) | ||
| 383 | add_test(exportertest exportertest) | ||
| 384 | |||
| 354 | # freenull | 385 | # freenull |
| 355 | add_executable(freenull freenull.c) | 386 | add_executable(freenull freenull.c) |
| 356 | set_source_files_properties(freenull.c PROPERTIES COMPILE_FLAGS | 387 | set_source_files_properties(freenull.c PROPERTIES COMPILE_FLAGS |
| @@ -393,11 +424,14 @@ add_executable(igetest igetest.c) | |||
| 393 | target_link_libraries(igetest ${OPENSSL_TEST_LIBS}) | 424 | target_link_libraries(igetest ${OPENSSL_TEST_LIBS}) |
| 394 | add_test(igetest igetest) | 425 | add_test(igetest igetest) |
| 395 | 426 | ||
| 396 | # keypairtest | 427 | # init_pledge |
| 428 | |||
| 429 | # key_schedule | ||
| 397 | add_executable(key_schedule key_schedule.c) | 430 | add_executable(key_schedule key_schedule.c) |
| 398 | target_link_libraries(key_schedule ${OPENSSL_TEST_LIBS}) | 431 | target_link_libraries(key_schedule ${OPENSSL_TEST_LIBS}) |
| 399 | add_test(key_schedule key_schedule) | 432 | add_test(key_schedule key_schedule) |
| 400 | 433 | ||
| 434 | # keypair | ||
| 401 | add_executable(keypairtest keypairtest.c) | 435 | add_executable(keypairtest keypairtest.c) |
| 402 | target_link_libraries(keypairtest ${LIBTLS_TEST_LIBS}) | 436 | target_link_libraries(keypairtest ${LIBTLS_TEST_LIBS}) |
| 403 | target_include_directories(keypairtest BEFORE PUBLIC ../tls) | 437 | target_include_directories(keypairtest BEFORE PUBLIC ../tls) |
| @@ -528,6 +562,8 @@ add_executable(rsa_test rsa_test.c) | |||
| 528 | target_link_libraries(rsa_test ${OPENSSL_TEST_LIBS}) | 562 | target_link_libraries(rsa_test ${OPENSSL_TEST_LIBS}) |
| 529 | add_test(rsa_test rsa_test) | 563 | add_test(rsa_test rsa_test) |
| 530 | 564 | ||
| 565 | # server.c | ||
| 566 | |||
| 531 | # servertest | 567 | # servertest |
| 532 | add_executable(servertest servertest.c) | 568 | add_executable(servertest servertest.c) |
| 533 | target_link_libraries(servertest ${OPENSSL_TEST_LIBS}) | 569 | target_link_libraries(servertest ${OPENSSL_TEST_LIBS}) |
| @@ -543,6 +579,18 @@ add_executable(sha_test sha_test.c) | |||
| 543 | target_link_libraries(sha_test ${OPENSSL_TEST_LIBS}) | 579 | target_link_libraries(sha_test ${OPENSSL_TEST_LIBS}) |
| 544 | add_test(sha_test sha_test) | 580 | add_test(sha_test sha_test) |
| 545 | 581 | ||
| 582 | # signertest | ||
| 583 | add_executable(signertest signertest.c) | ||
| 584 | target_link_libraries(signertest ${LIBTLS_TEST_LIBS}) | ||
| 585 | target_include_directories(signertest BEFORE PUBLIC ../tls) | ||
| 586 | set_source_files_properties(signertest.c PROPERTIES COMPILE_FLAGS | ||
| 587 | -DCERTSDIR=\\"${CMAKE_CURRENT_SOURCE_DIR}\\") | ||
| 588 | add_test(signertest signertest) | ||
| 589 | |||
| 590 | # sm2crypttest | ||
| 591 | # sm2evptest | ||
| 592 | # sm2sigtest | ||
| 593 | |||
| 546 | # sm3test | 594 | # sm3test |
| 547 | add_executable(sm3test sm3test.c) | 595 | add_executable(sm3test sm3test.c) |
| 548 | target_link_libraries(sm3test ${OPENSSL_TEST_LIBS}) | 596 | target_link_libraries(sm3test ${OPENSSL_TEST_LIBS}) |
diff --git a/tests/Makefile.am b/tests/Makefile.am index aebfed1..b0e1128 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am | |||
| @@ -57,6 +57,12 @@ TESTS += aes_wrap | |||
| 57 | check_PROGRAMS += aes_wrap | 57 | check_PROGRAMS += aes_wrap |
| 58 | aes_wrap_SOURCES = aes_wrap.c | 58 | aes_wrap_SOURCES = aes_wrap.c |
| 59 | 59 | ||
| 60 | # apitest | ||
| 61 | TESTS += apitest | ||
| 62 | check_PROGRAMS += apitest | ||
| 63 | apitest_SOURCES = apitest.c | ||
| 64 | apitest_CPPFLAGS = $(AM_CPPFLAGS) -DCERTSDIR=\"$(srcdir)\" | ||
| 65 | |||
| 60 | # arc4randomforktest | 66 | # arc4randomforktest |
| 61 | # Windows/mingw does not have fork, but Cygwin does. | 67 | # Windows/mingw does not have fork, but Cygwin does. |
| 62 | if !HOST_WIN | 68 | if !HOST_WIN |
| @@ -164,6 +170,8 @@ TESTS += bn_gcd | |||
| 164 | check_PROGRAMS += bn_gcd | 170 | check_PROGRAMS += bn_gcd |
| 165 | bn_gcd_SOURCES = bn_gcd.c | 171 | bn_gcd_SOURCES = bn_gcd.c |
| 166 | 172 | ||
| 173 | # bn_general is a benchmark. | ||
| 174 | |||
| 167 | # bn_isqrt | 175 | # bn_isqrt |
| 168 | TESTS += bn_isqrt | 176 | TESTS += bn_isqrt |
| 169 | check_PROGRAMS += bn_isqrt | 177 | check_PROGRAMS += bn_isqrt |
| @@ -231,6 +239,9 @@ TESTS += bytestringtest | |||
| 231 | check_PROGRAMS += bytestringtest | 239 | check_PROGRAMS += bytestringtest |
| 232 | bytestringtest_SOURCES = bytestringtest.c | 240 | bytestringtest_SOURCES = bytestringtest.c |
| 233 | 241 | ||
| 242 | # callback | ||
| 243 | # callbackfailures | ||
| 244 | |||
| 234 | # casttest | 245 | # casttest |
| 235 | TESTS += casttest | 246 | TESTS += casttest |
| 236 | check_PROGRAMS += casttest | 247 | check_PROGRAMS += casttest |
| @@ -277,6 +288,15 @@ TESTS += cts128test | |||
| 277 | check_PROGRAMS += cts128test | 288 | check_PROGRAMS += cts128test |
| 278 | cts128test_SOURCES = cts128test.c | 289 | cts128test_SOURCES = cts128test.c |
| 279 | 290 | ||
| 291 | # cttest | ||
| 292 | TESTS += cttest | ||
| 293 | check_PROGRAMS += cttest | ||
| 294 | cttest_SOURCES = cttest.c | ||
| 295 | cttest_CPPFLAGS = $(AM_CPPFLAGS) -DCTPATH=\"$(srcdir)\" | ||
| 296 | EXTRA_DIST += ctlog.conf | ||
| 297 | EXTRA_DIST += letsencrypt-r3.crt | ||
| 298 | EXTRA_DIST += libressl.org.crt | ||
| 299 | |||
| 280 | # destest | 300 | # destest |
| 281 | TESTS += destest | 301 | TESTS += destest |
| 282 | check_PROGRAMS += destest | 302 | check_PROGRAMS += destest |
| @@ -358,6 +378,13 @@ evptest_SOURCES = evptest.c | |||
| 358 | EXTRA_DIST += evptest.sh | 378 | EXTRA_DIST += evptest.sh |
| 359 | EXTRA_DIST += evptests.txt | 379 | EXTRA_DIST += evptests.txt |
| 360 | 380 | ||
| 381 | # evp_test | ||
| 382 | TESTS += evp_test | ||
| 383 | check_PROGRAMS += evp_test | ||
| 384 | evp_test_SOURCES = evp_test.c | ||
| 385 | |||
| 386 | # expirecallback.c | ||
| 387 | |||
| 361 | # explicit_bzero | 388 | # explicit_bzero |
| 362 | # explicit_bzero relies on SA_ONSTACK, which is unavailable on Windows | 389 | # explicit_bzero relies on SA_ONSTACK, which is unavailable on Windows |
| 363 | if !HOST_WIN | 390 | if !HOST_WIN |
| @@ -371,6 +398,11 @@ endif | |||
| 371 | endif | 398 | endif |
| 372 | endif | 399 | endif |
| 373 | 400 | ||
| 401 | # exportertest | ||
| 402 | TESTS += exportertest | ||
| 403 | check_PROGRAMS += exportertest | ||
| 404 | exportertest_SOURCES = exportertest.c | ||
| 405 | |||
| 374 | # freenull | 406 | # freenull |
| 375 | TESTS += freenull | 407 | TESTS += freenull |
| 376 | freenull_CPPFLAGS = $(AM_CPPFLAGS) -ULIBRESSL_INTERNAL | 408 | freenull_CPPFLAGS = $(AM_CPPFLAGS) -ULIBRESSL_INTERNAL |
| @@ -412,6 +444,8 @@ TESTS += igetest | |||
| 412 | check_PROGRAMS += igetest | 444 | check_PROGRAMS += igetest |
| 413 | igetest_SOURCES = igetest.c | 445 | igetest_SOURCES = igetest.c |
| 414 | 446 | ||
| 447 | # init_pledge.c | ||
| 448 | |||
| 415 | # key_schedule | 449 | # key_schedule |
| 416 | TESTS += key_schedule | 450 | TESTS += key_schedule |
| 417 | check_PROGRAMS += key_schedule | 451 | check_PROGRAMS += key_schedule |
| @@ -536,6 +570,8 @@ TESTS += rsa_test | |||
| 536 | check_PROGRAMS += rsa_test | 570 | check_PROGRAMS += rsa_test |
| 537 | rsa_test_SOURCES = rsa_test.c | 571 | rsa_test_SOURCES = rsa_test.c |
| 538 | 572 | ||
| 573 | # server.c | ||
| 574 | |||
| 539 | # servertest | 575 | # servertest |
| 540 | TESTS += servertest.sh | 576 | TESTS += servertest.sh |
| 541 | check_PROGRAMS += servertest | 577 | check_PROGRAMS += servertest |
| @@ -547,6 +583,16 @@ TESTS += sha_test | |||
| 547 | check_PROGRAMS += sha_test | 583 | check_PROGRAMS += sha_test |
| 548 | sha_test_SOURCES = sha_test.c | 584 | sha_test_SOURCES = sha_test.c |
| 549 | 585 | ||
| 586 | # signertest | ||
| 587 | TESTS += signertest | ||
| 588 | check_PROGRAMS += signertest | ||
| 589 | signertest_CPPFLAGS = -I $(top_srcdir)/tls $(AM_CPPFLAGS) -DCERTSDIR=\"$(srcdir)\" | ||
| 590 | signertest_SOURCES = signertest.c | ||
| 591 | |||
| 592 | # sm2crypttest | ||
| 593 | # sm2evptest | ||
| 594 | # sm2sigtest | ||
| 595 | |||
| 550 | # sm3test | 596 | # sm3test |
| 551 | TESTS += sm3test | 597 | TESTS += sm3test |
| 552 | check_PROGRAMS += sm3test | 598 | check_PROGRAMS += sm3test |
| @@ -353,6 +353,8 @@ for i in `find $libcrypto_regress -name '*.c'`; do | |||
| 353 | done | 353 | done |
| 354 | $CP $libcrypto_regress/evp/evptests.txt tests | 354 | $CP $libcrypto_regress/evp/evptests.txt tests |
| 355 | $CP $libcrypto_regress/aead/*.txt tests | 355 | $CP $libcrypto_regress/aead/*.txt tests |
| 356 | $CP $libcrypto_regress/ct/ctlog.conf tests | ||
| 357 | $CP $libcrypto_regress/ct/*.crt tests | ||
| 356 | 358 | ||
| 357 | # generate libcrypto freenull.c | 359 | # generate libcrypto freenull.c |
| 358 | awk -f $libcrypto_regress/free/freenull.awk \ | 360 | awk -f $libcrypto_regress/free/freenull.awk \ |
