[v3,2/3] gdb/testsuite: add linux target check in allow_hipcc_tests

Message ID 20230915145249.22318-2-simon.marchi@efficios.com
State New
Headers
Series [v3,1/3] gdb: add inferior_cloned observable |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_check--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 fail Patch failed to apply

Commit Message

Simon Marchi Sept. 15, 2023, 2:52 p.m. UTC
  ROCm / HIP tests should only run on Linux for now, existing gdb.rocm
tests miss such a check.  Add an "istarget linux" check in
allow_hipcc_tests.

Change-Id: I71f69e510a754f2fdadc32de53b923ebb9835ab5
---
 gdb/testsuite/lib/rocm.exp | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Lancelot SIX Sept. 15, 2023, 5:19 p.m. UTC | #1
On Fri, Sep 15, 2023 at 10:52:12AM -0400, Simon Marchi via Gdb-patches wrote:
> ROCm / HIP tests should only run on Linux for now, existing gdb.rocm
> tests miss such a check.  Add an "istarget linux" check in
> allow_hipcc_tests.
> 
> Change-Id: I71f69e510a754f2fdadc32de53b923ebb9835ab5
> ---
>  gdb/testsuite/lib/rocm.exp | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/gdb/testsuite/lib/rocm.exp b/gdb/testsuite/lib/rocm.exp
> index 98a3b308228d..791f1b403bb7 100644
> --- a/gdb/testsuite/lib/rocm.exp
> +++ b/gdb/testsuite/lib/rocm.exp
> @@ -67,6 +67,10 @@ gdb_caching_proc allow_hipcc_tests {} {
>  	return {0 "remote debugging"}
>      }
>  
> +    if {![istarget "*-linux*"]} {
> +	return {0 "target platform is not Linux"}
> +    }
> +

Hi,

This looks good to me.

As this is a rocm-specific part, I think I can now add:
Approved-By: Lancelot Six <lancelot.six@amd.com>

Thanks,
Lancelot.


>      # Ensure that GDB is built with amd-dbgapi support.
>      set output [remote_exec host $::GDB "$::INTERNAL_GDBFLAGS --configuration"]
>      if { [string first "--with-amd-dbgapi" $output] == -1 } {
> -- 
> 2.42.0
>
  
Simon Marchi Sept. 15, 2023, 8:18 p.m. UTC | #2
On 9/15/23 13:19, Lancelot SIX via Gdb-patches wrote:
> On Fri, Sep 15, 2023 at 10:52:12AM -0400, Simon Marchi via Gdb-patches wrote:
>> ROCm / HIP tests should only run on Linux for now, existing gdb.rocm
>> tests miss such a check.  Add an "istarget linux" check in
>> allow_hipcc_tests.
>>
>> Change-Id: I71f69e510a754f2fdadc32de53b923ebb9835ab5
>> ---
>>  gdb/testsuite/lib/rocm.exp | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/gdb/testsuite/lib/rocm.exp b/gdb/testsuite/lib/rocm.exp
>> index 98a3b308228d..791f1b403bb7 100644
>> --- a/gdb/testsuite/lib/rocm.exp
>> +++ b/gdb/testsuite/lib/rocm.exp
>> @@ -67,6 +67,10 @@ gdb_caching_proc allow_hipcc_tests {} {
>>  	return {0 "remote debugging"}
>>      }
>>  
>> +    if {![istarget "*-linux*"]} {
>> +	return {0 "target platform is not Linux"}
>> +    }
>> +
> 
> Hi,
> 
> This looks good to me.
> 
> As this is a rocm-specific part, I think I can now add:
> Approved-By: Lancelot Six <lancelot.six@amd.com>

Indeed, thanks!

Simon
  

Patch

diff --git a/gdb/testsuite/lib/rocm.exp b/gdb/testsuite/lib/rocm.exp
index 98a3b308228d..791f1b403bb7 100644
--- a/gdb/testsuite/lib/rocm.exp
+++ b/gdb/testsuite/lib/rocm.exp
@@ -67,6 +67,10 @@  gdb_caching_proc allow_hipcc_tests {} {
 	return {0 "remote debugging"}
     }
 
+    if {![istarget "*-linux*"]} {
+	return {0 "target platform is not Linux"}
+    }
+
     # Ensure that GDB is built with amd-dbgapi support.
     set output [remote_exec host $::GDB "$::INTERNAL_GDBFLAGS --configuration"]
     if { [string first "--with-amd-dbgapi" $output] == -1 } {