diff mbox

[testsuite] Don't skip gdb.dwarf2/pr10770.exp for non-gcc compiler

Message ID 1510932321-11891-1-git-send-email-yao.qi@linaro.org
State New
Headers show

Commit Message

Yao Qi Nov. 17, 2017, 3:25 p.m. UTC
gdb.dwarf2/pr10770.exp can be used for non-gcc compiler, at least clang.
This patch removes the restriction to only use gcc.  If other compilers,
like xlc or icc, can't compile the .c file, test result is not changed.

gdb/testsuite:

2017-11-17  Yao Qi  <yao.qi@linaro.org>

	* gdb.dwarf2/pr10770.exp: Remove code skipping non-gcc
	compiler.
---
 gdb/testsuite/gdb.dwarf2/pr10770.exp | 6 ------
 1 file changed, 6 deletions(-)

Comments

Simon Marchi Nov. 17, 2017, 4:56 p.m. UTC | #1
On 2017-11-17 10:25 AM, Yao Qi wrote:
> gdb.dwarf2/pr10770.exp can be used for non-gcc compiler, at least clang.
> This patch removes the restriction to only use gcc.  If other compilers,
> like xlc or icc, can't compile the .c file, test result is not changed.
> 
> gdb/testsuite:
> 
> 2017-11-17  Yao Qi  <yao.qi@linaro.org>
> 
> 	* gdb.dwarf2/pr10770.exp: Remove code skipping non-gcc
> 	compiler.
> ---
>  gdb/testsuite/gdb.dwarf2/pr10770.exp | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/gdb/testsuite/gdb.dwarf2/pr10770.exp b/gdb/testsuite/gdb.dwarf2/pr10770.exp
> index 938fbd1..63f4061 100644
> --- a/gdb/testsuite/gdb.dwarf2/pr10770.exp
> +++ b/gdb/testsuite/gdb.dwarf2/pr10770.exp
> @@ -21,12 +21,6 @@ if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
>      return 0
>  }
>  
> -# This test can only be run on targets which use GCC.
> -get_compiler_info
> -if {![test_compiler_info "gcc-*"]} {
> -    return 0
> -}
> -
>  if {![runto_main]} {
>      return -1
>  }
> 

LGTM.  I don't like this kind of whitelisting, because it excludes
by default test setups for which the test might also be relevant.  But
it's hard to find out, because the test is silently skipped.

Simon
Yao Qi Nov. 22, 2017, 2:50 p.m. UTC | #2
Simon Marchi <simon.marchi@ericsson.com> writes:

> LGTM.  I don't like this kind of whitelisting, because it excludes
> by default test setups for which the test might also be relevant.  But
> it's hard to find out, because the test is silently skipped.

I pushed it in.
diff mbox

Patch

diff --git a/gdb/testsuite/gdb.dwarf2/pr10770.exp b/gdb/testsuite/gdb.dwarf2/pr10770.exp
index 938fbd1..63f4061 100644
--- a/gdb/testsuite/gdb.dwarf2/pr10770.exp
+++ b/gdb/testsuite/gdb.dwarf2/pr10770.exp
@@ -21,12 +21,6 @@  if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
     return 0
 }
 
-# This test can only be run on targets which use GCC.
-get_compiler_info
-if {![test_compiler_info "gcc-*"]} {
-    return 0
-}
-
 if {![runto_main]} {
     return -1
 }