From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id B87D9385B514; Mon, 28 Nov 2022 21:05:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B87D9385B514 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669669535; bh=nLe2QqPLtPlSGwspJpHYAWpFBmflwT4E83OMnJDF7ZY=; h=From:To:Subject:Date:From; b=O6nT2wLoqcUGMBXNjHgvQ6oFnnsK6DBgeMeW55XESesnPYE8FL09FXMfIDOdqw32X xFQ5NhVDoPM3Wr0p9PbUfLLiaJVc8Yh7Cz+anKd5BkHykocZYjSzOXgP8eze2dTiLK 55YgTBRwPSb5htnm32VWF+ii8beoGrfZNi4olgU0= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: remove use of then keyword from gdb.*/*.exp scripts X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: 0216141ac37843192e3525dda4cc3c58810ee195 X-Git-Newrev: f50c72da4dc7ab67ea244e9c6e97404a04700c2d Message-Id: <20221128210535.B87D9385B514@sourceware.org> Date: Mon, 28 Nov 2022 21:05:35 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Df50c72da4dc7= ab67ea244e9c6e97404a04700c2d commit f50c72da4dc7ab67ea244e9c6e97404a04700c2d Author: Andrew Burgess Date: Mon Nov 14 14:31:52 2022 +0000 gdb/testsuite: remove use of then keyword from gdb.*/*.exp scripts =20 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. =20 This commit removes all use of the 'then' keyword from the remaining gdb.*/*.exp scripts. Previous commits have done the bulk of this removal, this commit just handles the remaining directories that each contain a low number of instances. =20 There should be no changes in what is tested after this commit. Diff: --- gdb/testsuite/gdb.asm/asm-source.exp | 14 +++++++---= ---- gdb/testsuite/gdb.compile/compile-tls.exp | 2 +- gdb/testsuite/gdb.ctf/funcreturn.exp | 4 ++-- gdb/testsuite/gdb.dwarf2/dw2-common-block.exp | 2 +- gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp | 2 +- gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp | 2 +- .../gdb.dwarf2/dw2-single-line-discriminators.exp | 2 +- gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp | 4 ++-- gdb/testsuite/gdb.guile/scm-breakpoint.exp | 2 +- gdb/testsuite/gdb.mi/list-thread-groups-available.exp | 2 +- gdb/testsuite/gdb.mi/mi-async.exp | 2 +- gdb/testsuite/gdb.mi/mi-corefile.exp | 2 +- gdb/testsuite/gdb.mi/mi-frame-regs.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-info-os.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-regs.exp | 2 +- gdb/testsuite/gdb.modula2/max-depth.exp | 2 +- gdb/testsuite/gdb.modula2/multidim.exp | 2 +- gdb/testsuite/gdb.modula2/unbounded-array.exp | 2 +- gdb/testsuite/gdb.opt/break-on-_exit.exp | 2 +- gdb/testsuite/gdb.opt/clobbered-registers-O2.exp | 2 +- gdb/testsuite/gdb.opt/fortran-string.exp | 2 +- gdb/testsuite/gdb.opt/solib-intra-step.exp | 4 ++-- gdb/testsuite/gdb.pascal/types.exp | 2 +- gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp | 2 +- gdb/testsuite/gdb.server/ext-attach.exp | 2 +- gdb/testsuite/gdb.server/extended-remote-restart.exp | 4 ++-- gdb/testsuite/gdb.stabs/exclfwd.exp | 6 +++--- gdb/testsuite/gdb.tui/tui-layout.exp | 2 +- gdb/testsuite/gdb.xml/tdesc-reload.exp | 4 ++-- 29 files changed, 44 insertions(+), 44 deletions(-) diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/a= sm-source.exp index d56a5076b44..45c83305216 100644 --- a/gdb/testsuite/gdb.asm/asm-source.exp +++ b/gdb/testsuite/gdb.asm/asm-source.exp @@ -166,14 +166,14 @@ if { "${asm-arch}" =3D=3D "" } { } =20 # On NetBSD/ELF we need a special NetBSD-identifying note section. -if { [istarget "*-*-netbsd*"] && ![istarget "*-*-netbsdaout*"] } then { +if {[istarget "*-*-netbsd*"] && ![istarget "*-*-netbsdaout*"]} { set asm-note "netbsd" } =20 # On OpenBSD/ELF we need a similar note section. We make no attempt # of handing a.out here since most OpenBSD/a.out systems use a rather # outdated assembler that doesn't assemble this test's code anyway. -if { [istarget "*-*-openbsd*"] } then { +if {[istarget "*-*-openbsd*"]} { set asm-note "openbsd" } =20 @@ -212,7 +212,7 @@ if { [string equal ${debug-flags} ""] } { } =20 # Allow the target board to override the debug flags. -if { [board_info $dest exists debug_flags] } then { +if {[board_info $dest exists debug_flags]} { set debug-flags "[board_info $dest debug_flags]" } =20 @@ -239,11 +239,11 @@ regsub "--" "-g\[0-9\]" "${debug-flags}" "" debug-fla= gs set asm1obj [standard_output_file asmrc1.o] set asm2obj [standard_output_file asmrc2.o] =20 -if {[target_assemble ${srcdir}/${subdir}/${srcfile} $asm1obj "${asm-flags}= ${debug-flags}"] !=3D ""} then { +if {[target_assemble ${srcdir}/${subdir}/${srcfile} $asm1obj "${asm-flags}= ${debug-flags}"] !=3D ""} { untested "failed to assemble" return -1 } -if {[target_assemble ${srcdir}/${subdir}/${srcfile2} $asm2obj "${asm-flags= } ${debug-flags}"] !=3D ""} then { +if {[target_assemble ${srcdir}/${subdir}/${srcfile2} $asm2obj "${asm-flags= } ${debug-flags}"] !=3D ""} { untested "failed to assemble" return -1 } @@ -254,7 +254,7 @@ if {[target_assemble ${srcdir}/${subdir}/${srcfile2} $a= sm2obj "${asm-flags} ${de # code here that provides its own startup code. Using target_link # also avoids a lot of problems on many systems, most notably on # *-*-*bsd* and *-*-solaris2*. -if {[target_link [list $asm1obj $asm2obj] "${binfile}" ${link-flags}] !=3D= "" } then { +if {[target_link [list $asm1obj $asm2obj] "${binfile}" ${link-flags}] !=3D= ""} { untested "failed to link" return -1 } @@ -284,7 +284,7 @@ gdb_load ${binfile} # Run to `main' where we begin our tests. # =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.compile/compile-tls.exp b/gdb/testsuite/gdb.= compile/compile-tls.exp index bb6a60bd2e9..f9c9ee5e2f7 100644 --- a/gdb/testsuite/gdb.compile/compile-tls.exp +++ b/gdb/testsuite/gdb.compile/compile-tls.exp @@ -21,7 +21,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}= " "${binfile}" \ } =20 clean_restart ${binfile} -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.ctf/funcreturn.exp b/gdb/testsuite/gdb.ctf/f= uncreturn.exp index 1267cab2b75..ab4aa21fa32 100644 --- a/gdb/testsuite/gdb.ctf/funcreturn.exp +++ b/gdb/testsuite/gdb.ctf/funcreturn.exp @@ -106,7 +106,7 @@ if ![target_info exists no_long_long] { } =20 # Sun /bin/cc calls this a function returning double. -if {!$gcc_compiled} then {setup_xfail "*-sun-sunos4*"} +if {!$gcc_compiled} {setup_xfail "*-sun-sunos4*"} gdb_test "print v_float_func" \ "$decimal =3D \{float \\(\\)\} 0x\[0-9a-z\]+.*" \ "print float function" @@ -179,7 +179,7 @@ if ![target_info exists no_long_long] { } =20 # Sun /bin/cc calls this a function returning double. -if {!$gcc_compiled} then {setup_xfail "*-sun-sunos4*"} +if {!$gcc_compiled} {setup_xfail "*-sun-sunos4*"} gdb_test "whatis v_float_func" \ "type =3D float \\($void\\)" \ "whatis float function" diff --git a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp b/gdb/testsuite/= gdb.dwarf2/dw2-common-block.exp index f7c9e9597a7..12c2f4cce82 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp @@ -37,7 +37,7 @@ if { [prepare_for_testing "failed to prepare" "${testfile= }" $srcfile \ return -1 } =20 -if ![runto MAIN__] then { +if {![runto MAIN__]} { perror "couldn't run to breakpoint MAIN__" return } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp b/gdb/t= estsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp index 262f36a7afb..92f0e1350ec 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp @@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}= \ return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { return -1 } =20 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp b/gdb/test= suite/gdb.dwarf2/dw2-linkage-name-trust.exp index 99c69f00348..288c5a00176 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp @@ -34,7 +34,7 @@ if {[prepare_for_testing_full "failed to prepare" \ return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { return -1 } =20 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp b/= gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp index 63fc723956e..5824d8b3426 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp @@ -35,7 +35,7 @@ if { [prepare_for_testing "failed to prepare" "${testfile= }" $srcfile {nodebug no return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { return } =20 diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gd= b/testsuite/gdb.dwarf2/locexpr-data-member-location.exp index bd20272637c..368f63c1a63 100644 --- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp +++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp @@ -105,7 +105,7 @@ with_test_prefix "first session" { gdb_load_shlib ${lib_so} =20 # Run to foo to make sure foo refers to the function, and not foo@PLT. - if ![runto foo qualified] then { + if {![runto foo qualified]} { return } =20 @@ -334,7 +334,7 @@ with_test_prefix "second session" { # loaded for remote targets. gdb_load_shlib ${lib_so} =20 - if ![runto_main] then { + if {![runto_main]} { return } =20 diff --git a/gdb/testsuite/gdb.guile/scm-breakpoint.exp b/gdb/testsuite/gdb= .guile/scm-breakpoint.exp index 37607b7f4ff..256416d8e9e 100644 --- a/gdb/testsuite/gdb.guile/scm-breakpoint.exp +++ b/gdb/testsuite/gdb.guile/scm-breakpoint.exp @@ -536,7 +536,7 @@ proc_with_prefix test_bkpt_probe {} { return -1 } =20 - if ![gdb_guile_runto_main] then { + if {![gdb_guile_runto_main]} { return } =20 diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/te= stsuite/gdb.mi/list-thread-groups-available.exp index c4cad2075ac..4b3c6d7a18e 100644 --- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp +++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp @@ -21,7 +21,7 @@ set MIFLAGS "-i=3Dmi" standard_testfile =20 # Support for XML is needed to run this test. -if [gdb_skip_xml_test] then { +if {[gdb_skip_xml_test]} { unsupported "list-thread-groups-available.exp" return -1 } diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-as= ync.exp index af16b4a243d..756ca112820 100644 --- a/gdb/testsuite/gdb.mi/mi-async.exp +++ b/gdb/testsuite/gdb.mi/mi-async.exp @@ -21,7 +21,7 @@ # mi_run_cmd, it ignores whatever target the rest of GDB testsuite is # using, and always tries to run natively. So, don't do anything unless # we're actually testing native. -if { !([isnative] && [istarget *-linux*]) } then { +if {!([isnative] && [istarget *-linux*])} { return } =20 diff --git a/gdb/testsuite/gdb.mi/mi-corefile.exp b/gdb/testsuite/gdb.mi/mi= -corefile.exp index d8ca6b3b34f..61aec326bcb 100644 --- a/gdb/testsuite/gdb.mi/mi-corefile.exp +++ b/gdb/testsuite/gdb.mi/mi-corefile.exp @@ -18,7 +18,7 @@ load_lib mi-support.exp set MIFLAGS "-i=3Dmi" =20 -if ![isnative] then { +if {![isnative]} { return } =20 diff --git a/gdb/testsuite/gdb.mi/mi-frame-regs.exp b/gdb/testsuite/gdb.mi/= mi-frame-regs.exp index 94a02dd2c0f..df15c59887c 100644 --- a/gdb/testsuite/gdb.mi/mi-frame-regs.exp +++ b/gdb/testsuite/gdb.mi/mi-frame-regs.exp @@ -98,7 +98,7 @@ proc_with_prefix do_floating_varobj_test {} { =20 # Get the address of the current breakpoint. set bpaddr [breakpoint_address $bpnum] - if {$bpaddr =3D=3D ""} then { return } + if {$bpaddr =3D=3D ""} { return } =20 # Check that the addresses are the same. gdb_assert [expr $bpaddr =3D=3D $pcval] "\$pc equals address of breakpoin= t in callee$i" @@ -145,7 +145,7 @@ proc_with_prefix do_fixed_varobj_test {} { =20 for {set i 0} {$i < 4} {incr i} { =20 - if { $i =3D=3D 1 } then { set first_unchanging_varnum $varnum } + if {$i =3D=3D 1} { set first_unchanging_varnum $varnum } =20 mi_gdb_test "-var-create --thread 1 --frame $i - \* \$pc" \ "\\^done,.*value=3D\"$hex.*" \ diff --git a/gdb/testsuite/gdb.mi/mi-info-os.exp b/gdb/testsuite/gdb.mi/mi-= info-os.exp index ea4acf9e3eb..fde70bb1ea8 100644 --- a/gdb/testsuite/gdb.mi/mi-info-os.exp +++ b/gdb/testsuite/gdb.mi/mi-info-os.exp @@ -17,13 +17,13 @@ load_lib mi-support.exp set MIFLAGS "-i=3Dmi" =20 # This test is Linux-only. -if ![istarget *-*-linux*] then { +if {![istarget *-*-linux*]} { unsupported "mi-info-os.exp" return -1 } =20 # Support for XML-output is needed to run this test. -if [gdb_skip_xml_test] then { +if {[gdb_skip_xml_test]} { unsupported "mi-info-os.exp" return -1 } diff --git a/gdb/testsuite/gdb.mi/mi-regs.exp b/gdb/testsuite/gdb.mi/mi-reg= s.exp index da253e644ca..983e1079a38 100644 --- a/gdb/testsuite/gdb.mi/mi-regs.exp +++ b/gdb/testsuite/gdb.mi/mi-regs.exp @@ -104,7 +104,7 @@ proc sparc_register_tests { } { "list changed registers" } =20 -if [istarget "sparc-*-*"] then { +if {[istarget "sparc-*-*"]} { mi_clean_restart sparc_register_tests_no_exec mi_clean_restart $binfile diff --git a/gdb/testsuite/gdb.modula2/max-depth.exp b/gdb/testsuite/gdb.mo= dula2/max-depth.exp index 2ffcba4ba93..5f5b19a5a77 100644 --- a/gdb/testsuite/gdb.modula2/max-depth.exp +++ b/gdb/testsuite/gdb.modula2/max-depth.exp @@ -21,7 +21,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug quiet}]} return -1 } =20 -if { ![runto_main] } then { +if {![runto_main]} { return -1 } =20 diff --git a/gdb/testsuite/gdb.modula2/multidim.exp b/gdb/testsuite/gdb.mod= ula2/multidim.exp index 1e4354d8822..06a74d462f5 100644 --- a/gdb/testsuite/gdb.modula2/multidim.exp +++ b/gdb/testsuite/gdb.modula2/multidim.exp @@ -24,7 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile \ return -1 } =20 -if ![runto here] then { +if {![runto here]} { perror "couldn't run to breakpoint 'here'" return } diff --git a/gdb/testsuite/gdb.modula2/unbounded-array.exp b/gdb/testsuite/= gdb.modula2/unbounded-array.exp index ae3032d349f..e75f1993787 100644 --- a/gdb/testsuite/gdb.modula2/unbounded-array.exp +++ b/gdb/testsuite/gdb.modula2/unbounded-array.exp @@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug quiet}]} return -1 } =20 -if ![runto foo] then { +if {![runto foo]} { perror "couldn't run to breakpoint foo" return } diff --git a/gdb/testsuite/gdb.opt/break-on-_exit.exp b/gdb/testsuite/gdb.o= pt/break-on-_exit.exp index d94cc7e48df..7c2fda6af69 100644 --- a/gdb/testsuite/gdb.opt/break-on-_exit.exp +++ b/gdb/testsuite/gdb.opt/break-on-_exit.exp @@ -50,7 +50,7 @@ save_vars { GDBFLAGS } { } } =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp b/gdb/testsui= te/gdb.opt/clobbered-registers-O2.exp index 66ec5c85d21..617ebff7ab4 100644 --- a/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp +++ b/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp @@ -26,7 +26,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \ return -1 } =20 -if { ![runto start_sequence] } then { +if {![runto start_sequence]} { return } =20 diff --git a/gdb/testsuite/gdb.opt/fortran-string.exp b/gdb/testsuite/gdb.o= pt/fortran-string.exp index 8d4018e9b8b..5798ad0fcb5 100644 --- a/gdb/testsuite/gdb.opt/fortran-string.exp +++ b/gdb/testsuite/gdb.opt/fortran-string.exp @@ -27,7 +27,7 @@ if { [prepare_for_testing "prepare for testing" ${testfil= e} ${srcfile} \ return -1 } =20 -if ![runto f] then { +if {![runto f]} { perror "couldn't run to f" return } diff --git a/gdb/testsuite/gdb.opt/solib-intra-step.exp b/gdb/testsuite/gdb= .opt/solib-intra-step.exp index e803a7db14d..9306ced85c8 100644 --- a/gdb/testsuite/gdb.opt/solib-intra-step.exp +++ b/gdb/testsuite/gdb.opt/solib-intra-step.exp @@ -39,7 +39,7 @@ if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $li= b_flags] !=3D "" clean_restart ${binfile} gdb_load_shlib $binfile_lib =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 @@ -92,7 +92,7 @@ gdb_test_multiple "step" $test { } } =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.pascal/types.exp b/gdb/testsuite/gdb.pascal/= types.exp index a761e25a0f0..a19d65ab17f 100644 --- a/gdb/testsuite/gdb.pascal/types.exp +++ b/gdb/testsuite/gdb.pascal/types.exp @@ -74,7 +74,7 @@ gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir =20 -if [set_lang_pascal] then { +if {[set_lang_pascal]} { test_integer_literal_types_accepted test_logical_literal_types_accepted test_character_literal_types_accepted diff --git a/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp b/gdb= /testsuite/gdb.server/connect-with-no-symbol-file.exp index 0ada144a803..9b47f21106f 100644 --- a/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp +++ b/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp @@ -63,7 +63,7 @@ proc connect_no_symbol_file { sysroot action } { set gdbserver_gdbport [lindex $res 1] =20 # Perform test actions to the symbol file on the target. - if { $action =3D=3D "delete" } then { + if {$action =3D=3D "delete"} { remote_file target delete $target_exec } elseif { $action =3D=3D "permission" } { remote_exec target "chmod 000 $target_exec" diff --git a/gdb/testsuite/gdb.server/ext-attach.exp b/gdb/testsuite/gdb.se= rver/ext-attach.exp index 7514faf6b3d..a67a536809c 100644 --- a/gdb/testsuite/gdb.server/ext-attach.exp +++ b/gdb/testsuite/gdb.server/ext-attach.exp @@ -56,7 +56,7 @@ proc run_test { target_async target_non_stop to_disable }= { # extended-remote board, therefore already connected. gdb_test "disconnect" ".*" =20 - if { [gdb_target_supports_trace] } then { + if {[gdb_target_supports_trace]} { # Test predefined TSVs are uploaded. gdb_test_sequence "info tvariables" "check uploaded tsv" { "\[\r\n\]+Name\[\t \]+Initial\[\t \]+Current" diff --git a/gdb/testsuite/gdb.server/extended-remote-restart.exp b/gdb/tes= tsuite/gdb.server/extended-remote-restart.exp index db25a6ef075..41e55439950 100644 --- a/gdb/testsuite/gdb.server/extended-remote-restart.exp +++ b/gdb/testsuite/gdb.server/extended-remote-restart.exp @@ -35,7 +35,7 @@ if {[target_info gdb_protocol] !=3D "extended-remote"} { =20 # This test also makes use of 'detach-on-fork' which is not supported # on all platforms. -if { ![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"] } then { +if {![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"]} { return } =20 @@ -60,7 +60,7 @@ proc test_reload { do_kill_p follow_child_p } { =20 clean_restart ${binfile} =20 - if ![runto_main] then { + if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.stabs/exclfwd.exp b/gdb/testsuite/gdb.stabs/= exclfwd.exp index 5337ac8e376..201c13dd59a 100644 --- a/gdb/testsuite/gdb.stabs/exclfwd.exp +++ b/gdb/testsuite/gdb.stabs/exclfwd.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \ return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } @@ -41,14 +41,14 @@ gdb_test "ptype v1" "type =3D struct a {$eol int y;$eol }$eol" =20 -if { [test_debug_format "stabs"] } then { +if {[test_debug_format "stabs"]} { setup_kfail "gdb/1602" *-*-* } gdb_test "ptype v2" "type =3D struct a {$eol const char .c;$eol }$eol" =20 -if { [test_debug_format "stabs"] } then { +if {[test_debug_format "stabs"]} { setup_kfail "gdb/1603" *-*-* } gdb_test "ptype v3" "type =3D const char ." diff --git a/gdb/testsuite/gdb.tui/tui-layout.exp b/gdb/testsuite/gdb.tui/t= ui-layout.exp index 5e44b9cf38a..26259e337f9 100644 --- a/gdb/testsuite/gdb.tui/tui-layout.exp +++ b/gdb/testsuite/gdb.tui/tui-layout.exp @@ -35,7 +35,7 @@ proc test_layout {layout execution} { clean_restart $binfile =20 if {$execution} { - if ![runto_main] then { + if {![runto_main]} { return 0 } } diff --git a/gdb/testsuite/gdb.xml/tdesc-reload.exp b/gdb/testsuite/gdb.xml= /tdesc-reload.exp index 6e3fe2f5304..5c3f702ea18 100644 --- a/gdb/testsuite/gdb.xml/tdesc-reload.exp +++ b/gdb/testsuite/gdb.xml/tdesc-reload.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile debug]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 @@ -62,7 +62,7 @@ gdb_test_no_output "set tdesc filename $xml_file_1" \ gdb_load ${binfile} =20 # Run to `main' where we begin our tests. -if ![runto_main] then { +if {![runto_main]} { return -1 }