From c3e6cf2995b7c8c4620da8007ff672a8164a94ca Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 3 Nov 2025 19:34:56 +0100 Subject: [PATCH] Suppress expected output from commands when support_xxx is false Signed-off-by: Gilles Peskine --- tests/scripts/components-configuration.sh | 2 +- tests/scripts/components-platform.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/scripts/components-configuration.sh b/tests/scripts/components-configuration.sh index 72e7a86e3d..aec8ed8b91 100644 --- a/tests/scripts/components-configuration.sh +++ b/tests/scripts/components-configuration.sh @@ -229,7 +229,7 @@ support_build_baremetal () { # Older Glibc versions include time.h from other headers such as stdlib.h, # which makes the no-time.h-in-baremetal check fail. Ubuntu 16.04 has this # problem, Ubuntu 18.04 is ok. - ! grep -q -F time.h /usr/include/x86_64-linux-gnu/sys/types.h + ! grep -s -q -F time.h /usr/include/x86_64-linux-gnu/sys/types.h } component_test_no_psa_crypto_full_cmake_asan () { diff --git a/tests/scripts/components-platform.sh b/tests/scripts/components-platform.sh index 36cc858f6d..743d36de9c 100644 --- a/tests/scripts/components-platform.sh +++ b/tests/scripts/components-platform.sh @@ -19,7 +19,7 @@ support_test_aesni () { # in component_test_aesni_m32. (gcc -v 2>&1 | grep Target | grep -q x86_64) && [[ "$HOSTTYPE" == "x86_64" && "$OSTYPE" == "linux-gnu" ]] && - (lscpu | grep -qw aes) + (lscpu | grep -qw aes) 2>/dev/null } component_test_aesni () { # ~ 60s @@ -73,7 +73,7 @@ component_test_aesni () { # ~ 60s } support_test_aesni_m32 () { - support_test_m32_no_asm && (lscpu | grep -qw aes) + support_test_m32_no_asm && (lscpu | grep -qw aes) 2>/dev/null } component_test_aesni_m32 () { # ~ 60s