This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING][PATCH] gnu_vector.exp: Avoid some more known FAILs


On 08/11/2015 06:27 PM, Andreas Arnez wrote:
> +gdb_test_multiple "return (int4) \{4, 2, 7, 6\}" $test {
> +    -re "#0 .* main .*$gdb_prompt $" {
> +	if { $ok } {
> +	    pass $test
> +	    gdb_test "continue" "4 2 7 6\r\n.*" "verify vector return value"
> +	}
> +    }
> +    -re "The location .* is unknown.\r\n.* return value .* will be ignored.\r\n" {
> +	kfail "gdb/8549" $test
> +	set ok 0
> +	exp_continue
> +    }
> +    -re "Make add_some_intvecs return now. .y or n. $" {
> +	send_gdb "y\n"
> +	exp_continue
> +    }
> +}

If this fails without matching the first pattern above, then we can
end up with a duplicate test message (kfail + fail).

Maybe do something like this instead:

set test "set vector return value"
set should_kfail 0
set finished 0
gdb_test_multiple "return (int4) \{4, 2, 7, 6\}" $test {
    -re "#0 .* main .*$gdb_prompt $" {
        set finished 1
    }
    -re "The location .* is unknown.\r\n.* return value .* will be ignored.\r\n" {
	set should_kfail 1
	exp_continue
    }
    -re "Make add_some_intvecs return now. .y or n. $" {
	send_gdb "y\n"
	exp_continue
    }
}
if { $finished } {
    if { $should_kfail } {
        kfail "gdb/8549" $test
    } else {
	pass $test
        gdb_test "continue" "4 2 7 6\r\n.*" "verify vector return value"
    }
}

Otherwise LGTM.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]