mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Merge branch 'ci/panic_tests_p4_s31' into 'master'
test(system): enable panic tests for P4 and S31 Closes IDF-14348 See merge request espressif/esp-idf!47442
This commit is contained in:
@@ -137,12 +137,7 @@ tools/test_apps/system/no_embedded_paths:
|
||||
|
||||
tools/test_apps/system/panic:
|
||||
enable:
|
||||
- if: INCLUDE_DEFAULT == 1 or IDF_TARGET in ["esp32p4"] # preview targets
|
||||
disable:
|
||||
- if: IDF_TARGET == "esp32p4" # TODO: IDF-14348
|
||||
- if: IDF_TARGET == "esp32s31"
|
||||
temporary: true
|
||||
reason: cannot pass build because flash encryption is not supported yet # TODO: [ESP32S31] IDF-14628
|
||||
- if: INCLUDE_DEFAULT == 1 or IDF_TARGET in ["esp32s31"]
|
||||
|
||||
tools/test_apps/system/ram_loadable_app:
|
||||
disable:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | ESP32-S31 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- | -------- | --------- |
|
||||
|
||||
# Introduction
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ TARGETS_XTENSA_DUAL_CORE = ['esp32', 'esp32s3']
|
||||
TARGETS_XTENSA = TARGETS_XTENSA_SINGLE_CORE + TARGETS_XTENSA_DUAL_CORE
|
||||
|
||||
TARGETS_RISCV_SINGLE_CORE = ['esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32c61']
|
||||
TARGETS_RISCV_DUAL_CORE = ['esp32p4']
|
||||
TARGETS_RISCV_DUAL_CORE = ['esp32p4', 'esp32s31']
|
||||
TARGETS_RISCV_TARGETS = TARGETS_RISCV_SINGLE_CORE + TARGETS_RISCV_DUAL_CORE
|
||||
|
||||
TARGETS_RISCV = TARGETS_RISCV_SINGLE_CORE + TARGETS_RISCV_DUAL_CORE
|
||||
@@ -199,7 +199,6 @@ def common_test(
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_task_wdt_cpu0(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
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:')
|
||||
@@ -232,7 +231,6 @@ def test_task_wdt_cpu0(dut: PanicTestDut, config: str, test_func_name: str) -> N
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_DUAL_CORE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_task_wdt_cpu1(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
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:')
|
||||
@@ -297,7 +295,6 @@ def test_panic_extram_stack(dut: PanicTestDut, config: str) -> None:
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_int_wdt(dut: PanicTestDut, target: str, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
dut.expect_gme('Interrupt wdt timeout on CPU0')
|
||||
@@ -320,7 +317,6 @@ def test_int_wdt(dut: PanicTestDut, target: str, config: str, test_func_name: st
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_int_wdt_cache_disabled(dut: PanicTestDut, target: str, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
dut.expect_gme('Interrupt wdt timeout on CPU0')
|
||||
@@ -343,7 +339,6 @@ def test_int_wdt_cache_disabled(dut: PanicTestDut, target: str, config: str, tes
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_cache_error(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
if dut.target in ['esp32c3', 'esp32c2']:
|
||||
@@ -375,7 +370,6 @@ def test_cache_error(dut: PanicTestDut, config: str, test_func_name: str) -> Non
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_stack_overflow(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
if dut.is_xtensa:
|
||||
@@ -397,7 +391,6 @@ def test_stack_overflow(dut: PanicTestDut, config: str, test_func_name: str) ->
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_instr_fetch_prohibited(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
if dut.is_xtensa:
|
||||
@@ -425,7 +418,6 @@ def test_instr_fetch_prohibited(dut: PanicTestDut, config: str, test_func_name:
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_illegal_instruction(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
if dut.is_xtensa:
|
||||
@@ -462,21 +454,18 @@ def check_x_prohibited(dut: PanicTestDut, config: str, test_func_name: str, oper
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_storeprohibited(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
check_x_prohibited(dut, config, test_func_name, 'Store')
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_loadprohibited(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
check_x_prohibited(dut, config, test_func_name, 'Load')
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_abort(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
regex_pattern = rb'abort\(\) was called at PC [0-9xa-f]+ on core 0'
|
||||
@@ -499,7 +488,6 @@ def test_abort(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_UBSAN, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_ub(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
regex_pattern = rb'Undefined behavior of type out_of_bounds'
|
||||
@@ -526,7 +514,6 @@ def test_ub(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_abort_cache_disabled(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
if dut.target == 'esp32s2':
|
||||
pytest.xfail(reason='Crashes in itoa which is not in ROM, IDF-3572')
|
||||
@@ -551,7 +538,6 @@ def test_abort_cache_disabled(dut: PanicTestDut, config: str, test_func_name: st
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_assert(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.*$'
|
||||
@@ -574,7 +560,6 @@ def test_assert(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_assert_cache_disabled(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
if dut.target == 'esp32s2':
|
||||
pytest.xfail(reason='Crashes in itoa which is not in ROM, IDF-3572')
|
||||
@@ -612,7 +597,6 @@ def cache_error_log_check(dut: PanicTestDut) -> None:
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIG_PANIC, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_assert_cache_write_back_error_can_print_backtrace(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
cache_error_log_check(dut)
|
||||
@@ -621,7 +605,6 @@ def test_assert_cache_write_back_error_can_print_backtrace(dut: PanicTestDut, co
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', ['panic_delay'], indirect=True)
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_panic_delay(dut: PanicTestDut) -> None:
|
||||
dut.run_test_func('test_storeprohibited')
|
||||
try:
|
||||
@@ -639,7 +622,6 @@ def test_panic_delay(dut: PanicTestDut) -> None:
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIG_PANIC, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_panic_handler_stuck0(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
|
||||
@@ -652,7 +634,6 @@ def test_panic_handler_stuck0(dut: PanicTestDut, config: str, test_func_name: st
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIG_PANIC_DUAL_CORE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_panic_handler_stuck1(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
|
||||
@@ -665,7 +646,6 @@ def test_panic_handler_stuck1(dut: PanicTestDut, config: str, test_func_name: st
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIG_PANIC, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_panic_handler_crash0(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
|
||||
@@ -684,7 +664,6 @@ def test_panic_handler_crash0(dut: PanicTestDut, config: str, test_func_name: st
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIG_PANIC_DUAL_CORE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_panic_handler_crash1(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
|
||||
@@ -811,7 +790,6 @@ CONFIGS_MEMPROT_INVALID_REGION_PROTECTION_USING_PMA = list(
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_DCACHE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_dcache_read_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
dut.expect_exact(r'Test error: Test function has returned')
|
||||
@@ -822,7 +800,6 @@ def test_dcache_read_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.xfail(targets=['esp32s2'], reason='Incorrect panic reason may be observed', run=False)
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_DCACHE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_dcache_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
dut.expect_gme('Memory protection fault')
|
||||
@@ -853,14 +830,12 @@ def iram_reg1_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_IDRAM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_iram_reg1_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
iram_reg1_write_violation(dut, test_func_name)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_IDRAM_L2_MEM_NON_CACHE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_non_cache_iram_reg1_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
if dut.target == 'esp32p4' and not dut.app.sdkconfig.get('ESP32P4_SELECTS_REV_LESS_V3'):
|
||||
iram_reg1_write_violation(dut, test_func_name)
|
||||
@@ -892,14 +867,12 @@ def iram_reg_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_IDRAM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_iram_reg2_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
iram_reg_write_violation(dut, test_func_name)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_IDRAM_L2_MEM_NON_CACHE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_non_cache_iram_reg2_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
if dut.target == 'esp32p4' and not dut.app.sdkconfig.get('ESP32P4_SELECTS_REV_LESS_V3'):
|
||||
iram_reg_write_violation(dut, test_func_name)
|
||||
@@ -931,14 +904,12 @@ def iram_reg3_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_IDRAM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_iram_reg3_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
iram_reg_write_violation(dut, test_func_name)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_IDRAM_L2_MEM_NON_CACHE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_non_cache_iram_reg3_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
if dut.target == 'esp32p4' and not dut.app.sdkconfig.get('ESP32P4_SELECTS_REV_LESS_V3'):
|
||||
iram_reg_write_violation(dut, test_func_name)
|
||||
@@ -972,14 +943,12 @@ def iram_reg4_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
@pytest.mark.xfail(targets=['esp32s2'], reason='Incorrect panic reason may be observed', run=False)
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_IDRAM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_iram_reg4_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
iram_reg_write_violation(dut, test_func_name)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_IDRAM_L2_MEM_NON_CACHE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_non_cache_iram_reg4_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
if dut.target == 'esp32p4' and not dut.app.sdkconfig.get('ESP32P4_SELECTS_REV_LESS_V3'):
|
||||
iram_reg_write_violation(dut, test_func_name)
|
||||
@@ -1006,14 +975,12 @@ def dram_reg1_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
@pytest.mark.xfail(targets=['esp32s2'], reason='Multiple panic reasons for the same test may surface', run=False)
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_IDRAM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_dram_reg1_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
dram_reg1_execute_violation(dut, test_func_name)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_IDRAM_L2_MEM_NON_CACHE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_non_cache_dram_reg1_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
if dut.target == 'esp32p4' and not dut.app.sdkconfig.get('ESP32P4_SELECTS_REV_LESS_V3'):
|
||||
dram_reg1_execute_violation(dut, test_func_name)
|
||||
@@ -1039,14 +1006,12 @@ def dram_reg2_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
@pytest.mark.xfail(targets=['esp32s2'], reason='Multiple panic reasons for the same test may surface', run=False)
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_IDRAM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_dram_reg2_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
dram_reg2_execute_violation(dut, test_func_name)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_IDRAM_L2_MEM_NON_CACHE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_non_cache_dram_reg2_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
if dut.target == 'esp32p4' and not dut.app.sdkconfig.get('ESP32P4_SELECTS_REV_LESS_V3'):
|
||||
dram_reg2_execute_violation(dut, test_func_name)
|
||||
@@ -1055,7 +1020,6 @@ def test_non_cache_dram_reg2_execute_violation(dut: PanicTestDut, test_func_name
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_RTC_FAST_MEM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_rtc_fast_reg1_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
dut.expect_exact(r'Test error: Test function has returned')
|
||||
@@ -1068,7 +1032,6 @@ def test_rtc_fast_reg1_execute_violation(dut: PanicTestDut, test_func_name: str)
|
||||
reason='Not a violation condition, no PMS peripheral cases',
|
||||
)
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_RTC_FAST_MEM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_rtc_fast_reg2_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
dut.expect_gme('Memory protection fault')
|
||||
@@ -1092,7 +1055,6 @@ def test_rtc_fast_reg2_execute_violation(dut: PanicTestDut, test_func_name: str)
|
||||
@pytest.mark.xfail(targets=['esp32s2'], reason='Multiple panic reasons for the same test may surface', run=False)
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_RTC_FAST_MEM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_rtc_fast_reg3_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
|
||||
@@ -1118,7 +1080,6 @@ def test_rtc_fast_reg3_execute_violation(dut: PanicTestDut, test_func_name: str)
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_RTC_SLOW_MEM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_rtc_slow_reg1_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
dut.expect_gme('Memory protection fault')
|
||||
@@ -1130,7 +1091,6 @@ def test_rtc_slow_reg1_execute_violation(dut: PanicTestDut, test_func_name: str)
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_RTC_SLOW_MEM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_rtc_slow_reg2_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
dut.expect_gme('Memory protection fault')
|
||||
@@ -1150,14 +1110,12 @@ def irom_reg_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_FLASH_IDROM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_irom_reg_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
irom_reg_write_violation(dut, test_func_name)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_FLASH_IDROM_L2_NON_CACHE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_non_cache_irom_reg_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
if dut.target == 'esp32p4' and not dut.app.sdkconfig.get('ESP32P4_SELECTS_REV_LESS_V3'):
|
||||
irom_reg_write_violation(dut, test_func_name)
|
||||
@@ -1173,14 +1131,12 @@ def drom_reg_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_FLASH_IDROM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_drom_reg_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
drom_reg_write_violation(dut, test_func_name)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_FLASH_IDROM_L2_NON_CACHE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_non_cache_drom_reg_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
if dut.target == 'esp32p4' and not dut.app.sdkconfig.get('ESP32P4_SELECTS_REV_LESS_V3'):
|
||||
drom_reg_write_violation(dut, test_func_name)
|
||||
@@ -1196,14 +1152,12 @@ def drom_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_FLASH_IDROM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_drom_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
drom_reg_execute_violation(dut, test_func_name)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_FLASH_IDROM_L2_NON_CACHE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_non_cache_drom_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
if dut.target == 'esp32p4' and not dut.app.sdkconfig.get('ESP32P4_SELECTS_REV_LESS_V3'):
|
||||
drom_reg_execute_violation(dut, test_func_name)
|
||||
@@ -1222,7 +1176,6 @@ def spiram_xip_irom_alignment_reg_execute_violation(dut: PanicTestDut, test_func
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32c5'], reason='TODO IDF-14835')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_SPIRAM_XIP_IROM_ALIGNMENT_HEAP, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_spiram_xip_irom_alignment_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
spiram_xip_irom_alignment_reg_execute_violation(dut, test_func_name)
|
||||
|
||||
@@ -1231,7 +1184,6 @@ def test_spiram_xip_irom_alignment_reg_execute_violation(dut: PanicTestDut, test
|
||||
@idf_parametrize(
|
||||
'config, target', CONFIGS_MEMPROT_SPIRAM_XIP_IROM_ALIGNMENT_HEAP_L2_NON_CACHE, indirect=['config', 'target']
|
||||
)
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_non_cache_spiram_xip_irom_alignment_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
if dut.target == 'esp32p4' and not dut.app.sdkconfig.get('ESP32P4_SELECTS_REV_LESS_V3'):
|
||||
spiram_xip_irom_alignment_reg_execute_violation(dut, test_func_name)
|
||||
@@ -1253,7 +1205,6 @@ def spiram_xip_drom_alignment_reg_execute_violation(dut: PanicTestDut, test_func
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32c5'], reason='TODO IDF-14835')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_SPIRAM_XIP_DROM_ALIGNMENT_HEAP, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_spiram_xip_drom_alignment_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
spiram_xip_drom_alignment_reg_execute_violation(dut, test_func_name)
|
||||
|
||||
@@ -1262,7 +1213,6 @@ def test_spiram_xip_drom_alignment_reg_execute_violation(dut: PanicTestDut, test
|
||||
@idf_parametrize(
|
||||
'config, target', CONFIGS_MEMPROT_SPIRAM_XIP_DROM_ALIGNMENT_HEAP_L2_NON_CACHE, indirect=['config', 'target']
|
||||
)
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_non_cache_spiram_xip_drom_alignment_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
if dut.target == 'esp32p4' and not dut.app.sdkconfig.get('ESP32P4_SELECTS_REV_LESS_V3'):
|
||||
spiram_xip_drom_alignment_reg_execute_violation(dut, test_func_name)
|
||||
@@ -1271,7 +1221,6 @@ def test_non_cache_spiram_xip_drom_alignment_reg_execute_violation(dut: PanicTes
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_INVALID_REGION_PROTECTION_USING_PMA, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_invalid_memory_region_write_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
dut.expect_gme('Store access fault')
|
||||
@@ -1282,7 +1231,6 @@ def test_invalid_memory_region_write_violation(dut: PanicTestDut, test_func_name
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners')
|
||||
@idf_parametrize('config, target', CONFIGS_MEMPROT_INVALID_REGION_PROTECTION_USING_PMA, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_invalid_memory_region_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
dut.expect_gme('Instruction access fault')
|
||||
@@ -1293,7 +1241,6 @@ def test_invalid_memory_region_execute_violation(dut: PanicTestDut, test_func_na
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', ['gdbstub_coredump'], indirect=True)
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_gdbstub_coredump(dut: PanicTestDut) -> None:
|
||||
test_func_name = 'test_storeprohibited'
|
||||
dut.run_test_func(test_func_name)
|
||||
@@ -1319,7 +1266,6 @@ def test_hw_stack_guard_cpu(dut: PanicTestDut, cpu: int) -> None:
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_HW_STACK_GUARD, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_hw_stack_guard_cpu0(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
test_hw_stack_guard_cpu(dut, 0)
|
||||
@@ -1328,7 +1274,6 @@ def test_hw_stack_guard_cpu0(dut: PanicTestDut, config: str, test_func_name: str
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_HW_STACK_GUARD_DUAL_CORE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_hw_stack_guard_cpu1(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
test_hw_stack_guard_cpu(dut, 1)
|
||||
@@ -1338,7 +1283,6 @@ def test_hw_stack_guard_cpu1(dut: PanicTestDut, config: str, test_func_name: str
|
||||
@pytest.mark.parametrize('config', ['panic'], indirect=True)
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_illegal_access(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
if dut.is_xtensa:
|
||||
@@ -1352,7 +1296,6 @@ def test_illegal_access(dut: PanicTestDut, config: str, test_func_name: str) ->
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIG_CAPTURE_DRAM, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
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.*$'
|
||||
@@ -1409,14 +1352,12 @@ def _test_coredump_summary(dut: PanicTestDut, flash_encrypted: bool, coredump_en
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIG_COREDUMP_SUMMARY, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_coredump_summary(dut: PanicTestDut) -> None:
|
||||
_test_coredump_summary(dut, False, False)
|
||||
|
||||
|
||||
@pytest.mark.flash_encryption
|
||||
@idf_parametrize('config, target', CONFIG_COREDUMP_SUMMARY_FLASH_ENCRYPTED, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_coredump_summary_flash_encrypted(dut: PanicTestDut, config: str) -> None:
|
||||
_test_coredump_summary(dut, True, config == 'coredump_flash_encrypted')
|
||||
|
||||
@@ -1424,7 +1365,6 @@ def test_coredump_summary_flash_encrypted(dut: PanicTestDut, config: str) -> Non
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config', ['coredump_flash_default'], indirect=['config'])
|
||||
@idf_parametrize('target', TARGETS_ALL, indirect=['target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_tcb_corrupted(dut: PanicTestDut, target: str, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
if dut.is_xtensa:
|
||||
@@ -1458,7 +1398,6 @@ def test_tcb_corrupted(dut: PanicTestDut, target: str, config: str, test_func_na
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIG_PANIC_HALT, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')
|
||||
def test_panic_halt(dut: PanicTestDut) -> None:
|
||||
dut.run_test_func('test_panic_halt')
|
||||
dut.expect_exact('CPU halted.', timeout=30)
|
||||
|
||||
Reference in New Issue
Block a user