gdb/testsuite: skip gdb.threads/omp-par-scope.exp with clang
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
Commit Message
Since 2020 it has been reported to clang[1] that the debug information
around OpenMP is insufficient. The OpenMP section is not declared
within the correct scope, and instead clang marks as if the section was
a function in the global scope. This causes several failures in the
test gdb.threads/omp-par-scope.exp when using clang to test GDB.
Since this isn't a true failure of GDB, and there is little expectation
that clang will be able to fix this soon, this commit disables the
aforementioned test when clang is being used.
[1] https://github.com/llvm/llvm-project/issues/44236
---
gdb/testsuite/gdb.threads/omp-par-scope.exp | 8 ++++++++
1 file changed, 8 insertions(+)
Comments
On Mon, 25 Nov 2024 15:42:25 -0300
Guinevere Larsen <guinevere@redhat.com> wrote:
> Since 2020 it has been reported to clang[1] that the debug information
> around OpenMP is insufficient. The OpenMP section is not declared
> within the correct scope, and instead clang marks as if the section was
> a function in the global scope. This causes several failures in the
> test gdb.threads/omp-par-scope.exp when using clang to test GDB.
>
> Since this isn't a true failure of GDB, and there is little expectation
> that clang will be able to fix this soon, this commit disables the
> aforementioned test when clang is being used.
>
> [1] https://github.com/llvm/llvm-project/issues/44236
I thought at first that it might make sense to XFAIL the problematic
tests. But after running it for myself, I see that clang has so many
problems that I now agree that it makes sense to disable the test
entirely (for clang).
One nit though...
> +if { [test_compiler_info "clang*"] } {
> + # Clang doesn't add OpenMP information in the correct scope,
> + # so all relevant tests here will fail. See here for more info:
> + # https://github.com/llvm/llvm-project/issues/44236
> + unsupported "Clang doesn't add required info for the test"
Could you change the message to:
"Clang doesn't provided the required debuginfo for this test"
?
> + return
> +}
> +
With that nit fixed...
Approved-by: Kevin Buettner <kevinb@redhat.com>
On 11/27/24 3:14 PM, Kevin Buettner wrote:
> On Mon, 25 Nov 2024 15:42:25 -0300
> Guinevere Larsen <guinevere@redhat.com> wrote:
>
>> Since 2020 it has been reported to clang[1] that the debug information
>> around OpenMP is insufficient. The OpenMP section is not declared
>> within the correct scope, and instead clang marks as if the section was
>> a function in the global scope. This causes several failures in the
>> test gdb.threads/omp-par-scope.exp when using clang to test GDB.
>>
>> Since this isn't a true failure of GDB, and there is little expectation
>> that clang will be able to fix this soon, this commit disables the
>> aforementioned test when clang is being used.
>>
>> [1] https://github.com/llvm/llvm-project/issues/44236
> I thought at first that it might make sense to XFAIL the problematic
> tests. But after running it for myself, I see that clang has so many
> problems that I now agree that it makes sense to disable the test
> entirely (for clang).
>
> One nit though...
>
>> +if { [test_compiler_info "clang*"] } {
>> + # Clang doesn't add OpenMP information in the correct scope,
>> + # so all relevant tests here will fail. See here for more info:
>> + # https://github.com/llvm/llvm-project/issues/44236
>> + unsupported "Clang doesn't add required info for the test"
> Could you change the message to:
>
> "Clang doesn't provided the required debuginfo for this test"
>
> ?
>
>> + return
>> +}
>> +
> With that nit fixed...
>
> Approved-by: Kevin Buettner <kevinb@redhat.com>
>
pushed with the nit fixed! Thanks for the quick review
@@ -20,6 +20,14 @@
standard_testfile
+if { [test_compiler_info "clang*"] } {
+ # Clang doesn't add OpenMP information in the correct scope,
+ # so all relevant tests here will fail. See here for more info:
+ # https://github.com/llvm/llvm-project/issues/44236
+ unsupported "Clang doesn't add required info for the test"
+ return
+}
+
set have_nested_function_support 0
set opts {openmp debug}
if [support_nested_function_tests] {