[NLUUG]   Welcome to ftp.nluug.nl
Current directory: /pub/os/NetBSD/NetBSD-release-9/src/crypto/external/bsd/openssl/dist/test/
 
Current bandwidth utilization 1728.80 Mbit/s
Bandwidth utilization bar
Contents of README:
How to add recipes
==================

For any test that you want to perform, you write a script located in
test/recipes/, named {nn}-test_{name}.t, where {nn} is a two digit number and
{name} is a unique name of your choice.

Please note that if a test involves a new testing executable, you will need to
do some additions in test/Makefile.  More on this later.


Naming conventions
=================

A test executable is named test/{name}test.c

A test recipe is named test/recipes/{nn}-test_{name}.t, where {nn} is a two
digit number and {name} is a unique name of your choice.

The number {nn} is (somewhat loosely) grouped as follows:

00-04  sanity, internal and essential API tests
05-09  individual symmetric cipher algorithms
10-14  math (bignum)
15-19  individual asymmetric cipher algorithms
20-24  openssl commands (some otherwise not tested)
25-29  certificate forms, generation and verification
30-35  engine and evp
60-79  APIs
   70  PACKET layer
80-89  "larger" protocols (CA, CMS, OCSP, SSL, TSA)
90-98  misc
99     most time consuming tests [such as test_fuzz]


A recipe that just runs a test executable
=========================================

A script that just runs a program looks like this:

    #! /usr/bin/perl

    use OpenSSL::Test::Simple;

    simple_test("test_{name}", "{name}test", "{name}");

{name} is the unique name you have chosen for your test.

The second argument to `simple_test' is the test executable, and `simple_test'
expects it to be located in test/

