This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] add testcases for function definitions


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]