Mike Beckerle created DAFFODIL-2757:
---------------------------------------
Summary: Java 19 incompatibility floating point - 3 tests fail
Key: DAFFODIL-2757
URL: https://issues.apache.org/jira/browse/DAFFODIL-2757
Project: Daffodil
Issue Type: Bug
Components: Infrastructure, QA
Affects Versions: 3.4.0
Reporter: Mike Beckerle
I know we don't officially support Java 19 yet, but one would think it would
"just work", but ....
Tests fail if you do 'sbt test' with Java 19.0.1 as your JVM.
Checkout daffodil 3.5.0-SNAPSHOT git hash
54bbe40f503c5e4f3645036a3b66be09121f3785
>From the command prompt do:
sbt clean updateClassifiers compile test
The failures do not occur if you are using IntelliJ and just type 'test' at the
sbt shell or if you run tests from the right-click menu on test scala folders.
(or they didn't occur the times I tried that.)
The failures are related to changes in floating point numbers from
calculations having slightly different values.
{code:java}
[error] Test org.apache.daffodil.TresysTests.test_BG000 failed:
org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil)
XMLDifferenceException:
[error] Comparison failed.
[error] Expected (attributes stripped)
[error]
<list><x>9.87654321001E9</x><x>12345.6</x><x>1.23456789123456784E17</x><x>INF</x><x>NaN</x><x>0.0</x><x>0.0</x><x>0.0</x><y>187723572702975</y><y>986895</y><y>4886718345</y><z>10.1</z><z>20.3</z><z>-9.12E-11</z></list>
[error] Actual (attributes ignored for diff)
[error] <tns:list
xmlns:tns="http://example.com"><x>9.87654321001E9</x><x>12345.6</x><x>1.2345678912345678E17</x><x>INF</x><x>NaN</x><x>0.0</x><x>0.0</x><x>0.0</x><y>187723572702975</y><y>986895</y><y>4886718345</y><z>10.1</z><z>20.3</z><z>-9.12E-11</z></tns:list>
[error] Differences were (path, expected, actual):
[error] - (list/x[3].charAt(19),4E17,E17)
[error] , took 0.202 sec
[error] at
org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:32)
[error] at
org.apache.daffodil.tdml.VerifyTestCase$.verifyParserTestData(TDMLRunner.scala:1556){code}
Here is another:
{code:java}
[error] Test
org.apache.daffodil.section13.text_number_props.TestTextNumberProps.test_textNumberPattern_exponent01
failed: org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil)
XMLDifferenceException:
[error] Comparison failed.
[error] Expected (attributes stripped)
[error] <tnp05>6.5400003E9</tnp05>
[error] Actual (attributes ignored for diff)
[error] <ex:tnp05 xmlns:ex="http://example.com">6.54E9</ex:tnp05>
[error] Differences were (path, expected, actual):
[error] - (tnp05.charAt(5),00003E9,E9)
[error] , took 0.457 sec
[error] at
org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:32)
[error] at
org.apache.daffodil.tdml.VerifyTestCase$.verifyParserTestData(TDMLRunner.scala:1556)
[error] at
org.apache.daffodil.tdml.ParserTestCase.verifyParseResults(TDMLRunner.scala:1057){code}
A third one:
{code:java}
[error] Test
org.apache.daffodil.section05.simple_types.TestSimpleTypes.test_double_binary_06
failed: org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil)
XMLDifferenceException:
[error] Comparison failed.
[error] Expected (attributes stripped)
[error] <d_02>9.8765432109876544E16</d_02>
[error] Actual (attributes ignored for diff)
[error] <ex:d_02
xmlns:ex="http://example.com">9.876543210987654E16</ex:d_02>
[error] Differences were (path, expected, actual):
[error] - (d_02.charAt(18),4E16,E16)
[error] , took 0.357 sec
[error] at
org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:32)
[error] at
org.apache.daffodil.tdml.VerifyTestCase$.verifyParserTestData(TDMLRunner.scala:1556){code}
Interesting also, there are definitely 3 failure here, but...notice the below
lists only 2 failures, and doesn't mention the first of the above 3 failures at
all?
{code:java}
[error] Failed: Total 4070, Failed 2, Errors 0, Passed 4065, Skipped 3
[error] Failed tests:
[error]
org.apache.daffodil.section13.text_number_props.TestTextNumberProps
[error] org.apache.daffodil.section05.simple_types.TestSimpleTypes
[error] (daffodil-test-ibm1 / Test / test) sbt.TestsFailedException: Tests
unsuccessful
[error] (daffodil-test / Test / test) sbt.TestsFailedException: Tests
unsuccessful
[error] Total time: 242 s (04:02), completed Dec 12, 2022, 6:31:51 PM{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)