From: Pedro Alves Date: Thu, 3 Jun 2021 18:39:18 +0000 (+0100) Subject: Make inferior/GDB share terminal in tests expecting output after detach X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8db79a51e592e9f4dad54cef3290298371d5f3f7;p=thirdparty%2Fbinutils-gdb.git Make inferior/GDB share terminal in tests expecting output after detach A following patch will make GDB put spawned inferiors in their own terminal/session. A consequence of that is that if you do "run", and then "detach", GDB closes the terminal, so expecting inferior output after detach no longer works, the inferior is alive, but its output goes nowhere. There's only one testcase that expects output out of an inferior after detach. Tweak it to output to GDB's terminal instead. gdb/testsuite/ChangeLog: yyyy-mm-dd Pedro Alves * gdb.threads/process-dies-while-detaching.exp: Issue "tty /dev/tty" before starting program. Change-Id: Ic62bca178295763fb9c47657ee459fe715f7865e --- diff --git a/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp b/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp index ac1aad26ec5..f01d4cf0666 100644 --- a/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp +++ b/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp @@ -215,6 +215,7 @@ proc test_detach {multi_process cmd} { global binfile clean_restart ${binfile} + gdb_test_no_output "tty /dev/tty" if ![runto_main] { fail "can't run to main" @@ -240,6 +241,7 @@ proc test_detach_watch {multi_process cmd} { global binfile decimal clean_restart ${binfile} + gdb_test_no_output "tty /dev/tty" if ![runto_main] { fail "can't run to main" @@ -276,6 +278,7 @@ proc test_detach_killed_outside {multi_process cmd} { global binfile clean_restart ${binfile} + gdb_test_no_output "tty /dev/tty" if ![runto_main] { fail "can't run to main"