This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Guard compile tests from running when unsupported + harden feature support check
- From: Pedro Alves <palves at redhat dot com>
- To: Luis Machado <lgustavo at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Wed, 19 Aug 2015 14:15:37 +0100
- Subject: Re: [PATCH] Guard compile tests from running when unsupported + harden feature support check
- Authentication-results: sourceware.org; auth=none
- References: <1439988825-19754-1-git-send-email-lgustavo at codesourcery dot com>
On 08/19/2015 01:53 PM, Luis Machado wrote:
> + if {[skip_compile_feature_tests]} {
> + untested "compile command not supported (could not find libcc1 shared library?)"
> + return -1
> + }
> +
> # gnu_ifunc (10): error: too many arguments to function 'gnu_ifunc'
> gdb_test_no_output "compile code resultvar = gnu_ifunc_alias (10);"
>
This one's OK.
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index 56cde7a..fcf9cac 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -3005,6 +3005,9 @@ proc skip_compile_feature_tests {} {
> -re "Command not supported on this host\\..*\r\n$gdb_prompt $" {
> set result 1
> }
> + -re "No compiler support for this language\\.\r\n$gdb_prompt $" {
> + set result 1
> + }
This one I'm not so sure.
I'd suspect that that could happen when e.g., gdb connects to gdbserver and
finds the program stopped at the entry point, and then the current language
ends up set to asm instead of C. But then that would be a test bug and it
would be wrong to skip further testing.
But please don't make us guess; please expand on when do you see this.
Thanks,
Pedro Alves