zephyr/tests/subsys/debug/gdbstub/testcase.yaml
Dmitrii Golovanov 664d96785b tests: gdbstub: qemu: Cross-validate test behavior
Add a testcase to run the same test application and GDB script
which we use for Zephyr GDB stub testing, but now with
the GDB stub enabled at QEMU itself using it as a reference
RDP backend implementation. This allows to check the Zephyr's
gdbstub implementation has similar behavior as the reference.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-10-20 15:03:55 +02:00

60 lines
1.8 KiB
YAML

#
# Copyright (c) 2020, 2023 intel Corporation.
#
# SPDX-License-Identifier: Apache-2.0
#
tests:
# Connect to Zephyr gdbstub and run a simple GDB script
debug.gdbstub.breakpoints:
platform_allow: qemu_x86
harness: pytest
harness_config:
pytest_root:
- "pytest/test_gdbstub.py"
pytest_args:
- "--gdb_timeout"
- "20"
- "--gdb_script"
- "test_breakpoints.gdbinit"
- "--gdb_target_remote"
- "tcp::5678"
tags:
- debug
- gdbstub
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.
- 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:
platform_allow: qemu_x86
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"
tags:
- debug
- gdbstub
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=""