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 <andrzej.glabek@nordicsemi.no>
This commit is contained in:
Andrzej Głąbek 2024-04-05 15:39:30 +02:00 committed by Anas Nashif
commit ccedcd1ac0

View file

@ -212,11 +212,13 @@ static int test_wdt_no_callback(void)
err = wdt_install_timeout(wdt, &m_cfg_wdt0);
if (err < 0) {
TC_PRINT("Watchdog install error\n");
return TC_FAIL;
}
err = wdt_setup(wdt, WDT_OPT_PAUSE_HALTED_BY_DBG);
if (err < 0) {
TC_PRINT("Watchdog setup error\n");
return TC_FAIL;
}
TC_PRINT("Waiting to restart MCU\n");