You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Dave Thompson (Jira)" <ji...@apache.org> on 2022/01/31 18:48:00 UTC

[jira] [Closed] (DAFFODIL-2635) dfdl:valueLength on child element returns unexpected Result

     [ https://issues.apache.org/jira/browse/DAFFODIL-2635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Thompson closed DAFFODIL-2635.
-----------------------------------

Verified the specified commit (commit e1c415c57c872e2c4ddb9587dab2b35240056522) is included in the latest pull from the daffodil repository.

Verified changes identified in commit comments were implemented.

Verified that with the commit prior to the fix commit the identified errors occurred.

Verified that with the fix commit the identified errors no longer occurs

Verified affected daffodil subproject sbt test suites execute successfully including the additional test.

> dfdl:valueLength on child element returns unexpected Result
> -----------------------------------------------------------
>
>                 Key: DAFFODIL-2635
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2635
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End, General
>    Affects Versions: 3.2.1
>            Reporter: Olabusayo Kilo
>            Assignee: Steve Lawrence
>            Priority: Major
>             Fix For: 3.3.0
>
>         Attachments: TestExSchema.scala, exSchema.dfdl.xsd, exSchema.tdml
>
>
> dfdl:valueLength returns the incorrect result for a child element. Sometimes it returns the value of the entire containing element (i.e root element), sometimes it just returns the value of the neighbor element. Attached are some files to demonstrate this issue
>  
> The data in the test correspond to these infosets:
> correct_message:
> {code:xml}
>   <exSchema:exSchema_message xmlns:exSchema="urn:exSchema:1.0">
>     <framing_header>
>       <message_size>7</message_size>
>     </framing_header>
>     <message>
>       <content>620100</content>
>     </message>
>   </exSchema:exSchema_message> {code}
>  
> msg_size_smaller_than_file_size:
> {code:xml}
>   <exSchema:exSchema_message xmlns:exSchema="urn:exSchema:1.0">
>     <framing_header>
>       <message_size>4</message_size>
>     </framing_header>
>     <message>
>       <content>620100</content>
>     </message>
>   </exSchema:exSchema_message> {code}
> The first TDML fails with this message:
> {noformat}
> Content size (7) and the difference of message_size and framing_header size (3) should be equal
> {noformat}
> The second:
> {noformat}
> Content size (4) and the difference of message_size and framing_header size (0) should be equal
> {noformat}
> The first should not fail, and the 2nd should fail on a "Left over data" error. Commenting out the assertion annotation will show 2 passing tests.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)