| 1 | """Test GDB's follow-fork-mode parent. |
| 2 | |
| 3 | SPDX-License-Identifier: GPL-2.0-or-later |
| 4 | """ |
| 5 | from test_gdbstub import main, report |
| 6 | |
| 7 | |
| 8 | def run_test(): |
| 9 | """Run through the tests one by one""" |
| 10 | gdb.execute("set follow-fork-mode parent") |
| 11 | gdb.execute("continue") |
| 12 | exitcode = int(gdb.parse_and_eval("$_exitcode")) |
| 13 | report(exitcode == 0, "{} == 0".format(exitcode)) |
| 14 | |
| 15 | |
| 16 | main(run_test) |