Re: [committed][gdb/testsuite] Update psym-external-decl.exp for gcc-10/clang

Tom de Vries
2020-06-17T13:56:20Z

On 6/17/20 2:24 PM, Gary Benson wrote:
> Tom de Vries wrote:
>> Fix the test-case [with gcc-10] by adding a use of aaa in psym-external-decl.c.
> ...
>> That still doesn't work for clang, so skip test in that case.
> ..
>> diff --git a/gdb/testsuite/gdb.base/psym-external-decl.exp b/gdb/testsuite/gdb.base/psym-external-decl.exp
>> index bbcc2745755..d0388d5655e 100644
>> --- a/gdb/testsuite/gdb.base/psym-external-decl.exp
>> +++ b/gdb/testsuite/gdb.base/psym-external-decl.exp
>> @@ -15,6 +15,11 @@
>>
>> standard_testfile .c psym-external-decl-2.c
>>
>> +get_compiler_info
>> +if { [test_compiler_info "clang-*"] } {
>> + return -1
>> +}
>> +
>> set srcfiles [list $srcfile $srcfile2]
>>
>> if { [build_executable_from_specs \
>
> Tom, I'd like this testcase to not fail silently. Is the
> functionality under test something that isn't ever expected to work
> with clang, or is this a test that should pass with clang (but it
> currently doesn't, for whatever reason)?
>

Hi Gary,

I'm not sure. The test can pass with clang, provided it generates the
required debug info. It currently doesn't. Why that is the case, I
have no idea.

Thanks,
- Tom

> If the former (it isn't ever expected to work), can this test please
> call to unsupported/untested, so there's at least something in the
> .sum file? If it's the latter (the test should pass, but it doesn't),
> can the skip-the-test block please be removed, so the test can fail?
>
> Whichever it is, I'm happy to make the commit, or you can if you
> like, I'm easy.
>
> Thanks,
> Gary
>