From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30147 invoked by alias); 2 Sep 2010 14:21:04 -0000 Received: (qmail 30119 invoked by uid 22791); 2 Sep 2010 14:21:01 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Sep 2010 14:20:53 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o82EKpfJ018804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 2 Sep 2010 10:20:51 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o82EKn3T007669 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 2 Sep 2010 10:20:50 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o82EKmP1005291; Thu, 2 Sep 2010 16:20:48 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o82EKmuL005287; Thu, 2 Sep 2010 16:20:48 +0200 Date: Thu, 02 Sep 2010 15:11:00 -0000 From: Jan Kratochvil To: Doug Evans Cc: gdb-patches@sourceware.org Subject: Re: [patch] Fix new FAIL `reject p 0x1.1' [fixup] Message-ID: <20100902142048.GA31155@host1.dyn.jankratochvil.net> References: <20100820073430.GA28054@host1.dyn.jankratochvil.net> <20100820073703.GA19257@host1.dyn.jankratochvil.net> <20100823185451.GA3512@host1.dyn.jankratochvil.net> <20100831193749.GA18505@host1.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00089.txt.bz2 On Wed, 01 Sep 2010 00:51:25 +0200, Doug Evans wrote: > This is ok with me, but I think you also want to similarly patch > gdb.{objc,pascal}/print.exp, right? Yes. Tested on fedora14snapshot.x86_64 (PASS) and epel-4.x86_64 (XFAIL). I will check it in later if not replied. Thanks, Jan gdb/testsuite/ 2010-09-02 Jan Kratochvil * gdb.base/printcmds.exp (test_float_accepted): Import gdb_prompt. Move here, negate and extend by XFAIL the "p 0x1.1" test from ... (test_float_rejected): ... here. * gdb.java/jv-print.exp (test_float_accepted): Import gdb_prompt. Move here, negate and extend by XFAIL the "p 0x1.1" test from ... (test_float_rejected): ... here. * gdb.objc/print.exp (test_float_accepted): Import gdb_prompt. Move here, negate and extend by XFAIL the "p 0x1.1" test from ... (test_float_rejected): ... here. * gdb.pascal/print.exp (test_float_accepted): Import gdb_prompt. Move here, negate and extend by XFAIL the "p 0x1.1" test from ... (test_float_rejected): ... here. --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -119,6 +119,8 @@ proc test_integer_literals_rejected {} { } proc test_float_accepted {} { + global gdb_prompt + # This test is useful to catch successful parsing of the first fp value. gdb_test "p 123.4+56.7" " = 180.(099\[0-9]*|100\[0-9\]*)" "check for floating addition" @@ -129,6 +131,18 @@ proc test_float_accepted {} { gdb_test "p 1.5f" " = 1.5" gdb_test "p 1.l" " = 1" gdb_test "p 1.5l" " = 1.5" + + # Test hexadecimal floating point. + set test "p 0x1.1" + gdb_test_multiple $test $test { + -re " = 1\\.0625\r\n$gdb_prompt $" { + pass $test + } + -re "Invalid number \"0x1\\.1\"\\.\r\n$gdb_prompt $" { + # Older glibc does not support hex float, newer does. + xfail $test + } + } } proc test_float_rejected {} { @@ -140,7 +154,6 @@ proc test_float_rejected {} { test_print_reject "p 123foobar.bazfoo3" test_print_reject "p 123EEEEEEEEEEEEEEEEE33333k333" - test_print_reject "p 0x1.1" # Test bad suffixes. test_print_reject "p 1.1x" --- a/gdb/testsuite/gdb.java/jv-print.exp +++ b/gdb/testsuite/gdb.java/jv-print.exp @@ -98,6 +98,8 @@ proc test_integer_literals_rejected {} { } proc test_float_accepted {} { + global gdb_prompt + # Test parsing of fp value with legit text following. gdb_test "p 1234.5+1" " = 1235.5" "check fp + text" @@ -108,12 +110,21 @@ proc test_float_accepted {} { gdb_test "p 1.5f" " = 1.5" gdb_test "p 1.d" " = 1" gdb_test "p 1.5d" " = 1.5" + + # Test hexadecimal floating point. + set test "p 0x1.1" + gdb_test_multiple $test $test { + -re " = 1\\.0625\r\n$gdb_prompt $" { + pass $test + } + -re "Invalid number \"0x1\\.1\"\r\n$gdb_prompt $" { + # Older glibc does not support hex float, newer does. + xfail $test + } + } } proc test_float_rejected {} { - # Test invalid fp values. - test_print_reject "p 0x1.1" - # Test bad suffixes. test_print_reject "p 1.1x" test_print_reject "p 1.1ff" --- a/gdb/testsuite/gdb.objc/print.exp +++ b/gdb/testsuite/gdb.objc/print.exp @@ -28,6 +28,8 @@ if $tracelevel { load_lib "objc.exp" proc test_float_accepted {} { + global gdb_prompt + # Test parsing of fp value with legit text following. gdb_test "p 1234.5+1" " = 1235.5" "check fp + text" @@ -42,12 +44,21 @@ proc test_float_accepted {} { gdb_test "p 1.l" " = 1" setup_kfail gdb/11925 "*-*-*" gdb_test "p 1.5l" " = 1.5" + + # Test hexadecimal floating point. + set test "p 0x1.1" + gdb_test_multiple $test $test { + -re " = 1\\.0625\r\n$gdb_prompt $" { + pass $test + } + -re "Invalid number \"0x1\\.1\"\\.\r\n$gdb_prompt $" { + # Older glibc does not support hex float, newer does. + xfail $test + } + } } proc test_float_rejected {} { - # Test invalid fp values. - test_print_reject "p 0x1.1" - # Test bad suffixes. test_print_reject "p 1.1x" test_print_reject "p 1.1ff" --- a/gdb/testsuite/gdb.pascal/print.exp +++ b/gdb/testsuite/gdb.pascal/print.exp @@ -28,6 +28,8 @@ if $tracelevel { load_lib "pascal.exp" proc test_float_accepted {} { + global gdb_prompt + # Test parsing of fp value with legit text following. gdb_test "p 1234.5+1" " = 1235.5" "check fp + text" @@ -38,12 +40,21 @@ proc test_float_accepted {} { gdb_test "p 1.5f" " = 1.5" gdb_test "p 1.l" " = 1" gdb_test "p 1.5l" " = 1.5" + + # Test hexadecimal floating point. + set test "p 0x1.1" + gdb_test_multiple $test $test { + -re " = 1\\.0625\r\n$gdb_prompt $" { + pass $test + } + -re "Invalid number \"0x1\\.1\"\\.\r\n$gdb_prompt $" { + # Older glibc does not support hex float, newer does. + xfail $test + } + } } proc test_float_rejected {} { - # Test invalid fp values. - test_print_reject "p 0x1.1" - # Test bad suffixes. test_print_reject "p 1.1x" test_print_reject "p 1.1ff"