]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Make inferior/GDB share terminal in tests expecting output after detach
authorPedro Alves <pedro@palves.net>
Thu, 3 Jun 2021 18:39:18 +0000 (19:39 +0100)
committerPedro Alves <pedro@palves.net>
Mon, 14 Jun 2021 20:53:28 +0000 (21:53 +0100)
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  <pedro@palves.net>

* gdb.threads/process-dies-while-detaching.exp: Issue "tty
/dev/tty" before starting program.

Change-Id: Ic62bca178295763fb9c47657ee459fe715f7865e

gdb/testsuite/gdb.threads/process-dies-while-detaching.exp

index ac1aad26ec5776c0e30acc583ca8967c1d9b79e9..f01d4cf06664a7ea59d774fdce4daefdab343f37 100644 (file)
@@ -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"