Skip to content

Commit 9a9bc10

Browse files
asmellbykartben
authored andcommitted
tests: drivers: watchdog: Support requiring PM for pause test
Some devices require PM to go to sufficiently deep sleep modes for the watchdog to get paused using WDT_OPT_PAUSE_IN_SLEEP. Signed-off-by: Aksel Skauge Mellbye <[email protected]>
1 parent b2e21d5 commit 9a9bc10

File tree

1 file changed

+6
-0
lines changed
  • tests/drivers/watchdog/wdt_error_cases/src

1 file changed

+6
-0
lines changed

tests/drivers/watchdog/wdt_error_cases/src/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#define WDT_OPT_PAUSE_HALTED_BY_DBG_SUPPORTED BIT(6)
3838
#define WDT_FEED_CAN_STALL BIT(7)
3939
#define WDT_WINDOW_MIN_SUPPORTED BIT(8)
40+
#define WDT_OPT_PAUSE_IN_SLEEP_REQUIRES_PM BIT(9)
4041

4142
/* Common for all targets: */
4243
#define DEFAULT_WINDOW_MAX (500U)
@@ -436,6 +437,11 @@ ZTEST(wdt_coverage, test_06b_wdt_setup_WDT_OPT_PAUSE_IN_SLEEP_functional)
436437
ztest_test_skip();
437438
}
438439

440+
if ((WDT_TEST_FLAGS & WDT_OPT_PAUSE_IN_SLEEP_REQUIRES_PM) && !IS_ENABLED(CONFIG_PM)) {
441+
/* Skip this test because WDT_OPT_PAUSE_IN_SLEEP can't be tested without PM. */
442+
ztest_test_skip();
443+
}
444+
439445
/* When test fails, watchdog sets m_test_06b_value to TEST_06B_TAG in WDT callback
440446
* wdt_test_06b_cb. Then, target is reset. Check value of m_test_06b_value to prevent reset
441447
* loop on this test.

0 commit comments

Comments
 (0)