From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Fix xpass in gdb.python/lib-types.exp
Date: Wed, 19 Feb 2020 22:03:00 -0000 [thread overview]
Message-ID: <bc5368ac-9ced-9c14-814d-791a87e46378@suse.de> (raw)
In-Reply-To: <87k14iqnas.fsf@tromey.com>
[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]
On 19-02-2020 22:28, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
> Tom> It's incorrect to xfail a gdb test-case for gcc bug.
>
> I think we've used "kfail" for this in the past, though TBH I never
> truly understood the kfail/xfail distinction and I probably have it
> backward or something.
>
I went to double check again at my xfail/kfail reference point (
https://opensource.apple.com/source/gdb/gdb-325/src/dejagnu/doc/dejagnu.texi.auto.html
), and found:
...
@item XFAIL
A test failed, but it was expected to fail. This result indicates no
change in a known environment bug. If a test fails because the
operating system where the test runs lacks some facility required by the
test (i.e. failure is due to the lack of a feature, not the existence of
a bug), the outcome is @code{UNSUPPORTED} instead.
...
So, I got the xfail and kfail mixed up, and in fact the xfail for a gcc
bug is valid use in the gdb testsuite. Oops.
I've now fixed the xpass by testing more precisely for the xfail.
Committed as attached.
Thanks,
- Tom
[-- Attachment #2: 0001-gdb-testsuite-Fix-xpass-in-gdb.python-lib-types.exp.patch --]
[-- Type: text/x-patch, Size: 2356 bytes --]
[gdb/testsuite] Fix xpass in gdb.python/lib-types.exp
When running gdb.python/lib-types.exp, we have an xpass:
...
(gdb) python print (str (typedef_const_typedef_class1_ref_obj.type))^M
typedef_const_typedef_class1_ref^M
(gdb) XPASS: gdb.python/lib-types.exp: \
python print (str (typedef_const_typedef_class1_ref_obj.type)) \
(PRMS gcc/55641)
...
When running the same with gcc 4.8, we have an xfail instead:
...
(gdb) python print (str (typedef_const_typedef_class1_ref_obj.type))^M
const typedef_const_typedef_class1_ref^M
(gdb) XFAIL: gdb.python/lib-types.exp: \
python print (str (typedef_const_typedef_class1_ref_obj.type)) \
(PRMS gcc/55641)
...
Fix the xpass by xfailing only for the gcc 4.8 pattern.
Tested on x86_64-linux, with:
- gcc 7.5.0
- gcc 4.8.5
- clang 5.0.2
gdb/testsuite/ChangeLog:
2020-02-19 Tom de Vries <tdevries@suse.de>
* gdb.python/lib-types.exp: Make xfail more strict.
---
gdb/testsuite/gdb.python/lib-types.exp | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.python/lib-types.exp b/gdb/testsuite/gdb.python/lib-types.exp
index ab1d9d8dad..d2d5f9b2b9 100644
--- a/gdb/testsuite/gdb.python/lib-types.exp
+++ b/gdb/testsuite/gdb.python/lib-types.exp
@@ -103,8 +103,15 @@ gdb_test_multiple "python print (str (basic_type_typedef_const_typedef_class1_ob
# test nested typedef/reference stripping
gdb_test_no_output "python typedef_const_typedef_class1_ref_obj = gdb.parse_and_eval ('typedef_const_typedef_class1_ref_obj')"
gdb_test_no_output "python basic_type_typedef_const_typedef_class1_ref_obj = gdb.types.get_basic_type (typedef_const_typedef_class1_ref_obj.type)"
-if {[test_compiler_info {gcc-*-*}]} { setup_xfail gcc/55641 *-*-* }
-gdb_test "python print (str (typedef_const_typedef_class1_ref_obj.type))" "\[\r\n\]+typedef_const_typedef_class1_ref"
+gdb_test_multiple "python print (str (typedef_const_typedef_class1_ref_obj.type))" "" {
+ -re -wrap "\[\r\n\]+const typedef_const_typedef_class1_ref" {
+ # Compiler with PR gcc/55641.
+ xfail $gdb_test_name
+ }
+ -re -wrap "\[\r\n\]+typedef_const_typedef_class1_ref" {
+ pass $gdb_test_name
+ }
+}
set test "nested typedef/ref stripping"
gdb_test_multiple "python print (str (basic_type_typedef_const_typedef_class1_ref_obj))" $test {
-re "\[\r\n\]+class1\[\r\n\]+$gdb_prompt $" {
prev parent reply other threads:[~2020-02-19 22:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 11:57 Tom de Vries
2020-02-19 21:28 ` Tom Tromey
2020-02-19 22:03 ` Tom de Vries [this message]
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=bc5368ac-9ced-9c14-814d-791a87e46378@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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