From patchwork Tue Nov 15 10:42:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 60634 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 063713895FED for ; Tue, 15 Nov 2022 10:44:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 063713895FED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668509050; bh=ZPS82H4y5R0lpH/5mbcXW/ZafBS6olricxfA6L4z5Kc=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=GRYF0XSTAYGdwNIt1t0VQBf+p5hfp2C/rn6l8jNKCVwL2Gmfd9bCbJopfrr098yzh lj0oW4xVUnHHE1Kwc97zS1PAoZA+slxhvUVdwmIue6H7Y3+yTOvdtnYLSGpDqbEFZx xtpaX3xbi920jdbpPtD/YvDjQkDtnGKehq3+K+3Q= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 46E353895FD4 for ; Tue, 15 Nov 2022 10:42:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 46E353895FD4 Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-47-vO9nMOFEOUasxr0zB3RveA-1; Tue, 15 Nov 2022 05:42:54 -0500 X-MC-Unique: vO9nMOFEOUasxr0zB3RveA-1 Received: by mail-qv1-f72.google.com with SMTP id ln3-20020a0562145a8300b004b8c29a7d50so10313049qvb.15 for ; Tue, 15 Nov 2022 02:42:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZPS82H4y5R0lpH/5mbcXW/ZafBS6olricxfA6L4z5Kc=; b=6tshNGXBTxuvnkD6t4nvZUSX3G3g46T7ryY/+u3BNZnJIYEtlIm4vHldxndneySCkS PtlWBMQ083mok4gBwkpFPtpyWC5UOEeaE5tKWy0SkCk7DWt+W81zVn5NpQZZ7zyjryYk 0NPpN91h/3uWk0RRQij71kVxdSRGWWkQo1tFaRvytRxRCkmskG5jnWijvCFpU9gITLXd ToObY/Vun4LsQHVlo/NezXOZZXxt9XQO3Qfz5DXgizVzoPYbifEeYnRV1lZDxMc7rsEl X/PyybEAyxxBT24CrIhBwHUKG32OPeGICm0icshAhOULWQtWwSJisTaEQSZ6uN5i+2fU KLMA== X-Gm-Message-State: ANoB5pmmpF/HgKerohrunLr5x94F5C2ba4TrzOHFbYEAVN/LfFlou7i/ 9+36ULyOkwDo+ILg1v2hCqD7lgEWj6ERPF2gMJCs9HUKJpnqEyiGxUIxQvC+UV5TUuRqYeopIW1 0oIS3Ft35klsW5UVOnsXQKKtHIBDeG4wNu8H3sa1JPyn7SndpOyA5gA4Df/JBIIaooD0/FwbD+A == X-Received: by 2002:a37:aa86:0:b0:6fb:a0ec:c5c4 with SMTP id t128-20020a37aa86000000b006fba0ecc5c4mr922173qke.379.1668508974004; Tue, 15 Nov 2022 02:42:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf7HtfhwutL/xH+tdBwNFkrEIaLP0ee9/hkB+inB8LBC6NccIVVMOuq8DAVT9IYs4xNvKkJ1SQ== X-Received: by 2002:a37:aa86:0:b0:6fb:a0ec:c5c4 with SMTP id t128-20020a37aa86000000b006fba0ecc5c4mr922154qke.379.1668508973543; Tue, 15 Nov 2022 02:42:53 -0800 (PST) Received: from localhost ([31.111.84.238]) by smtp.gmail.com with ESMTPSA id x13-20020a05620a258d00b006bb82221013sm8085732qko.0.2022.11.15.02.42.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 02:42:53 -0800 (PST) To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 08/14] gdb/testsuite: remove use of then keyword from gdb.trace/*.exp Date: Tue, 15 Nov 2022 10:42:25 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrew Burgess via Gdb-patches From: Andrew Burgess Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" The canonical form of 'if' in modern TCL is 'if {} {}'. But there's still a bunch of places in the testsuite where we make use of the 'then' keyword, and sometimes these get copies into new tests, which just spreads poor practice. This commit removes all use of the 'then' keyword from the gdb.trace/ test script directory. There should be no changes in what is tested after this commit. --- gdb/testsuite/gdb.trace/actions.exp | 4 ++-- gdb/testsuite/gdb.trace/backtrace.exp | 4 ++-- gdb/testsuite/gdb.trace/change-loc.exp | 2 +- gdb/testsuite/gdb.trace/collection.exp | 2 +- gdb/testsuite/gdb.trace/deltrace.exp | 6 +++--- gdb/testsuite/gdb.trace/infotrace.exp | 4 ++-- gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp | 2 +- gdb/testsuite/gdb.trace/mi-tsv-changed.exp | 2 +- gdb/testsuite/gdb.trace/no-attach-trace.exp | 2 +- gdb/testsuite/gdb.trace/packetlen.exp | 2 +- gdb/testsuite/gdb.trace/passc-dyn.exp | 6 +++--- gdb/testsuite/gdb.trace/passcount.exp | 4 ++-- gdb/testsuite/gdb.trace/report.exp | 4 ++-- gdb/testsuite/gdb.trace/save-trace.exp | 2 +- gdb/testsuite/gdb.trace/strace.exp | 2 +- gdb/testsuite/gdb.trace/tfind.exp | 10 +++++----- gdb/testsuite/gdb.trace/tracecmd.exp | 2 +- gdb/testsuite/gdb.trace/tspeed.exp | 4 ++-- gdb/testsuite/gdb.trace/tsv.exp | 6 +++--- gdb/testsuite/gdb.trace/unavailable.exp | 2 +- gdb/testsuite/gdb.trace/while-dyn.exp | 2 +- gdb/testsuite/gdb.trace/while-stepping.exp | 2 +- 22 files changed, 38 insertions(+), 38 deletions(-) diff --git a/gdb/testsuite/gdb.trace/actions.exp b/gdb/testsuite/gdb.trace/actions.exp index c14fb27e3f6..397b30e484b 100644 --- a/gdb/testsuite/gdb.trace/actions.exp +++ b/gdb/testsuite/gdb.trace/actions.exp @@ -42,7 +42,7 @@ gdb_file_cmd $binfile # all subsequent line numbers are relative to this first one (baseline) set baseline [gdb_find_recursion_test_baseline $srcfile] -if { $baseline == -1 } then { +if {$baseline == -1} { fail "could not find gdb_recursion_test function" return } @@ -57,7 +57,7 @@ gdb_delete_tracepoints set trcpt1 [gdb_gettpnum gdb_c_test] set trcpt2 [gdb_gettpnum gdb_asm_test] set trcpt3 [gdb_gettpnum $testline1] -if { $trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0 } then { +if {$trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0} { fail "setting tracepoints" return } diff --git a/gdb/testsuite/gdb.trace/backtrace.exp b/gdb/testsuite/gdb.trace/backtrace.exp index ec068b20d4a..20f0a388afc 100644 --- a/gdb/testsuite/gdb.trace/backtrace.exp +++ b/gdb/testsuite/gdb.trace/backtrace.exp @@ -35,7 +35,7 @@ if ![runto_main] { return -1 } -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { unsupported "current target does not support trace" return 1 @@ -106,7 +106,7 @@ all tests in this module will fail." } } -if { $return_me == 1 } then { +if {$return_me == 1} { return -1 } diff --git a/gdb/testsuite/gdb.trace/change-loc.exp b/gdb/testsuite/gdb.trace/change-loc.exp index 5e31d0c77f6..4710b8d0952 100644 --- a/gdb/testsuite/gdb.trace/change-loc.exp +++ b/gdb/testsuite/gdb.trace/change-loc.exp @@ -53,7 +53,7 @@ if ![runto_main] { return -1 } -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { unsupported "current target does not support trace" return -1 } diff --git a/gdb/testsuite/gdb.trace/collection.exp b/gdb/testsuite/gdb.trace/collection.exp index c261b3c824d..c290684e0d8 100644 --- a/gdb/testsuite/gdb.trace/collection.exp +++ b/gdb/testsuite/gdb.trace/collection.exp @@ -796,7 +796,7 @@ proc gdb_trace_collection_test {} { runto_main -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { unsupported "current target does not support trace" return 1 } diff --git a/gdb/testsuite/gdb.trace/deltrace.exp b/gdb/testsuite/gdb.trace/deltrace.exp index 1e2f10f7636..605223aa3db 100644 --- a/gdb/testsuite/gdb.trace/deltrace.exp +++ b/gdb/testsuite/gdb.trace/deltrace.exp @@ -43,7 +43,7 @@ gdb_file_cmd $binfile # define relative source line numbers: # all subsequent line numbers are relative to this first one (baseline) set baseline [gdb_find_recursion_test_baseline $srcfile] -if { $baseline == -1 } then { +if {$baseline == -1} { fail "could not find gdb_recursion_test function" return } @@ -81,7 +81,7 @@ gdb_delete_tracepoints set trcpt1 [gdb_gettpnum gdb_c_test] set trcpt2 [gdb_gettpnum gdb_asm_test] set trcpt3 [gdb_gettpnum $testline1] -if { $trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0 } then { +if {$trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0} { fail "setting tracepoints" return } @@ -159,7 +159,7 @@ gdb_delete_tracepoints set trcpt1 [gdb_gettpnum gdb_c_test] set trcpt2 [gdb_gettpnum gdb_asm_test] set trcpt3 [gdb_gettpnum $testline1] -if { $trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0 } then { +if {$trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0} { fail "setting tracepoints" return } diff --git a/gdb/testsuite/gdb.trace/infotrace.exp b/gdb/testsuite/gdb.trace/infotrace.exp index 1504fb36508..912e29123d3 100644 --- a/gdb/testsuite/gdb.trace/infotrace.exp +++ b/gdb/testsuite/gdb.trace/infotrace.exp @@ -47,7 +47,7 @@ gdb_file_cmd $binfile gdb_delete_tracepoints set c_test_num [gdb_gettpnum gdb_c_test] set asm_test_num [gdb_gettpnum gdb_asm_test] -if { $c_test_num <= 0 || $asm_test_num <= 0 } then { +if {$c_test_num <= 0 || $asm_test_num <= 0} { fail "setting tracepoints" return } @@ -111,7 +111,7 @@ if {[gdb_test "" "Breakpoint ${decimal}, main.*" "run to main"] != 0} { return -1 } -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { unsupported "current target does not support trace" return 1 } diff --git a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp index 517e0394e06..abf5fec1ba2 100644 --- a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp +++ b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp @@ -69,7 +69,7 @@ proc test_reconnect { } { clean_restart $executable gdb_load_shlib $lib_sl1 gdb_load_shlib $lib_sl2 - if ![runto_main] then { + if {![runto_main]} { return 0 } # Create tracepoints on marker and main, and leave them in the diff --git a/gdb/testsuite/gdb.trace/mi-tsv-changed.exp b/gdb/testsuite/gdb.trace/mi-tsv-changed.exp index 96251c900e7..a2cfa70b8f3 100644 --- a/gdb/testsuite/gdb.trace/mi-tsv-changed.exp +++ b/gdb/testsuite/gdb.trace/mi-tsv-changed.exp @@ -151,7 +151,7 @@ proc test_upload_tsv { } { } clean_restart $testfile - if ![runto_main] then { + if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.trace/no-attach-trace.exp b/gdb/testsuite/gdb.trace/no-attach-trace.exp index b16ca83afa6..67a908de575 100644 --- a/gdb/testsuite/gdb.trace/no-attach-trace.exp +++ b/gdb/testsuite/gdb.trace/no-attach-trace.exp @@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { # can start programs ("run"), such as e.g., extended-remote gdbserver. clean_restart $testfile -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { unsupported "current target does not support trace" return 1 } diff --git a/gdb/testsuite/gdb.trace/packetlen.exp b/gdb/testsuite/gdb.trace/packetlen.exp index 9f019acaa00..0330e82c1a0 100644 --- a/gdb/testsuite/gdb.trace/packetlen.exp +++ b/gdb/testsuite/gdb.trace/packetlen.exp @@ -37,7 +37,7 @@ gdb_test "tfind none" ".*" "" runto_main gdb_reinitialize_dir $srcdir/$subdir -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { unsupported "current target does not support trace" return 1 diff --git a/gdb/testsuite/gdb.trace/passc-dyn.exp b/gdb/testsuite/gdb.trace/passc-dyn.exp index 747e4207dd0..63f4788d07b 100644 --- a/gdb/testsuite/gdb.trace/passc-dyn.exp +++ b/gdb/testsuite/gdb.trace/passc-dyn.exp @@ -34,7 +34,7 @@ gdb_load $binfile runto_main gdb_reinitialize_dir $srcdir/$subdir -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { unsupported "current target does not support trace" return 1 @@ -50,7 +50,7 @@ if { ![gdb_target_supports_trace] } then { set baseline [gdb_find_recursion_test_baseline $srcfile] -if { $baseline == -1 } then { +if {$baseline == -1} { fail "could not find gdb_recursion_test function" return } @@ -74,7 +74,7 @@ gdb_delete_tracepoints set tdp2 [gdb_gettpnum "$testline2"] set tdp3 [gdb_gettpnum "$testline3"] set tdp4 [gdb_gettpnum "$testline4"] -if { $tdp2 <= 0 || $tdp3 <= 0 || $tdp4 <= 0 } then { +if {$tdp2 <= 0 || $tdp3 <= 0 || $tdp4 <= 0} { fail "setting tracepoints" return } diff --git a/gdb/testsuite/gdb.trace/passcount.exp b/gdb/testsuite/gdb.trace/passcount.exp index 52c95c53367..bbb3be7d583 100644 --- a/gdb/testsuite/gdb.trace/passcount.exp +++ b/gdb/testsuite/gdb.trace/passcount.exp @@ -40,7 +40,7 @@ gdb_file_cmd $binfile # define relative source line numbers: # all subsequent line numbers are relative to this first one (baseline) set baseline [gdb_find_recursion_test_baseline $srcfile] -if { $baseline == -1 } then { +if {$baseline == -1} { fail "could not find gdb_recursion_test function" return } @@ -55,7 +55,7 @@ gdb_delete_tracepoints set trcpt1 [gdb_gettpnum gdb_c_test] set trcpt2 [gdb_gettpnum gdb_asm_test] set trcpt3 [gdb_gettpnum $testline1] -if { $trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0 } then { +if {$trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0} { fail "setting tracepoints" return } diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp index 7b3678d29f3..33e803bd4fe 100644 --- a/gdb/testsuite/gdb.trace/report.exp +++ b/gdb/testsuite/gdb.trace/report.exp @@ -35,7 +35,7 @@ gdb_load $binfile runto_main gdb_reinitialize_dir $srcdir/$subdir -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { unsupported "current target does not support trace" return 1 @@ -111,7 +111,7 @@ all tests in this module will fail." } } -if { $return_me == 1 } then { +if {$return_me == 1} { return -1 } diff --git a/gdb/testsuite/gdb.trace/save-trace.exp b/gdb/testsuite/gdb.trace/save-trace.exp index 0eac0b5503c..ddeb20360aa 100644 --- a/gdb/testsuite/gdb.trace/save-trace.exp +++ b/gdb/testsuite/gdb.trace/save-trace.exp @@ -41,7 +41,7 @@ gdb_file_cmd $binfile # define relative source line numbers: # all subsequent line numbers are relative to this first one (baseline) set baseline [gdb_find_recursion_test_baseline $srcfile] -if { $baseline == -1 } then { +if {$baseline == -1} { fail "could not find gdb_recursion_test function" return } diff --git a/gdb/testsuite/gdb.trace/strace.exp b/gdb/testsuite/gdb.trace/strace.exp index d015381899b..2e754891903 100644 --- a/gdb/testsuite/gdb.trace/strace.exp +++ b/gdb/testsuite/gdb.trace/strace.exp @@ -370,7 +370,7 @@ gdb_load_shlib $libipa if ![runto_main] { return -1 } -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { # At this point, the socket file has been created. We must make sure it is # removed when we return here. GDB detaches inferior so that the socket # file can be removed. Note that GDB simply kill inferior doesn't remove diff --git a/gdb/testsuite/gdb.trace/tfind.exp b/gdb/testsuite/gdb.trace/tfind.exp index 57b7b2fad70..66b744fc11b 100644 --- a/gdb/testsuite/gdb.trace/tfind.exp +++ b/gdb/testsuite/gdb.trace/tfind.exp @@ -65,7 +65,7 @@ gdb_test "help tfind trace" "Select a trace frame by tracepoint number.*" \ runto_main gdb_reinitialize_dir $srcdir/$subdir -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { unsupported "current target does not support trace" return 1 @@ -77,7 +77,7 @@ if { ![gdb_target_supports_trace] } then { # define relative source line numbers: # all subsequent line numbers are relative to this first one (baseline) set baseline [gdb_find_recursion_test_baseline $srcfile] -if { $baseline == -1 } then { +if {$baseline == -1} { fail "could not find gdb_recursion_test function" return } @@ -123,7 +123,7 @@ gdb_test_multiple "tstart" "6.1: tstart" { } } -if { $return_me == 1 } then { +if {$return_me == 1} { return -1 } @@ -154,7 +154,7 @@ gdb_test_multiple "tstop" "7.1: tstop" { } } -if { $return_me == 1 } then { +if {$return_me == 1} { return -1 } @@ -164,7 +164,7 @@ gdb_test "tstatus" "Trace stopped by a tstop command.*" \ ## record starting PC set save_pc [gdb_readexpr "(unsigned long) \$pc"] -if { $save_pc == -1 } then { +if {$save_pc == -1} { fail "could not read PC" return } diff --git a/gdb/testsuite/gdb.trace/tracecmd.exp b/gdb/testsuite/gdb.trace/tracecmd.exp index c2ec95a7a4e..4bc16b1d344 100644 --- a/gdb/testsuite/gdb.trace/tracecmd.exp +++ b/gdb/testsuite/gdb.trace/tracecmd.exp @@ -40,7 +40,7 @@ gdb_file_cmd $binfile # define relative source line numbers: # all subsequent line numbers are relative to this first one (baseline) set baseline [gdb_find_recursion_test_baseline $srcfile] -if { $baseline == -1 } then { +if {$baseline == -1} { fail "could not find gdb_recursion_test function" return } diff --git a/gdb/testsuite/gdb.trace/tspeed.exp b/gdb/testsuite/gdb.trace/tspeed.exp index ba64176596b..80ec962c042 100644 --- a/gdb/testsuite/gdb.trace/tspeed.exp +++ b/gdb/testsuite/gdb.trace/tspeed.exp @@ -139,7 +139,7 @@ proc_with_prefix gdb_fast_trace_speed_test { } { } # If the fast tracepoint couldn't be set, don't bother with the run. - if { $run_ftrace == 1 } then { + if {$run_ftrace == 1} { # Begin the test. run_trace_experiment @@ -160,7 +160,7 @@ gdb_load_shlib $ipalib runto_main -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { unsupported "current target does not support trace" return 1 } diff --git a/gdb/testsuite/gdb.trace/tsv.exp b/gdb/testsuite/gdb.trace/tsv.exp index abf858963de..e51e7d654b1 100644 --- a/gdb/testsuite/gdb.trace/tsv.exp +++ b/gdb/testsuite/gdb.trace/tsv.exp @@ -113,7 +113,7 @@ runto_main gdb_reinitialize_dir $srcdir/$subdir # The rest of the testing needs actual tracing to work. -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { unsupported "current target does not support trace" return 1 } @@ -121,7 +121,7 @@ if { ![gdb_target_supports_trace] } then { gdb_delete_tracepoints set trcpt1 [gdb_gettpnum gdb_c_test] -if { $trcpt1 <= 0 } then { +if {$trcpt1 <= 0} { fail "setting tracepoints" return } @@ -200,7 +200,7 @@ gdb_test_multiple "target ctf ${tracefile}.ctf" "" { # Restart. clean_restart ${binfile} -if ![runto_main] then { +if {![runto_main]} { return } diff --git a/gdb/testsuite/gdb.trace/unavailable.exp b/gdb/testsuite/gdb.trace/unavailable.exp index 9e1124edc6e..82a6014c1bc 100644 --- a/gdb/testsuite/gdb.trace/unavailable.exp +++ b/gdb/testsuite/gdb.trace/unavailable.exp @@ -731,7 +731,7 @@ proc gdb_trace_collection_test {} { runto_main -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { unsupported "current target does not support trace" return 1 } diff --git a/gdb/testsuite/gdb.trace/while-dyn.exp b/gdb/testsuite/gdb.trace/while-dyn.exp index c77bad73c2d..0085e0aad48 100644 --- a/gdb/testsuite/gdb.trace/while-dyn.exp +++ b/gdb/testsuite/gdb.trace/while-dyn.exp @@ -36,7 +36,7 @@ gdb_load $binfile runto_main gdb_reinitialize_dir $srcdir/$subdir -if { ![gdb_target_supports_trace] } then { +if {![gdb_target_supports_trace]} { unsupported "current target does not support trace" return 1 } diff --git a/gdb/testsuite/gdb.trace/while-stepping.exp b/gdb/testsuite/gdb.trace/while-stepping.exp index 77641b8a130..3d1b29bab02 100644 --- a/gdb/testsuite/gdb.trace/while-stepping.exp +++ b/gdb/testsuite/gdb.trace/while-stepping.exp @@ -44,7 +44,7 @@ gdb_file_cmd $binfile gdb_delete_tracepoints set trcpt1 [gdb_gettpnum gdb_c_test] -if { $trcpt1 <= 0 } then { +if {$trcpt1 <= 0} { fail "could not find gdb_c_test function" return }