From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gnu_vector.exp: Respect `should_kfail' for PR8549
Date: Tue, 19 Jan 2016 18:46:00 -0000 [thread overview]
Message-ID: <m3d1sxs8zo.fsf@oc1027705133.ibm.com> (raw)
In-Reply-To: <864me9tqxc.fsf@gmail.com> (Yao Qi's message of "Tue, 19 Jan 2016 17:33:35 +0000")
On Tue, Jan 19 2016, Yao Qi wrote:
> Andreas Arnez <arnez@linux.vnet.ibm.com> writes:
>
>> -gdb_test "p res" "\\{4, 2, 7, 6\\}.*" "verify vector return value"
>> +set test "verify vector return value"
>> +gdb_test_multiple "p res" $test {
>> + -re ".*= \\{4, 2, 7, 6\\}\r\n.*$gdb_prompt $" {
>> + pass $test
>> + }
>> + -re ".*= \\{10, 20, 48, 72\\}\r\n.*$gdb_prompt $" {
>> + if { $should_kfail } {
>> + kfail "gdb/8549" $test
>> + } else {
>> + fail $test
>> + }
>> + }
>> +}
>
> IMO, if GDB for a certain target doesn't handle "return" and "finish"
> correctly, the return value can be some random results. Why do we match
> "\\{10, 20, 48, 72\\}" here? I presume that because "10, 20, 48, 72"
> was returned in the previous test. Do *all* targets don't correctly handle
> "return" and "finish" return "\\{10, 20, 48, 72\\}"? In other words, if
> we know it is broken already, why do still match the output? We can
> kfail it according to the target triplet.
Doing the KFAIL based on the target triplet would miss the point of this
test on s390x, because on the same target "s390x-ibm-linux-gnu" the test
shall succeed if the CPU has vector registers and the vector ABI is
used, but is known to fail if a non-vector ABI is used. (Note that the
main reason for enhancing the gnu_vector test case was to verify GDB's
correct treatment of the s390x vector ABI.)
But testing against some expected return value in this case is certainly
wrong. I suggest to change my patch like follows. WDYT?
diff --git a/gdb/testsuite/gdb.base/gnu_vector.exp b/gdb/testsuite/gdb.base/gnu_vector.exp
index 127c0b7..c911830 100644
--- a/gdb/testsuite/gdb.base/gnu_vector.exp
+++ b/gdb/testsuite/gdb.base/gnu_vector.exp
@@ -245,7 +245,7 @@ gdb_test_multiple "p res" $test {
-re ".*= \\{4, 2, 7, 6\\}\r\n.*$gdb_prompt $" {
pass $test
}
- -re ".*= \\{10, 20, 48, 72\\}\r\n.*$gdb_prompt $" {
+ -re ".*= \\{.*\\}\r\n.*$gdb_prompt $" {
if { $should_kfail } {
kfail "gdb/8549" $test
} else {
next prev parent reply other threads:[~2016-01-19 18:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 16:33 Andreas Arnez
2016-01-19 17:33 ` Yao Qi
2016-01-19 18:46 ` Andreas Arnez [this message]
2016-01-20 9:32 ` 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=m3d1sxs8zo.fsf@oc1027705133.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.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