Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@vmware.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [RFA] Skip tests if floating point not supported.
Date: Mon, 29 Nov 2010 23:09:00 -0000	[thread overview]
Message-ID: <4CF432A3.5030306@vmware.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 78 bytes --]

Here are some tests that fail if the target does not support floating point.


[-- Attachment #2: float.txt --]
[-- Type: text/plain, Size: 4624 bytes --]

2010-11-29  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>

	* gdb.base/callfuncs.exp: Test for skip_float_tests.
	* gdb.base/call-sc.exp: Ditto.
	* gdb.base/finish.exp: Ditto.
	* gdb.base/return.exp: Ditto.
	* gdb.base/return2.exp: Ditto.

Index: gdb.base/callfuncs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/callfuncs.exp,v
retrieving revision 1.38
diff -u -p -r1.38 callfuncs.exp
--- gdb.base/callfuncs.exp	10 Jun 2010 19:48:19 -0000	1.38
+++ gdb.base/callfuncs.exp	29 Nov 2010 22:58:30 -0000
@@ -229,10 +229,14 @@ proc do_function_calls {} {
 	"call inferior func with struct - returns int"
     gdb_test "p t_structs_l(struct_val1)" "= 51" \
 	"call inferior func with struct - returns long"
-    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.*" \
-    	"call inferior func with struct - returns double"
+
+    if ![target_info exists gdb,skip_float_tests] {
+        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.*" \
+	    "call inferior func with struct - returns double"
+    }
+
     gdb_test "p t_structs_a(struct_val1)" "= (.unsigned char .. )?\"foo\"" \
     	"call inferior func with struct - returns char *"
 }
Index: gdb.base/call-sc.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/call-sc.exp,v
retrieving revision 1.15
diff -u -p -r1.15 call-sc.exp
--- gdb.base/call-sc.exp	1 Jun 2010 21:29:21 -0000	1.15
+++ gdb.base/call-sc.exp	29 Nov 2010 22:58:30 -0000
@@ -440,20 +440,22 @@ start_scalars_test tll
 test_scalar_calls
 test_scalar_returns
 
-# Approx size: 4, 8, ...
-start_scalars_test tf
-test_scalar_calls
-test_scalar_returns
+if ![target_info exists gdb,skip_float_tests] {
+    # Approx size: 4, 8, ...
+    start_scalars_test tf
+    test_scalar_calls
+    test_scalar_returns
 
-# Approx size: 8, 16, ...
-start_scalars_test td
-test_scalar_calls
-test_scalar_returns
+    # Approx size: 8, 16, ...
+    start_scalars_test td
+    test_scalar_calls
+    test_scalar_returns
 
-# Approx size: 16, 32, ...
-start_scalars_test tld
-test_scalar_calls
-test_scalar_returns
+    # Approx size: 16, 32, ...
+    start_scalars_test tld
+    test_scalar_calls
+    test_scalar_returns
+}
 
 # Approx size: 4, 8, ...
 start_scalars_test te
Index: gdb.base/finish.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/finish.exp,v
retrieving revision 1.18
diff -u -p -r1.18 finish.exp
--- gdb.base/finish.exp	24 May 2010 22:06:59 -0000	1.18
+++ gdb.base/finish.exp	29 Nov 2010 22:58:30 -0000
@@ -103,8 +103,10 @@ proc finish_tests { } {
     finish_1 "int"
     finish_1 "long"
     finish_1 "long_long"
-    finish_1 "float"
-    finish_1 "double"
+    if ![target_info exists gdb,skip_float_tests] {
+	finish_1 "float"
+	finish_1 "double"
+    }
     finish_abbreviation "fin"
 }
 
Index: gdb.base/return.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/return.exp,v
retrieving revision 1.14
diff -u -p -r1.14 return.exp
--- gdb.base/return.exp	10 Jun 2010 19:48:19 -0000	1.14
+++ gdb.base/return.exp	29 Nov 2010 22:58:30 -0000
@@ -89,7 +89,10 @@ proc return_tests { } {
     # is not xfailed.
 
     setup_xfail "sparc-*-solaris2.3*" "sparc-*-solaris2.4*" "m6811-*-*"
-    gdb_test "p tmp3" ".* = 5.*" "correct value returned double test (known problem with sparc solaris)"
+    if ![target_info exists gdb,skip_float_tests] {
+	gdb_test "p tmp3" ".* = 5.*" \
+	    "correct value returned double test (known problem with sparc solaris)"
+    }
 }
 
 set prev_timeout $timeout
Index: gdb.base/return2.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/return2.exp,v
retrieving revision 1.14
diff -u -p -r1.14 return2.exp
--- gdb.base/return2.exp	27 May 2010 23:44:51 -0000	1.14
+++ gdb.base/return2.exp	29 Nov 2010 22:58:30 -0000
@@ -98,9 +98,11 @@ proc return2_tests { } {
     if { ! [istarget "m6811-*-*"] && ![istarget "h8300*-*"] } then {
         return_1 "long_long"
     }
-    return_1 "float"
-    if { ! [istarget "m6811-*-*"] } then {
-        return_1 "double"
+    if ![target_info exists gdb,skip_float_tests] {
+	return_1 "float"
+	if { ! [istarget "m6811-*-*"] } then {
+	    return_1 "double"
+	}
     }
 }
 

             reply	other threads:[~2010-11-29 23:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-29 23:09 Michael Snyder [this message]
2010-12-02 16:05 ` Tom Tromey
2010-12-02 21:34   ` Michael Snyder

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=4CF432A3.5030306@vmware.com \
    --to=msnyder@vmware.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