Comment 2 for bug 961455

Revision history for this message
cpb (chris-beauregard) wrote : Re: [Bug 961455] Re: error handling Section 1 with extra baggage

On 03/22/2012 01:57 PM, Yves Pelletier wrote:
> Chris,
>
> Would it be worthwhile to add one of these messages to the test suite?

Already done. It's just SOP. Anytime I find a bug triggered by a piece
of data, it goes into the test suite. There's also one in the MetManager
test suite. And for the most part, when I find a bug triggered by a
certain use of the API, I write/modify a test program to trigger the bug.

Having to fix a bug sucks. Having to fix a bug twice because your test
suite didn't see it come back is a whole other level of sucks.

The trick is that the decoder doesn't handle this particular message
because it claims to use Table 13, but uses descriptors which aren't
found in the Table 13 included with libecbufr. No further comment on
that particular issue ;)

However, it's okay for regression testing. The failure mode before I
fixed it was that it didn't even recognize the message as valid BUFR
because the section 4 off-by-one meant it couldn't see section 5. Now,
it can find all the sections and make sense of them even if it can't
actually display the data payload. That's fixed enough for me.

c.