From 7e569e152482324463859e0d8fdbaa6fe9b40dda Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Fri, 11 Feb 2022 19:07:13 +0700 Subject: [PATCH] test_apps/panic: GDB in esp-2021r2-patch3 toolchain doesn't contain the fix for interrupted backtraced Revert "test_apps/panic: remove workaround for incorrect GDB backtrace" This reverts commit 3e3fa4bff29e64cb684c920d2f881fc0de199231. --- tools/test_apps/system/panic/panic_tests.py | 39 +++++++++++---------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/tools/test_apps/system/panic/panic_tests.py b/tools/test_apps/system/panic/panic_tests.py index 5983deefc6..10bd5fbac5 100644 --- a/tools/test_apps/system/panic/panic_tests.py +++ b/tools/test_apps/system/panic/panic_tests.py @@ -51,13 +51,13 @@ def task_wdt_inner(env, test_name): dut.expect_backtrace() dut.expect_elf_sha256() dut.expect_none('Guru Meditation') - test_common(dut, test_name, - expected_backtrace=['panic_abort', - 'esp_system_abort', - 'abort', - 'task_wdt_isr', - '_xt_lowint1'] + - get_default_backtrace(dut.test_name)) + if ('gdbstub' in test_name): + test_common(dut, test_name, expected_backtrace=[ + # Backtrace interrupted when abort is called, IDF-842 + 'panic_abort', 'esp_system_abort' + ]) + else: + test_common(dut, test_name) def int_wdt_inner(env, test_name): @@ -103,11 +103,13 @@ def abort_inner(env, test_name): dut.expect_backtrace() dut.expect_elf_sha256() dut.expect_none('Guru Meditation', 'Re-entered core dump') - test_common(dut, test_name, - expected_backtrace=['panic_abort', - 'esp_system_abort', - 'abort'] + - get_default_backtrace(dut.test_name)) + if ('gdbstub' in test_name): + test_common(dut, test_name, expected_backtrace=[ + # Backtrace interrupted when abort is called, IDF-842 + 'panic_abort', 'esp_system_abort' + ]) + else: + test_common(dut, test_name) def abort_cached_disabled_inner(env, test_name): @@ -185,9 +187,10 @@ def ub_inner(env, test_name): dut.expect_backtrace() dut.expect_elf_sha256() dut.expect_none('Guru Meditation', 'Re-entered core dump') - test_common(dut, test_name, - expected_backtrace=['panic_abort', - 'esp_system_abort', - '__ubsan_default_handler', - '__ubsan_handle_out_of_bounds'] + - get_default_backtrace(dut.test_name)) + if ('gdbstub' in test_name): + test_common(dut, test_name, expected_backtrace=[ + # Backtrace interrupted when abort is called, IDF-842 + 'panic_abort', 'esp_system_abort' + ]) + else: + test_common(dut, test_name)