[PATCH 1/3] add testcases for function definitions

"Zhou, Wenjian/周文剑" zhouwj-fnst@cn.fujitsu.com
Tue Nov 10 02:51:00 GMT 2015


On 11/10/2015 10:31 AM, Josh Stone wrote:
> 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.
>

I don't think it is necessary to concern about case authors' mistakes
in the test suite.

>> 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.
>

Yes, I just mean the "+" and "{5}".

>> 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.
>

Eh, if it works, I think the "{5}" won't be needed.
But I doubt whether it will introduce errors to some cases.
I will think more about it.

-- 
Thanks
Zhou



More information about the Systemtap mailing list