Merge branch 'fix/panic_spiram_xip_irom_drom_alignment_no_gap_v6.1' into 'release/v6.1'

Handle absent IROM/DROM alignment gap in SPIRAM-XIP memprot tests (v6.1)

See merge request espressif/esp-idf!50233
This commit is contained in:
Mahavir Jain
2026-07-02 11:54:18 +05:30
@@ -1117,16 +1117,13 @@ def test_non_cache_drom_reg_execute_violation(dut: PanicTestDut, test_func_name:
def spiram_xip_irom_alignment_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> None: def spiram_xip_irom_alignment_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
dut.run_test_func(test_func_name) dut.run_test_func(test_func_name)
try: match = dut.expect(r'(IROM alignment gap not added into heap|Instruction access fault)')
dut.expect_gme('Instruction access fault') if match.group(1) == b'Instruction access fault':
except Exception: dut.expect_reg_dump(0)
dut.expect_exact('SPIRAM (IROM): IROM alignment gap not added into heap')
dut.expect_reg_dump(0)
dut.expect_cpu_reset() dut.expect_cpu_reset()
@pytest.mark.generic @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']) @idf_parametrize('config, target', CONFIGS_MEMPROT_SPIRAM_XIP_IROM_ALIGNMENT_HEAP, indirect=['config', 'target'])
def test_spiram_xip_irom_alignment_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> None: 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) spiram_xip_irom_alignment_reg_execute_violation(dut, test_func_name)
@@ -1143,19 +1140,14 @@ def test_non_cache_spiram_xip_irom_alignment_reg_execute_violation(dut: PanicTes
def spiram_xip_drom_alignment_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> None: def spiram_xip_drom_alignment_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> None:
dut.run_test_func(test_func_name) dut.run_test_func(test_func_name)
try: fault_reason = 'InstructionFetchError' if dut.target == 'esp32s3' else 'Instruction access fault'
if dut.target == 'esp32s3': match = dut.expect(rf'(DROM alignment gap not added into heap|{fault_reason})')
dut.expect_gme('InstructionFetchError') if match.group(1) != b'DROM alignment gap not added into heap':
else: dut.expect_reg_dump(0)
dut.expect_gme('Instruction access fault')
except Exception:
dut.expect_exact('SPIRAM (DROM): DROM alignment gap not added into heap')
dut.expect_reg_dump(0)
dut.expect_cpu_reset() dut.expect_cpu_reset()
@pytest.mark.generic @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']) @idf_parametrize('config, target', CONFIGS_MEMPROT_SPIRAM_XIP_DROM_ALIGNMENT_HEAP, indirect=['config', 'target'])
def test_spiram_xip_drom_alignment_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> None: 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) spiram_xip_drom_alignment_reg_execute_violation(dut, test_func_name)