For documentation on OpenSSL::Test::Simple, do
`perldoc util/perl/OpenSSL/Test/Simple.pm'.


A recipe that runs a more complex test
======================================

For more complex tests, you will need to read up on Test::More and
OpenSSL::Test.  Test::More is normally preinstalled, do `man Test::More' for
documentation.  For OpenSSL::Test, do `perldoc util/perl/OpenSSL/Test.pm'.

A script to start from could be this:

    #! /usr/bin/perl

    use strict;
    use warnings;
    use OpenSSL::Test;

    setup("test_{name}");

    plan tests => 2;                # The number of tests being performed

    ok(test1, "test1");
    ok(test2, "test1");

    sub test1
    {
        # test feature 1
    }

    sub test2
    {
        # test feature 2
    }


Changes to test/build.info
==========================

Whenever a new test involves a new test executable you need to do the
following (at all times, replace {NAME} and {name} with the name of your
test):

* add {name} to the list of programs under PROGRAMS_NO_INST

* create a three line description of how to build the test, you will have
to modify the include paths and source files if you don't want to use the
basic test framework:

    SOURCE[{name}]={name}.c
    INCLUDE[{name}]=.. ../include
    DEPEND[{name}]=../libcrypto libtestutil.a

Generic form of C test executables
==================================

    #include "testutil.h"

    static int my_test(void)
    {
        int testresult = 0;                 /* Assume the test will fail    */
        int observed;

        observed = function();              /* Call the code under test     */
        if (!TEST_int_eq(observed, 2))      /* Check the result is correct  */
            goto end;                       /* Exit on failure - optional   */

        testresult = 1;                     /* Mark the test case a success */
    end:
        cleanup();                          /* Any cleanup you require      */
        return testresult;
    }

    int setup_tests(void)
    {
        ADD_TEST(my_test);                  /* Add each test separately     */
        return 1;                           /* Indicate success             */
    }

You should use the TEST_xxx macros provided by testutil.h to test all failure
conditions.  These macros produce an error message in a standard format if the
condition is not met (and nothing if the condition is met).  Additional
information can be presented with the TEST_info macro that takes a printf
format string and arguments.  TEST_error is useful for complicated conditions,
it also takes a printf format string and argument.  In all cases the TEST_xxx
macros are guaranteed to evaluate their arguments exactly once.  This means
that expressions with side effects are allowed as parameters.  Thus,

    if (!TEST_ptr(ptr = OPENSSL_malloc(..)))

works fine and can be used in place of:

    ptr = OPENSSL_malloc(..);
    if (!TEST_ptr(ptr))

The former produces a more meaningful message on failure than the latter.


Icon  Name                                                                  Last modified      Size  
[DIR] Parent Directory - [DIR] CVS/ 12-Aug-2024 05:04 - [DIR] certs/ 14-Feb-2024 19:44 - [DIR] ct/ 14-Feb-2024 19:44 - [DIR] d2i-tests/ 14-Feb-2024 19:44 - [DIR] ocsp-tests/ 14-Feb-2024 19:44 - [DIR] ossl_shim/ 14-Feb-2024 19:44 - [DIR] recipes/ 12-Aug-2024 05:04 - [DIR] smime-certs/ 14-Feb-2024 19:44 - [DIR] ssl-tests/ 14-Feb-2024 19:44 - [DIR] testutil/ 14-Feb-2024 19:44 - [TXT] CAss.cnf 08-Feb-2018 21:56 2.2K [   ] CAssdh.cnf 20-Jul-2009 01:06 728 [   ] CAssdsa.cnf 20-Jul-2009 01:06 729 [   ] CAssrsa.cnf 20-Jul-2009 01:06 708 [TXT] CAtsa.cnf 23-Sep-2018 15:17 4.9K [   ] P1ss.cnf 08-Feb-2018 21:56 1.0K [   ] P2ss.cnf 08-Feb-2018 21:56 1.1K [TXT] README 27-Apr-2020 16:47 4.4K [TXT] README.external 12-Mar-2019 17:44 4.6K [TXT] README.ssltest.md 23-Sep-2018 15:17 10K [   ] Sssdsa.cnf 20-Jul-2009 01:06 821 [   ] Sssrsa.cnf 20-Jul-2009 01:06 798 [   ] Uss.cnf 08-Feb-2018 21:56 1.0K [TXT] aborttest.c 08-Feb-2018 21:56 464 [TXT] afalgtest.c 24-Feb-2023 15:07 4.2K [TXT] asn1_decode_test.c 24-Feb-2023 15:07 6.3K [TXT] asn1_encode_test.c 27-Mar-2021 15:35 30K [TXT] asn1_internal_test.c 24-Feb-2023 15:07 3.7K [TXT] asn1_string_table_test.c 23-Sep-2018 15:17 1.9K [TXT] asn1_time_test.c 27-Jan-2020 08:21 16K [TXT] asynciotest.c 27-Apr-2020 16:47 12K [TXT] asynctest.c 23-Sep-2018 15:17 8.7K [TXT] bad_dtls_test.c 27-Apr-2020 16:47 19K [TXT] bftest.c 23-Sep-2018 15:33 15K [TXT] bio_callback_test.c 08-Dec-2018 23:33 6.4K [TXT] bio_enc_test.c 23-Sep-2018 15:17 6.7K [TXT] bio_memleak_test.c 24-Feb-2023 15:07 7.5K [TXT] bioprinttest.c 27-Mar-2021 15:35 11K [TXT] bntest.c 24-Feb-2023 15:07 92K [TXT] bntests.pl 23-Sep-2018 15:17 4.5K [TXT] build.info 24-Feb-2023 15:07 20K [TXT] casttest.c 23-Sep-2018 15:33 3.1K [TXT] chacha_internal_test.c 27-Apr-2020 16:47 8.0K [TXT] cipher_overhead_test.c 27-Apr-2020 16:47 1.1K [TXT] cipherbytes_test.c 23-Sep-2018 15:17 4.4K [TXT] cipherlist_test.c 12-Mar-2019 17:44 7.1K [TXT] ciphername_test.c 23-Sep-2018 15:17 21K [TXT] clienthellotest.c 24-Feb-2023 15:07 8.3K [TXT] cmactest.c 27-Mar-2021 15:35 5.9K [TXT] cms-examples.pl 08-Feb-2018 21:56 8.7K [TXT] cmsapitest.c 23-Sep-2018 15:17 2.2K [TXT] conf_include_test.c 27-Jan-2020 08:21 5.4K [TXT] constant_time_test.c 27-Apr-2020 16:47 12K [TXT] crltest.c 12-Mar-2019 17:44 15K [TXT] ct_test.c 24-Feb-2023 15:07 16K [TXT] ctype_internal_test.c 27-Apr-2020 16:47 2.6K [TXT] curve448_internal_test.c 27-Apr-2020 16:47 35K [TXT] d2i_test.c 23-Sep-2018 15:17 4.0K [TXT] dane-cross.in 24-Feb-2023 15:07 6.9K [TXT] danetest.c 24-Feb-2023 15:07 11K [TXT] danetest.in 08-Feb-2018 21:56 88K [   ] danetest.pem 08-Feb-2018 21:56 652 [   ] data.bin 24-Feb-2023 15:07 128 [TXT] destest.c 23-Sep-2018 15:33 25K [TXT] dhtest.c 27-Jan-2020 08:21 27K [TXT] drbg_cavs_data.c 23-Sep-2018 15:17 7.9M [TXT] drbg_cavs_data.h 27-Apr-2020 16:47 1.8K [TXT] drbg_cavs_test.c 27-Apr-2020 16:47 7.5K [TXT] drbgtest.c 27-Mar-2021 15:35 30K [TXT] drbgtest.h 23-Sep-2018 15:17 26K [TXT] dsa_no_digest_size_test.c 23-Sep-2018 15:17 8.4K [TXT] dsatest.c 23-Sep-2018 15:33 3.7K [TXT] dtls_mtu_test.c 24-Feb-2023 15:07 7.1K [TXT] dtlstest.c 24-Feb-2023 15:07 13K [TXT] dtlsv1listentest.c 23-Sep-2018 15:17 12K [TXT] ec_internal_test.c 24-Feb-2023 15:07 12K [TXT] ecdsatest.c 09-Jun-2019 20:44 11K [TXT] ecdsatest.h 27-Apr-2020 16:47 674K [TXT] ecstresstest.c 23-Sep-2018 15:17 3.9K [TXT] ectest.c 24-Feb-2023 15:07 91K [TXT] enginetest.c 27-Jan-2020 08:21 11K [TXT] errtest.c 23-Sep-2018 15:17 941 [TXT] evp_extra_test.c 24-Feb-2023 15:07 71K [TXT] evp_test.c 24-Feb-2023 15:07 73K [TXT] evp_test.h 23-Sep-2018 15:17 413 [TXT] exdatatest.c 23-Sep-2018 15:17 6.7K [TXT] exptest.c 24-Feb-2023 15:07 6.1K [TXT] fatalerrtest.c 23-Sep-2018 15:17 2.7K [TXT] generate_buildtest.pl 23-Sep-2018 15:17 793 [TXT] generate_ssl_tests.pl 07-Apr-2018 00:49 4.4K [TXT] gmdifftest.c 23-Sep-2018 15:17 1.8K [TXT] gosttest.c 23-Sep-2018 15:17 3.1K [TXT] handshake_helper.c 27-Mar-2021 15:35 60K [TXT] handshake_helper.h 27-Apr-2020 16:47 2.9K [TXT] hmactest.c 27-Apr-2020 16:47 7.2K [TXT] ideatest.c 23-Sep-2018 15:33 3.7K [TXT] igetest.c 23-Sep-2018 15:17 16K [TXT] lhash_test.c 23-Sep-2018 15:17 5.5K [TXT] md2test.c 23-Sep-2018 15:33 1.6K [TXT] mdc2_internal_test.c 23-Sep-2018 15:17 1.6K [TXT] mdc2test.c 23-Sep-2018 15:33 2.0K [TXT] memleaktest.c 23-Sep-2018 15:17 1.6K [TXT] modes_internal_test.c 27-Apr-2020 16:47 29K [TXT] ocspapitest.c 09-Jun-2019 19:47 5.9K [TXT] packettest.c 24-Feb-2023 15:07 15K [TXT] pbelutest.c 23-Sep-2018 15:17 1.4K [TXT] pemtest.c 24-Feb-2023 15:07 3.4K [   ] pkcs7-1.pem 20-Jul-2009 01:06 851 [   ] pkcs7.pem 20-Jul-2009 01:06 3.7K [TXT] pkey_meth_kdf_test.c 23-Sep-2018 15:17 5.2K [TXT] pkey_meth_test.c 23-Sep-2018 15:17 2.2K [TXT] pkits-test.pl 23-Sep-2018 15:17 31K [TXT] poly1305_internal_test.c 27-Apr-2020 16:47 56K [TXT] rc2test.c 23-Sep-2018 15:33 2.0K [TXT] rc4test.c 23-Sep-2018 15:33 3.9K [TXT] rc5test.c 23-Sep-2018 15:33 8.8K [TXT] rdrand_sanitytest.c 12-Mar-2019 17:44 3.4K [TXT] recordlentest.c 23-Sep-2018 15:17 5.1K [TXT] rsa_complex.c 08-Dec-2018 23:33 787 [TXT] rsa_mp_test.c 23-Sep-2018 15:17 9.5K [TXT] rsa_test.c 24-Feb-2023 15:07 13K [TXT] run_tests.pl 27-Apr-2020 16:47 4.0K [TXT] sanitytest.c 23-Sep-2018 15:17 3.0K [TXT] secmemtest.c 08-Dec-2018 23:33 5.9K [   ] serverinfo.pem 14-Oct-2016 18:06 740 [   ] serverinfo2.pem 23-Sep-2018 15:17 412 [TXT] servername_test.c 27-Apr-2020 16:47 6.7K [   ] session.pem 23-Sep-2018 15:17 1.9K [   ] shibboleth.pfx 08-Feb-2018 21:56 2.5K [TXT] shlibloadtest.c 27-Apr-2020 16:47 9.1K [TXT] siphash_internal_test.c 27-Apr-2020 16:47 17K [TXT] sm2_internal_test.c 24-Feb-2023 15:07 13K [TXT] sm4_internal_test.c 27-Apr-2020 16:47 2.3K [TXT] smcont.txt 08-Feb-2018 21:56 83 [TXT] srptest.c 23-Sep-2018 15:33 8.0K [TXT] ssl_cert_table_internal_test.c 27-Apr-2020 16:47 2.3K [TXT] ssl_ctx_test.c 27-Apr-2020 16:47 2.3K [TXT] ssl_test.c 23-Sep-2018 15:17 18K [TXT] ssl_test.tmpl 08-Feb-2018 21:56 4.3K [TXT] ssl_test_ctx.c 12-Mar-2019 17:44 29K [TXT] ssl_test_ctx.h 27-Apr-2020 16:47 8.5K [TXT] ssl_test_ctx_test.c 23-Sep-2018 15:17 9.0K [   ] ssl_test_ctx_test.conf 23-Sep-2018 15:17 2.0K [TXT] sslapitest.c 24-Feb-2023 15:07 249K [TXT] sslbuffertest.c 27-Apr-2020 16:47 5.2K [TXT] sslcorrupttest.c 23-Sep-2018 15:17 7.0K [TXT] ssltest_old.c 24-Feb-2023 15:07 103K [TXT] ssltestlib.c 24-Feb-2023 15:07 29K [TXT] ssltestlib.h 24-Feb-2023 15:07 2.0K [TXT] stack_test.c 23-Sep-2018 15:17 9.2K [   ] sysdefault.cnf 23-Sep-2018 15:17 241 [TXT] sysdefaulttest.c 23-Sep-2018 15:17 1.1K [TXT] test.cnf 08-Feb-2018 21:56 2.6K [TXT] test_test.c 24-Feb-2023 15:07 18K [   ] testcrl.pem 20-Jul-2009 01:06 938 [   ] testdsa.pem 08-Feb-2018 21:56 672 [   ] testdsapub.pem 08-Feb-2018 21:56 654 [   ] testec-p256.pem 08-Feb-2018 21:56 227 [   ] testecpub-p256.pem 08-Feb-2018 21:56 178 [   ] tested448.pem 27-Mar-2021 15:35 156 [   ] tested448pub.pem 27-Mar-2021 15:35 146 [   ] tested25519.pem 27-Mar-2021 15:35 119 [   ] tested25519pub.pem 27-Mar-2021 15:35 113 [   ] testp7.pem 20-Jul-2009 01:06 2.8K [   ] testreq2.pem 20-Jul-2009 01:06 371 [   ] testrsa.pem 20-Jul-2009 01:06 497 [   ] testrsa_withattrs.der 24-Feb-2023 15:07 1.2K [   ] testrsa_withattrs.pem 24-Feb-2023 15:07 1.7K [   ] testrsapub.pem 08-Feb-2018 21:56 182 [   ] testsid.pem 08-Feb-2018 21:56 2.3K [TXT] testutil.h 27-Apr-2020 16:47 19K [   ] testx509.pem 20-Jul-2009 01:06 530 [TXT] threadstest.c 23-Sep-2018 15:17 3.9K [TXT] time_offset_test.c 23-Sep-2018 15:17 3.2K [TXT] tls13ccstest.c 27-Apr-2020 16:47 15K [TXT] tls13encryptiontest.c 27-Mar-2021 15:35 14K [TXT] tls13secretstest.c 27-Apr-2020 16:47 11K [TXT] uitest.c 23-Sep-2018 15:17 2.3K [   ] v3-cert1.pem 20-Jul-2009 01:06 944 [   ] v3-cert2.pem 20-Jul-2009 01:06 940 [TXT] v3ext.c 24-Feb-2023 15:07 11K [TXT] v3nametest.c 24-Feb-2023 15:07 20K [TXT] verify_extra_test.c 24-Feb-2023 15:07 8.6K [TXT] versions.c 18-Aug-2018 10:30 645 [TXT] wpackettest.c 27-Apr-2020 16:47 15K [TXT] x509_check_cert_pkey_test.c 23-Sep-2018 15:17 3.0K [TXT] x509_dup_cert_test.c 23-Sep-2018 15:17 1.3K [TXT] x509_internal_test.c 24-Feb-2023 15:07 3.1K [TXT] x509_time_test.c 24-Feb-2023 15:07 14K [TXT] x509aux.c 27-Mar-2021 15:35 5.1K

NLUUG - Open Systems. Open Standards
Become a member and get discounts on conferences and more, see the NLUUG website!