This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH 1/3] add testcases for function definitions
- From: "Zhou, Wenjian/åæå" <zhouwj-fnst at cn dot fujitsu dot com>
- To: David Smith <dsmith at redhat dot com>
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>, Josh Stone <jistone at redhat dot com>, <systemtap at sourceware dot org>
- Date: Thu, 12 Nov 2015 10:56:11 +0800
- Subject: Re: [PATCH 1/3] add testcases for function definitions
- Authentication-results: sourceware.org; auth=none
- References: <1447059456-19811-1-git-send-email-zhouwj-fnst at cn dot fujitsu dot com> <5640E0EE dot 2060803 at redhat dot com> <56415207 dot 6050905 at cn dot fujitsu dot com> <56415718 dot 2010100 at redhat dot com> <56415B6E dot 8030808 at cn dot fujitsu dot com> <56419783 dot 8050005 at cn dot fujitsu dot com> <56422AB0 dot 1060200 at redhat dot com> <5642DEAA dot 20205 at cn dot fujitsu dot com> <y0m61183a71 dot fsf at fche dot csb> <564391E3 dot 4020802 at redhat dot com>
On 11/12/2015 03:07 AM, David Smith wrote:
On 11/11/2015 08:03 AM, Frank Ch. Eigler wrote:
I think the more basic problem is the general pattern of these test
cases, where multiple identical messages are printed to report subtest
status. In a more ideal world, instead of:
systemtap starting probe
systemtap ending probe
systemtap test success
systemtap test success
systemtap test success
systemtap test success
those .stp scripts that can self-diagnose should say simply:
success
or
failure (detail)
those .stp scripts that cannot self-diagnose should say simply:
result1 FOO
result2 BAR
result3 ZOO
No "systemtap" / "starting" / "ending" boilerplate is needed; nor
repeated lines whose counting is critical.
Maybe we can implement it for the new cases.
stap_run.exp is probably too complicated. I've attached a small patch to
it that tries to catch any "extra" output. Note that I haven't tried
running the entire testsuite with this patch to see if this breaks anything.
The patch will also cause 20+ more cases error(in systemtap.base).
The starting/ending boilerplate doesn't really bother me, but I think we
should modify all the scripts to only print one success/fail line (which
Zhou Wenjian suggested several messages back). That is going to be
simple to test for, but a little more complicated in the test script
itself (but not too bad).
Why isn't the implementation in PATCH v2 a good choice?
It will do the least change to the testsuite and has the minimum risk of
affecting other cases. In other hand, printing several success lines doesn't
have any bad effects.
We should also switch the "all_pass_string" to only be one copy of the
"success" string.
--
Thanks
Zhou