aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-10-13 11:10:25 +0100
committerYao Qi <yao.qi@linaro.org>2016-10-13 15:36:57 +0100
commit62df7e210ebf096dc09ad14d9316fcda0f6217f7 (patch)
tree38b8d753c5f5ccb35ad984ddb4e6f95ed77b0103
parentaf533a5f8b149bfa1394ab04c3947e97dd507a33 (diff)
downloadgdb-62df7e210ebf096dc09ad14d9316fcda0f6217f7.zip
gdb-62df7e210ebf096dc09ad14d9316fcda0f6217f7.tar.gz
gdb-62df7e210ebf096dc09ad14d9316fcda0f6217f7.tar.bz2
Skip testing structures with floating points
This patch skips some tests related to floating point in structs.exp if gdb_skip_float_test return false. gdb/testsuite: 2016-10-13 Yao Qi <yao.qi@linaro.org> * gdb.base/structs.exp: Invoke gdb_skip_float_test, and do floating point tests if $skip_float_test is false.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/structs.exp119
2 files changed, 68 insertions, 56 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 21ee095..18dd701 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-13 Yao Qi <yao.qi@linaro.org>
+
+ * gdb.base/structs.exp: Invoke gdb_skip_float_test, and do
+ floating point tests if $skip_float_test is false.
+
2016-10-12 Luis Machado <lgustavo@codesourcery.com>
* gdb.python/py-value.c (main): Check if argv is NULL before using it.
diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp
index c525340..4fcef52 100644
--- a/gdb/testsuite/gdb.base/structs.exp
+++ b/gdb/testsuite/gdb.base/structs.exp
@@ -36,6 +36,8 @@ if [get_compiler_info] {
return -1
}
+set skip_float_test [gdb_skip_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
# the last TYPES field). Run the compmiled program up to "main".
@@ -563,25 +565,27 @@ test_struct_calls 1
test_struct_calls 2
test_struct_returns 1
-# Approx size: 4, 8, ...
-start_structs_test { tf }
-test_struct_calls 1
-test_struct_calls 2
-test_struct_calls 3
-test_struct_returns 1
-test_struct_returns 2
-
-# Approx size: 8, 16, ...
-start_structs_test { td }
-test_struct_calls 1
-test_struct_calls 2
-test_struct_returns 1
-
-# Approx size: 16, 32, ...
-start_structs_test { tld }
-test_struct_calls 1
-test_struct_calls 2
-test_struct_returns 1
+if { !$skip_float_test } {
+ # Approx size: 4, 8, ...
+ start_structs_test { tf }
+ test_struct_calls 1
+ test_struct_calls 2
+ test_struct_calls 3
+ test_struct_returns 1
+ test_struct_returns 2
+
+ # Approx size: 8, 16, ...
+ start_structs_test { td }
+ test_struct_calls 1
+ test_struct_calls 2
+ test_struct_returns 1
+
+ # Approx size: 16, 32, ...
+ start_structs_test { tld }
+ test_struct_calls 1
+ test_struct_calls 2
+ test_struct_returns 1
+}
# Approx size: 2+1=3, 4, ...
start_structs_test { ts tc }
@@ -616,22 +620,24 @@ test_struct_returns 2
start_structs_test { tll tc }
test_struct_calls 2
-# Approx size: 4+1=5, 6, ...
-start_structs_test { tf tc }
-test_struct_calls 2
-test_struct_calls 3
-test_struct_calls 4
-test_struct_calls 5
-test_struct_calls 6
-test_struct_returns 2
-
-# Approx size: 8+1=9, 10, ...
-start_structs_test { td tc }
-test_struct_calls 2
-
-# Approx size: 16+1=17, 18, ...
-start_structs_test { tld tc }
-test_struct_calls 2
+if { !$skip_float_test } {
+ # Approx size: 4+1=5, 6, ...
+ start_structs_test { tf tc }
+ test_struct_calls 2
+ test_struct_calls 3
+ test_struct_calls 4
+ test_struct_calls 5
+ test_struct_calls 6
+ test_struct_returns 2
+
+ # Approx size: 8+1=9, 10, ...
+ start_structs_test { td tc }
+ test_struct_calls 2
+
+ # Approx size: 16+1=17, 18, ...
+ start_structs_test { tld tc }
+ test_struct_calls 2
+}
# Approx size: (1+1)+2=4, 6, ...
start_structs_test { tc ts }
@@ -660,30 +666,31 @@ test_struct_returns 2
start_structs_test { tc tll }
test_struct_calls 2
-# Approx size: (1+3)+4=8, 12, ...
-start_structs_test { tc tf }
-test_struct_calls 2
-test_struct_calls 3
-test_struct_calls 4
+if { !$skip_float_test } {
+ # Approx size: (1+3)+4=8, 12, ...
+ start_structs_test { tc tf }
+ test_struct_calls 2
+ test_struct_calls 3
+ test_struct_calls 4
-# Approx size: (1+7)+8=16, 24, ...
-start_structs_test { tc td }
-test_struct_calls 2
-
-# Approx size: (1+15)+16=32, 48, ...
-start_structs_test { tc tld }
-test_struct_calls 2
+ # Approx size: (1+7)+8=16, 24, ...
+ start_structs_test { tc td }
+ test_struct_calls 2
-# Some float combinations
+ # Approx size: (1+15)+16=32, 48, ...
+ start_structs_test { tc tld }
+ test_struct_calls 2
-# Approx size: 8+4=12, 16, ...
-start_structs_test { td tf }
-test_struct_calls 2
-test_struct_returns 2
+ # Some float combinations
-# Approx size: (4+4)+8=16, 32, ...
-start_structs_test { tf td }
-test_struct_calls 2
-test_struct_returns 2
+ # Approx size: 8+4=12, 16, ...
+ start_structs_test { td tf }
+ test_struct_calls 2
+ test_struct_returns 2
+ # Approx size: (4+4)+8=16, 32, ...
+ start_structs_test { tf td }
+ test_struct_calls 2
+ test_struct_returns 2
+}
return 0