tests: wdt_basic_api: pass when requested test is not supported
Not all watchdog devices support a warning callback before reset. If the driver refuses to accept that configuration record the test as having passed. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
5eef2c5f24
commit
cb5e45c884
|
@ -218,6 +218,12 @@ static int test_wdt_callback_1(void)
|
|||
m_cfg_wdt0.window.max = 2000U;
|
||||
err = wdt_install_timeout(wdt, &m_cfg_wdt0);
|
||||
if (err < 0) {
|
||||
if (err == -ENOTSUP) {
|
||||
TC_PRINT("CB1 not supported on platform\n");
|
||||
m_testcase_index++;
|
||||
return TC_PASS;
|
||||
|
||||
}
|
||||
TC_PRINT("Watchdog install error\n");
|
||||
return TC_FAIL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue