From 22c4ee05b07f922e13a7fea9e3d1b8c3d0b930f2 Mon Sep 17 00:00:00 2001 From: Alexey Lapshin Date: Thu, 13 Jun 2024 11:55:16 +0700 Subject: [PATCH] feat(gdbstub): enable test for esp32p4 --- tools/test_apps/system/.build-test-rules.yml | 6 ------ tools/test_apps/system/gdbstub_runtime/README.md | 4 ++-- tools/test_apps/system/gdbstub_runtime/pytest_runtime.py | 5 +++-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tools/test_apps/system/.build-test-rules.yml b/tools/test_apps/system/.build-test-rules.yml index 64f3807f11..8d2ca6ffd4 100644 --- a/tools/test_apps/system/.build-test-rules.yml +++ b/tools/test_apps/system/.build-test-rules.yml @@ -45,12 +45,6 @@ tools/test_apps/system/gdb_loadable_elf: temporary: true reason: target esp32c6, esp32h2 is not supported yet -tools/test_apps/system/gdbstub_runtime: - disable: - - if: IDF_TARGET == "esp32p4" - temporary: true - reason: not supported yet #TODO: IDF-7510 - tools/test_apps/system/longjmp_test: enable: - if: IDF_TARGET in ["esp32", "esp32s2", "esp32s3"] diff --git a/tools/test_apps/system/gdbstub_runtime/README.md b/tools/test_apps/system/gdbstub_runtime/README.md index 56b3c23513..3a502b1f86 100644 --- a/tools/test_apps/system/gdbstub_runtime/README.md +++ b/tools/test_apps/system/gdbstub_runtime/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | diff --git a/tools/test_apps/system/gdbstub_runtime/pytest_runtime.py b/tools/test_apps/system/gdbstub_runtime/pytest_runtime.py index 040e7f2c83..f2c3fa2c08 100644 --- a/tools/test_apps/system/gdbstub_runtime/pytest_runtime.py +++ b/tools/test_apps/system/gdbstub_runtime/pytest_runtime.py @@ -1,5 +1,6 @@ # SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 +import os import os.path as path import sys @@ -18,7 +19,6 @@ def get_line_number(lookup: str, offset: int = 0) -> int: return -1 -@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='esp32p4 support TBD') # TODO: IDF-8992 @pytest.mark.supported_targets @pytest.mark.generic def test_gdbstub_runtime(dut: PanicTestDut) -> None: @@ -106,7 +106,8 @@ def test_gdbstub_runtime(dut: PanicTestDut) -> None: assert dut.find_gdb_response('running', 'notify', responses) is not None # test ctrl-c - responses = dut.gdbmi.send_signal_to_gdb(2) + os.kill(dut.gdbmi.gdb_process.pid, 2) + # responses = dut.gdbmi.send_signal_to_gdb(2) # https://github.com/cs01/pygdbmi/issues/97 # assert dut.find_gdb_response('stopped', 'notify', responses) is not None # ?? No response? check we stopped dut.gdb_backtrace()