public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PUSHED] Skip testing structures with floating points
Date: Thu, 13 Oct 2016 14:38:00 -0000	[thread overview]
Message-ID: <1476369508-11074-1-git-send-email-yao.qi@linaro.org> (raw)

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.
---
 gdb/testsuite/ChangeLog            |   5 ++
 gdb/testsuite/gdb.base/structs.exp | 119 ++++++++++++++++++++-----------------
 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
-- 
1.9.1

                 reply	other threads:[~2016-10-13 14:38 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=1476369508-11074-1-git-send-email-yao.qi@linaro.org \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@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).