aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-11-14 14:24:37 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-11-28 21:04:09 +0000
commit49bb47443c05e573d1675adba6d8f07562db2d3f (patch)
tree2ddf0c75c426062009c021c96712a987068916d1
parent6ca2ea063a71d6e2742096f980c2607e9d413cf5 (diff)
downloadgdb-49bb47443c05e573d1675adba6d8f07562db2d3f.zip
gdb-49bb47443c05e573d1675adba6d8f07562db2d3f.tar.gz
gdb-49bb47443c05e573d1675adba6d8f07562db2d3f.tar.bz2
gdb/testsuite: remove use of then keyword from gdb.fortran/*.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.fortran/ test script directory. There should be no changes in what is tested after this commit.
-rw-r--r--gdb/testsuite/gdb.fortran/array-element.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/block-data.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/common-block.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/complex.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/derived-type-function.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/derived-type-striding.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/derived-type.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/dot-ops.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/exprs.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/function-calls.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/library-module.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/module.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/namelist.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/nested-funcs-2.exp2
-rwxr-xr-xgdb/testsuite/gdb.fortran/nested-funcs.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/printing-types.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/ptr-indentation.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/ptype-on-functions.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/subarray.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/type-kinds.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/types.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/vla-value.exp2
23 files changed, 23 insertions, 23 deletions
diff --git a/gdb/testsuite/gdb.fortran/array-element.exp b/gdb/testsuite/gdb.fortran/array-element.exp
index 22b72e2..f5d313c 100644
--- a/gdb/testsuite/gdb.fortran/array-element.exp
+++ b/gdb/testsuite/gdb.fortran/array-element.exp
@@ -26,7 +26,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
return -1
}
-if ![runto sub_] then {
+if {![runto sub_]} {
perror "couldn't run to breakpoint sub_"
return
}
diff --git a/gdb/testsuite/gdb.fortran/block-data.exp b/gdb/testsuite/gdb.fortran/block-data.exp
index 482dcc2..ab06491 100644
--- a/gdb/testsuite/gdb.fortran/block-data.exp
+++ b/gdb/testsuite/gdb.fortran/block-data.exp
@@ -30,7 +30,7 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
return -1
}
-if ![fortran_runto_main] then {
+if {![fortran_runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.fortran/common-block.exp b/gdb/testsuite/gdb.fortran/common-block.exp
index e8d7c22..b8cbfb8 100644
--- a/gdb/testsuite/gdb.fortran/common-block.exp
+++ b/gdb/testsuite/gdb.fortran/common-block.exp
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} \
return -1
}
-if ![fortran_runto_main] then {
+if {![fortran_runto_main]} {
perror "couldn't run to main"
return
}
diff --git a/gdb/testsuite/gdb.fortran/complex.exp b/gdb/testsuite/gdb.fortran/complex.exp
index 9298b3b..896e01c 100644
--- a/gdb/testsuite/gdb.fortran/complex.exp
+++ b/gdb/testsuite/gdb.fortran/complex.exp
@@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90 quiet
return -1
}
-if ![fortran_runto_main] then {
+if {![fortran_runto_main]} {
perror "Couldn't run to main"
return
}
diff --git a/gdb/testsuite/gdb.fortran/derived-type-function.exp b/gdb/testsuite/gdb.fortran/derived-type-function.exp
index 573444a..3adabd6 100644
--- a/gdb/testsuite/gdb.fortran/derived-type-function.exp
+++ b/gdb/testsuite/gdb.fortran/derived-type-function.exp
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
return -1
}
-if ![fortran_runto_main] then {
+if {![fortran_runto_main]} {
perror "couldn't run to main"
return
}
diff --git a/gdb/testsuite/gdb.fortran/derived-type-striding.exp b/gdb/testsuite/gdb.fortran/derived-type-striding.exp
index 1edc489..bf868f5 100644
--- a/gdb/testsuite/gdb.fortran/derived-type-striding.exp
+++ b/gdb/testsuite/gdb.fortran/derived-type-striding.exp
@@ -29,7 +29,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
return -1
}
-if {![runto [gdb_get_line_number "post_init"]]} then {
+if {![runto [gdb_get_line_number "post_init"]]} {
perror "couldn't run to breakpoint post_init"
return
}
diff --git a/gdb/testsuite/gdb.fortran/derived-type.exp b/gdb/testsuite/gdb.fortran/derived-type.exp
index b3be8e5..63ec0c8 100644
--- a/gdb/testsuite/gdb.fortran/derived-type.exp
+++ b/gdb/testsuite/gdb.fortran/derived-type.exp
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
return -1
}
-if ![fortran_runto_main] then {
+if {![fortran_runto_main]} {
perror "couldn't run to main"
return
}
diff --git a/gdb/testsuite/gdb.fortran/dot-ops.exp b/gdb/testsuite/gdb.fortran/dot-ops.exp
index fefa27b..2bad2bc 100644
--- a/gdb/testsuite/gdb.fortran/dot-ops.exp
+++ b/gdb/testsuite/gdb.fortran/dot-ops.exp
@@ -153,7 +153,7 @@ proc test_dot_operations {} {
clean_restart
-if [set_lang_fortran] then {
+if {[set_lang_fortran]} {
test_dot_operations
} else {
warning "$test_name tests suppressed." 0
diff --git a/gdb/testsuite/gdb.fortran/exprs.exp b/gdb/testsuite/gdb.fortran/exprs.exp
index 28c0a86..c14cdad 100644
--- a/gdb/testsuite/gdb.fortran/exprs.exp
+++ b/gdb/testsuite/gdb.fortran/exprs.exp
@@ -249,7 +249,7 @@ gdb_reinitialize_dir $srcdir/$subdir
gdb_test "set print sevenbit-strings" ""
-if [set_lang_fortran] then {
+if {[set_lang_fortran]} {
test_value_history
test_convenience_variables
test_integer_literals_accepted
diff --git a/gdb/testsuite/gdb.fortran/function-calls.exp b/gdb/testsuite/gdb.fortran/function-calls.exp
index bc0192b..ea58e62 100644
--- a/gdb/testsuite/gdb.fortran/function-calls.exp
+++ b/gdb/testsuite/gdb.fortran/function-calls.exp
@@ -39,7 +39,7 @@ with_complaints 5 {
}
}
-if {![runto [gdb_get_line_number "post_init"]]} then {
+if {![runto [gdb_get_line_number "post_init"]]} {
perror "couldn't run to breakpoint post_init"
return
}
diff --git a/gdb/testsuite/gdb.fortran/library-module.exp b/gdb/testsuite/gdb.fortran/library-module.exp
index 1745360..a6ed67d 100644
--- a/gdb/testsuite/gdb.fortran/library-module.exp
+++ b/gdb/testsuite/gdb.fortran/library-module.exp
@@ -39,7 +39,7 @@ clean_restart $testfile
gdb_load_shlib $libfile
-if ![fortran_runto_main] then {
+if {![fortran_runto_main]} {
perror "couldn't run to main"
return
}
diff --git a/gdb/testsuite/gdb.fortran/module.exp b/gdb/testsuite/gdb.fortran/module.exp
index fe539fb..b9c9d6b 100644
--- a/gdb/testsuite/gdb.fortran/module.exp
+++ b/gdb/testsuite/gdb.fortran/module.exp
@@ -34,7 +34,7 @@ gdb_test "print mod1::var_const" " = 20" "fully qualified name of DW_TAG_constan
# Avoid shared lib symbols.
gdb_test_no_output "set auto-solib-add off"
-if ![fortran_runto_main] then {
+if {![fortran_runto_main]} {
perror "couldn't run to main"
return
}
diff --git a/gdb/testsuite/gdb.fortran/namelist.exp b/gdb/testsuite/gdb.fortran/namelist.exp
index 39cf0e1..46f24f4 100644
--- a/gdb/testsuite/gdb.fortran/namelist.exp
+++ b/gdb/testsuite/gdb.fortran/namelist.exp
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
return -1
}
-if ![fortran_runto_main] then {
+if {![fortran_runto_main]} {
perror "couldn't run to main"
return
}
diff --git a/gdb/testsuite/gdb.fortran/nested-funcs-2.exp b/gdb/testsuite/gdb.fortran/nested-funcs-2.exp
index bf67944..2a83144 100644
--- a/gdb/testsuite/gdb.fortran/nested-funcs-2.exp
+++ b/gdb/testsuite/gdb.fortran/nested-funcs-2.exp
@@ -108,7 +108,7 @@ proc do_bp_tests {with_src_prefix_p with_nest_prefix_p} {
}
# Break on a contained function and run to it.
- if {![runto ${src_prefix}[gdb_get_line_number "pre_init"]]} then {
+ if {![runto ${src_prefix}[gdb_get_line_number "pre_init"]]} {
perror "couldn't run to breakpoint pre_init"
return
}
diff --git a/gdb/testsuite/gdb.fortran/nested-funcs.exp b/gdb/testsuite/gdb.fortran/nested-funcs.exp
index ea3d666..237e09e 100755
--- a/gdb/testsuite/gdb.fortran/nested-funcs.exp
+++ b/gdb/testsuite/gdb.fortran/nested-funcs.exp
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
return -1
}
-if ![fortran_runto_main] then {
+if {![fortran_runto_main]} {
perror "couldn't run to main"
continue
}
diff --git a/gdb/testsuite/gdb.fortran/printing-types.exp b/gdb/testsuite/gdb.fortran/printing-types.exp
index 3a8e02f..0ba07f6 100644
--- a/gdb/testsuite/gdb.fortran/printing-types.exp
+++ b/gdb/testsuite/gdb.fortran/printing-types.exp
@@ -22,7 +22,7 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
return -1
}
-if {![fortran_runto_main]} then {
+if {![fortran_runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.fortran/ptr-indentation.exp b/gdb/testsuite/gdb.fortran/ptr-indentation.exp
index 9837834..daf5bd5 100644
--- a/gdb/testsuite/gdb.fortran/ptr-indentation.exp
+++ b/gdb/testsuite/gdb.fortran/ptr-indentation.exp
@@ -22,7 +22,7 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
return -1
}
-if {![fortran_runto_main]} then {
+if {![fortran_runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.fortran/ptype-on-functions.exp b/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
index cc24548..6751b50 100644
--- a/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
+++ b/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
@@ -24,7 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
return -1
}
-if ![fortran_runto_main] then {
+if {![fortran_runto_main]} {
perror "couldn't run to main"
return
}
diff --git a/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp b/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp
index aa7f5d1..d458e1a 100644
--- a/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp
+++ b/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp
@@ -25,7 +25,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}]} {
return -1
}
-if {![runto [gdb_get_line_number "post_truth_table_init"]]} then {
+if {![runto [gdb_get_line_number "post_truth_table_init"]]} {
perror "couldn't run to breakpoint post_truth_table_init"
return
}
diff --git a/gdb/testsuite/gdb.fortran/subarray.exp b/gdb/testsuite/gdb.fortran/subarray.exp
index b282c5d..88d47f9 100644
--- a/gdb/testsuite/gdb.fortran/subarray.exp
+++ b/gdb/testsuite/gdb.fortran/subarray.exp
@@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
# Avoid shared lib symbols.
gdb_test_no_output "set auto-solib-add off"
-if ![fortran_runto_main] then {
+if {![fortran_runto_main]} {
perror "couldn't run to main"
return
}
diff --git a/gdb/testsuite/gdb.fortran/type-kinds.exp b/gdb/testsuite/gdb.fortran/type-kinds.exp
index 47b788b..e481ad3 100644
--- a/gdb/testsuite/gdb.fortran/type-kinds.exp
+++ b/gdb/testsuite/gdb.fortran/type-kinds.exp
@@ -101,7 +101,7 @@ proc test_old_star_type_sizes {} {
clean_restart
-if [set_lang_fortran] then {
+if {[set_lang_fortran]} {
test_basic_parsing_of_type_kinds
test_parsing_invalid_type_kinds
test_old_star_type_sizes
diff --git a/gdb/testsuite/gdb.fortran/types.exp b/gdb/testsuite/gdb.fortran/types.exp
index 594276f..eac6676 100644
--- a/gdb/testsuite/gdb.fortran/types.exp
+++ b/gdb/testsuite/gdb.fortran/types.exp
@@ -106,7 +106,7 @@ gdb_reinitialize_dir $srcdir/$subdir
gdb_test "set print sevenbit-strings" ""
-if [set_lang_fortran] then {
+if {[set_lang_fortran]} {
test_primitive_types_known
test_default_types
test_integer_literal_types_accepted
diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran/vla-value.exp
index 5b3a680..36ba0b4 100644
--- a/gdb/testsuite/gdb.fortran/vla-value.exp
+++ b/gdb/testsuite/gdb.fortran/vla-value.exp
@@ -130,7 +130,7 @@ gdb_test "print vla1(9, 9, 9)" "no such vector element \\\(vector not allocated\
# Try to assign VLA to user variable
clean_restart ${testfile}
-if ![fortran_runto_main] then {
+if {![fortran_runto_main]} {
perror "couldn't run to main"
return
}