Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-1947

TDMLRunner - incorrect error on left-over data: TDMLException: Left over data. Consumed 48 bit(s) with 0 bit(s) remaining.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0
    • Component/s: TDML Runner
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              dfthompson Dave Thompson
              Reporter:
              mbeckerle Michael Beckerle
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: