From fea48c2027d045f82e77b8a722f6fab6d61f6542 Mon Sep 17 00:00:00 2001 From: guoshichao Date: Wed, 19 Mar 2025 16:40:47 +0800 Subject: [PATCH] watchdog: disable the drivertest_watchdog_api testcase on some platform When we support the watchdog interrupt on the Armv7-A platform with the TEE enabled, the watchdog interrupt needs to be configured as a FIQ to avoid the impact of interrupt disabling in the AP. In this case, the drivertest_watchdog_api testcase cannot pass the test in such a scenario. This is because the drivertest_watchdog_api itself requires calling a specified callback after the watchdog interrupt is triggered, instead of directly dumping the AP's context and then asserting the system. Therefore, when both CONFIG_ARCH_ARMV7A and CONFIG_ARCH_HAVE_TRUSTZONE are enabled, we need to skip the current drivertest_watchdog_api testcase. Signed-off-by: guoshichao --- testing/drivers/drivertest/drivertest_watchdog.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testing/drivers/drivertest/drivertest_watchdog.c b/testing/drivers/drivertest/drivertest_watchdog.c index 1a4f54c495f..1021e8e1053 100644 --- a/testing/drivers/drivertest/drivertest_watchdog.c +++ b/testing/drivers/drivertest/drivertest_watchdog.c @@ -57,7 +57,11 @@ #define WDG_DEFAULT_TIMEOUT 2000 #define WDG_DEFAULT_TESTCASE 0 #define WDG_DEFAULT_DEVIATION 20 +#if defined(CONFIG_ARCH_ARMV7A) && defined(CONFIG_ARCH_HAVE_TRUSTZONE) +#define WDG_COUNT_TESTCASE 3 +#else #define WDG_COUNT_TESTCASE 4 +#endif #define OPTARG_TO_VALUE(value, type, base) \ do \ @@ -544,7 +548,9 @@ int main(int argc, FAR char *argv[]) cmocka_unit_test_prestate(drivertest_watchdog_feeding, &wdg_state), cmocka_unit_test_prestate(drivertest_watchdog_interrupts, &wdg_state), cmocka_unit_test_prestate(drivertest_watchdog_loop, &wdg_state), +#if !defined(CONFIG_ARCH_ARMV7A) || !defined(CONFIG_ARCH_HAVE_TRUSTZONE) cmocka_unit_test_prestate(drivertest_watchdog_api, &wdg_state) +#endif }; return cmocka_run_group_tests(tests, NULL, NULL);