From: Simon Marchi <simark@simark.ca>
To: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] Split gdb.multi/multi-target.exp into separate testcases
Date: Thu, 17 Sep 2020 15:16:01 -0400 [thread overview]
Message-ID: <f5746190-91b2-606e-7502-6055e5c9486d@simark.ca> (raw)
In-Reply-To: <20200917180038.29226-2-pedro@palves.net>
On 2020-09-17 2:00 p.m., Pedro Alves wrote:
> gdb.multi/multi-target.exp sets up a debug environment with multiple
> gdbservers, multiple native processes, and multiple cores, which has
> proved useful for exercising a number of multi-target scenarios.
>
> But, as we add more tests to gdb.base/multi-target.exp, it is growing
> a bit too large (making a bit cumbersome to debug) and too slow to run
> (if you have glibc debug info).
>
> This commit thus splits the multi-target.exp into several testcases,
> one per use case. The common setup code is moved to a new
> multi-target.exp.tcl file that is included by all the resulting
> multi-target testcases.
Nice, that makes the test cases much more readable too.
> diff --git a/gdb/testsuite/gdb.multi/mtarg-ping-pong-next.exp b/gdb/testsuite/gdb.multi/mtarg-ping-pong-next.exp
> new file mode 100644
> index 00000000000..551e383b6d1
> --- /dev/null
> +++ b/gdb/testsuite/gdb.multi/mtarg-ping-pong-next.exp
> @@ -0,0 +1,85 @@
> +# Copyright 2017-2020 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/>.
> +
> +# Test "next" bouncing between two breakpoints in two threads running
> +# in different targets.
> +
> +source $srcdir/$subdir/multi-target.exp.tcl
> +
> +if {![mtarg_prepare]} {
> + return
> +}
> +
> +proc test_ping_pong_next {} {
> + global srcfile
> +
> + if {![setup "off"]} {
> + untested "setup failed"
> + return
> + }
> +
> + # block/unblock inferiors 1 and 2 according to INF1 and INF2.
> + proc block {inf1 inf2} {
> + gdb_test "thread apply 1.1 p wait_for_gdb = $inf1" " = $inf1"
> + gdb_test "thread apply 2.1 p wait_for_gdb = $inf2" " = $inf2"
> + }
> +
> + # We're use inferiors 1 and 2. Make sure they're really connected
I just spotted this typo: "use" -> "using".
Simon
next prev parent reply other threads:[~2020-09-17 19:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 18:00 [PATCH 0/2] Fix "thread find" with multi inferior/target (PR gdb/26631) Pedro Alves
2020-09-17 18:00 ` [PATCH 1/2] Split gdb.multi/multi-target.exp into separate testcases Pedro Alves
2020-09-17 19:16 ` Simon Marchi [this message]
2020-09-18 12:34 ` Pedro Alves
2020-09-17 19:41 ` Simon Marchi
2020-09-18 13:01 ` Pedro Alves
2020-09-17 18:00 ` [PATCH 2/2] Fix "thread find" with multiple inferiors/targets (PR gdb/26631) Pedro Alves
2020-09-17 19:37 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f5746190-91b2-606e-7502-6055e5c9486d@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox