diff --git a/tools/test_apps/system/panic/pytest_panic.py b/tools/test_apps/system/panic/pytest_panic.py index 1a864df1be..6898ede25d 100644 --- a/tools/test_apps/system/panic/pytest_panic.py +++ b/tools/test_apps/system/panic/pytest_panic.py @@ -9,37 +9,50 @@ import pexpect import pytest from test_panic_util import PanicTestDut -# Markers for all the targets this test currently runs on -TARGETS_TESTED = [ - pytest.mark.esp32, +TARGETS_XTENSA_SINGLE_CORE = [ pytest.mark.esp32s2, - pytest.mark.esp32c3, +] + +TARGETS_XTENSA_DUAL_CORE = [ + pytest.mark.esp32, pytest.mark.esp32s3, +] + +TARGETS_XTENSA = TARGETS_XTENSA_SINGLE_CORE + TARGETS_XTENSA_DUAL_CORE + +TARGETS_RISCV_SINGLE_CORE = [ pytest.mark.esp32c2, + pytest.mark.esp32c3, pytest.mark.esp32c6, pytest.mark.esp32h2, +] + +TARGETS_RISCV_DUAL_CORE = [ pytest.mark.esp32p4, ] +TARGETS_RISCV = TARGETS_RISCV_SINGLE_CORE + TARGETS_RISCV_DUAL_CORE + +# Markers for all the targets this test currently runs on +TARGETS_ALL = TARGETS_XTENSA + TARGETS_RISCV + +# Some tests only run on dual-core targets, they use the config below. +TARGETS_DUAL_CORE = TARGETS_XTENSA_DUAL_CORE + TARGETS_RISCV_DUAL_CORE + # Most tests run on all targets and with all configs. # This list is passed to @pytest.mark.parametrize for each of the test cases. # It creates an outer product of the sets: [configs] x [targets], # with some exceptions. CONFIGS = [ - pytest.param('coredump_flash_bin_crc', marks=TARGETS_TESTED), - pytest.param('coredump_flash_elf_sha', marks=TARGETS_TESTED), - pytest.param('coredump_uart_bin_crc', marks=TARGETS_TESTED), - pytest.param('coredump_uart_elf_crc', marks=TARGETS_TESTED), - pytest.param('gdbstub', marks=TARGETS_TESTED), - pytest.param('panic', marks=TARGETS_TESTED), + pytest.param('coredump_flash_bin_crc', marks=TARGETS_ALL), + pytest.param('coredump_flash_elf_sha', marks=TARGETS_ALL), + pytest.param('coredump_uart_bin_crc', marks=TARGETS_ALL), + pytest.param('coredump_uart_elf_crc', marks=TARGETS_ALL), + pytest.param('coredump_flash_custom_stack', marks=TARGETS_RISCV), + pytest.param('gdbstub', marks=TARGETS_ALL), + pytest.param('panic', marks=TARGETS_ALL), ] -# Some tests only run on dual-core targets, they use the config below. -TARGETS_DUAL_CORE = [ - pytest.mark.esp32, - pytest.mark.esp32s3, - pytest.mark.esp32p4, -] CONFIGS_DUAL_CORE = [ pytest.param('coredump_flash_bin_crc', marks=TARGETS_DUAL_CORE), pytest.param('coredump_flash_elf_sha', marks=TARGETS_DUAL_CORE), @@ -60,28 +73,20 @@ CONFIGS_EXTRAM_STACK = [ pytest.param('coredump_extram_stack', marks=[pytest.mark.esp32s3, pytest.mark.quad_psram]), ] -TARGETS_HW_STACK_GUARD = [ - pytest.mark.esp32c2, - pytest.mark.esp32c3, - pytest.mark.esp32c6, - pytest.mark.esp32h2, - pytest.mark.esp32p4, -] - CONFIGS_HW_STACK_GUARD = [ - pytest.param('coredump_flash_bin_crc', marks=TARGETS_HW_STACK_GUARD), - pytest.param('coredump_uart_bin_crc', marks=TARGETS_HW_STACK_GUARD), - pytest.param('coredump_uart_elf_crc', marks=TARGETS_HW_STACK_GUARD), - pytest.param('gdbstub', marks=TARGETS_HW_STACK_GUARD), - pytest.param('panic', marks=TARGETS_HW_STACK_GUARD), + pytest.param('coredump_flash_bin_crc', marks=TARGETS_RISCV), + pytest.param('coredump_uart_bin_crc', marks=TARGETS_RISCV), + pytest.param('coredump_uart_elf_crc', marks=TARGETS_RISCV), + pytest.param('gdbstub', marks=TARGETS_RISCV), + pytest.param('panic', marks=TARGETS_RISCV), ] CONFIGS_HW_STACK_GUARD_DUAL_CORE = [ - pytest.param('coredump_flash_bin_crc', marks=[pytest.mark.esp32p4]), - pytest.param('coredump_uart_bin_crc', marks=[pytest.mark.esp32p4]), - pytest.param('coredump_uart_elf_crc', marks=[pytest.mark.esp32p4]), - pytest.param('gdbstub', marks=[pytest.mark.esp32p4]), - pytest.param('panic', marks=[pytest.mark.esp32p4]), + pytest.param('coredump_flash_bin_crc', marks=TARGETS_RISCV_DUAL_CORE), + pytest.param('coredump_uart_bin_crc', marks=TARGETS_RISCV_DUAL_CORE), + pytest.param('coredump_uart_elf_crc', marks=TARGETS_RISCV_DUAL_CORE), + pytest.param('gdbstub', marks=TARGETS_RISCV_DUAL_CORE), + pytest.param('panic', marks=TARGETS_RISCV_DUAL_CORE), ] # Panic abort information will start with this string. diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_custom_stack b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_custom_stack new file mode 100644 index 0000000000..b85ce194dc --- /dev/null +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_custom_stack @@ -0,0 +1,5 @@ +CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y +CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y +CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y +CONFIG_LOG_DEFAULT_LEVEL_INFO=y +CONFIG_ESP_COREDUMP_STACK_SIZE=2048 diff --git a/tools/test_apps/system/panic/test_panic_util/panic_dut.py b/tools/test_apps/system/panic/test_panic_util/panic_dut.py index 8600754c67..d7eae8d306 100644 --- a/tools/test_apps/system/panic/test_panic_util/panic_dut.py +++ b/tools/test_apps/system/panic/test_panic_util/panic_dut.py @@ -140,6 +140,7 @@ class PanicTestDut(IdfDut): espcoredump_args = [ sys.executable, espcoredump_script, + '-b115200', 'info_corefile', '--core', coredump_file_name,