]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite, tclint] Fix gdb.rocm
authorTom de Vries <tdevries@suse.de>
Fri, 12 Sep 2025 13:04:50 +0000 (15:04 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 12 Sep 2025 13:04:50 +0000 (15:04 +0200)
Running tclint on the test-cases in gdb.rocm shows a few problems:
...
precise-memory-multi-inferiors.exp:33:5: expected braced word or word \
  without substitutions in argument interpreted as expr [command-args]
precise-memory-multi-inferiors.exp:43:5: expected braced word or word \
  without substitutions in argument interpreted as expr [command-args]
precise-memory-multi-inferiors.exp:55:5: expected braced word or word \
  without substitutions in argument interpreted as expr [command-args]
...

Fix these.

The gdb.rocm test-cases are unsupported for me, so I can't test this.

gdb/testsuite/gdb.rocm/precise-memory-multi-inferiors.exp

index c7a78b87d51d867331f6036d7e2d5b8528d6ff79..058b085ab4766bbfcab952e55cbaffd352afaf24 100644 (file)
@@ -30,7 +30,7 @@ proc test_per_inferior { } {
     gdb_test "show amdgpu precise-memory" \
        "AMDGPU precise memory access reporting is off \\(currently disabled\\)." \
        "show initial value, inferior 1"
-    if $::test_python {
+    if { $::test_python } {
        gdb_test "python print(gdb.parameter(\"amdgpu precise-memory\"))" \
            "False" \
            "show initial value using Python, inferior 1"
@@ -40,7 +40,7 @@ proc test_per_inferior { } {
     gdb_test "show amdgpu precise-memory" \
        "AMDGPU precise memory access reporting is on \\(currently disabled\\)." \
        "show new value, inferior 1"
-    if $::test_python {
+    if { $::test_python } {
        gdb_test "python print(gdb.parameter(\"amdgpu precise-memory\"))" \
            "True" \
            "show new value using Python, inferior 1"
@@ -52,7 +52,7 @@ proc test_per_inferior { } {
     gdb_test "show amdgpu precise-memory" \
        "AMDGPU precise memory access reporting is off \\(currently disabled\\)." \
        "show initial value, inferior 2"
-    if $::test_python {
+    if { $::test_python } {
        gdb_test "python print(gdb.parameter(\"amdgpu precise-memory\"))" \
            "False" \
            "show initial value using Python, inferior 2"