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: David Smith <dsmith at redhat dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>, Zhou, Wenjian/åæå <zhouwj-fnst at cn dot fujitsu dot com>
- Cc: Josh Stone <jistone at redhat dot com>, systemtap at sourceware dot org
- Date: Wed, 11 Nov 2015 13:07:15 -0600
- 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>
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.
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 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).
We should also switch the "all_pass_string" to only be one copy of the
"success" string.
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)
diff --git a/testsuite/lib/stap_run.exp b/testsuite/lib/stap_run.exp
index dab8e06..dc03d65 100644
--- a/testsuite/lib/stap_run.exp
+++ b/testsuite/lib/stap_run.exp
@@ -90,8 +90,14 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args }
-re $warning_regexp {
set probe_errors $expect_out(1,string)
set skipped_probes $expect_out(2,string)}
+ default {
+ fail "$TEST_NAME unexpected output (after passing output)"
+ }
}
}
+ default {
+ fail "$TEST_NAME unexpected output"
+ }
timeout {
fail "$TEST_NAME shutdown (timeout)"
kill -INT -[exp_pid]