From: Pedro Alves <palves@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Yao Qi <yao@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] Remove pass in skip_unwinder_tests
Date: Fri, 24 Aug 2012 16:53:00 -0000 [thread overview]
Message-ID: <5037B15E.1020809@redhat.com> (raw)
In-Reply-To: <20120824161854.GA10953@host2.jankratochvil.net>
On 08/24/2012 05:18 PM, Jan Kratochvil wrote:
> On Fri, 24 Aug 2012 17:40:55 +0200, Pedro Alves wrote:
>> Nothing actually FAILed here. We have lots of precedent for "supports-foo" or
>> "try this" style functions that issue no FAIL.
>
> There are cases which one can be sure they never can fail. But otherwise
> I find it as a testsuitea bug.
>
>
>> It is expected that
>> some systems won't have the unwinder hooks. In the absurd, issuing a FAIL for
>> these cases would be like issuing FAILs when tests are skipped because
>> a [istarget "foobar-*-*"] returns false.
>
> If the system does not have unwinder hook it will XFAIL. XFAIL is not even
> displayed on screen during interactive run.
That's not what an XFAIL is for. XFAIL is when you do
"print 2+2", you expect "4" to come out, but you know that on
some broken systems instead "5" comes out, so you XFAIL on those systems,
as in, to fix that _wrong result_, you need to fix something else, not GDB,
but there _is_ something broken that should be fixed.
The fact is that the check for the unwinder hook actually _succeeded_.
It just happened that the result of the successful test was
"no unwinder hook".
I don't believe this support check should XFAIL on not-top-of-tree-glibc,
just like they shouldn't trigger an XFAIL on Windows or Solaris (if it
ever runs there). Rather, this is why DejaGNU has UNSUPPORTED -- it also
leaves a line in the .sum file, and is also not displayed on screen during
interactive run (IIUYC). If testing for the presence of the unwinder hooks
fails (as in, we get some unexpected output, like an internal error), then
we should be issuing in addition an UNRESOLVED instead of UNSUPPORTED
(we don't do that presently):
"Declares a test to have an unresolved outcome. unresolved writes in the log file a
message beginning with `UNRESOLVED', appending the argument string. This usually means
the test did not execute as expected, and a human being must go over results to
determine if it passed or failed (and to improve the test case). "
> If it even FAILs it is a GDB testsuite problem one should fix.
>
> In summary I find better:
>
> -PASS: gdb.java/jnpe.exp: check for unwinder hook
> +FAIL: gdb.java/jnpe.exp: check for unwinder hook
>
> or:
>
> -XFAIL: gdb.java/jnpe.exp: check for unwinder hook
> +FAIL: gdb.java/jnpe.exp: check for unwinder hook
>
> I find worse to get in diffs just:
>
> +FAIL: gdb.java/jnpe.exp: check for unwinder hook
In isolation, it's mildly worse, because you can't tell whether
it's a regression, or a new failure. But if you get that new
FAIL, you'll actually see:
FAIL: gdb.java/jnpe.exp: check for unwinder hook
UNSUPPORTED: gdb.java/jnpe.exp: jnpe.exp could not find _Unwind_DebugHook"
and several following
-PASS: ...
-PASS: ...
-PASS: ...
lines missing, corresponding to the tests that were skipped.
Those FAIL+UNSUPPORTED lines look pretty clearly related to me.
And IMO, ideally, we should see:
FAIL: gdb.java/jnpe.exp: check for unwinder hook
UNRESOLVED: gdb.java/jnpe.exp: looking for unwinder hooks failed
>
> Sure the testsuite has much more serious problems than this one, but when we
> already discuss it it would be nice to get some consensus and write it to:
> http://sourceware.org/gdb/wiki/GDBTestcaseCookbook
>
>
> Thanks,
> Jan
>
--
Pedro Alves
next prev parent reply other threads:[~2012-08-24 16:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 16:20 RFC: consolidate checks for _Unwind_DebugHook in test suite Tom Tromey
2012-08-15 0:53 ` Yao Qi
2012-08-15 13:58 ` Tom Tromey
2012-08-22 14:26 ` Tom Tromey
2012-08-23 9:50 ` [PATCH 1/2] Append "." in error message Yao Qi
2012-08-23 9:50 ` [PATCH 2/2] Remove pass in skip_unwinder_tests Yao Qi
2012-08-23 10:52 ` Pedro Alves
2012-08-23 12:29 ` Yao Qi
2012-08-23 18:03 ` Pedro Alves
2012-08-24 13:38 ` Jan Kratochvil
2012-08-24 15:41 ` Pedro Alves
2012-08-24 16:19 ` Jan Kratochvil
2012-08-24 16:53 ` Pedro Alves [this message]
2012-08-24 16:57 ` Pedro Alves
2012-08-24 17:12 ` Jan Kratochvil
2012-08-27 10:33 ` Yao Qi
2012-08-27 13:07 ` Jan Kratochvil
2012-08-27 15:15 ` Yao Qi
2012-08-27 15:57 ` Jan Kratochvil
2012-08-24 13:34 ` [PATCH 1/2] Append "." in error message Jan Kratochvil
2012-08-24 13:40 ` RFC: consolidate checks for _Unwind_DebugHook in test suite Jan Kratochvil
2012-08-24 13:54 ` Tom Tromey
2012-08-24 14:08 ` Jan Kratochvil
2012-08-24 15:26 ` Tom Tromey
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=5037B15E.1020809@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=yao@codesourcery.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