* [RFC] new board file 'remote-host-native.exp'
@ 2012-07-24 13:10 Yao Qi
2012-07-24 16:08 ` Pedro Alves
0 siblings, 1 reply; 9+ messages in thread
From: Yao Qi @ 2012-07-24 13:10 UTC (permalink / raw)
To: gdb-patches
Hi, when fixing other PR, I need to make sure test case running well on
'remote host' as well. I write a new board file remote-host-native.exp
so that we can run gdb testsuite in 'remote-host' locally.
When run testsuite for 'remote-host', I get following error,
ERROR: tcl error sourcing ../../../../git/gdb/testsuite/gdb.base/break.exp.
ERROR: wrong # args: should be "gdb_download filename"
while executing
"gdb_download "remote-host" ../../../../git/gdb/testsuite/gdb.base/break.c break.c"
("eval" body line 1)
invoked from within
"eval ${try}_${proc} \"$dest\" $args"
(procedure "call_remote" line 66)
invoked from within
"call_remote "" download $dest $file $destfile"
(procedure "remote_download" line 30)
invoked from within
"remote_download host $x"
(procedure "default_target_compile" line 323)
invoked from within
"default_target_compile $source $destfile $type $options"
(procedure "target_compile" line 6)
invoked from within
"target_compile $source $dest $type $options"
(procedure "gdb_compile" line 142)
invoked from within
"gdb_compile "${srcdir}/${subdir}/${s}" "${binfile}${i}.o" object $options"
As we can see, dejagnu looks proc ${board}_download, and matches gdb_download. However,
we can't simply change the parameters of gdb_download to meet the required parameters.
This will cause an endless recurisive call "remote_download->call_remote->gdb_download
->remote_download". This patch simply renames this proc to gdb_download_1.
As this patch applied, there are a lot of fails when running testsuite with
board file remote-host-native.exp. Some of them are intermittent, and
some of them reflect the flaws in test cases.
gdb/testsuite:
2012-07-24 Yao Qi <yao@codesourcery.com>
* boards/remote-host-native.exp: New board file.
* lib/gdb.exp: Rename gdb_downlad to gdb_download_1.
(gdb_load_shlibs): Caller update.
* lib/gdbserver-support.exp (gdbserver_download_current_prog):
Likewise.
* lib/mi-support.exp (mi_load_shlibs): Likewise.
* gdb.base/jit-so.exp, gdb.base/jit.exp: Likewise.
---
gdb/testsuite/boards/remote-host-native.exp | 60 +++++++++++++++++++++++++++
gdb/testsuite/gdb.base/jit-so.exp | 2 +-
gdb/testsuite/gdb.base/jit.exp | 2 +-
gdb/testsuite/lib/gdb.exp | 6 +-
gdb/testsuite/lib/gdbserver-support.exp | 2 +-
gdb/testsuite/lib/mi-support.exp | 2 +-
6 files changed, 67 insertions(+), 7 deletions(-)
create mode 100644 gdb/testsuite/boards/remote-host-native.exp
diff --git a/gdb/testsuite/boards/remote-host-native.exp b/gdb/testsuite/boards/remote-host-native.exp
new file mode 100644
index 0000000..cdb0684
--- /dev/null
+++ b/gdb/testsuite/boards/remote-host-native.exp
@@ -0,0 +1,60 @@
+# Copyright 2012 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This file is a dejagnu "board file" and is used to run the testsuite
+# natively in remote host.
+#
+# To use this file:
+# bash$ touch ${my_dejagnu_dir}/my-dejagnu.exp
+# bash$ export DEJAGNU=${my_dejagnu_dir}/my-dejagnu.exp
+# bash$ mkdir ${my_dejagnu_dir}/boards
+# bash$ cp ${src_dir}/gdb/testsuite/boards/remote-host-native.exp \
+# ${my_dejagnu_dir}/boards
+
+# Modify the location of GDB and the username to access your box
+# below.
+
+# bash$ cd ${build_dir}/gdb
+# bash$ make check RUNTESTFLAGS="--host_board=remote-host-native"
+
+load_generic_config "gdb"
+
+set_board_info gdb_protocol "standard"
+
+global GDB
+# Specify the location of GDB binary.
+set GDB "/your/built/gdb"
+
+set_board_info compiler "[find_gcc]"
+set_board_info hostname 127.0.0.1
+
+set_board_info username YOUR.USER.NAME
+
+# The ssh key should be correctly set up that you ssh to 127.0.0.1
+# without having to type password.
+set_board_info rsh_prog /usr/bin/ssh
+set_board_info rcp_prog /usr/bin/scp
+set_board_info file_transfer "rsh"
+
+proc ${board}_download { board src dest } {
+
+ # If file name is a relative, convert it to absolute, otherwise file can't
+ # be found on host, because the current directory usually is /home/$USER.
+ if { [file pathtype $src] == "relative" } {
+ return [file join [pwd] $src]
+ } else {
+ return $src
+ }
+}
diff --git a/gdb/testsuite/gdb.base/jit-so.exp b/gdb/testsuite/gdb.base/jit-so.exp
index 36f18ad..95c2eac 100644
--- a/gdb/testsuite/gdb.base/jit-so.exp
+++ b/gdb/testsuite/gdb.base/jit-so.exp
@@ -61,7 +61,7 @@ if { [gdb_compile_shlib ${solib_srcfile} ${solib_binfile} {}] != "" } {
return -1
}
-set solib_binfile_target [gdb_download ${solib_binfile}]
+set solib_binfile_target [gdb_download_1 ${solib_binfile}]
proc one_jit_test {count match_str} { with_test_prefix "one_jit_test-$count" {
global verbose testfile srcfile2 binfile2 binfile2_dlopen solib_binfile_target solib_binfile_test_msg
diff --git a/gdb/testsuite/gdb.base/jit.exp b/gdb/testsuite/gdb.base/jit.exp
index 3034e6a..699b336 100644
--- a/gdb/testsuite/gdb.base/jit.exp
+++ b/gdb/testsuite/gdb.base/jit.exp
@@ -49,7 +49,7 @@ if { [gdb_compile_shlib ${solib_srcfile} ${solib_binfile} {-fPIC}] != "" } {
return -1
}
-set solib_binfile_target [gdb_download ${solib_binfile}]
+set solib_binfile_target [gdb_download_1 ${solib_binfile}]
proc one_jit_test {count match_str} { with_test_prefix "one_jit_test-$count" {
global verbose testfile solib_binfile_target solib_binfile_test_msg
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 4f2b7c9..257e76e 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2964,12 +2964,12 @@ proc gdb_touch_execfile { binfile } {
}
}
-# gdb_download
+# gdb_download_1
#
# Copy a file to the remote target and return its target filename.
# Schedule the file to be deleted at the end of this test.
-proc gdb_download { filename } {
+proc gdb_download_1 { filename } {
global cleanfiles
set destname [remote_download target $filename]
@@ -2987,7 +2987,7 @@ proc gdb_load_shlibs { args } {
}
foreach file $args {
- gdb_download [shlib_target_file $file]
+ gdb_download_1 [shlib_target_file $file]
}
# Even if the target supplies full paths for shared libraries,
diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp
index ee66e48..63933b7 100644
--- a/gdb/testsuite/lib/gdbserver-support.exp
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -177,7 +177,7 @@ proc gdbserver_download_current_prog { } {
set gdbserver_host_exec $host_exec
set gdbserver_host_mtime [file mtime $host_exec]
if [is_remote target] {
- set gdbserver_server_exec [gdb_download $host_exec]
+ set gdbserver_server_exec [gdb_download_1 $host_exec]
} else {
set gdbserver_server_exec $host_exec
}
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 401565d..28199bd 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -1908,7 +1908,7 @@ proc mi_load_shlibs { args } {
}
foreach file $args {
- gdb_download [shlib_target_file $file]
+ gdb_download_1 [shlib_target_file $file]
}
# Even if the target supplies full paths for shared libraries,
--
1.7.7.6
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [RFC] new board file 'remote-host-native.exp'
2012-07-24 13:10 [RFC] new board file 'remote-host-native.exp' Yao Qi
@ 2012-07-24 16:08 ` Pedro Alves
2012-07-25 7:27 ` Yao Qi
0 siblings, 1 reply; 9+ messages in thread
From: Pedro Alves @ 2012-07-24 16:08 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On 07/24/2012 02:10 PM, Yao Qi wrote:
> Hi, when fixing other PR, I need to make sure test case running well on
> 'remote host' as well. I write a new board file remote-host-native.exp
> so that we can run gdb testsuite in 'remote-host' locally.
>
> When run testsuite for 'remote-host', I get following error,
>
> ERROR: tcl error sourcing ../../../../git/gdb/testsuite/gdb.base/break.exp.
> ERROR: wrong # args: should be "gdb_download filename"
> while executing
> "gdb_download "remote-host" ../../../../git/gdb/testsuite/gdb.base/break.c break.c"
> ("eval" body line 1)
> invoked from within
> "eval ${try}_${proc} \"$dest\" $args"
> (procedure "call_remote" line 66)
> invoked from within
> "call_remote "" download $dest $file $destfile"
> (procedure "remote_download" line 30)
> invoked from within
> "remote_download host $x"
> (procedure "default_target_compile" line 323)
> invoked from within
> "default_target_compile $source $destfile $type $options"
> (procedure "target_compile" line 6)
> invoked from within
> "target_compile $source $dest $type $options"
> (procedure "gdb_compile" line 142)
> invoked from within
> "gdb_compile "${srcdir}/${subdir}/${s}" "${binfile}${i}.o" object $options"
>
> As we can see, dejagnu looks proc ${board}_download, and matches gdb_download. However,
I'm confused at why ${board} expanded to gdb, the tool.
> we can't simply change the parameters of gdb_download to meet the required parameters.
> This will cause an endless recurisive call "remote_download->call_remote->gdb_download
> ->remote_download". This patch simply renames this proc to gdb_download_1.
>
> As this patch applied, there are a lot of fails when running testsuite with
> board file remote-host-native.exp. Some of them are intermittent, and
> some of them reflect the flaws in test cases.
>
> gdb/testsuite:
>
> 2012-07-24 Yao Qi <yao@codesourcery.com>
>
> * boards/remote-host-native.exp: New board file.
> * lib/gdb.exp: Rename gdb_downlad to gdb_download_1.
> (gdb_load_shlibs): Caller update.
> * lib/gdbserver-support.exp (gdbserver_download_current_prog):
> Likewise.
> * lib/mi-support.exp (mi_load_shlibs): Likewise.
> * gdb.base/jit-so.exp, gdb.base/jit.exp: Likewise.
> ---
> gdb/testsuite/boards/remote-host-native.exp | 60 +++++++++++++++++++++++++++
> gdb/testsuite/gdb.base/jit-so.exp | 2 +-
> gdb/testsuite/gdb.base/jit.exp | 2 +-
> gdb/testsuite/lib/gdb.exp | 6 +-
> gdb/testsuite/lib/gdbserver-support.exp | 2 +-
> gdb/testsuite/lib/mi-support.exp | 2 +-
> 6 files changed, 67 insertions(+), 7 deletions(-)
> create mode 100644 gdb/testsuite/boards/remote-host-native.exp
>
> diff --git a/gdb/testsuite/boards/remote-host-native.exp b/gdb/testsuite/boards/remote-host-native.exp
> new file mode 100644
> index 0000000..cdb0684
> --- /dev/null
> +++ b/gdb/testsuite/boards/remote-host-native.exp
> @@ -0,0 +1,60 @@
> +# Copyright 2012 Free Software Foundation, Inc.
> +
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 3 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program. If not, see <http://www.gnu.org/licenses/>.
> +
> +# This file is a dejagnu "board file" and is used to run the testsuite
> +# natively in remote host.
Why natively? I'd think you could use both this host board with e.g.,
a gdbserver target board file. I suggest:
+# This file is a dejagnu "board file" and is used to run the testsuite
+# against local host, in remote host mode.
I'd even rename the file to local-remote-host.exp.
> +#
> +# To use this file:
> +# bash$ touch ${my_dejagnu_dir}/my-dejagnu.exp
> +# bash$ export DEJAGNU=${my_dejagnu_dir}/my-dejagnu.exp
> +# bash$ mkdir ${my_dejagnu_dir}/boards
> +# bash$ cp ${src_dir}/gdb/testsuite/boards/remote-host-native.exp \
> +# ${my_dejagnu_dir}/boards
> +
> +# Modify the location of GDB and the username to access your box
> +# below.
> +
> +# bash$ cd ${build_dir}/gdb
> +# bash$ make check RUNTESTFLAGS="--host_board=remote-host-native"
> +
> +load_generic_config "gdb"
Why is this necessary? Why "gdb", and not "unix" ? What is "gdb"
actually loading? Isn't this "gdb" the reason remote_download maps
to gdb_download ? Otherwise, that gdb_download issue should have tripped
up other configurations doing remote host testing, I'd think.
> +
> +set_board_info gdb_protocol "standard"
Why is this necessary? A host board file should only specify the bits
for downloading and executing bits on the host, I think.
> +
> +global GDB
> +# Specify the location of GDB binary.
> +set GDB "/your/built/gdb"
How about we make this pick up the just built GDB ?
set GDB [file join [pwd] "../gdb"]
> +
> +set_board_info compiler "[find_gcc]"
Is this necessary in a host board file?
> +set_board_info hostname 127.0.0.1
> +
> +set_board_info username YOUR.USER.NAME
We can make this pick up the current user by default on at least GNU/Linux,
and probably other Unixen:
set_board_info username $::env(USER)
> +
> +# The ssh key should be correctly set up that you ssh to 127.0.0.1
> +# without having to type password.
> +set_board_info rsh_prog /usr/bin/ssh
> +set_board_info rcp_prog /usr/bin/scp
> +set_board_info file_transfer "rsh"
> +
> +proc ${board}_download { board src dest } {
> +
> + # If file name is a relative, convert it to absolute, otherwise file can't
> + # be found on host, because the current directory usually is /home/$USER.
> + if { [file pathtype $src] == "relative" } {
> + return [file join [pwd] $src]
> + } else {
> + return $src
> + }
> +}
Hmm, so the intention is to bypass the download to the host. I'd like a small
comment above the function that says something to the effect.
> diff --git a/gdb/testsuite/gdb.base/jit-so.exp b/gdb/testsuite/gdb.base/jit-so.exp
> index 36f18ad..95c2eac 100644
> --- a/gdb/testsuite/gdb.base/jit-so.exp
> +++ b/gdb/testsuite/gdb.base/jit-so.exp
> @@ -61,7 +61,7 @@ if { [gdb_compile_shlib ${solib_srcfile} ${solib_binfile} {}] != "" } {
> return -1
> }
>
> -set solib_binfile_target [gdb_download ${solib_binfile}]
> +set solib_binfile_target [gdb_download_1 ${solib_binfile}]
Someone might well in the future notice there's a "gdb_download_1" overload
but no "gdb_download", and decide to "clean up" things by renaming "gdb_download_1"
back to "gdb_download"... I'd prefer a better name. But, in any case, I'm confused
at why this board trips on this, while other remote host testing CS does, does not.
--
Pedro Alves
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [RFC] new board file 'remote-host-native.exp'
2012-07-24 16:08 ` Pedro Alves
@ 2012-07-25 7:27 ` Yao Qi
2012-07-25 13:48 ` Pedro Alves
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Yao Qi @ 2012-07-25 7:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Pedro Alves
On Tuesday, July 24, 2012 05:08:26 PM Pedro Alves wrote:
> Why natively? I'd think you could use both this host board with e.g.,
> a gdbserver target board file. I suggest:
>
> +# This file is a dejagnu "board file" and is used to run the testsuite
> +# against local host, in remote host mode.
>
> I'd even rename the file to local-remote-host.exp.
>
Looks term "native" can be used for target board file, while term
"local/remote" can be used for host board file. Comment is fixed.
I thought of 'local-remote-host.exp' before, but gave it up since I
was afraid people are confused by its name. I am fine with it.
> > +#
> > +# To use this file:
> > +# bash$ touch ${my_dejagnu_dir}/my-dejagnu.exp
> > +# bash$ export DEJAGNU=${my_dejagnu_dir}/my-dejagnu.exp
> > +# bash$ mkdir ${my_dejagnu_dir}/boards
> > +# bash$ cp ${src_dir}/gdb/testsuite/boards/remote-host-native.exp \
> > +# ${my_dejagnu_dir}/boards
> > +
> > +# Modify the location of GDB and the username to access your box
> > +# below.
> > +
> > +# bash$ cd ${build_dir}/gdb
> > +# bash$ make check RUNTESTFLAGS="--host_board=remote-host-native"
> > +
> > +load_generic_config "gdb"
>
> Why is this necessary? Why "gdb", and not "unix" ? What is "gdb"
> actually loading? Isn't this "gdb" the reason remote_download maps
> to gdb_download ? Otherwise, that gdb_download issue should have tripped
> up other configurations doing remote host testing, I'd think.
Yes, this line causes remote_donwload map to gdb_download. This line
is removed, and existing gdb_download doesn't have to be renamed.
>
> > +
> > +set_board_info gdb_protocol "standard"
>
> Why is this necessary? A host board file should only specify the bits
> for downloading and executing bits on the host, I think.
>
We don't have to set this in host board file. Removed.
> > +
> > +global GDB
> > +# Specify the location of GDB binary.
> > +set GDB "/your/built/gdb"
>
> How about we make this pick up the just built GDB ?
>
> set GDB [file join [pwd] "../gdb"]
>
Done.
> > +
> > +set_board_info compiler "[find_gcc]"
>
> Is this necessary in a host board file?
>
Again, we don't have to set this either in host board file. It should
be set in target board file.
> > +set_board_info hostname 127.0.0.1
> > +
> > +set_board_info username YOUR.USER.NAME
>
> We can make this pick up the current user by default on at least GNU/Linux,
> and probably other Unixen:
>
> set_board_info username $::env(USER)
>
What does these double colons mean? I use $env(USER), and it works fine.
> > +
> > +# The ssh key should be correctly set up that you ssh to 127.0.0.1
> > +# without having to type password.
> > +set_board_info rsh_prog /usr/bin/ssh
> > +set_board_info rcp_prog /usr/bin/scp
> > +set_board_info file_transfer "rsh"
> >
> > +
> > +proc ${board}_download { board src dest } {
> > +
> > + # If file name is a relative, convert it to absolute, otherwise file
> > can't + # be found on host, because the current directory usually is
> > /home/$USER. + if { [file pathtype $src] == "relative" } {
> > + return [file join [pwd] $src]
> > + } else {
> > + return $src
> > + }
> > +}
>
> Hmm, so the intention is to bypass the download to the host. I'd like a
> small comment above the function that says something to the effect.
Yes, with ${board}_download, files are not copied to somewhere else through
ssh, so the test is faster. One line of comment is added. How about the
new one?
--
Yao (齐尧)
gdb/testsuite:
2012-07-25 Yao Qi <yao@codesourcery.com>
Pedro Alves <palves@redhat.com>
* boards/local-remote-host.exp: New.
---
gdb/testsuite/boards/local-remote-host.exp | 55 ++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 0 deletions(-)
create mode 100644 gdb/testsuite/boards/local-remote-host.exp
diff --git a/gdb/testsuite/boards/local-remote-host.exp b/gdb/testsuite/boards/local-remote-host.exp
new file mode 100644
index 0000000..d9f6372
--- /dev/null
+++ b/gdb/testsuite/boards/local-remote-host.exp
@@ -0,0 +1,55 @@
+# Copyright 2012 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This file is a dejagnu "board file" and is used to run the testsuite
+# against local host, in remote host mode.
+#
+# To use this file:
+# bash$ touch ${my_dejagnu_dir}/my-dejagnu.exp
+# bash$ export DEJAGNU=${my_dejagnu_dir}/my-dejagnu.exp
+# bash$ mkdir ${my_dejagnu_dir}/boards
+# bash$ cp ${src_dir}/gdb/testsuite/boards/local-remote-host.exp \
+# ${my_dejagnu_dir}/boards
+
+# Modify the location of GDB and the username to access your box
+# below.
+
+# bash$ cd ${build_dir}/gdb
+# bash$ make check RUNTESTFLAGS="--host_board=local-remote-host"
+
+global GDB
+set GDB [file join [pwd] "../gdb"]
+
+set_board_info hostname 127.0.0.1
+
+set_board_info username $env(USER)
+
+# The ssh key should be correctly set up that you ssh to 127.0.0.1
+# without having to type password.
+set_board_info rsh_prog /usr/bin/ssh
+set_board_info rcp_prog /usr/bin/scp
+set_board_info file_transfer "rsh"
+
+proc ${board}_download { board src dest } {
+
+ # If file name is a relative, convert it to absolute, otherwise file can't
+ # be found on host, because the current directory usually is /home/$USER.
+ # This also bypasses the real download to the host.
+ if { [file pathtype $src] == "relative" } {
+ return [file join [pwd] $src]
+ } else {
+ return $src
+ }
+}
--
1.7.7.6
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [RFC] new board file 'remote-host-native.exp'
2012-07-25 7:27 ` Yao Qi
@ 2012-07-25 13:48 ` Pedro Alves
2012-08-02 8:47 ` [committed]: " Yao Qi
2012-07-25 22:45 ` Stan Shebs
2012-08-02 8:50 ` Doug Evans
2 siblings, 1 reply; 9+ messages in thread
From: Pedro Alves @ 2012-07-25 13:48 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On 07/25/2012 08:27 AM, Yao Qi wrote:
> On Tuesday, July 24, 2012 05:08:26 PM Pedro Alves wrote:
>> Why natively? I'd think you could use both this host board with e.g.,
>> a gdbserver target board file. I suggest:
>>
>> +# This file is a dejagnu "board file" and is used to run the testsuite
>> +# against local host, in remote host mode.
>>
>> I'd even rename the file to local-remote-host.exp.
>>
>
> Looks term "native" can be used for target board file, while term
> "local/remote" can be used for host board file. Comment is fixed.
> I thought of 'local-remote-host.exp' before, but gave it up since I
> was afraid people are confused by its name. I am fine with it.
If nobody complains, let's run with it.
>>> +set_board_info username YOUR.USER.NAME
>>
>> We can make this pick up the current user by default on at least GNU/Linux,
>> and probably other Unixen:
>>
>> set_board_info username $::env(USER)
>>
>
> What does these double colons mean? I use $env(USER), and it works fine.
Ah, I just basically copy/pasted from <http://wiki.tcl.tk/1624> :
"To access the env array within a Tcl proc, one needs to tell the proc that env is a global array. There are two ways to do this.
$::env(PATH)
global env ; puts $env(PATH) can alternatively used to identify that the variable is
globally available; however, you have to remember to use the global command
in EVERY proc that you need to use env. Using the $::env notation is shorter."
Since this is global code anyway (not within a proc) $env should be fine (and is the
style used elsewhere). Go ahead and make that change.
It's true, most of my tcl foo is web search based. :-)
> Yes, with ${board}_download, files are not copied to somewhere else through
> ssh, so the test is faster. One line of comment is added. How about the
> new one?
Looks fine to me. Thanks!
--
Pedro Alves
^ permalink raw reply [flat|nested] 9+ messages in thread* [committed]: [RFC] new board file 'remote-host-native.exp'
2012-07-25 13:48 ` Pedro Alves
@ 2012-08-02 8:47 ` Yao Qi
0 siblings, 0 replies; 9+ messages in thread
From: Yao Qi @ 2012-08-02 8:47 UTC (permalink / raw)
To: gdb-patches
On Wednesday, July 25, 2012 02:48:12 PM Pedro Alves wrote:
> > Looks term "native" can be used for target board file, while term
> > "local/remote" can be used for host board file. Comment is fixed.
> > I thought of 'local-remote-host.exp' before, but gave it up since I
> > was afraid people are confused by its name. I am fine with it.
>
> If nobody complains, let's run with it.
Committed.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] new board file 'remote-host-native.exp'
2012-07-25 7:27 ` Yao Qi
2012-07-25 13:48 ` Pedro Alves
@ 2012-07-25 22:45 ` Stan Shebs
2012-07-26 1:45 ` Yao Qi
2012-08-02 8:50 ` Doug Evans
2 siblings, 1 reply; 9+ messages in thread
From: Stan Shebs @ 2012-07-25 22:45 UTC (permalink / raw)
To: gdb-patches
On 7/25/12 12:27 AM, Yao Qi wrote:
> On Tuesday, July 24, 2012 05:08:26 PM Pedro Alves wrote:
>> Why natively? I'd think you could use both this host board with e.g.,
>> a gdbserver target board file. I suggest:
>>
>> +# This file is a dejagnu "board file" and is used to run the testsuite
>> +# against local host, in remote host mode.
>>
>> I'd even rename the file to local-remote-host.exp.
>>
> Looks term "native" can be used for target board file, while term
> "local/remote" can be used for host board file. Comment is fixed.
> I thought of 'local-remote-host.exp' before, but gave it up since I
> was afraid people are confused by its name. I am fine with it.
>
I'm still a little confused as to why anyone would need this board file,
so it would be good to include some more explanation and maybe an
example. Is it just that DejaGNU's generic remote execution machinery
doesn't include the GDB-specific concept of downloading, and so we have
to add a specific download proc?
Stan
stan@codesourcery.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] new board file 'remote-host-native.exp'
2012-07-25 22:45 ` Stan Shebs
@ 2012-07-26 1:45 ` Yao Qi
0 siblings, 0 replies; 9+ messages in thread
From: Yao Qi @ 2012-07-26 1:45 UTC (permalink / raw)
To: gdb-patches; +Cc: Stan Shebs
On Wednesday, July 25, 2012 03:45:33 PM Stan Shebs wrote:
> I'm still a little confused as to why anyone would need this board file,
> so it would be good to include some more explanation and maybe an
> example. Is it just that DejaGNU's generic remote execution machinery
> doesn't include the GDB-specific concept of downloading, and so we have
> to add a specific download proc?
Stan,
We need this board file to ensure gdb testsuite works properly in 'remote
host'. Existing test cases have some flaws on 'remote host', and it is also
useful to verify new test case works well in 'remote host'.
We have a line of explanation in the comment, is it clear enough?
# This file is a dejagnu "board file" and is used to run the testsuite
# against local host, in remote host mode.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] new board file 'remote-host-native.exp'
2012-07-25 7:27 ` Yao Qi
2012-07-25 13:48 ` Pedro Alves
2012-07-25 22:45 ` Stan Shebs
@ 2012-08-02 8:50 ` Doug Evans
2012-08-02 8:53 ` Doug Evans
2 siblings, 1 reply; 9+ messages in thread
From: Doug Evans @ 2012-08-02 8:50 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches, Pedro Alves
On Wed, Jul 25, 2012 at 12:27 AM, Yao Qi <yao@codesourcery.com> wrote:
>> > +
>> > +global GDB
>> > +# Specify the location of GDB binary.
>> > +set GDB "/your/built/gdb"
>>
>> How about we make this pick up the just built GDB ?
>>
>> set GDB [file join [pwd] "../gdb"]
>>
>
> Done.
But only if GDB is not already set?
And similarly for the remote host name?
E.g. allow runtest --host_board=foo GDB=/tmp/gdb REMOTE_HOST=bar ...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] new board file 'remote-host-native.exp'
2012-08-02 8:50 ` Doug Evans
@ 2012-08-02 8:53 ` Doug Evans
0 siblings, 0 replies; 9+ messages in thread
From: Doug Evans @ 2012-08-02 8:53 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches, Pedro Alves
On Thu, Aug 2, 2012 at 1:50 AM, Doug Evans <dje@google.com> wrote:
> On Wed, Jul 25, 2012 at 12:27 AM, Yao Qi <yao@codesourcery.com> wrote:
>>> > +
>>> > +global GDB
>>> > +# Specify the location of GDB binary.
>>> > +set GDB "/your/built/gdb"
>>>
>>> How about we make this pick up the just built GDB ?
>>>
>>> set GDB [file join [pwd] "../gdb"]
>>>
>>
>> Done.
>
> But only if GDB is not already set?
> And similarly for the remote host name?
> E.g. allow runtest --host_board=foo GDB=/tmp/gdb REMOTE_HOST=bar ...
Heh, our emails crossed in transit.
Easy enough to enhance later.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-08-02 8:53 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-24 13:10 [RFC] new board file 'remote-host-native.exp' Yao Qi
2012-07-24 16:08 ` Pedro Alves
2012-07-25 7:27 ` Yao Qi
2012-07-25 13:48 ` Pedro Alves
2012-08-02 8:47 ` [committed]: " Yao Qi
2012-07-25 22:45 ` Stan Shebs
2012-07-26 1:45 ` Yao Qi
2012-08-02 8:50 ` Doug Evans
2012-08-02 8:53 ` Doug Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox