diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 78666b41f..61288511c 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -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