Skip to content

Commit ccedcd1

Browse files
ananglnashif
authored andcommitted
tests: drivers: wdt_basic_api: Add missing failure indications
Two API calls that are supposed to set up the watchdog are not actually causing the test to fail, only error messages are printed. This patch adds the proper return statements. Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent 84898f6 commit ccedcd1

File tree

1 file changed

+2
-0
lines changed
  • tests/drivers/watchdog/wdt_basic_api/src

1 file changed

+2
-0
lines changed

tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,13 @@ static int test_wdt_no_callback(void)
212212
err = wdt_install_timeout(wdt, &m_cfg_wdt0);
213213
if (err < 0) {
214214
TC_PRINT("Watchdog install error\n");
215+
return TC_FAIL;
215216
}
216217

217218
err = wdt_setup(wdt, WDT_OPT_PAUSE_HALTED_BY_DBG);
218219
if (err < 0) {
219220
TC_PRINT("Watchdog setup error\n");
221+
return TC_FAIL;
220222
}
221223

222224
TC_PRINT("Waiting to restart MCU\n");

0 commit comments

Comments
 (0)