[Mono-dev] MonoTests.System.MathTest.TestIEEERemainder fails in Solaris 7 sparc

nataraj.ramaswamy at wipro.com nataraj.ramaswamy at wipro.com
Mon Jun 2 09:11:50 EDT 2008


Hi,
We have been able to successfully build Mono on Solaris 7 sparc (32
bit).
 
When we tried to execute the Class Library test suites, some of the test
cases were failing.
 
We need your expert inputs/suggestions on the following failure:
 
Under mcs/class/corlib, MonoTests.System.MathTest.TestIEEERemainder
fails with the error message:
Negative Dividend expected:<-9223372036854775808>  but was:<128>
  at MonoTests.System.MathTest.TestIEEERemainder () [0x000bf] in
/mono_sol7/mono-1.9/mcs/class/corlib/Test/System/MathTest.cs:414 
  at (wrapper managed-to-native)
System.Reflection.MonoMethod:InternalInvoke (object,object[])
  at System.Reflection.MonoMethod.Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture)
[0x0003f] in
/mono_sol7/mono-1.9/mcs/class/corlib/System.Reflection/MonoMethod.cs:149

 
On analysing further, it is observed that:
- In System/Math.cs, IEEERemainder uses InternalInt64BitsToDouble.
Changing this to Int64BitsToDouble gave the expected result and the test
case passed.
- InternalInt64BitsToDouble() uses SwappableToDouble() under
System/BitConverter.cs where it gets into (!IsLittleEndian) which fills
the value in the big endian (reverse) order whereas Int64BitsToDouble
uses ToDouble() which doesnot have this conversion based on endianness
(!IsLittleEndian).
 
We would like to know your valuable inputs on how to fix this issue for
Solaris 7 sparc.
Please let us know whether it would be a right fix to use
Int64BitsToDouble instead of InternalInt64BitsToDouble (conditionally
built for Solaris 7 sparc). 
 
Thanks & regards,
Nataraj
 
 
 
 

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080602/b3d11dc1/attachment-0001.html 


More information about the Mono-devel-list mailing list