From: Tom de Vries Date: Thu, 18 Sep 2025 11:28:04 +0000 (+0200) Subject: [gdb/testsuite, tclint] Fix gdb.perf X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f22e65cbf5340c02ff71cb4f8d95b420f76cb3f7;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite, tclint] Fix gdb.perf Running tclint on the test-cases in gdb.perf shows a few problems. Fix these. Tested on x86_64-linux. --- diff --git a/gdb/tclint.toml b/gdb/tclint.toml index b67f7d03b29..0f62e5ff821 100644 --- a/gdb/tclint.toml +++ b/gdb/tclint.toml @@ -29,7 +29,6 @@ exclude = [ "gdb/testsuite/gdb.guile", "gdb/testsuite/gdb.mi", "gdb/testsuite/gdb.opencl", -"gdb/testsuite/gdb.perf", "gdb/testsuite/gdb.python", "gdb/testsuite/gdb.reverse", "gdb/testsuite/gdb.threads", diff --git a/gdb/testsuite/gdb.perf/backtrace.exp b/gdb/testsuite/gdb.perf/backtrace.exp index 212298e55d6..aea1e012181 100644 --- a/gdb/testsuite/gdb.perf/backtrace.exp +++ b/gdb/testsuite/gdb.perf/backtrace.exp @@ -28,7 +28,7 @@ set executable $testfile set expfile $testfile.exp # make check-perf RUNTESTFLAGS='backtrace.exp BACKTRACE_DEPTH=1024' -if ![info exists BACKTRACE_DEPTH] { +if {![info exists BACKTRACE_DEPTH]} { set BACKTRACE_DEPTH 64 } diff --git a/gdb/testsuite/gdb.perf/gmonster1.exp b/gdb/testsuite/gdb.perf/gmonster1.exp index f7520627ad9..8bb748dd381 100644 --- a/gdb/testsuite/gdb.perf/gmonster1.exp +++ b/gdb/testsuite/gdb.perf/gmonster1.exp @@ -38,7 +38,7 @@ load_lib gen-perf-test.exp require allow_perf_tests -if ![info exists MONSTER] { +if {![info exists MONSTER]} { set MONSTER "n" } diff --git a/gdb/testsuite/gdb.perf/gmonster2.exp b/gdb/testsuite/gdb.perf/gmonster2.exp index ba4e46bde6a..7049bce43ec 100644 --- a/gdb/testsuite/gdb.perf/gmonster2.exp +++ b/gdb/testsuite/gdb.perf/gmonster2.exp @@ -38,7 +38,7 @@ load_lib gen-perf-test.exp require allow_perf_tests -if ![info exists MONSTER] { +if {![info exists MONSTER]} { set MONSTER "n" } diff --git a/gdb/testsuite/gdb.perf/single-step.exp b/gdb/testsuite/gdb.perf/single-step.exp index 354203ed136..8ec32d17598 100644 --- a/gdb/testsuite/gdb.perf/single-step.exp +++ b/gdb/testsuite/gdb.perf/single-step.exp @@ -26,7 +26,7 @@ set executable $testfile set expfile $testfile.exp # make check-perf RUNTESTFLAGS='single-step.exp SINGLE_STEP_COUNT=300' -if ![info exists SINGLE_STEP_COUNT] { +if {![info exists SINGLE_STEP_COUNT]} { set SINGLE_STEP_COUNT 1000 } diff --git a/gdb/testsuite/gdb.perf/skip-command.exp b/gdb/testsuite/gdb.perf/skip-command.exp index 99ecad8f889..e59cb07157b 100644 --- a/gdb/testsuite/gdb.perf/skip-command.exp +++ b/gdb/testsuite/gdb.perf/skip-command.exp @@ -33,10 +33,10 @@ set skip_func_file [standard_output_file $srcfile2] set expfile $testfile.exp # make check-perf RUNTESTFLAGS='skip-command.exp SKIP_STEP_COUNT=1000 ...' -if ![info exists SKIP_STEP_COUNT] { +if {![info exists SKIP_STEP_COUNT]} { set SKIP_STEP_COUNT 1000 } -if ![info exists SKIP_DIRECTIVE_COUNT] { +if {![info exists SKIP_DIRECTIVE_COUNT]} { set SKIP_DIRECTIVE_COUNT 1000 } @@ -91,7 +91,7 @@ proc write_skip_func_source { file_name func_name_prefix nr_funcs } { proc run_skip_bench { kind text } { global SKIP_STEP_COUNT SKIP_DIRECTIVE_COUNT - if ![runto_main] { + if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.perf/skip-prologue.exp b/gdb/testsuite/gdb.perf/skip-prologue.exp index dbeb9f8ecb3..880a0f4a943 100644 --- a/gdb/testsuite/gdb.perf/skip-prologue.exp +++ b/gdb/testsuite/gdb.perf/skip-prologue.exp @@ -28,7 +28,7 @@ set executable $testfile set expfile $testfile.exp # make check-perf RUNTESTFLAGS='skip-prologue.exp SKIP_PROLOGUE_COUNT=500' -if ![info exists SKIP_PROLOGUE_COUNT] { +if {![info exists SKIP_PROLOGUE_COUNT]} { set SKIP_PROLOGUE_COUNT 500 } diff --git a/gdb/testsuite/gdb.perf/solib.exp b/gdb/testsuite/gdb.perf/solib.exp index 1775bf6b856..e7870f65e99 100644 --- a/gdb/testsuite/gdb.perf/solib.exp +++ b/gdb/testsuite/gdb.perf/solib.exp @@ -31,7 +31,7 @@ set executable $testfile set expfile $testfile.exp # make check-perf RUNTESTFLAGS='solib.exp SOLIB_COUNT=1024' -if ![info exists SOLIB_COUNT] { +if {![info exists SOLIB_COUNT]} { set SOLIB_COUNT 128 } diff --git a/gdb/testsuite/gdb.perf/template-breakpoints.exp b/gdb/testsuite/gdb.perf/template-breakpoints.exp index db57731f402..e5d21b2a11c 100644 --- a/gdb/testsuite/gdb.perf/template-breakpoints.exp +++ b/gdb/testsuite/gdb.perf/template-breakpoints.exp @@ -28,7 +28,7 @@ set executable $testfile set expfile $testfile.exp # make check-perf RUNTESTFLAGS='template-breakpoints.exp EXPANSION_DEPTH=40' -if ![info exists EXPANSION_DEPTH] { +if {![info exists EXPANSION_DEPTH]} { set EXPANSION_DEPTH 40 }