diff options
| author | Ilya Leoshkevich <iii@linux.ibm.com> | 2024-03-05 12:09:49 +0000 |
|---|---|---|
| committer | Alex Bennée <alex.bennee@linaro.org> | 2024-03-06 12:35:19 +0000 |
| commit | b9504c9ad980b97e6888bf07c36c2be567b4c65d (patch) | |
| tree | 2742ac5058997f39b587a29962c96d0d6a9f4e51 /tests/tcg/multiarch/gdbstub/follow-fork-mode-parent.py | |
| parent | d547e711a8a520b1a160958443c0851a6767f95b (diff) | |
| download | focaccia-qemu-b9504c9ad980b97e6888bf07c36c2be567b4c65d.tar.gz focaccia-qemu-b9504c9ad980b97e6888bf07c36c2be567b4c65d.zip | |
tests/tcg: Add two follow-fork-mode tests
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>
Diffstat (limited to 'tests/tcg/multiarch/gdbstub/follow-fork-mode-parent.py')
| -rw-r--r-- | tests/tcg/multiarch/gdbstub/follow-fork-mode-parent.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/tcg/multiarch/gdbstub/follow-fork-mode-parent.py b/tests/tcg/multiarch/gdbstub/follow-fork-mode-parent.py new file mode 100644 index 0000000000..5c2fe72208 --- /dev/null +++ b/tests/tcg/multiarch/gdbstub/follow-fork-mode-parent.py @@ -0,0 +1,16 @@ +"""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) |