Andrew Black wrote:
One probable reason is that some legacy tests (like 27_iosfile) produce multiple assertion totals (or are supposed to), and we want the last of these, rather than the first.

To handle this case we should process the file from the beginning
and take the last total as the final one.

A second possible reason was to make the parsing FSM slightly simpler (though adding an additional character or two to the pattern shouldn't make it much more complex).

I don't think avoiding the seek would add too much complexity
(the default non-compat case doesn't seek and it's no more
complex than the compat mode).

A final possible reason was to make the parsing faster for long output files.

If the common case is the default mode (i.e., not --compat)
we optimized the wrong branch :) In any case, getting correct
results slowly is better than getting the wrong results fast.

I suggest you rewrite check_compat_test() to avoid seeking
and scan the whole file, top to bottom, and take the last
total.

Martin

Reply via email to