Skip to content

Commit bc0cad0

Browse files
Do not generated new TCP port when rebooting nSIM GDB
GDB testsuite has an unfortunate trait - it reboots target after recording TCP port involved. As a result if we would try to generate new port number after reboot, test would fail, as it would use old TCP port number. Signed-off-by: Anton Kolesov <[email protected]>
1 parent 189454b commit bc0cad0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

dejagnu/nsim-extra.exp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,13 @@ proc arc-nsim_reboot { connhost args } {
102102
set board $connhost
103103
}
104104

105-
# Generate random port number.
106-
set portnum [exec [file dirname $env(DEJAGNU)]/get-random-port.sh]
107-
nsim_open $portnum
105+
# GDB testsuite has an unfortunate trait - it reboots target after
106+
# recording TCP port involved. As a result if we would try to generate new
107+
# port number after reboot, test would fail, as it would use old TCP port
108+
# number.
109+
nsim_open [target_info nsim_port]
110+
111+
return 1
108112
}
109113

110114
# vim: noexpandtab sts=4 ts=8:

0 commit comments

Comments
 (0)