[PATCH 3/4] ssh.exp: force pty allocation in ssh_exec

Joseph Myers <[email protected]> Tue, 24 Mar 2026 21:21:21 +0000 (UTC)
Newsgroups gmane.comp.sysutils.dejagnu.general
Message-ID <[email protected]>
There are some GCC tests that use dg-output and depend on correct
interleaving of stdout and stderr, which only works correctly when the
test program is run in a pty.
---
 lib/ssh.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ssh.exp b/lib/ssh.exp
index b64bf73..26e9714 100644
--- a/lib/ssh.exp
+++ b/lib/ssh.exp
@@ -159,7 +159,7 @@ proc ssh_exec { boardname program pargs inp outp } {
 	append ssh_useropts " -p [board_info $boardname port]"
     }
 
-    append ssh_useropts " -o ControlPersist=yes -o ControlMaster=auto -o ControlPath=\"/tmp/ssh-%r@%h:%p\""
+    append ssh_useropts " -t -t -o ControlPersist=yes -o ControlMaster=auto -o ControlPath=\"/tmp/ssh-%r@%h:%p\""
 
     # If CMD sends any output to stderr, exec will think it failed.
     # More often than not that will be true, but it doesn't catch the
-- 
2.53.0


-- 
Joseph S. Myers
[email protected]