diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-11-14 11:31:04 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-11-28 21:04:09 +0000 |
commit | 65a33d75c2667895f067cc5f9079215126cbb2eb (patch) | |
tree | fdd3f74defa60f3a0cb96123071d49990fd9cfe0 /gdb/testsuite/gdb.base/remote.exp | |
parent | ed7fbdd033a272ff0d7d82c2153d7d0fade80d26 (diff) | |
download | gdb-65a33d75c2667895f067cc5f9079215126cbb2eb.zip gdb-65a33d75c2667895f067cc5f9079215126cbb2eb.tar.gz gdb-65a33d75c2667895f067cc5f9079215126cbb2eb.tar.bz2 |
gdb/testsuite: remove use of then keyword from gdb.base/*.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.base/
test script directory.
There should be no changes in what is tested after this commit.
Diffstat (limited to 'gdb/testsuite/gdb.base/remote.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/remote.exp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.base/remote.exp b/gdb/testsuite/gdb.base/remote.exp index 579dcd4..4c2bc25 100644 --- a/gdb/testsuite/gdb.base/remote.exp +++ b/gdb/testsuite/gdb.base/remote.exp @@ -22,7 +22,7 @@ if {[target_info gdb_protocol] != "remote" standard_testfile .c set result [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] -if {$result != "" } then { +if {$result != ""} { untested "failed to compile" return -1 } @@ -87,7 +87,7 @@ proc gdb_load_timed {executable class writesize} { global test gdb_prompt set test "timed download `[file tail $executable]' - $class, $writesize" - if {$writesize != ""} then { + if {$writesize != ""} { gdb_test_no_output "set remote memory-write-packet-size $writesize" \ "$test - set packet size" @@ -121,7 +121,7 @@ proc gdb_load_timed {executable class writesize} { set load_begin_time [clock clicks] set result [gdb_load $executable] set load_end_time [clock clicks] - if { $result != 0 } then { + if {$result != 0} { fail "$test - loading executable" return } @@ -158,7 +158,7 @@ set sizeof_random_data [get_sizeof "random_data" 48*1024] # # Part THREE: Check the upload behavour # -if ![runto_main] then { +if {![runto_main]} { return } @@ -171,7 +171,7 @@ gdb_test "x/8ub random_data" \ gdb_test "x/8ub random_data + 400 - 4" \ "<random_data\\+396>:\[ \t\]+185\[ \t\]+255\[ \t\]+50\[ \t\]+140\[ \t\]+237\[ \t\]+172\[ \t\]+143\[ \t\]+93" -if {$sizeof_random_data > 16380 } then { +if {$sizeof_random_data > 16380} { gdb_test "x/8ub random_data + 16384 - 4" \ "<random_data\\+16380>:\[ \t\]+178\[ \t\]+180\[ \t\]+135\[ \t\]+93\[ \t\]+70\[ \t\]+62\[ \t\]+205\[ \t\]+76" } |