This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, 7.2] FAIL: gdb.base/printcmds.exp: reject p 0x1.1


I find this failure in GDB 7.2 tree on x86 and ARM.

  FAIL: gdb.base/printcmds.exp: reject p 0x1.1

It has been fixed by Jan in mainline,
http://sourceware.org/ml/gdb-patches/2010-09/msg00086.html

I backport part of this patch, instead of the whole, because the rest of
this patch depends on other files which are absent in GDB 7.2 tree, such
as gdb.pascal/print.exp and gdb.objc/print.exp.

The changelog entry is not exactly accurate, because test_float_accepted
and test_float_rejected are absent in 7.2 tree also.  However, I think
it is still a backport, so I leave original changelog entry there.

OK for GDB 7.2?

-- 
Yao (éå)
gdb/testsuite/

2010-12-03  Yao Qi  <yao@codesourcery.com>

	Backport from mainline:

	2010-09-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
	* 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.

Index: gdb/testsuite/gdb.base/printcmds.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/printcmds.exp,v
retrieving revision 1.34.2.2
diff -b -u -r1.34.2.2 printcmds.exp
--- gdb/testsuite/gdb.base/printcmds.exp	19 Aug 2010 15:50:02 -0000	1.34.2.2
+++ gdb/testsuite/gdb.base/printcmds.exp	3 Dec 2010 07:45:32 -0000
@@ -85,6 +85,18 @@
     gdb_test "p 0b1111" " = 15"
     gdb_test "p 0B1111" " = 15"
     gdb_test "p -0b1111" " = -15"
+
+    # 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_character_literals_accepted {} {
@@ -128,7 +140,6 @@
     test_print_reject "p 123DEADBEEF"
     test_print_reject "p 123foobar.bazfoo3"
     test_print_reject "p 123EEEEEEEEEEEEEEEEE33333k333"
-    test_print_reject "p 0x1.1"
     gdb_test "p 123.4+56.7" "180.(099\[0-9]*|100\[0-9\]*)" "check for floating addition"
 
     # Test various octal values.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]