mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-31 14:11:36 +08:00
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>
This commit is contained in:
parent
53181a6dfa
commit
efcfb26ae6
@ -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"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user