This is the mail archive of the gdb-patches@sources.redhat.com 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] floating point precision in testsuites.



Per Andrew's suggestion, a revision of my previous patch.

2002-05-23  Michael Snyder  <msnyder@redhat.com>

	* gdb.base/all-bin.exp: Revise previous patch by just reducing 
	the precision of the floating point test results.
	* gdb.base/call-rt-st.exp: Ditto.

Index: all-bin.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/all-bin.exp,v
retrieving revision 1.3
diff -p -r1.3 all-bin.exp
*** all-bin.exp	23 May 2002 15:42:44 -0000	1.3
--- all-bin.exp	23 May 2002 21:19:03 -0000
*************** gdb_expect {
*** 187,202 ****
  
  send_gdb "print v_int+v_double\n"
  gdb_expect {
!     -re ".*206.56565.*$gdb_prompt $" {
          pass "print value of v_int+v_double"
-     }
-     -re ".*206.565643.*$gdb_prompt $" {
- 	# D10V has 4-byte doubles
- 	if [istarget "d10v*-*"] then {
- 	    pass "print value of v_int+v_double (D10V)"
- 	} else {
- 	    fail "print value of v_int+v_double (precision)"
- 	}
      }
      -re ".*$gdb_prompt $" { fail "print value of v_int+v_double" }
      timeout     { fail "(timeout) print value of v_int+v_double" }
--- 187,194 ----
  
  send_gdb "print v_int+v_double\n"
  gdb_expect {
!     -re ".*206.565.*$gdb_prompt $" {
          pass "print value of v_int+v_double"
      }
      -re ".*$gdb_prompt $" { fail "print value of v_int+v_double" }
      timeout     { fail "(timeout) print value of v_int+v_double" }
Index: call-rt-st.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/call-rt-st.exp,v
retrieving revision 1.9
diff -p -r1.9 call-rt-st.exp
*** call-rt-st.exp	23 May 2002 15:42:44 -0000	1.9
--- call-rt-st.exp	23 May 2002 21:19:03 -0000
*************** if ![gdb_skip_stdio_test "print print_on
*** 175,188 ****
  
  if {![gdb_skip_float_test "print print_one_double(*d1)"] && \
          ![gdb_skip_stdio_test "print print_one_double(*d1)"] } {
!     if [istarget "d10v*-*"] then {
! 	# D10V has 4-byte doubles
! 	print_struct_call "print_one_double(*d1)" \
! 		".*Contents of one_double_t:\[ \r\n\]+1\\.111110\[ \r\n\]+.\[0-9\]+ = \\{double1 = 1\\.11110997\\}"
!     } else {
! 	print_struct_call "print_one_double(*d1)" \
! 		".*Contents of one_double_t:\[ \r\n\]+1\\.111110\[ \r\n\]+.\[0-9\]+ = \\{double1 = 1\\.11111\\}"
!     }
  }
  
  if {![gdb_skip_float_test "print print_two_floats(*f3)"] && \
--- 175,182 ----
  
  if {![gdb_skip_float_test "print print_one_double(*d1)"] && \
          ![gdb_skip_stdio_test "print print_one_double(*d1)"] } {
!     print_struct_call "print_one_double(*d1)" \
! 	    ".*Contents of one_double_t:\[ \r\n\]+1\\.111110\[ \r\n\]+.\[0-9\]+ = \\{double1 = 1\\.111\[0-9\]*\}"
  }
  
  if {![gdb_skip_float_test "print print_two_floats(*f3)"] && \


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