mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ci(coredump): fix capture dram tests
This commit is contained in:
parent
52b36a60f4
commit
0f96e51146
@ -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);
|
||||
|
@ -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:
|
||||
|
@ -921,10 +921,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)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user