From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Add untested case in selftest_setup
Date: Fri, 3 Sep 2021 08:24:42 -0400 [thread overview]
Message-ID: <89921d12-57b6-5fef-4adf-04ce9d3940e3@polymtl.ca> (raw)
In-Reply-To: <20210902061325.GA29918@delia>
On 2021-09-02 2:13 a.m., Tom de Vries via Gdb-patches wrote:
> Hi,
>
> When building gdb with "-Wall -O2 -g -flto=auto", I run into:
> ...
> FAIL: gdb.gdb/python-helper.exp: breakpoint in captured_main \
> (got interactive prompt)
> FAIL: gdb.gdb/python-helper.exp: run until breakpoint at captured_main
> WARNING: Couldn't test self
> ...
> and similar in gdb.gdb/selftest.exp.
>
> The first FAIL in more detail:
> ...
> (gdb) break captured_main^M
> Function "captured_main" not defined.^M
> Make breakpoint pending on future shared library load? (y or [n]) n^M
> (gdb) FAIL: gdb.gdb/python-helper.exp: breakpoint in captured_main \
> (got interactive prompt)
> ...
>
> The problem is that lto has optimized away the captured_main function
> and consequently the selftests dependent on that cannot run.
>
> Fix this by:
> - using gdb_breakpoint to detect failure to set the breakpoint
> - handling the failure to set a breakpoint by calling untested
> - not emitting the warning if we've already got untested
> such that we have:
> ...
> (gdb) UNTESTED: gdb.gdb/python-helper.exp: Cannot set breakpoint at \
> captured_main, skipping testcase.
> ...
>
> Any comments?
I don't see what else we could do in this case, so LGTM.
Simon
next prev parent reply other threads:[~2021-09-03 12:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 6:13 Tom de Vries via Gdb-patches
2021-09-03 12:24 ` Simon Marchi via Gdb-patches [this message]
2021-09-03 14:40 ` [committed][gdb/testsuite] Add untested case in gdb.gdb/complaints.exp Tom de Vries via Gdb-patches
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=89921d12-57b6-5fef-4adf-04ce9d3940e3@polymtl.ca \
--to=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
--cc=tdevries@suse.de \
/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