mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
test(panic): remove WDT both CPU test
Test never worked on S3/P4 and was flakey on ESP32. Hard to design a reliable test case that triggers both WDT at the exact same time.
This commit is contained in:
committed by
Erhan Kurubas
parent
48e11e68a1
commit
d9c471d054
@ -32,7 +32,6 @@ void test_panic_extram_stack(void);
|
|||||||
|
|
||||||
#if !CONFIG_FREERTOS_UNICORE
|
#if !CONFIG_FREERTOS_UNICORE
|
||||||
void test_task_wdt_cpu1(void);
|
void test_task_wdt_cpu1(void);
|
||||||
void test_task_wdt_both_cpus(void);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test_storeprohibited(void);
|
void test_storeprohibited(void);
|
||||||
|
@ -89,7 +89,6 @@ void app_main(void)
|
|||||||
#endif
|
#endif
|
||||||
#if !CONFIG_FREERTOS_UNICORE
|
#if !CONFIG_FREERTOS_UNICORE
|
||||||
HANDLE_TEST(test_name, test_task_wdt_cpu1);
|
HANDLE_TEST(test_name, test_task_wdt_cpu1);
|
||||||
HANDLE_TEST(test_name, test_task_wdt_both_cpus);
|
|
||||||
#endif
|
#endif
|
||||||
HANDLE_TEST(test_name, test_storeprohibited);
|
HANDLE_TEST(test_name, test_storeprohibited);
|
||||||
HANDLE_TEST(test_name, test_cache_error);
|
HANDLE_TEST(test_name, test_cache_error);
|
||||||
|
@ -116,16 +116,6 @@ void test_task_wdt_cpu1(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_task_wdt_both_cpus(void)
|
|
||||||
{
|
|
||||||
xTaskCreatePinnedToCore(infinite_loop, "Infinite loop", 1024, NULL, 4, NULL, 1);
|
|
||||||
/* Give some time to the task on CPU 1 to be scheduled */
|
|
||||||
vTaskDelay(1);
|
|
||||||
xTaskCreatePinnedToCore(infinite_loop, "Infinite loop", 1024, NULL, 4, NULL, 0);
|
|
||||||
while (true) {
|
|
||||||
;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void __attribute__((no_sanitize_undefined)) test_storeprohibited(void)
|
void __attribute__((no_sanitize_undefined)) test_storeprohibited(void)
|
||||||
|
@ -185,42 +185,6 @@ def test_task_wdt_cpu1(dut: PanicTestDut, config: str, test_func_name: str) -> N
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('config', CONFIGS_DUAL_CORE, indirect=True)
|
|
||||||
@pytest.mark.generic
|
|
||||||
def test_task_wdt_both_cpus(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
|
||||||
if dut.target == 'esp32s3':
|
|
||||||
pytest.xfail(reason='Only prints "Print CPU 1 backtrace", IDF-6560')
|
|
||||||
dut.run_test_func(test_func_name)
|
|
||||||
dut.expect_exact(
|
|
||||||
'Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:'
|
|
||||||
)
|
|
||||||
dut.expect_exact('CPU 0: Infinite loop')
|
|
||||||
dut.expect_exact('CPU 1: Infinite loop')
|
|
||||||
if dut.is_xtensa:
|
|
||||||
# see comment in test_task_wdt_cpu0
|
|
||||||
dut.expect_none('register dump:')
|
|
||||||
dut.expect_exact('Print CPU 0 (current core) backtrace')
|
|
||||||
dut.expect_backtrace()
|
|
||||||
dut.expect_exact('Print CPU 1 backtrace')
|
|
||||||
dut.expect_backtrace()
|
|
||||||
# On Xtensa, we get incorrect backtrace from GDB in this test
|
|
||||||
expected_backtrace = ['infinite_loop', 'vPortTaskWrapper']
|
|
||||||
else:
|
|
||||||
assert False, 'No dual-core RISC-V chips yet, check this test case later'
|
|
||||||
dut.expect_elf_sha256()
|
|
||||||
dut.expect_none('Guru Meditation')
|
|
||||||
|
|
||||||
coredump_pattern = (PANIC_ABORT_PREFIX +
|
|
||||||
'Task watchdog got triggered. '
|
|
||||||
'The following tasks/users did not reset the watchdog in time:\n - IDLE1 (CPU 1)\n - IDLE0 (CPU 0)')
|
|
||||||
common_test(
|
|
||||||
dut,
|
|
||||||
config,
|
|
||||||
expected_backtrace=expected_backtrace,
|
|
||||||
expected_coredump=[coredump_pattern]
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('config', CONFIGS_EXTRAM_STACK, indirect=True)
|
@pytest.mark.parametrize('config', CONFIGS_EXTRAM_STACK, indirect=True)
|
||||||
def test_panic_extram_stack(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
def test_panic_extram_stack(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||||
dut.run_test_func(test_func_name)
|
dut.run_test_func(test_func_name)
|
||||||
|
Reference in New Issue
Block a user