[PATCH 1/3] add testcases for function definitions

Josh Stone jistone@redhat.com
Tue Nov 10 02:31:00 GMT 2015


On 11/09/2015 06:10 PM, "Zhou, Wenjian/周文剑" wrote:
> I think either of them is enough to generate the correct result.
> Why should stap_run still make sure nothing comes after matching
> the exact output?

Because people make mistakes.  Perhaps the test.exp looks for 5 success
lines, but the test.stp outputs 6 lines - this should be flagged.  The
extra line might have been added later, forgetting to update test.exp
too.  And if the extra line of output happens to report a failure, we
don't want to miss that.

Checking that nothing comes after is a way to be sure that we really are
matching exact output.

> And between them, I prefer matching the exact output.

You mean between "+" and "{5}"?  Explicit counts are fine with me, but I
don't like manually repeating the match string.

> To make sure nothing comes, we have to modify all cases which use the
> stap_run. I don't think it's a good idea that modifying the cases which
> are working well.

If my probe-final-"EOF" idea works, then we can implement that entirely
in stap_run, without modifying any testcases.



More information about the Systemtap mailing list