Skip floating point tests in return-nodebug.exp if gdb_skip_stdio_test is true

Message ID 1472806536-11600-1-git-send-email-yao.qi@linaro.org
State New, archived
Headers

Commit Message

Yao Qi Sept. 2, 2016, 8:55 a.m. UTC
  return-nodebug.exp does the test for various types, but we shouldn't
test with floating point type if gdb_skip_float_test returns true.

gdb/testsuite:

2016-09-02  Yao Qi  <yao.qi@linaro.org>

	* gdb.base/return-nodebug.exp: Skip the test if	skip_float_test
	is true and $type is "float" or "double".
---
 gdb/testsuite/gdb.base/return-nodebug.exp | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Pedro Alves Sept. 2, 2016, 10:26 a.m. UTC | #1
On 09/02/2016 09:55 AM, Yao Qi wrote:
> return-nodebug.exp does the test for various types, but we shouldn't
> test with floating point type if gdb_skip_float_test returns true.

LGTM.

Thanks,
Pedro Alves
  
Yao Qi Sept. 2, 2016, 2:34 p.m. UTC | #2
On Fri, Sep 2, 2016 at 11:26 AM, Pedro Alves <palves@redhat.com> wrote:
>
> LGTM.
>

Thanks, patch is pushed in.
  

Patch

diff --git a/gdb/testsuite/gdb.base/return-nodebug.exp b/gdb/testsuite/gdb.base/return-nodebug.exp
index e44494f..0d58ba5 100644
--- a/gdb/testsuite/gdb.base/return-nodebug.exp
+++ b/gdb/testsuite/gdb.base/return-nodebug.exp
@@ -13,6 +13,8 @@ 
 # 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]
+
 proc do_test {type} {
     set typenospace [string map {{ } -} $type]
 
@@ -42,6 +44,9 @@  proc do_test {type} {
 }
 
 foreach type {{signed char} {short} {int} {long} {long long} {float} {double}} {
+    if { $skip_float_test && ($type == "float" || $type == "double") } {
+	continue
+    }
     set typeesc [string map {{ } {\ }} $type]
     set typenospace [string map {{ } -} $type]