2023-10-08 17:09:01 +08:00
|
|
|
#
|
2023-10-08 19:17:52 +08:00
|
|
|
# Copyright (c) 2020, 2023 intel Corporation.
|
2023-10-08 17:09:01 +08:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
|
|
|
|
2024-07-23 12:53:01 +08:00
|
|
|
common:
|
|
|
|
tags:
|
|
|
|
- debug
|
|
|
|
- gdbstub
|
|
|
|
filter: CONFIG_ARCH_HAS_GDBSTUB
|
|
|
|
|
2023-10-08 17:09:01 +08:00
|
|
|
tests:
|
2024-07-23 13:16:13 +08:00
|
|
|
# Basic build-only test for all platforms supporting gdbstub
|
|
|
|
debug.gdbstub.build_only:
|
|
|
|
platform_allow:
|
|
|
|
- qemu_x86
|
|
|
|
- qemu_cortex_a9
|
|
|
|
build_only: true
|
|
|
|
|
2023-10-10 03:31:41 +08:00
|
|
|
# Connect to Zephyr gdbstub and run a simple GDB script
|
2023-10-08 19:17:52 +08:00
|
|
|
debug.gdbstub.breakpoints:
|
2024-07-23 12:53:01 +08:00
|
|
|
platform_allow:
|
|
|
|
- qemu_x86
|
2023-10-08 17:09:01 +08:00
|
|
|
harness: pytest
|
2023-10-08 19:17:52 +08:00
|
|
|
harness_config:
|
|
|
|
pytest_root:
|
|
|
|
- "pytest/test_gdbstub.py"
|
2023-10-09 21:09:26 +08:00
|
|
|
pytest_args:
|
|
|
|
- "--gdb_timeout"
|
|
|
|
- "20"
|
|
|
|
- "--gdb_script"
|
|
|
|
- "test_breakpoints.gdbinit"
|
|
|
|
- "--gdb_target_remote"
|
2023-10-10 03:31:41 +08:00
|
|
|
- "tcp::5678"
|
2023-10-09 21:09:26 +08:00
|
|
|
extra_configs:
|
|
|
|
# Make sure the gdbstub port chosen is unique for this test to avoid conflicts
|
|
|
|
# when Twister runs tests in parallel on the same host.
|
2023-10-10 03:31:41 +08:00
|
|
|
- CONFIG_QEMU_EXTRA_FLAGS="-serial tcp::5678,server"
|
|
|
|
|
|
|
|
# Connect to QEMU gdbstub backend and run the same GDB test script
|
|
|
|
# to check it against a reference RDP backend implementation expecting
|
|
|
|
# similar behavior as for Zephyr's gdbstub.
|
|
|
|
# Use non-default QEMU gdbstub port 1235 for this test to avoid conflicts
|
|
|
|
# with some other test on QEMU running in parallel.
|
|
|
|
debug.gdbstub_qemu.breakpoints:
|
2024-07-23 12:53:01 +08:00
|
|
|
platform_allow:
|
|
|
|
- qemu_x86
|
2023-10-10 03:31:41 +08:00
|
|
|
harness: pytest
|
|
|
|
harness_config:
|
|
|
|
pytest_root:
|
|
|
|
- "pytest/test_gdbstub.py"
|
|
|
|
pytest_args:
|
|
|
|
- "--gdb_timeout"
|
|
|
|
- "20"
|
|
|
|
- "--gdb_script"
|
|
|
|
- "test_breakpoints.gdbinit"
|
|
|
|
- "--gdb_target_remote"
|
|
|
|
- "tcp::1235"
|
|
|
|
extra_configs:
|
|
|
|
# Turn off Zephyr's gdbstub for this test case.
|
|
|
|
- CONFIG_GDBSTUB=n
|
|
|
|
- CONFIG_GDBSTUB_SERIAL_BACKEND=n
|
|
|
|
# Make sure the gdbstub port chosen is unique for this test to avoid conflicts
|
|
|
|
# when Twister runs tests in parallel on the same host.
|
|
|
|
- CONFIG_QEMU_EXTRA_FLAGS="-S -gdb tcp::1235"
|
|
|
|
# Clear QEMU default 'tcp::1234'
|
|
|
|
- CONFIG_QEMU_GDBSERVER_LISTEN_DEV=""
|