diff options
author | Lancelot SIX <lancelot.six@amd.com> | 2025-03-21 11:20:23 +0000 |
---|---|---|
committer | Lancelot SIX <lancelot.six@amd.com> | 2025-03-21 22:50:37 +0000 |
commit | efcfb26ae61fc68a380417ac717f9590073182e9 (patch) | |
tree | d82f3047e4f43479e7961ff18916971f5f7b5b6f /gdb | |
parent | 53181a6dfaa8c472c860c15e73365e397c0cd4f4 (diff) | |
download | binutils-efcfb26ae61fc68a380417ac717f9590073182e9.zip binutils-efcfb26ae61fc68a380417ac717f9590073182e9.tar.gz binutils-efcfb26ae61fc68a380417ac717f9590073182e9.tar.bz2 |
gdb/testsuise: gdb.rocm/precise-memory.exp to not require hip_devices_support_precise_memory
The gdb.rocm/precise-memory.exp test adjusts its behaviour based on the
value returned by hip_devices_support_precise_memory. This function has
static assumption regarding HW capabilities, which might not be
accurate.
Adjust the test so it does not assume anything about HW capabilities,
but instead just ensure that GDB behaves consistently.
Change-Id: Ie1f9c6219b88b94f6d461a254b2ad616b92db6b9
Approved-by: Pedro Alves <pedro@palves.net>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/gdb.rocm/precise-memory.exp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gdb/testsuite/gdb.rocm/precise-memory.exp b/gdb/testsuite/gdb.rocm/precise-memory.exp index f423a11..209bae6 100644 --- a/gdb/testsuite/gdb.rocm/precise-memory.exp +++ b/gdb/testsuite/gdb.rocm/precise-memory.exp @@ -39,17 +39,20 @@ proc do_test { } { "AMDGPU precise memory access reporting is off \\(currently disabled\\)." \ "show precise-memory setting in CLI before" - if {[hip_devices_support_precise_memory]} { - gdb_test_no_output "set amdgpu precise-memory on" - set cli_effective_value "enabled" - } else { - gdb_test "set amdgpu precise-memory on" \ - "warning: AMDGPU precise memory access reporting could not be enabled." - set cli_effective_value "disabled" + # Assume precise-memory is available, unless GDB reports otherwise. + gdb_test_multiple "set amdgpu precise-memory on" "" { + -re -wrap "warning: AMDGPU precise memory access reporting could not be enabled\\." { + set cli_effective_value "disabled" + pass $gdb_test_name + } + -re -wrap "^" { + set cli_effective_value "enabled" + pass $gdb_test_name + } } gdb_test "show amdgpu precise-memory" \ - "AMDGPU precise memory access reporting is on \\(currently ${cli_effective_value}\\)." \ + "AMDGPU precise memory access reporting is on \\(currently ${cli_effective_value}\\)\\." \ "show precise-memory setting in CLI after" } } |