public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] gdb/testsuite: remove use of then keyword from gdb.disasm/*.exp
Date: Mon, 28 Nov 2022 21:05:20 +0000 (GMT)	[thread overview]
Message-ID: <20221128210520.835B6385843D@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6ca2ea063a71d6e2742096f980c2607e9d413cf5

commit 6ca2ea063a71d6e2742096f980c2607e9d413cf5
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Mon Nov 14 14:22:46 2022 +0000

    gdb/testsuite: remove use of then keyword from gdb.disasm/*.exp
    
    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.

Diff:
---
 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
 }

                 reply	other threads:[~2022-11-28 21:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221128210520.835B6385843D@sourceware.org \
    --to=aburgess@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).