aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/gdb.arch/arm-neon.exp5
-rw-r--r--gdb/testsuite/gdb.arch/riscv-info-fcsr.exp5
-rw-r--r--gdb/testsuite/gdb.base/call-ar-st.exp20
-rw-r--r--gdb/testsuite/gdb.base/call-rt-st.exp6
-rw-r--r--gdb/testsuite/gdb.base/call-sc.exp4
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.exp8
-rw-r--r--gdb/testsuite/gdb.base/finish.exp6
-rw-r--r--gdb/testsuite/gdb.base/funcargs.exp6
-rw-r--r--gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl2
-rw-r--r--gdb/testsuite/gdb.base/return-nodebug.exp4
-rw-r--r--gdb/testsuite/gdb.base/return.exp6
-rw-r--r--gdb/testsuite/gdb.base/return2.exp6
-rw-r--r--gdb/testsuite/gdb.base/structs.exp8
-rw-r--r--gdb/testsuite/gdb.base/varargs.exp4
-rw-r--r--gdb/testsuite/lib/gdb.exp18
15 files changed, 51 insertions, 57 deletions
diff --git a/gdb/testsuite/gdb.arch/arm-neon.exp b/gdb/testsuite/gdb.arch/arm-neon.exp
index 409623e..54720e8 100644
--- a/gdb/testsuite/gdb.arch/arm-neon.exp
+++ b/gdb/testsuite/gdb.arch/arm-neon.exp
@@ -20,10 +20,7 @@ if {![istarget "aarch64*-*-*"] && ![istarget "arm*-*-*"]} {
return
}
-if { [gdb_skip_float_test] } {
- verbose "Skipping ${gdb_test_file_name}."
- return
-}
+require allow_float_test
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug quiet}] } {
diff --git a/gdb/testsuite/gdb.arch/riscv-info-fcsr.exp b/gdb/testsuite/gdb.arch/riscv-info-fcsr.exp
index 94b7279..d8e8899 100644
--- a/gdb/testsuite/gdb.arch/riscv-info-fcsr.exp
+++ b/gdb/testsuite/gdb.arch/riscv-info-fcsr.exp
@@ -21,10 +21,7 @@ if {![istarget "riscv*-*-*"]} {
return
}
-if { [gdb_skip_float_test] } {
- untested "no floating point support"
- return
-}
+require allow_float_test
standard_testfile
diff --git a/gdb/testsuite/gdb.base/call-ar-st.exp b/gdb/testsuite/gdb.base/call-ar-st.exp
index c86a5c3..37b817a 100644
--- a/gdb/testsuite/gdb.base/call-ar-st.exp
+++ b/gdb/testsuite/gdb.base/call-ar-st.exp
@@ -29,7 +29,7 @@ if [target_info exists gdb,cannot_call_functions] {
# Create and source the file that provides information about the compiler
# used to compile the test case.
-set skip_float_test [gdb_skip_float_test]
+set allow_float_test [allow_float_test]
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
@@ -61,7 +61,7 @@ gdb_test continue \
#call print_double_array(double_array)
-if {!$skip_float_test && \
+if {$allow_float_test && \
![gdb_skip_stdio_test "print print_double_array(double_array)"] } {
gdb_test_stdio "print print_double_array(double_array)" \
@@ -122,7 +122,7 @@ gdb_test "tbreak $stop_line" \
"Temporary breakpoint.* file .*$srcfile, line $stop_line.*" \
"tbreakpoint at tbreak3"
-if {!$skip_float_test && \
+if {$allow_float_test && \
![gdb_skip_stdio_test "continuing to tbreak3"] } {
gdb_test_stdio "continue" \
@@ -175,7 +175,7 @@ if ![gdb_skip_stdio_test "next over print_int_array in print_all_arrays"] {
}
#call print_double_array(array_d)
-if {!$skip_float_test && \
+if {$allow_float_test && \
![gdb_skip_stdio_test "print print_double_array(array_d)"] } {
gdb_test_stdio "print print_double_array(array_d)" \
@@ -193,7 +193,7 @@ gdb_test "tbreak $stop_line" \
"Temporary breakpoint.* file .*$srcfile, line $stop_line.*" \
"tbreakpoint at tbreak4"
-if {!$skip_float_test && \
+if {$allow_float_test && \
![gdb_skip_stdio_test "continuing to tbreak4"] } {
gdb_test_stdio "continue" \
@@ -312,7 +312,7 @@ if ![gdb_skip_stdio_test "continuing to tbreak6"] {
# *flags, *flags_combo, *three_char, *five_char,
# *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)
-if {!$skip_float_test && \
+if {$allow_float_test && \
![gdb_skip_stdio_test "print print_small_structs(...)"] } {
gdb_test_stdio "print print_small_structs(*struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)" \
[multi_line \
@@ -375,7 +375,7 @@ gdb_test "print compute_with_small_structs(20)" \
#call print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098,
# 3.14, -5678.12345, -0.11111111, 216.97065)
-if {!$skip_float_test && \
+if {$allow_float_test && \
![gdb_skip_stdio_test "print print_ten_doubles(...)"]} {
gdb_test_stdio "print print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065)" \
[multi_line \
@@ -403,7 +403,7 @@ gdb_test "tbreak print_long_arg_list" \
# The short match case below handles cases where a buffer
# overflows or something, and expect can't deal with the full
# line. Perhaps a more elegant solution exists... -sts 1999-08-17
-if {!$skip_float_test} {
+if {$allow_float_test} {
gdb_test_multiple "continue" "step into print_long_arg_list" {
-re ".*print_long_arg_list \\(a=22.25, b=33.375, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}, five_char=\{ch1 = 108 \'l\', ch2 = 109 \'m\', ch3 = 110 \'n\', ch4 = 111 \'o\', ch5 = 112 \'p\'\}, int_char_combo=\{int1 = 123, ch1 = 122 \'z\'\}, d1=\{double1 = 10.5\}, d2=\{double1 = -3.375\}, d3=\{double1 = 675.09375\}, f1=\{float1 = 45.2340012, float2 = 43.5999985\}, f2=\{float1 = 78.0100021, float2 = 122.099998\}, f3=\{float1 = -1232.34497, float2 = -199.210007\}\\) at .*${srcfile}:$stop_line\[\r\n\]+$stop_line\[ \t\]+printf\\(\"double :.*\", a\\);.*$gdb_prompt $" {
pass "step into print_long_arg_list"
@@ -425,7 +425,7 @@ set ws "\[\n\r\t \]+"
# flags_combo, three_char, five_char, int_char_combo,
# d1, d2, d3, f1, f2, f3)
-if {!$skip_float_test && \
+if {$allow_float_test && \
![gdb_skip_stdio_test "print_small_structs from print_long_arg_list"] } {
# On 32-bit SPARC, some of the args are passed by ref, others by
@@ -526,7 +526,7 @@ gdb_test continue "Continuing\\..*main \\(\\) at .*$srcfile:$stop_line\[\r\n\t \
#call print_long_arg_list(a, b, c, d, e, f, *struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)
-if {!$skip_float_test && \
+if {$allow_float_test && \
![gdb_skip_stdio_test "print print_long_arg_list"] } {
gdb_test_stdio "print print_long_arg_list(a, b, c, d, e, f, *struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)" \
diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp
index 14d5014..16ecb92 100644
--- a/gdb/testsuite/gdb.base/call-rt-st.exp
+++ b/gdb/testsuite/gdb.base/call-rt-st.exp
@@ -35,7 +35,7 @@ if [target_info exists gdb,cannot_call_functions] {
return
}
-set skip_float_test [gdb_skip_float_test]
+set allow_float_test [allow_float_test]
# Start with a fresh gdb.
@@ -120,14 +120,14 @@ if ![gdb_skip_stdio_test "print print_one_large_struct(...)"] {
".\[0-9\]+ = \\{next_index = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\}, values = \\{4, 6, 8, 10, 12, 14, 16, 18, 20, 22\\}, head = 0\\}"
}
-if {!$skip_float_test && \
+if {$allow_float_test && \
![gdb_skip_stdio_test "print print_one_double(*d1)"] } {
print_struct_call "print_one_double(*d1)" \
".*Contents of one_double_t:\[ \r\n\]+1\\.111110\[ \r\n\]+" \
".\[0-9\]+ = \\{double1 = 1\\.111\[0-9\]*\\}"
}
-if {!$skip_float_test && \
+if {$allow_float_test && \
![gdb_skip_stdio_test "print print_two_floats(*f3)"] } {
print_struct_call "print_two_floats(*f3)" \
".*Contents of two_floats_t:\[ \r\n\]+-2\\.345000\[ \t]+1\\.000000\[ \r\n\]+" \
diff --git a/gdb/testsuite/gdb.base/call-sc.exp b/gdb/testsuite/gdb.base/call-sc.exp
index 3d4ac06..dc78308 100644
--- a/gdb/testsuite/gdb.base/call-sc.exp
+++ b/gdb/testsuite/gdb.base/call-sc.exp
@@ -29,7 +29,7 @@ if [target_info exists gdb,cannot_call_functions] {
standard_testfile .c
-set skip_float_test [gdb_skip_float_test]
+set allow_float_test [allow_float_test]
# Compile a variant of scalars.c using TYPE to specify the type of the
# parameter and return-type. Run the compiled program up to "main".
@@ -425,7 +425,7 @@ test tl
# Approx size: 8, 16, ...
test tll
-if {!$skip_float_test} {
+if {$allow_float_test} {
# Approx size: 4, 8, ...
test tf
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index df67c77..9bbf108 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -32,7 +32,7 @@ if [target_info exists gdb,cannot_call_functions] {
return
}
-set skip_float_test [gdb_skip_float_test]
+set allow_float_test [allow_float_test]
# FIXME: Before calling this proc, we should probably verify that
# we can call inferior functions and get a valid integral value
@@ -42,7 +42,7 @@ set skip_float_test [gdb_skip_float_test]
# (computed in the inferior) is 1 for true and 0 for false.
proc do_function_calls {prototypes} {
- global gdb_prompt skip_float_test
+ global gdb_prompt allow_float_test
# We need to up this because this can be really slow on some boards.
set timeout 60
@@ -75,7 +75,7 @@ proc do_function_calls {prototypes} {
gdb_test "p t_long_values(789,long_val2)" " = 1"
gdb_test "p t_long_values(long_val1,-321)" " = 1"
- if {!$skip_float_test} {
+ if {$allow_float_test} {
gdb_test "p t_float_values(0.0,0.0)" " = 0"
# These next four tests fail on the mn10300.
@@ -217,7 +217,7 @@ proc do_function_calls {prototypes} {
gdb_test "p t_structs_l(struct_val1)" "= 51" \
"call inferior func with struct - returns long"
- if {!$skip_float_test} {
+ if {$allow_float_test} {
gdb_test "p t_structs_f(struct_val1)" "= 2.12.*" \
"call inferior func with struct - returns float"
gdb_test "p t_structs_d(struct_val1)" "= 9.87.*" \
diff --git a/gdb/testsuite/gdb.base/finish.exp b/gdb/testsuite/gdb.base/finish.exp
index 9e6961b..fa0fb8b 100644
--- a/gdb/testsuite/gdb.base/finish.exp
+++ b/gdb/testsuite/gdb.base/finish.exp
@@ -15,7 +15,7 @@
# This file was written by Michael Snyder (msnyder@redhat.com)
-set skip_float_test [gdb_skip_float_test]
+set allow_float_test [allow_float_test]
# re-use the program from the "return2" test.
if { [prepare_for_testing "failed to prepare" finish return2.c] } {
@@ -100,7 +100,7 @@ proc finish_no_print {} {
}
proc finish_tests { } {
- global gdb_prompt skip_float_test
+ global gdb_prompt allow_float_test
if {![runto_main]} {
return -1
@@ -112,7 +112,7 @@ proc finish_tests { } {
finish_1 "int"
finish_1 "long"
finish_1 "long_long"
- if {!$skip_float_test} {
+ if {$allow_float_test} {
finish_1 "float"
finish_1 "double"
}
diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp
index 3edc082..860d411 100644
--- a/gdb/testsuite/gdb.base/funcargs.exp
+++ b/gdb/testsuite/gdb.base/funcargs.exp
@@ -25,7 +25,7 @@ if [support_complex_tests] {
lappend compile_flags "additional_flags=-DTEST_COMPLEX"
}
-set skip_float_test [gdb_skip_float_test]
+set allow_float_test [allow_float_test]
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $compile_flags]} {
return -1
@@ -1078,7 +1078,7 @@ gdb_test_no_output "set print frame-arguments all"
integral_args
unsigned_integral_args
-if {!$skip_float_test} {
+if {$allow_float_test} {
float_and_integral_args
}
@@ -1088,7 +1088,7 @@ if [support_complex_tests] {
complex_integral_args
- if {!$skip_float_test} {
+ if {$allow_float_test} {
complex_float_integral_args
}
}
diff --git a/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl b/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl
index 9541107..d9d2fa5 100644
--- a/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl
+++ b/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl
@@ -167,7 +167,7 @@ if [support_complex_tests] {
}
}
-if ![gdb_skip_float_test] {
+if {[allow_float_test]} {
foreach ta $float_types {
start_gdb_and_run_tests $lang $ta
}
diff --git a/gdb/testsuite/gdb.base/return-nodebug.exp b/gdb/testsuite/gdb.base/return-nodebug.exp
index 3c09e05..daee0b8 100644
--- a/gdb/testsuite/gdb.base/return-nodebug.exp
+++ b/gdb/testsuite/gdb.base/return-nodebug.exp
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-set skip_float_test [gdb_skip_float_test]
+set allow_float_test [allow_float_test]
proc do_test {type} {
set typenospace [string map {{ } -} $type]
@@ -49,7 +49,7 @@ proc do_test {type} {
}
foreach type {{signed char} {short} {int} {long} {long long} {float} {double}} {
- if { $skip_float_test && ($type == "float" || $type == "double") } {
+ if { !$allow_float_test && ($type == "float" || $type == "double") } {
continue
}
set typenospace_dash \
diff --git a/gdb/testsuite/gdb.base/return.exp b/gdb/testsuite/gdb.base/return.exp
index 11e1923..fb4096e 100644
--- a/gdb/testsuite/gdb.base/return.exp
+++ b/gdb/testsuite/gdb.base/return.exp
@@ -19,10 +19,10 @@ if { [prepare_for_testing "failed to prepare" "return"] } {
return -1
}
-set skip_float_test [gdb_skip_float_test]
+set allow_float_test [allow_float_test]
proc return_tests { } {
- global gdb_prompt skip_float_test
+ global gdb_prompt allow_float_test
if {![runto func1]} { return 0 }
@@ -90,7 +90,7 @@ proc return_tests { } {
# is not xfailed.
setup_xfail "sparc-*-solaris2.3*" "sparc-*-solaris2.4*" "m6811-*-*"
- if {!$skip_float_test} {
+ if {$allow_float_test} {
gdb_test "p tmp3" ".* = 5.*" \
"correct value returned double test (known problem with sparc solaris)"
}
diff --git a/gdb/testsuite/gdb.base/return2.exp b/gdb/testsuite/gdb.base/return2.exp
index a65f2ac..6361a6a 100644
--- a/gdb/testsuite/gdb.base/return2.exp
+++ b/gdb/testsuite/gdb.base/return2.exp
@@ -23,7 +23,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-set skip_float_test [gdb_skip_float_test]
+set allow_float_test [allow_float_test]
proc return_1 { type } {
global gdb_prompt
@@ -79,7 +79,7 @@ proc return_void { } {
}
proc return2_tests { } {
- global gdb_prompt skip_float_test
+ global gdb_prompt allow_float_test
if {![runto_main]} {
return -1
@@ -93,7 +93,7 @@ proc return2_tests { } {
if {![istarget "m6811-*-*"] && ![istarget "h8300*-*"]} {
return_1 "long_long"
}
- if {!$skip_float_test} {
+ if {$allow_float_test} {
return_1 "float"
if {![istarget "m6811-*-*"]} {
return_1 "double"
diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp
index ca6e80e..31b58cf 100644
--- a/gdb/testsuite/gdb.base/structs.exp
+++ b/gdb/testsuite/gdb.base/structs.exp
@@ -29,7 +29,7 @@ standard_testfile .c
# Regex matching any value of `char' type like: a = 65 'A'
set anychar_re {-?[0-9]{1,3} '(.|\\([0-7]{3}|[a-z]|\\|'))'}
-set skip_float_test [gdb_skip_float_test]
+set allow_float_test [allow_float_test]
# Compile a variant of structs.c using TYPES to specify the type of
# the first N struct elements (the remaining elements take the type of
@@ -539,7 +539,7 @@ test { tl } {1 3} {1 2}
# Approx size: 8, 16, ...
test { tll } {1 2} {1}
-if { !$skip_float_test } {
+if { $allow_float_test } {
# Approx size: 4, 8, ...
test { tf } {1 3} {1 2}
@@ -562,7 +562,7 @@ test { tl tc } {2 6} {2}
# Approx size: 8+1=9, 10, ...
test { tll tc } {2} {}
-if { !$skip_float_test } {
+if { $allow_float_test } {
# Approx size: 4+1=5, 6, ...
test { tf tc } {2 6} {2}
@@ -585,7 +585,7 @@ test { tc tl } {2 4} {2}
# Approx size: (1+7)+8=16, 24, ...
test { tc tll } {2} {}
-if { !$skip_float_test } {
+if { $allow_float_test } {
# Approx size: (1+3)+4=8, 12, ...
test { tc tf } {2 4} {}
diff --git a/gdb/testsuite/gdb.base/varargs.exp b/gdb/testsuite/gdb.base/varargs.exp
index cca7d6a..f205a71 100644
--- a/gdb/testsuite/gdb.base/varargs.exp
+++ b/gdb/testsuite/gdb.base/varargs.exp
@@ -31,7 +31,7 @@
standard_testfile .c
-set skip_float_test [gdb_skip_float_test]
+set allow_float_test [allow_float_test]
set additional_flags {debug}
if [support_complex_tests] {
@@ -81,7 +81,7 @@ gdb_test_stdio "print find_max2(3,1,2,3)" \
".\[0-9\]+ = 3" \
"print find_max2(3,1,2,3)"
-if {!$skip_float_test} {
+if {$allow_float_test} {
gdb_test_stdio "print find_max_double(5,1.0,17.0,2.0,3.0,4.0)" \
"find_max\\(.*\\) returns 17\\.000000\[ \r\n\]+" \
".\[0-9\]+ = 17" \
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 4346c85..2c53ebe 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3167,7 +3167,7 @@ proc with_read1_timeout_factor { factor body } {
gdb_caching_proc support_complex_tests {
- if { [gdb_skip_float_test] } {
+ if { ![allow_float_test] } {
# If floating point is not supported, _Complex is not
# supported.
return 0
@@ -6846,13 +6846,13 @@ proc exec_is_pie { executable } {
return 0
}
-# Return true if a test should be skipped due to lack of floating
+# Return false if a test should be skipped due to lack of floating
# point support or GDB can't fetch the contents from floating point
# registers.
-gdb_caching_proc gdb_skip_float_test {
+gdb_caching_proc allow_float_test {
if [target_info exists gdb,skip_float_tests] {
- return 1
+ return 0
}
# There is an ARM kernel ptrace bug that hardware VFP registers
@@ -6901,13 +6901,13 @@ gdb_caching_proc gdb_skip_float_test {
if {![string match "" $lines]} {
verbose "testfile compilation failed, returning 1" 2
- return 0
+ return 1
}
# No error message, compilation succeeded so now run it via gdb.
# Run the test up to 5 times to detect whether ptrace can
# correctly update VFP registers or not.
- set skip_vfp_test 0
+ set allow_vfp_test 1
for {set i 0} {$i < 5} {incr i} {
global gdb_prompt srcdir subdir
@@ -6931,7 +6931,7 @@ gdb_caching_proc gdb_skip_float_test {
-re "exited normally.*$gdb_prompt $" {
# However, the exit code is 0. That means something
# wrong in setting VFP registers.
- set skip_vfp_test 1
+ set allow_vfp_test 0
break
}
}
@@ -6940,9 +6940,9 @@ gdb_caching_proc gdb_skip_float_test {
gdb_exit
remote_file build delete $exe
- return $skip_vfp_test
+ return $allow_vfp_test
}
- return 0
+ return 1
}
# Print a message and return true if a test should be skipped