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