From patchwork Tue Nov 15 10:42:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 60637 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 6EECA38A90B3 for ; Tue, 15 Nov 2022 10:45:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6EECA38A90B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668509109; bh=AxS5DpmwlkRAmngc8FrfcfYpMs5V6U216GhAxB/b1Dk=; 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=JyzXscE7Dk/BEejbdjHfnikEtyGFnkKc62wSeWIP3GYgDbB+yraH3KQlop+UsOI5Y XCNDLXnPB16ejnqS+cduOrqyUFPetHmPD2ugW9ukmZCLxpC1DxQTUKWQqU80J8Roh6 f/WdY3elAs55vhM6Vj25tqoxvJjXDznCZYvY1yos= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 172B53894C3D for ; Tue, 15 Nov 2022 10:43:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 172B53894C3D Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-626-81CcESVOPNCYSW81zSxN2w-1; Tue, 15 Nov 2022 05:42:58 -0500 X-MC-Unique: 81CcESVOPNCYSW81zSxN2w-1 Received: by mail-qt1-f200.google.com with SMTP id y19-20020a05622a121300b003a526e0ff9bso9923920qtx.15 for ; Tue, 15 Nov 2022 02:42:58 -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=AxS5DpmwlkRAmngc8FrfcfYpMs5V6U216GhAxB/b1Dk=; b=aYhkkHLNxRh4y2Tc9v0nTQJJPTV9KO27KwXREqHD8MRz1m8TkKB82jkGq9tyg+Bv7l SAxrs1wLeNVFsrv8s1qgjMpM3BPuk1rPa36ALZjLduoUFgwW5ax2vxK/fvlms04X6tTH nm6hxeegYpNAMRrNHfXicp8QS4lVO8X4TQnVAHdtv90TLXr9hZ4xyn7M+iKRSb8/22Oo GKKqeHpmtIzLTWOSf9h8CYlZXxjDvsRTaNu3t4E3voeyStMO2/Xsqe0dcXfwtUUQZWg1 SfAjf/chcT3hGV8+IANYBw453W+R7xpN4ktkVJGp4SOJDfzjuoTvvHq76PQ+yKsbCRQX /PkQ== X-Gm-Message-State: ANoB5pkPbwvTw+X/nsP7lNFdGMOX38iVO5ig9NboDIaKG2Q5iaEibi68 lE2VGM7kntIJjBsOc+0Uw5mF4OeZ1nyvkzjsDzDdjDuIkVov83zqFT2K6VU8XCv2vN4m5+v6ozY sU/AyFkTXJLGyD/UH5PDIrXwhTUUACL+OXtPPGwyZzQ/D1SH++Nqh9hGejVNUP+8TEsyxhiaZtw == X-Received: by 2002:ac8:4454:0:b0:3a5:15dd:c912 with SMTP id m20-20020ac84454000000b003a515ddc912mr16080659qtn.553.1668508977802; Tue, 15 Nov 2022 02:42:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Yruu4k+jNwtx0MQPrQp9/D+2LpWlOq8XN06gJyr2upVekZnsfGCW2rIv1X1/M1hvHilszmg== X-Received: by 2002:ac8:4454:0:b0:3a5:15dd:c912 with SMTP id m20-20020ac84454000000b003a515ddc912mr16080642qtn.553.1668508977414; Tue, 15 Nov 2022 02:42:57 -0800 (PST) Received: from localhost ([31.111.84.238]) by smtp.gmail.com with ESMTPSA id g11-20020ac87f4b000000b0039a9b55b829sm7117303qtk.29.2022.11.15.02.42.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 02:42:57 -0800 (PST) To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 10/14] gdb/testsuite: remove use of then keyword from gdb.disasm/*.exp Date: Tue, 15 Nov 2022 10:42:27 +0000 Message-Id: <77d36fcf382f4f955ac14aac6755ef0f215f7af2.1668508387.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=-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.disasm/ test script directory. There should be no changes in what is tested after this commit. --- gdb/testsuite/gdb.disasm/t01_mov.exp | 4 ++-- gdb/testsuite/gdb.disasm/t02_mova.exp | 4 ++-- gdb/testsuite/gdb.disasm/t03_add.exp | 4 ++-- gdb/testsuite/gdb.disasm/t04_sub.exp | 4 ++-- gdb/testsuite/gdb.disasm/t05_cmp.exp | 4 ++-- gdb/testsuite/gdb.disasm/t06_ari2.exp | 4 ++-- gdb/testsuite/gdb.disasm/t07_ari3.exp | 4 ++-- gdb/testsuite/gdb.disasm/t08_or.exp | 4 ++-- gdb/testsuite/gdb.disasm/t09_xor.exp | 4 ++-- gdb/testsuite/gdb.disasm/t10_and.exp | 4 ++-- gdb/testsuite/gdb.disasm/t11_logs.exp | 4 ++-- gdb/testsuite/gdb.disasm/t12_bit.exp | 4 ++-- gdb/testsuite/gdb.disasm/t13_otr.exp | 4 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/gdb/testsuite/gdb.disasm/t01_mov.exp b/gdb/testsuite/gdb.disasm/t01_mov.exp index c9efa34f7c6..2e29baccc18 100644 --- a/gdb/testsuite/gdb.disasm/t01_mov.exp +++ b/gdb/testsuite/gdb.disasm/t01_mov.exp @@ -30,12 +30,12 @@ set asm-flags "" set link-flags "-m h8300sxelf" -if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { +if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} { untested "failed to assemble" return -1 } -if {[target_link $objfile $binfile "${link-flags}"] != ""} then { +if {[target_link $objfile $binfile "${link-flags}"] != ""} { untested "failed to link" return -1 } diff --git a/gdb/testsuite/gdb.disasm/t02_mova.exp b/gdb/testsuite/gdb.disasm/t02_mova.exp index 3fcb0be5e2b..67d3d5f11c6 100644 --- a/gdb/testsuite/gdb.disasm/t02_mova.exp +++ b/gdb/testsuite/gdb.disasm/t02_mova.exp @@ -30,12 +30,12 @@ set asm-flags "" set link-flags "-m h8300sxelf" -if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { +if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} { untested "failed to assemble" return -1 } -if {[target_link $objfile $binfile "${link-flags}"] != ""} then { +if {[target_link $objfile $binfile "${link-flags}"] != ""} { untested "failed to link" return -1 } diff --git a/gdb/testsuite/gdb.disasm/t03_add.exp b/gdb/testsuite/gdb.disasm/t03_add.exp index 0a5a914e0c8..b2f2289f585 100644 --- a/gdb/testsuite/gdb.disasm/t03_add.exp +++ b/gdb/testsuite/gdb.disasm/t03_add.exp @@ -30,12 +30,12 @@ set asm-flags "" set link-flags "-m h8300sxelf" -if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { +if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} { untested "failed to assemble" return -1 } -if {[target_link $objfile $binfile "${link-flags}"] != ""} then { +if {[target_link $objfile $binfile "${link-flags}"] != ""} { untested "failed to link" return -1 } diff --git a/gdb/testsuite/gdb.disasm/t04_sub.exp b/gdb/testsuite/gdb.disasm/t04_sub.exp index 4f4353e0df6..5ac5829d60f 100644 --- a/gdb/testsuite/gdb.disasm/t04_sub.exp +++ b/gdb/testsuite/gdb.disasm/t04_sub.exp @@ -30,12 +30,12 @@ set asm-flags "" set link-flags "-m h8300sxelf" -if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { +if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} { untested "failed to assemble" return -1 } -if {[target_link $objfile $binfile "${link-flags}"] != ""} then { +if {[target_link $objfile $binfile "${link-flags}"] != ""} { untested "failed to link" return -1 } diff --git a/gdb/testsuite/gdb.disasm/t05_cmp.exp b/gdb/testsuite/gdb.disasm/t05_cmp.exp index 534f81650db..a1c704151c9 100644 --- a/gdb/testsuite/gdb.disasm/t05_cmp.exp +++ b/gdb/testsuite/gdb.disasm/t05_cmp.exp @@ -30,12 +30,12 @@ set asm-flags "" set link-flags "-m h8300sxelf" -if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { +if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} { untested "failed to assemble" return -1 } -if {[target_link $objfile $binfile "${link-flags}"] != ""} then { +if {[target_link $objfile $binfile "${link-flags}"] != ""} { untested "failed to link" return -1 } diff --git a/gdb/testsuite/gdb.disasm/t06_ari2.exp b/gdb/testsuite/gdb.disasm/t06_ari2.exp index ab5ffdd5fa0..c7de7336217 100644 --- a/gdb/testsuite/gdb.disasm/t06_ari2.exp +++ b/gdb/testsuite/gdb.disasm/t06_ari2.exp @@ -30,12 +30,12 @@ set asm-flags "" set link-flags "-m h8300sxelf" -if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { +if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} { untested "failed to assemble" return -1 } -if {[target_link $objfile $binfile "${link-flags}"] != ""} then { +if {[target_link $objfile $binfile "${link-flags}"] != ""} { untested "failed to link" return -1 } diff --git a/gdb/testsuite/gdb.disasm/t07_ari3.exp b/gdb/testsuite/gdb.disasm/t07_ari3.exp index 810dc0e2311..7937925e70a 100644 --- a/gdb/testsuite/gdb.disasm/t07_ari3.exp +++ b/gdb/testsuite/gdb.disasm/t07_ari3.exp @@ -30,12 +30,12 @@ set asm-flags "" set link-flags "-m h8300sxelf" -if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { +if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} { untested "failed to assemble" return -1 } -if {[target_link $objfile $binfile "${link-flags}"] != ""} then { +if {[target_link $objfile $binfile "${link-flags}"] != ""} { untested "failed to link" return -1 } diff --git a/gdb/testsuite/gdb.disasm/t08_or.exp b/gdb/testsuite/gdb.disasm/t08_or.exp index 5ade4eb770e..fdfa0a1b301 100644 --- a/gdb/testsuite/gdb.disasm/t08_or.exp +++ b/gdb/testsuite/gdb.disasm/t08_or.exp @@ -30,12 +30,12 @@ set asm-flags "" set link-flags "-m h8300sxelf" -if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { +if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} { untested "failed to assemble" return -1 } -if {[target_link $objfile $binfile "${link-flags}"] != ""} then { +if {[target_link $objfile $binfile "${link-flags}"] != ""} { untested "failed to link" return -1 } diff --git a/gdb/testsuite/gdb.disasm/t09_xor.exp b/gdb/testsuite/gdb.disasm/t09_xor.exp index 8c8f584e136..7e246753367 100644 --- a/gdb/testsuite/gdb.disasm/t09_xor.exp +++ b/gdb/testsuite/gdb.disasm/t09_xor.exp @@ -30,12 +30,12 @@ set asm-flags "" set link-flags "-m h8300sxelf" -if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { +if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} { untested "failed to assemble" return -1 } -if {[target_link $objfile $binfile "${link-flags}"] != ""} then { +if {[target_link $objfile $binfile "${link-flags}"] != ""} { untested "failed to link" return -1 } diff --git a/gdb/testsuite/gdb.disasm/t10_and.exp b/gdb/testsuite/gdb.disasm/t10_and.exp index c096737019f..5650aebba1c 100644 --- a/gdb/testsuite/gdb.disasm/t10_and.exp +++ b/gdb/testsuite/gdb.disasm/t10_and.exp @@ -30,12 +30,12 @@ set asm-flags "" set link-flags "-m h8300sxelf" -if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { +if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} { untested "failed to assemble" return -1 } -if {[target_link $objfile $binfile "${link-flags}"] != ""} then { +if {[target_link $objfile $binfile "${link-flags}"] != ""} { untested "failed to link" return -1 } diff --git a/gdb/testsuite/gdb.disasm/t11_logs.exp b/gdb/testsuite/gdb.disasm/t11_logs.exp index 7511b84c28d..2b58273c307 100644 --- a/gdb/testsuite/gdb.disasm/t11_logs.exp +++ b/gdb/testsuite/gdb.disasm/t11_logs.exp @@ -30,12 +30,12 @@ set asm-flags "" set link-flags "-m h8300sxelf" -if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { +if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} { untested "failed to assemble" return -1 } -if {[target_link $objfile $binfile "${link-flags}"] != ""} then { +if {[target_link $objfile $binfile "${link-flags}"] != ""} { untested "failed to link" return -1 } diff --git a/gdb/testsuite/gdb.disasm/t12_bit.exp b/gdb/testsuite/gdb.disasm/t12_bit.exp index 1020986f331..e58412128f3 100644 --- a/gdb/testsuite/gdb.disasm/t12_bit.exp +++ b/gdb/testsuite/gdb.disasm/t12_bit.exp @@ -30,12 +30,12 @@ set asm-flags "" set link-flags "-m h8300sxelf" -if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { +if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} { untested "failed to assemble" return -1 } -if {[target_link $objfile $binfile "${link-flags}"] != ""} then { +if {[target_link $objfile $binfile "${link-flags}"] != ""} { untested "failed to link" return -1 } diff --git a/gdb/testsuite/gdb.disasm/t13_otr.exp b/gdb/testsuite/gdb.disasm/t13_otr.exp index 70fbd1310e1..61b300f511f 100644 --- a/gdb/testsuite/gdb.disasm/t13_otr.exp +++ b/gdb/testsuite/gdb.disasm/t13_otr.exp @@ -30,12 +30,12 @@ set asm-flags "" set link-flags "-m h8300sxelf" -if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { +if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} { untested "failed to assemble" return -1 } -if {[target_link $objfile $binfile "${link-flags}"] != ""} then { +if {[target_link $objfile $binfile "${link-flags}"] != ""} { untested "failed to link" return -1 }