Fix full invocation of ssl-opt.sh

The previous commit had:
- one obvious mistake (-f NULL with default -e runs nothing)
- one unforeseen issue: OPENSSL_NEXT skips static ECDH
- arguably scope creep: the stated goal was to simplify the full
invocation (in particular, make it obvious that everything is run
without having to remember the default value of EXCLUDE), but it also
made an unrelated change: running most tests with OPENSSL_NEXT (hence
the previous point).

This commit should fix all this, in particular it switches back to
running most tests with OPENSSL and using OPENSSL_NEXT only when needed.

Hopefully in the future we'll do the opposite: most tests will run with
a recent OpenSSL, and only those that need an older one will use
something older. But that will be another PR.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard 2024-04-22 10:25:09 +02:00
parent 62d0bb8f2c
commit eb86b906d7
2 changed files with 27 additions and 21 deletions

View File

@ -1212,17 +1212,19 @@ component_test_full_cmake_gcc_asan () {
msg "test: main suites (inc. selftests) (full config, ASan build)"
make test
msg "test: selftest (ASan build)" # ~ 10s
msg "test: selftest (full config, ASan build)" # ~ 10s
programs/test/selftest
msg "test: ssl-opt.sh (full config, ASan build)"
tests/ssl-opt.sh
msg "test: compat.sh: NULL (full config, ASan build)"
tests/compat.sh -f 'NULL'
# Note: the next two invocations cover all compat.sh test cases.
# We should use the same here and in basic-build-test.sh.
msg "test: compat.sh: default version (full config, ASan build)"
tests/compat.sh -e 'ARIA\|CHACHA'
msg "test: compat.sh next: all except NULL (full config, ASan build)"
env OPENSSL="$OPENSSL_NEXT" tests/compat.sh -e 'NULL'
msg "test: compat.sh: next: ARIA, Chacha (full config, ASan build)"
env OPENSSL="$OPENSSL_NEXT" tests/compat.sh -e '^$' -f 'ARIA\|CHACHA'
msg "test: context-info.sh (full config, ASan build)" # ~ 15 sec
tests/context-info.sh
@ -1236,22 +1238,24 @@ component_test_full_cmake_gcc_asan_new_bignum () {
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
make
msg "test: main suites (inc. selftests) (full config, ASan build)"
msg "test: main suites (inc. selftests) (full config, new bignum, ASan)"
make test
msg "test: selftest (ASan build)" # ~ 10s
msg "test: selftest (full config, new bignum, ASan)" # ~ 10s
programs/test/selftest
msg "test: ssl-opt.sh (full config, ASan build)"
msg "test: ssl-opt.sh (full config, new bignum, ASan)"
tests/ssl-opt.sh
msg "test: compat.sh: NULL (full config, ASan build)"
tests/compat.sh -f 'NULL'
# Note: the next two invocations cover all compat.sh test cases.
# We should use the same here and in basic-build-test.sh.
msg "test: compat.sh: default version (full config, new bignum, ASan)"
tests/compat.sh -e 'ARIA\|CHACHA'
msg "test: compat.sh next: all except NULL (full config, ASan build)"
env OPENSSL="$OPENSSL_NEXT" tests/compat.sh -e 'NULL'
msg "test: compat.sh: next: ARIA, Chacha (full config, new bignum, ASan)"
env OPENSSL="$OPENSSL_NEXT" tests/compat.sh -e '^$' -f 'ARIA\|CHACHA'
msg "test: context-info.sh (full config, ASan build)" # ~ 15 sec
msg "test: context-info.sh (full config, new bignum, ASan)" # ~ 15 sec
tests/context-info.sh
}
@ -2610,11 +2614,13 @@ component_test_no_psa_crypto_full_cmake_asan() {
msg "test: ssl-opt.sh (full minus PSA crypto)"
tests/ssl-opt.sh
msg "test: compat.sh: NULL (full minus PSA crypto)"
tests/compat.sh -f 'NULL'
# Note: the next two invocations cover all compat.sh test cases.
# We should use the same here and in basic-build-test.sh.
msg "test: compat.sh: default version (full minus PSA crypto)"
tests/compat.sh -e 'ARIA\|CHACHA'
msg "test: compat.sh next: all except NULL (full minus PSA crypto)"
env OPENSSL="$OPENSSL_NEXT" tests/compat.sh -e 'NULL'
msg "test: compat.sh: next: ARIA, Chacha (full minus PSA crypto)"
env OPENSSL="$OPENSSL_NEXT" tests/compat.sh -e '^$' -f 'ARIA\|CHACHA'
}
component_test_psa_crypto_config_accel_ecdsa () {

View File

@ -102,12 +102,12 @@ echo
# Step 2c - Compatibility tests (keep going even if some tests fail)
echo '################ compat.sh ################'
{
echo '#### compat.sh: NULL ciphersuites'
sh compat.sh -e '^$' -f 'NULL'
echo '#### compat.sh: Default versions'
sh compat.sh -e 'ARIA\|CHACHA'
echo
echo '#### compat.sh: next (all except NULL)'
OPENSSL="$OPENSSL_NEXT" sh compat.sh -e 'NULL'
echo '#### compat.sh: next (ARIA, ChaCha)'
OPENSSL="$OPENSSL_NEXT" sh compat.sh -e '^$' -f 'ARIA\|CHACHA'
echo
} | tee compat-test-$TEST_OUTPUT
echo '^^^^^^^^^^^^^^^^ compat.sh ^^^^^^^^^^^^^^^^'