This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gnu_vector.exp: Respect `should_kfail' for PR8549
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- Cc: gdb-patches at sourceware dot org, Yao Qi <qiyaoltc at gmail dot com>
- Date: Tue, 19 Jan 2016 17:33:35 +0000
- Subject: Re: [PATCH] gnu_vector.exp: Respect `should_kfail' for PR8549
- Authentication-results: sourceware.org; auth=none
- References: <m3h9i9sf64 dot fsf at oc1027705133 dot ibm dot com>
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.
--
Yao (éå)