mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-07-03 04:53:10 +08:00
Enable drivers when testing with GCC 15
The goal of testing with GCC 15 is to validate fixes for https://github.com/Mbed-TLS/mbedtls/issues/9814 . The bug is present in multiple places, and some of them affect third-party drivers but not our built-in implementation. (The bug is that driver contexts might not be zero-initialized, but some of our built-in implementations happen not to care about this.) Thus, enable the test drivers in the test component that uses GCC 15, to gain the extra checks performed in the driver wrappers. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
bf90dc9c71
commit
2eab9fd92a
@ -79,15 +79,25 @@ support_test_gcc_latest_opt () {
|
||||
# separate component.
|
||||
# For the time being, we don't make $GCC_LATEST be GCC 15 on the CI
|
||||
# platform, because that would break branches where #9814 isn'f fixed yet.
|
||||
support_test_gcc15_opt () {
|
||||
support_test_gcc15_drivers_opt () {
|
||||
test -x /usr/local/gcc-15/bin/gcc-15
|
||||
}
|
||||
component_test_gcc15_opt () {
|
||||
component_test_gcc15_drivers_opt () {
|
||||
msg "build: GCC 15: full + test drivers dispatching to builtins"
|
||||
scripts/config.py full
|
||||
scripts/config.py unset MBEDTLS_PSA_CRYPTO_CONFIG
|
||||
loc_cflags="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST_ALL"
|
||||
loc_cflags="${loc_cflags} '-DMBEDTLS_USER_CONFIG_FILE=\"../tests/configs/user-config-for-test.h\"'"
|
||||
loc_cflags="${loc_cflags} -I../framework/tests/include -O2"
|
||||
# Until https://github.com/Mbed-TLS/mbedtls/issues/9814 is fixed,
|
||||
# disable the new problematic optimization.
|
||||
loc_cflags="${loc_cflags} -fzero-init-padding-bits=unions"
|
||||
# Also disable a warning that we don't yet comply to.
|
||||
make CC="/usr/local/gcc-15/bin/gcc-15" CFLAGS="-O2 -Wall -Wextra -Werror -fzero-init-padding-bits=unions -Wno-error=unterminated-string-initialization"
|
||||
loc_cflags="${loc_cflags} -Wno-error=unterminated-string-initialization"
|
||||
|
||||
make CC=/usr/local/gcc-15/bin/gcc-15 CFLAGS="${loc_cflags}" LDFLAGS="$ASAN_CFLAGS"
|
||||
|
||||
msg "test: GCC 15: full + test drivers dispatching to builtins"
|
||||
make test
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user