From 85e7ef753d64fb209cbec66b85dfd4d3ca5c04c4 Mon Sep 17 00:00:00 2001 From: Erhan Kurubas Date: Mon, 29 Dec 2025 13:12:24 +0100 Subject: [PATCH] test(panic): improve stack dump capture to return full hex content --- .../system/panic/test_panic_util/panic_dut.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 db42588304..2d5ef5d89e 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 @@ -91,9 +91,17 @@ class PanicTestDut(IdfDut): else: assert match - def expect_stack_dump(self) -> None: + def expect_stack_dump(self) -> Any: + """Expect and capture the entire stack memory dump (RISC-V only). + + Returns: + str: The full stack dump hex data + """ assert not self.is_xtensa, 'Stack memory dump is only printed on RISC-V' self.expect_exact('Stack memory:') + pattern = re.compile(rb'\r?\n\r?\n') + result = self.expect(pattern, return_what_before_match=True).decode('utf-8') + return result.strip() def expect_gme(self, reason: str) -> None: """Expect method for Guru Meditation Errors"""