Test asm and intrinsics from all.sh

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman 2023-06-16 13:18:19 +01:00
parent 6365a681c8
commit 838dc46a7b

View File

@ -3448,6 +3448,35 @@ component_test_malloc_0_null () {
tests/ssl-opt.sh -e 'proxy'
}
support_test_aesni () {
# require an x64_64 target
gcc -v 2>&1 | grep Target | grep -q x86_64
}
component_test_aesni () { # ~ 20s
msg "build: default config with MBEDTLS_HAVE_ASM and MBEDTLS_AESNI_C enabled"
scripts/config.py set MBEDTLS_AESNI_C
scripts/config.py set MBEDTLS_HAVE_ASM
msg "AES tests, MBEDTLS_AESNI_HAVE_CODE=1 (asm)"
make lib tests CC=gcc CFLAGS='-O2 -Werror -Wall -Wextra -DMBEDTLS_AESNI_HAVE_CODE=1'
cd tests
for t in `find . -type f -executable -name '*aes*'`; do
# Run all the suites with aes in their name
./$t
done
cd ..
msg "AES tests, MBEDTLS_AESNI_HAVE_CODE=2 (intrinsics)"
make clean
make lib tests CC=gcc CFLAGS='-O2 -Werror -Wall -Wextra -mpclmul -msse2 -maes -DMBEDTLS_AESNI_HAVE_CODE=2'
cd tests
for t in `find . -type f -executable -name '*aes*'`; do
./$t
done
cd ..
}
component_test_aes_fewer_tables () {
msg "build: default config with AES_FEWER_TABLES enabled"
scripts/config.py set MBEDTLS_AES_FEWER_TABLES