This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/6] testsuite: Don't use expect_background to reap gdbserver
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 13 Apr 2015 14:51:56 +0100
- Subject: Re: [PATCH 4/6] testsuite: Don't use expect_background to reap gdbserver
- Authentication-results: sourceware.org; auth=none
- References: <1424699660-11727-1-git-send-email-palves at redhat dot com> <1424699660-11727-5-git-send-email-palves at redhat dot com> <864mokuuep dot fsf at gmail dot com> <552BB206 dot 4000803 at redhat dot com> <552BC3C2 dot 6010103 at gmail dot com>
On 04/13/2015 02:25 PM, Yao Qi wrote:
> On 13/04/15 13:09, Pedro Alves wrote:
>>> I wrap the send_gdb and gdb_expect statement above by "catch",
>>>> testing looks fine, although error messages are still shown in the
>>>> console and gdb.log.
>> Why not suppress the error message? I think you just need to pass
>> a var name as second parameter to "catch".
>
> I did that, but it is useless. These messages prefixed with
> "ERROR OCCURED:" are printed by DejaGNU, lib/remote.exp:remote_expect,
>
> if {$code == 1} {
> if {[info exists string]} {send_user "ERROR OCCURED: $errorInfo
> $errorCode $string"}
>
> looks we can't prevent DejaGNU invoking send_user.
I think we should just call raw "expect" instead then.
> If this error is
> annoying, we can unset gdb_spawn_id at the end of proc do_test in
> gdb-sigterm.exp.
I think also need to call wait too? There are other eof calls in other
tests too and also under lib/ We'd need to do the same to all of those,
and then, at least, we'd need to make default_gdb_exit not skip the
inotify_log_file code too. I'm not sure I like that direction.
(BTW, that remote host code in default_gdb_exit looks like should be
given the same treatment.)
Thanks,
Pedro Alves