Bug 29669

Summary: [gdb/testsuite] silent timeout with host board local-remote-host-notty
Product: gdb Reporter: Tom de Vries <vries>
Component: testsuiteAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: HEAD   
Target Milestone: 13.1   
Host: Target:
Build: Last reconfirmed:

Description Tom de Vries 2022-10-11 15:05:58 UTC
I tried to run the gdb testsuite, test-cases gdb.server/*.exp using host board local-remote-host-notty and noticed in the first test-case gdb.server/stop-reply-no-thread-multi.exp a silent timeout on:
...
(gdb) kill^M
(gdb) The program is not being run.^M
...

I can reproduce this standalone using this command, which usually produces the expected:
...
$ /usr/bin/ssh -l vries 127.0.0.1 ~/gdb_versions/devel/gdb.sh -ex \"maint set target-non-stop off\" -ex kill 
The program is not being run.
(gdb) q
$
...

But sometimes:
...
$ /usr/bin/ssh -l vries 127.0.0.1 ~/gdb_versions/devel/gdb.sh -ex \"maint set target-non-stop off\" -ex kill 
(gdb) The program is not being run.
q
$
...
Comment 1 Tom de Vries 2022-10-11 15:53:06 UTC
Now also reproduced without -ex \"maint set target-non-stop off\".
Comment 2 Tom de Vries 2022-10-14 06:09:49 UTC
hmm, this sounds a lot like https://stackoverflow.com/questions/63238934/problems-with-ssh-buffering-of-stderr-without-tt
Comment 3 Tom de Vries 2022-10-14 09:29:46 UTC
I think we should use ssh -t, like local-remote-host.

The only mentioned difference between the two seems to be that editing is on in local-remote-host and off in local-remote-host-notty, and we can achieve this by adding -iex "set editing off" to GDBFLAGS.