git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (DAFFODIL-1947) TDMLRunner - incorrect error on left-over data: TDMLException: Left over data. Consumed 48 bit(s) with 0 bit(s) remaining.


Michael Beckerle created DAFFODIL-1947:
------------------------------------------

             Summary: TDMLRunner - incorrect error on left-over data: TDMLException: Left over data. Consumed 48 bit(s) with 0 bit(s) remaining.
                 Key: DAFFODIL-1947
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1947
             Project: Daffodil
          Issue Type: Bug
          Components: TDML Runner
    Affects Versions: 2.1.0
            Reporter: Michael Beckerle
             Fix For: 2.2.0


When a test runs round trip, if the test parse succeeds, but the unparse creates an extra character in the output, on reparse we get a left-over-data error, but the error message is bogus because it says 0 bits remaining, which makes no sense for left-over data.

org.apache.daffodil.tdml.TDMLException: Left over data. Consumed 48 bit(s) with 0 bit(s) remaining.

In general, the round-trip logic should be a bit smarter. The output should indicate what phase of the test it was in when the failure occurred. In this specific case, the unparsed output doesn't match the size of the original input. That might be ok on round trip, but in most cases we want parse/unparse to work without having to reparse.

We need to fix the bug so that this doesn't report incorrect left-over-data info. We also need to change roundTrip to have a mode for one-pass only, meaning that the unparse is expected to create exactly the same as the input data (for parse tests), so that it should not try to reparse the unparsed output, but should immediately report the error. 




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)