* [PATCH] [testsuite] Fix in board_file native-gdbserver.exp
@ 2012-06-21 7:55 Yao Qi
2012-06-21 14:02 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2012-06-21 7:55 UTC (permalink / raw)
To: gdb-patches
Hi,
When I use following statement in test case with native-gdbserver.exp board_file,
I got one error,
remote_exec target "sh -c { \[ -f /bin/ls \] }"
WARNING: program timed out.
FAIL: gdb.base/foo.exp: exists /bin/ls
Examine the verbose log shows that dejagnu thinks native-gdbserver is a
remote target, and will try to use remote method, rsh for example, to
access files,
Executing on target: sh -c { [ -f /bin/ls ] } (timeout = 300)
calling is_remote target
board_info build name
getting qiyao name
board_info host name
getting qiyao name
calling is_remote native-gdbserver
board_info build name
getting qiyao name
board_info host name
getting qiyao name
board_info native-gdbserver exists isremote
board_info native-gdbserver isremote
getting native-gdbserver isremote
board is native-gdbserver, isremote is 1
This patch add new proc ${board}_exec to wrap remote_exec with setting
isremote to 0 temporarily. Running test suite with native-gdbserver,
no change on result.
Note that such problem doesn't exist on board_file
native-extended-gdbserver.exp because isremote always is set to 0 in it.
gdb/testsuite:
2012-06-21 Yao Qi <yao@codesourcery.com>
* boards/native-gdbserver.exp: New proc ${board}_exec.
---
gdb/testsuite/boards/native-gdbserver.exp | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/gdb/testsuite/boards/native-gdbserver.exp b/gdb/testsuite/boards/native-gdbserver.exp
index 5fa02a4..89702df 100644
--- a/gdb/testsuite/boards/native-gdbserver.exp
+++ b/gdb/testsuite/boards/native-gdbserver.exp
@@ -64,6 +64,18 @@ proc ${board}_spawn { board cmd } {
return $result
}
+proc ${board}_exec { hostname program args } {
+ global board_info
+
+ set baseboard [lindex [split $hostname "/"] 0]
+
+ set board_info($baseboard,isremote) 0
+ set result [remote_exec $hostname $program $args]
+ set board_info($baseboard,isremote) 1
+
+ return $result
+}
+
proc ${board}_download { board host dest } {
return $host
}
--
1.7.7.6
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [testsuite] Fix in board_file native-gdbserver.exp
2012-06-21 7:55 [PATCH] [testsuite] Fix in board_file native-gdbserver.exp Yao Qi
@ 2012-06-21 14:02 ` Pedro Alves
2012-06-22 7:49 ` Yao Qi
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2012-06-21 14:02 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On 06/21/2012 08:55 AM, Yao Qi wrote:
> This patch add new proc ${board}_exec to wrap remote_exec with setting
> isremote to 0 temporarily. Running test suite with native-gdbserver,
> no change on result.
>
> Note that such problem doesn't exist on board_file
> native-extended-gdbserver.exp because isremote always is set to 0 in it.
I think native-stdio-gdbserver.exp does have the same problem, though?
> gdb/testsuite:
>
> 2012-06-21 Yao Qi <yao@codesourcery.com>
>
> * boards/native-gdbserver.exp: New proc ${board}_exec.
Okay, thanks.
--
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [testsuite] Fix in board_file native-gdbserver.exp
2012-06-21 14:02 ` Pedro Alves
@ 2012-06-22 7:49 ` Yao Qi
0 siblings, 0 replies; 3+ messages in thread
From: Yao Qi @ 2012-06-22 7:49 UTC (permalink / raw)
To: gdb-patches; +Cc: Pedro Alves
On Thursday, June 21, 2012 03:01:45 PM Pedro Alves wrote:
> I think native-stdio-gdbserver.exp does have the same problem, though?
>
Yes, I can reproduce the same problem on board file native-stdio-
gdbserver.exp. I copy the same stuff into native-stdio-gdbserver.exp, and run
testsuite against it, no change on test result.
> > gdb/testsuite:
> >
> >
> > 2012-06-21 Yao Qi <yao@codesourcery.com>
> >
> >
> >
> > * boards/native-gdbserver.exp: New proc ${board}_exec.
>
> Okay, thanks.
Here is what I committed.
--
Yao (齐尧)
gdb/testsuite:
2012-06-22 Yao Qi <yao@codesourcery.com>
* boards/native-gdbserver.exp: New proc ${board}_exec.
* boards/native-stdio-gdbserver.exp: Likewise.
---
gdb/testsuite/boards/native-gdbserver.exp | 12 ++++++++++++
gdb/testsuite/boards/native-stdio-gdbserver.exp | 12 ++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/gdb/testsuite/boards/native-gdbserver.exp
b/gdb/testsuite/boards/native-gdbserver.exp
index 5fa02a4..89702df 100644
--- a/gdb/testsuite/boards/native-gdbserver.exp
+++ b/gdb/testsuite/boards/native-gdbserver.exp
@@ -64,6 +64,18 @@ proc ${board}_spawn { board cmd } {
return $result
}
+proc ${board}_exec { hostname program args } {
+ global board_info
+
+ set baseboard [lindex [split $hostname "/"] 0]
+
+ set board_info($baseboard,isremote) 0
+ set result [remote_exec $hostname $program $args]
+ set board_info($baseboard,isremote) 1
+
+ return $result
+}
+
proc ${board}_download { board host dest } {
return $host
}
diff --git a/gdb/testsuite/boards/native-stdio-gdbserver.exp
b/gdb/testsuite/boards/native-stdio-gdbserver.exp
index 703f370..9804289 100644
--- a/gdb/testsuite/boards/native-stdio-gdbserver.exp
+++ b/gdb/testsuite/boards/native-stdio-gdbserver.exp
@@ -126,6 +126,18 @@ proc ${board}_spawn { board cmd } {
return $result
}
+proc ${board}_exec { hostname program args } {
+ global board_info
+
+ set baseboard [lindex [split $hostname "/"] 0]
+
+ set board_info($baseboard,isremote) 0
+ set result [remote_exec $hostname $program $args]
+ set board_info($baseboard,isremote) 1
+
+ return $result
+}
+
proc ${board}_download { board host dest } {
return $host
}
--
1.7.7.6
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-22 7:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-21 7:55 [PATCH] [testsuite] Fix in board_file native-gdbserver.exp Yao Qi
2012-06-21 14:02 ` Pedro Alves
2012-06-22 7:49 ` Yao Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox