From patchwork Tue Nov 15 10:42:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 60633 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 4BFE93893669 for ; Tue, 15 Nov 2022 10:44:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4BFE93893669 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668509040; bh=2aZy3MfeM9RQMexHADiTtLoz53qi6iSu+gPCzC5FAuo=; 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=ebe7L94qBuKwKSdJ0UqjOs0EU4jvFCQcHcNRkjEzQfmaOOMOHHS9nE3gxTLWKLXhx tDmFV8VAKVAGD7WCO2rvnvwSILMAAYEHuSn7qna6Am43mwdPrPVZ3xyhSXXQlftixd TKznsz3/NPNVH3au4IJ8fafNmh3qovUOWqw7Edzk= 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 B1C42388B6BB for ; Tue, 15 Nov 2022 10:42:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B1C42388B6BB Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-433-dxdUQnpoPmyqeuJZDv8XJg-1; Tue, 15 Nov 2022 05:42:51 -0500 X-MC-Unique: dxdUQnpoPmyqeuJZDv8XJg-1 Received: by mail-qk1-f198.google.com with SMTP id w13-20020a05620a424d00b006e833c4fb0dso13169656qko.2 for ; Tue, 15 Nov 2022 02:42:51 -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=2aZy3MfeM9RQMexHADiTtLoz53qi6iSu+gPCzC5FAuo=; b=camep9up826KyX5gjhDFXVwlSIer8TKoqtY9k3cmxXG4rSqKdbPP9JWROd6Ly33Soe 0/Ah2T2CP000w7TmNIusLACLq1ox6FRrwoyGv1sQ+BgVzeJrPnI9vvn6Uj0fLAY84zG4 rvErjXmjgCiw+F4gWipItIEfh8E8HNxWRE4oJ5evL/YZGZFUYP8x7DZ7Bwc+X6pLOZHj n9iNppDJQCHm3Z2tNoa0j3+r+939tpMaWY3oSPsSE78FqZRWLQMS01c0h7ymx2gU+fwj D9nk+CiWa/vi5Z7vLXWQ0adHhKvmJOtd5cMDTn7gFmSJ3ahKZXzj4aVGa3JJ6wk6kxsz O1sg== X-Gm-Message-State: ANoB5pkZyHaSRJwKzdHTXaPrt6e6QAepcM9GSAWL4ZlweeZ8B7xCKtZ1 CUEzUNIm41Obc8zi82Ep1mXhTw9W1w4LfHsQ1Ub2QQ81LkPqBTxno1kyrfnyOuOFwK4ejsQmozi kcD4DkqnldPE2lAh+tMDLBZ4PMe8SfVuiVdwO13kBNagMI5wljO/7QdKJFB3S6cBzXiHa9OEMMw == X-Received: by 2002:a05:620a:1536:b0:6ea:3768:1da1 with SMTP id n22-20020a05620a153600b006ea37681da1mr14205624qkk.555.1668508970094; Tue, 15 Nov 2022 02:42:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf43wtq0ABRRbbVA3u0GxZ5zgmSFpFk4kLpiV3jBU68Zx8WUvrGFzZqdRKNL21JD6KJJZWv4yw== X-Received: by 2002:a05:620a:1536:b0:6ea:3768:1da1 with SMTP id n22-20020a05620a153600b006ea37681da1mr14205594qkk.555.1668508969329; Tue, 15 Nov 2022 02:42:49 -0800 (PST) Received: from localhost ([31.111.84.238]) by smtp.gmail.com with ESMTPSA id bl12-20020a05620a1a8c00b006faa2c0100bsm7944209qkb.110.2022.11.15.02.42.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 02:42:49 -0800 (PST) To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 06/14] gdb/testsuite: remove use of then keyword from gdb.python/*.exp Date: Tue, 15 Nov 2022 10:42:23 +0000 Message-Id: <1747743801c7fca7b28cf71fccf455c0e55c630c.1668508386.git.aburgess@redhat.com> 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=-10.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_STOCKGEN, 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.python/ test script directory. There should be no changes in what is tested after this commit. --- gdb/testsuite/gdb.python/lib-types.exp | 2 +- .../gdb.python/pretty-print-call-by-hand.exp | 4 +-- gdb/testsuite/gdb.python/py-bad-printers.exp | 2 +- gdb/testsuite/gdb.python/py-block.exp | 2 +- gdb/testsuite/gdb.python/py-breakpoint.exp | 28 +++++++++---------- gdb/testsuite/gdb.python/py-cmd.exp | 2 +- gdb/testsuite/gdb.python/py-connection.exp | 2 +- gdb/testsuite/gdb.python/py-disasm.exp | 2 +- gdb/testsuite/gdb.python/py-events.exp | 2 +- .../gdb.python/py-finish-breakpoint.exp | 16 +++++------ .../gdb.python/py-finish-breakpoint2.exp | 2 +- gdb/testsuite/gdb.python/py-format-string.exp | 2 +- gdb/testsuite/gdb.python/py-frame-inline.exp | 2 +- gdb/testsuite/gdb.python/py-frame.exp | 2 +- .../gdb.python/py-framefilter-invalidarg.exp | 2 +- gdb/testsuite/gdb.python/py-framefilter.exp | 4 +-- gdb/testsuite/gdb.python/py-inferior.exp | 2 +- gdb/testsuite/gdb.python/py-infthread.exp | 2 +- gdb/testsuite/gdb.python/py-nested-maps.exp | 2 +- gdb/testsuite/gdb.python/py-objfile.exp | 2 +- .../gdb.python/py-pending-frame-level.exp | 2 +- gdb/testsuite/gdb.python/py-pp-maint.exp | 2 +- gdb/testsuite/gdb.python/py-prettyprint.exp | 4 +-- gdb/testsuite/gdb.python/py-rbreak.exp | 2 +- gdb/testsuite/gdb.python/py-record-btrace.exp | 2 +- gdb/testsuite/gdb.python/py-record-full.exp | 2 +- .../gdb.python/py-recurse-unwind.exp | 2 +- gdb/testsuite/gdb.python/py-shared.exp | 2 +- gdb/testsuite/gdb.python/py-symbol.exp | 6 ++-- gdb/testsuite/gdb.python/py-symtab.exp | 2 +- gdb/testsuite/gdb.python/py-template.exp | 2 +- gdb/testsuite/gdb.python/py-type.exp | 2 +- gdb/testsuite/gdb.python/py-unwind-inline.exp | 2 +- gdb/testsuite/gdb.python/py-unwind-maint.exp | 2 +- .../gdb.python/py-unwind-user-regs.exp | 2 +- gdb/testsuite/gdb.python/py-unwind.exp | 2 +- gdb/testsuite/gdb.python/py-value.exp | 4 +-- gdb/testsuite/gdb.python/python.exp | 6 ++-- 38 files changed, 66 insertions(+), 66 deletions(-) diff --git a/gdb/testsuite/gdb.python/lib-types.exp b/gdb/testsuite/gdb.python/lib-types.exp index a01e9d76219..35da9113621 100644 --- a/gdb/testsuite/gdb.python/lib-types.exp +++ b/gdb/testsuite/gdb.python/lib-types.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp index eb3fc9e35fa..76386bb6df1 100644 --- a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp +++ b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp @@ -47,7 +47,7 @@ proc start_test { breakpoint_comment } { clean_restart ${binfile} - if { ![runto_main] } then { + if {![runto_main]} { untested "couldn't run to breakpoint" return -1 } @@ -66,7 +66,7 @@ proc start_test { breakpoint_comment } { # Start by testing the "run" command, it can't leverage start_test with_test_prefix "run to frame" { - if { ![runto_main] } then { + if {![runto_main]} { untested "couldn't run to main" } diff --git a/gdb/testsuite/gdb.python/py-bad-printers.exp b/gdb/testsuite/gdb.python/py-bad-printers.exp index 2ef7f487eda..01654ad024b 100644 --- a/gdb/testsuite/gdb.python/py-bad-printers.exp +++ b/gdb/testsuite/gdb.python/py-bad-printers.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main ] then { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.python/py-block.exp b/gdb/testsuite/gdb.python/py-block.exp index 0bc020aee9e..0a88aec56a0 100644 --- a/gdb/testsuite/gdb.python/py-block.exp +++ b/gdb/testsuite/gdb.python/py-block.exp @@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp index c3215b13d5c..e36e87dc291 100644 --- a/gdb/testsuite/gdb.python/py-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-breakpoint.exp @@ -46,7 +46,7 @@ proc_with_prefix test_bkpt_basic { } { # We should start with no breakpoints. gdb_test "python print (gdb.breakpoints())" "\\(\\)" - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -128,7 +128,7 @@ proc_with_prefix test_bkpt_deletion { } { # Start with a fresh gdb. clean_restart ${testfile} - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -163,7 +163,7 @@ proc_with_prefix test_bkpt_cond_and_cmds { } { # Start with a fresh gdb. clean_restart ${testfile} - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -220,7 +220,7 @@ proc_with_prefix test_bkpt_invisible { } { # Start with a fresh gdb. clean_restart ${testfile} - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -265,7 +265,7 @@ proc_with_prefix test_hardware_breakpoints { } { # Start with a fresh gdb. clean_restart ${testfile} - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -293,7 +293,7 @@ proc_with_prefix test_watchpoints { } { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -316,7 +316,7 @@ proc_with_prefix test_bkpt_internal { } { if {$skip_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } - if ![runto_main] then { + if {![runto_main]} { return 0 } delete_breakpoints @@ -364,7 +364,7 @@ proc_with_prefix test_bkpt_eval_funcs { } { if {$skip_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } - if ![runto_main] then { + if {![runto_main]} { return 0 } delete_breakpoints @@ -477,7 +477,7 @@ proc_with_prefix test_bkpt_temporary { } { # Start with a fresh gdb. clean_restart ${testfile} - if ![runto_main] then { + if {![runto_main]} { return 0 } delete_breakpoints @@ -595,7 +595,7 @@ proc_with_prefix test_bkpt_explicit_loc {} { # Start with a fresh gdb. clean_restart ${testfile} - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -680,7 +680,7 @@ proc_with_prefix test_bkpt_qualified {} { set one_location_re "Breakpoint $decimal at $hex:.*line $decimal." set two_location_re "Breakpoint $decimal at $hex:.*2 locations." - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -749,7 +749,7 @@ proc_with_prefix test_bkpt_probe {} { return -1 } - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -766,7 +766,7 @@ proc_with_prefix test_catchpoints {} { # Start with a fresh gdb. clean_restart ${testfile} - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -825,7 +825,7 @@ proc_with_prefix test_bkpt_auto_disable { } { # Start with a fresh gdb. clean_restart ${testfile} - if ![runto_main] then { + if {![runto_main]} { return 0 } delete_breakpoints diff --git a/gdb/testsuite/gdb.python/py-cmd.exp b/gdb/testsuite/gdb.python/py-cmd.exp index 82f1c357518..aa95a459f46 100644 --- a/gdb/testsuite/gdb.python/py-cmd.exp +++ b/gdb/testsuite/gdb.python/py-cmd.exp @@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-connection.exp b/gdb/testsuite/gdb.python/py-connection.exp index 91315eb1af4..fc212fc09c0 100644 --- a/gdb/testsuite/gdb.python/py-connection.exp +++ b/gdb/testsuite/gdb.python/py-connection.exp @@ -29,7 +29,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-disasm.exp b/gdb/testsuite/gdb.python/py-disasm.exp index 1f94d3e60f3..2fe20c39d83 100644 --- a/gdb/testsuite/gdb.python/py-disasm.exp +++ b/gdb/testsuite/gdb.python/py-disasm.exp @@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} "debug"] } # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main] then { +if {![runto_main]} { fail "can't run to main" return 0 } diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp index 94762739cd4..ce9342afaff 100644 --- a/gdb/testsuite/gdb.python/py-events.exp +++ b/gdb/testsuite/gdb.python/py-events.exp @@ -317,7 +317,7 @@ with_test_prefix "gdb exiting: normal" { with_test_prefix "gdb exiting: error" { clean_restart ${testfile} - if ![runto_main] then { + if {![runto_main]} { fail "cannot run to main." return 0 } diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp index c525337990e..2f6c2f78e67 100644 --- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp @@ -50,7 +50,7 @@ with_test_prefix "normal conditions" { clean_restart ${testfile} gdb_load_shlib ${lib_sl} - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -102,7 +102,7 @@ with_test_prefix "no debug symbol" { "import python scripts" set cond_line [gdb_get_line_number "Condition Break."] - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -129,7 +129,7 @@ with_test_prefix "function returned by longjump" { gdb_test "source $python_file" "Python script imported.*" \ "import python scripts" - if ![runto call_longjmp_1] then { + if {![runto call_longjmp_1]} { return } @@ -157,7 +157,7 @@ with_test_prefix "finish in dummy frame" { "import python scripts" - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -184,7 +184,7 @@ with_test_prefix "finish in normal frame" { gdb_test "source $python_file" "Python script imported.*" \ "import python scripts" - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -213,7 +213,7 @@ with_test_prefix "explicit inferior function call" { gdb_test "source $python_file" "Python script imported.*" \ "import python scripts" - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -240,7 +240,7 @@ with_test_prefix "explicit inferior function call" { # with_test_prefix "inferior exit" { - if ![runto "test_exec_exit"] then { + if {![runto "test_exec_exit"]} { return 0 } @@ -254,7 +254,7 @@ with_test_prefix "inferior exit" { # with_test_prefix "inferior exec" { - if ![runto "test_exec_exit"] then { + if {![runto "test_exec_exit"]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp index 6ad0bef88ea..30758473d40 100644 --- a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp +++ b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-format-string.exp b/gdb/testsuite/gdb.python/py-format-string.exp index 45b08512c0c..26b18ce1ab0 100644 --- a/gdb/testsuite/gdb.python/py-format-string.exp +++ b/gdb/testsuite/gdb.python/py-format-string.exp @@ -52,7 +52,7 @@ proc prepare_gdb {exefile} { gdb_reinitialize_dir $srcdir/$subdir gdb_load ${exefile} - if ![runto_main] then { + if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.python/py-frame-inline.exp b/gdb/testsuite/gdb.python/py-frame-inline.exp index 44726cae0c4..791749c27c6 100644 --- a/gdb/testsuite/gdb.python/py-frame-inline.exp +++ b/gdb/testsuite/gdb.python/py-frame-inline.exp @@ -24,7 +24,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp index 56e1ecdcedd..27130a95d79 100644 --- a/gdb/testsuite/gdb.python/py-frame.exp +++ b/gdb/testsuite/gdb.python/py-frame.exp @@ -29,7 +29,7 @@ if { [skip_python_tests] } { continue } # The following tests require execution. -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp index 5fbce55ef3a..81c434046a4 100644 --- a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp +++ b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp @@ -51,7 +51,7 @@ gdb_load ${binfile} gdb_test "info auto-load python-scripts" "Yes.*${testfile}-gdb.py.*" \ "Test auto-load had loaded python scripts" -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.python/py-framefilter.exp b/gdb/testsuite/gdb.python/py-framefilter.exp index 7a172e72d33..794d1c2944c 100644 --- a/gdb/testsuite/gdb.python/py-framefilter.exp +++ b/gdb/testsuite/gdb.python/py-framefilter.exp @@ -52,7 +52,7 @@ gdb_load ${binfile} gdb_test "info auto-load python-scripts" "Yes.*${testfile}-gdb.py.*" \ "Test auto-load had loaded python scripts" -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } @@ -310,7 +310,7 @@ gdb_load ${binfile} # Verify gdb loaded the script. gdb_test "info auto-load python-scripts" "Yes.*${testfile}-gdb.py.*" \ "Set autoload path for no debug info tests" -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.python/py-inferior.exp b/gdb/testsuite/gdb.python/py-inferior.exp index 552f9b17f4d..8fcd97a1b8d 100644 --- a/gdb/testsuite/gdb.python/py-inferior.exp +++ b/gdb/testsuite/gdb.python/py-inferior.exp @@ -37,7 +37,7 @@ switch [get_endianness] { # The following tests require execution. -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-infthread.exp b/gdb/testsuite/gdb.python/py-infthread.exp index a7754198e60..4ca2b86a63c 100644 --- a/gdb/testsuite/gdb.python/py-infthread.exp +++ b/gdb/testsuite/gdb.python/py-infthread.exp @@ -40,7 +40,7 @@ gdb_test_multiline "install new_thread event handler" \ # The following tests require execution. -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-nested-maps.exp b/gdb/testsuite/gdb.python/py-nested-maps.exp index 70d4f771ec5..ea71a793aee 100644 --- a/gdb/testsuite/gdb.python/py-nested-maps.exp +++ b/gdb/testsuite/gdb.python/py-nested-maps.exp @@ -34,7 +34,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } { return -1 } -if ![runto_main ] then { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.python/py-objfile.exp b/gdb/testsuite/gdb.python/py-objfile.exp index 9565c16af96..80f2e794947 100644 --- a/gdb/testsuite/gdb.python/py-objfile.exp +++ b/gdb/testsuite/gdb.python/py-objfile.exp @@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-pending-frame-level.exp b/gdb/testsuite/gdb.python/py-pending-frame-level.exp index 57ee6b634cc..3cf8d4d639e 100644 --- a/gdb/testsuite/gdb.python/py-pending-frame-level.exp +++ b/gdb/testsuite/gdb.python/py-pending-frame-level.exp @@ -26,7 +26,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-pp-maint.exp b/gdb/testsuite/gdb.python/py-pp-maint.exp index 8d8974c94c5..19cabe847f2 100644 --- a/gdb/testsuite/gdb.python/py-pp-maint.exp +++ b/gdb/testsuite/gdb.python/py-pp-maint.exp @@ -32,7 +32,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main ] then { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp index c6040059cea..46a346c194b 100644 --- a/gdb/testsuite/gdb.python/py-prettyprint.exp +++ b/gdb/testsuite/gdb.python/py-prettyprint.exp @@ -42,7 +42,7 @@ proc run_lang_tests {exefile lang} { gdb_reinitialize_dir $srcdir/$subdir gdb_load ${exefile} - if ![runto_main ] then { + if {![runto_main]} { perror "couldn't run to breakpoint" return } @@ -198,7 +198,7 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -if ![runto_main ] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.python/py-rbreak.exp b/gdb/testsuite/gdb.python/py-rbreak.exp index 4c641c9cb96..f32cffc6e57 100644 --- a/gdb/testsuite/gdb.python/py-rbreak.exp +++ b/gdb/testsuite/gdb.python/py-rbreak.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $srcfile # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp index e9fdd06154e..bbaf268c86a 100644 --- a/gdb/testsuite/gdb.python/py-record-btrace.exp +++ b/gdb/testsuite/gdb.python/py-record-btrace.exp @@ -35,7 +35,7 @@ if { [skip_python_tests] } { return -1 } -if ![runto_main ] then { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.python/py-record-full.exp b/gdb/testsuite/gdb.python/py-record-full.exp index f3ccefa275c..52d6dd3da0b 100644 --- a/gdb/testsuite/gdb.python/py-record-full.exp +++ b/gdb/testsuite/gdb.python/py-record-full.exp @@ -35,7 +35,7 @@ if { [skip_python_tests] } { return -1 } -if ![runto_main ] then { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.python/py-recurse-unwind.exp b/gdb/testsuite/gdb.python/py-recurse-unwind.exp index 6361417ca9c..711b8b0995f 100644 --- a/gdb/testsuite/gdb.python/py-recurse-unwind.exp +++ b/gdb/testsuite/gdb.python/py-recurse-unwind.exp @@ -40,7 +40,7 @@ gdb_test "source ${pyfile}" "Python script imported" \ # The following tests require execution. -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-shared.exp b/gdb/testsuite/gdb.python/py-shared.exp index 7075bc5ee36..8dfd53acd26 100644 --- a/gdb/testsuite/gdb.python/py-shared.exp +++ b/gdb/testsuite/gdb.python/py-shared.exp @@ -48,7 +48,7 @@ if { [skip_python_tests] } { continue } # The following tests require execution. -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp index ef4f86d005d..ad06b07c2c6 100644 --- a/gdb/testsuite/gdb.python/py-symbol.exp +++ b/gdb/testsuite/gdb.python/py-symbol.exp @@ -104,7 +104,7 @@ gdb_test "python print (gdb.lookup_static_symbol ('nonexistent') is None)" \ gdb_test "python print (gdb.lookup_static_symbol ('qq') is None)" \ "True" "lookup_static_symbol for global var" -if ![runto_main] then { +if {![runto_main]} { return 0 } @@ -212,7 +212,7 @@ gdb_test "python print (gdb.lookup_global_symbol ('(anonymous namespace)::anon') gdb_test "python print (gdb.lookup_static_symbol ('(anonymous namespace)::anon').value ())" \ "10" "print value of anon" -if ![runto_main] then { +if {![runto_main]} { return 0 } @@ -240,7 +240,7 @@ gdb_test "python print (cplusfunc.addr_class == gdb.SYMBOL_LOC_BLOCK)" "True" "t # test as it unloads the object file in GDB. # Start with a fresh gdb. clean_restart ${binfile} -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp index 90750669a83..470710872c1 100644 --- a/gdb/testsuite/gdb.python/py-symtab.exp +++ b/gdb/testsuite/gdb.python/py-symtab.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-template.exp b/gdb/testsuite/gdb.python/py-template.exp index 729faef7966..25f3f52f4a3 100644 --- a/gdb/testsuite/gdb.python/py-template.exp +++ b/gdb/testsuite/gdb.python/py-template.exp @@ -43,7 +43,7 @@ proc test_template_arg {exefile type} { return -1 } gdb_load ${exefile} - if ![runto_main ] then { + if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.python/py-type.exp b/gdb/testsuite/gdb.python/py-type.exp index 20f5084c332..fbe56f35b4b 100644 --- a/gdb/testsuite/gdb.python/py-type.exp +++ b/gdb/testsuite/gdb.python/py-type.exp @@ -41,7 +41,7 @@ proc restart_gdb {exefile} { gdb_reinitialize_dir $srcdir/$subdir gdb_load ${exefile} - if ![runto_main ] then { + if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.python/py-unwind-inline.exp b/gdb/testsuite/gdb.python/py-unwind-inline.exp index 6667e29e446..b316ec0a3f4 100644 --- a/gdb/testsuite/gdb.python/py-unwind-inline.exp +++ b/gdb/testsuite/gdb.python/py-unwind-inline.exp @@ -29,7 +29,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ if { [skip_python_tests] } { continue } # The following tests require execution. -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-unwind-maint.exp b/gdb/testsuite/gdb.python/py-unwind-maint.exp index 7c88219089d..28121caf6bb 100644 --- a/gdb/testsuite/gdb.python/py-unwind-maint.exp +++ b/gdb/testsuite/gdb.python/py-unwind-maint.exp @@ -29,7 +29,7 @@ if { [skip_python_tests] } { continue } set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py] -if ![runto_main ] then { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp index 3430cbc3fbe..182a5481b56 100644 --- a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp +++ b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp @@ -47,7 +47,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-unwind.exp b/gdb/testsuite/gdb.python/py-unwind.exp index 798e76525db..515e1c07f21 100644 --- a/gdb/testsuite/gdb.python/py-unwind.exp +++ b/gdb/testsuite/gdb.python/py-unwind.exp @@ -37,7 +37,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { continue } # The following tests require execution. -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp index b88c4515c8c..c04c98da162 100644 --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp @@ -415,7 +415,7 @@ proc test_subscript_regression {exefile lang} { # Start with a fresh gdb. clean_restart ${exefile} - if ![runto_main ] then { + if {![runto_main]} { perror "couldn't run to breakpoint" return } @@ -652,7 +652,7 @@ test_add_to_history # The following tests require execution. -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp index 48ff07e91e5..15ec5256f2c 100644 --- a/gdb/testsuite/gdb.python/python.exp +++ b/gdb/testsuite/gdb.python/python.exp @@ -217,7 +217,7 @@ clean_restart ${testfile} # The following tests require execution. -if ![runto_main] then { +if {![runto_main]} { return 0 } @@ -431,7 +431,7 @@ clean_restart ${testfile} # The following tests require execution. -if ![runto_main] then { +if {![runto_main]} { return 0 } @@ -486,7 +486,7 @@ clean_restart ${testfile} # The following tests require execution. -if ![runto_main] then { +if {![runto_main]} { return 0 }