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>
diff --git a/tests/scripts/components-compiler.sh b/tests/scripts/components-compiler.sh
index 5b78c83..0110d70 100644
--- a/tests/scripts/components-compiler.sh
+++ b/tests/scripts/components-compiler.sh
@@ -80,15 +80,23 @@
# 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
+ loc_cflags="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_CONFIG_ADJUST_TEST_ACCELERATORS"
+ 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
}