From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Yao Qi <yao@codesourcery.com>,
"Joseph S. Myers" <joseph@codesourcery.com>
Subject: Re: [_Complex test 2/4] _Complex type in varargs.exp
Date: Mon, 23 May 2011 10:27:00 -0000 [thread overview]
Message-ID: <201105231127.17868.pedro@codesourcery.com> (raw)
In-Reply-To: <4DD9DDDA.9030602@codesourcery.com>
On Monday 23 May 2011 05:08:58, Yao Qi wrote:
> On 05/20/2011 11:37 PM, Pedro Alves wrote:
> > Did you try setup_kfail? See below. The way you have things
> > doesn't catch the internal error case because that is matched
> > within gdb_test_multiple itself. You could also check the return
> > of gdb_test_multiple to see if an internal match happened, but
> > that's more complicated than setup_kfail.
> >
>
> I see. It has been mentioned in the comment to proc gdb_test_multiple
>
> # Returns:
> # 1 if the test failed, according to a built-in failure pattern
> # 0 if only user-supplied patterns matched
> # -1 if there was an internal error.
>
> Thanks.
>
> >> > x86_64-unknown-linux-gnu:
> >> > KFAIL: gdb.base/varargs.exp: print find_max_float_real(4, fc1, fc2, fc3,
> >> > fc4) (PRMS: gdb/12790)
> >> > KFAIL: gdb.base/varargs.exp: print find_max_double_real(4, dc1, dc2,
> >> > dc3, dc4) (PRMS: gdb/12790)
> >> > FAIL: gdb.base/varargs.exp: print find_max_long_double_real(4, ldc1,
> >> > ldc2, ldc3, ldc4) (GDB internal error)
> >> >
> > setup_kfail gdb/12776 "i?86-*-*"
> > setup_kfail gdb/12790 "x86_64-*-*"
> > setup_kfail gdb/12791 "arm*-*-*"
> > set test "print find_max_long_double_real(4, ldc1, ldc2, ldc3, ldc4)"
> > gdb_test_multiple $test $test {
> > -re ".*= 4 \\+ 4 \\* I.*${gdb_prompt} $" {
> > pass $test
> > }
> > }
>
> This is exactly what I did when I was writing this patch. However, the
> wrong PR number is got in KFAIL result, like this,
>
> KFAIL: gdb.base/varargs.exp: print find_max_long_double_real(4, ldc1,
> ldc2, ldc3, ldc4) (PRMS: gdb/12791)
>
> I was running test case on i686-pc-linux-gnu, but the PR number
> displayed was arm's PR. Source code of proc setup_kfail shows that PR
> number is saved in kfail_prms unconditionally. Of course, only the PR
> in last call of setup_kfail is saved. This is a limitation of
> setup_kfail, IMO.
Huh, indeed.
> I gave up on this direction then.
>
> In order to overcome this limitation, a new proc setup_kfail_for_target
> is added in lib/gdb.exp, which only call setup_kfail if istarget returns
> true.
Okay.
>
> > Maybe you can even convert the gdb_test_multiple's to gdb_test that way.
> > (You could also put the setup_kfails in a procedure to not need to
> > repeat them everywhere).
>
> Since we are using setup_kfail, we can surely convert gdb_test_multiple
> to gdb_test. I don't put setup_kfails in a proc, because, KFAILs on x86
> are different from KFAILs on arm/x86_64.
>
> In my new patch, the internal-error on x86_64 is KFAIL'ed.
>
> KFAIL: gdb.base/varargs.exp: print find_max_long_double_real(4, ldc1,
> ldc2, ldc3, ldc4) (GDB internal error) (PRMS: gdb/12790)
Looks good to me.
--
Pedro Alves
next prev parent reply other threads:[~2011-05-23 10:27 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 14:13 [patch, testsuite] Tests to _Complex type Yao Qi
2011-05-06 14:33 ` Joseph S. Myers
2011-05-09 2:24 ` Yao Qi
2011-05-09 15:06 ` Tom Tromey
2011-05-19 4:26 ` [_Complex test 1/4] support_complex_tests in gdb.exp and pass _Complex args to func Yao Qi
2011-05-19 8:16 ` Mark Kettenis
2011-05-19 10:16 ` Joseph S. Myers
2011-05-19 13:26 ` Yao Qi
2011-05-19 17:10 ` Tom Tromey
2011-05-20 8:10 ` Yao Qi
2011-05-26 17:07 ` Tom Tromey
2011-05-30 2:53 ` [committed] " Yao Qi
2011-05-19 13:01 ` Yao Qi
2011-05-19 13:24 ` Mark Kettenis
2011-05-19 13:38 ` Mark Kettenis
2011-05-19 10:12 ` Joseph S. Myers
2011-05-19 4:34 ` [_Complex test 2/4] _Complex type in varargs.exp Yao Qi
2011-05-19 10:13 ` Joseph S. Myers
2011-05-19 13:42 ` Yao Qi
2011-05-19 15:27 ` Joseph S. Myers
2011-05-20 9:09 ` Pedro Alves
2011-05-20 15:22 ` Yao Qi
2011-05-20 15:37 ` Pedro Alves
2011-05-23 4:09 ` Yao Qi
2011-05-23 10:27 ` Pedro Alves [this message]
2011-05-30 2:55 ` [committed] " Yao Qi
2011-05-19 17:12 ` Tom Tromey
2011-05-20 8:11 ` Yao Qi
2011-05-19 4:46 ` [_Complex test 3/4] Isolate each test's effect in callfuncs.exp Yao Qi
2011-05-19 18:46 ` Tom Tromey
2011-05-30 2:56 ` [committed] " Yao Qi
2011-05-19 5:09 ` [_Complex test 4/4] _Complex tests " Yao Qi
2011-05-20 8:17 ` Yao Qi
2011-05-24 1:46 ` [_Complex test 4/4 V3] " Yao Qi
2011-05-24 9:00 ` Mark Kettenis
2011-05-24 9:34 ` Yao Qi
2011-05-24 10:00 ` Mark Kettenis
2011-05-24 13:54 ` Yao Qi
2011-05-26 17:07 ` [_Complex test 4/4] " Tom Tromey
2011-05-30 2:57 ` [committed] " Yao Qi
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=201105231127.17868.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=joseph@codesourcery.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