ci(coredump): fix capture dram tests

pull/13854/head
Erhan Kurubas 2024-05-06 15:41:25 +02:00
rodzic 60a99a9f97
commit 551d91ea8a
4 zmienionych plików z 13 dodań i 3 usunięć

Wyświetl plik

@ -482,7 +482,7 @@ static int elf_write_tasks_data(core_dump_elf_t *self)
#if CONFIG_ESP_COREDUMP_CAPTURE_DRAM
/* Only crashed task data will be saved here. The other task's data will be automatically saved within the sections */
if (esp_core_dump_get_current_task_handle() != task_iter.pxTaskHandle)
if (esp_core_dump_get_current_task_handle() == task_iter.pxTaskHandle)
#endif
{
ret = elf_save_task(self, &task_hdr);

Wyświetl plik

@ -17,7 +17,7 @@ if(CONFIG_TEST_MEMPROT)
endif()
endif()
if(NOT CONFIG_TEST_MEMPROT)
if(NOT CONFIG_TEST_MEMPROT AND NOT CONFIG_ESP_COREDUMP_CAPTURE_DRAM)
# Enable UBSAN checks
#
# shift-base sanitizer is disabled due to the following pattern found in register header files:

Wyświetl plik

@ -957,10 +957,19 @@ def test_illegal_access(dut: PanicTestDut, config: str, test_func_name: str) ->
@pytest.mark.generic
def test_capture_dram(dut: PanicTestDut, config: str, test_func_name: str) -> None:
dut.run_test_func(test_func_name)
regex_pattern = rb'assert failed:[\s\w()]*?\s[.\w/]*\.(?:c|cpp|h|hpp):\d.*$'
dut.expect(re.compile(regex_pattern, re.MULTILINE))
if dut.is_xtensa:
dut.expect_backtrace()
else:
dut.expect_stack_dump()
dut.expect_elf_sha256()
dut.expect_none(['Guru Meditation', 'Re-entered core dump'])
dut.expect_exact('Save core dump to flash...')
dut.expect_exact('Core dump has been saved to flash.')
dut.expect('Rebooting...')
core_elf_file = dut.process_coredump_flash()
dut.start_gdb_for_coredump(core_elf_file)

Wyświetl plik

@ -4,3 +4,4 @@ CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y
CONFIG_ESP_COREDUMP_CAPTURE_DRAM=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_capture_dram.csv"
CONFIG_LOG_DEFAULT_LEVEL_INFO=y