mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 04:43:54 -06:00

Add follow-fork-mode child and and follow-fork-mode parent tests. Check for the obvious pitfalls, such as lingering breakpoints, catchpoints, and single-step mode. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20240219141628.246823-13-iii@linux.ibm.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240305121005.3528075-14-alex.bennee@linaro.org>
16 lines
384 B
Python
16 lines
384 B
Python
"""Test GDB's follow-fork-mode parent.
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
"""
|
|
from test_gdbstub import main, report
|
|
|
|
|
|
def run_test():
|
|
"""Run through the tests one by one"""
|
|
gdb.execute("set follow-fork-mode parent")
|
|
gdb.execute("continue")
|
|
exitcode = int(gdb.parse_and_eval("$_exitcode"))
|
|
report(exitcode == 0, "{} == 0".format(exitcode))
|
|
|
|
|
|
main(run_test)
|