This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Another board file for remote host
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Thu, 28 Aug 2014 15:27:52 +0100
- Subject: Re: [PATCH] Another board file for remote host
- Authentication-results: sourceware.org; auth=none
- References: <1409232690-24185-1-git-send-email-yao at codesourcery dot com>
On 08/28/2014 02:31 PM, Yao Qi wrote:
> In the recent review to my patch about copying files to remote host,
> we find that we need a board file which is more closely mapped real
> remote host testing to improve coverage. With the board file
> local-remote-host-native.exp, DejaGNU copies files to /tmp/gdb/ to
> emulate the effect of remote host. Is it OK?
>
> gdb/testsuite:
>
> 2014-08-28 Yao Qi <yao@codesourcery.com>
>
> * boards/local-remote-host-native.exp: New file.
> ---
> gdb/testsuite/boards/local-remote-host-native.exp | 79 +++++++++++++++++++++++
> 1 file changed, 79 insertions(+)
> create mode 100644 gdb/testsuite/boards/local-remote-host-native.exp
>
> diff --git a/gdb/testsuite/boards/local-remote-host-native.exp b/gdb/testsuite/boards/local-remote-host-native.exp
> new file mode 100644
> index 0000000..a3fd2dc
> --- /dev/null
> +++ b/gdb/testsuite/boards/local-remote-host-native.exp
I'm confused on the choice of "native" for name.
local-remote-host.exp/local-remote-host-notty.exp seem just or more
more native to me, as they assume a shared filesystem, while
the whole point of this one is emulate the case of _not_ sharing
the filesystem?
> +# To use this file:
> +# bash$ cd ${build_dir}/gdb
> +# bash$ make check RUNTESTFLAGS="--host_board=local-remote-host-native --target_board=local-remote-host-native"
> +
> +if { $board_type == "target" } {
> + set_board_info compiler gcc
Why do we need to also use the board as a target board?
> +}
> +if { $board_type == "host" } {
> + set_board_info gdb_opts "-ex \"dir ${tmp_dir}\""
No biggie, but this:
set_board_info gdb_opts "-d \"${tmp_dir}\""
looks a little simpler to me, just for the fact that it runs
through less code / fewer indirections in GDB.
> +}
--
Thanks,
Pedro Alves