From: David Smith <dsmith@redhat.com>
To: "Frank Ch. Eigler" <fche@redhat.com>,
"Zhou, Wenjian/周文剑" <zhouwj-fnst@cn.fujitsu.com>
Cc: Josh Stone <jistone@redhat.com>, systemtap@sourceware.org
Subject: Re: [PATCH 1/3] add testcases for function definitions
Date: Wed, 11 Nov 2015 19:07:00 -0000 [thread overview]
Message-ID: <564391E3.4020802@redhat.com> (raw)
In-Reply-To: <y0m61183a71.fsf@fche.csb>
[-- Attachment #1: Type: text/plain, Size: 1450 bytes --]
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)
[-- Attachment #2: stap_run.patch --]
[-- Type: text/x-patch, Size: 664 bytes --]
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]
next prev parent reply other threads:[~2015-11-11 19:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-09 8:58 Zhou Wenjian
2015-11-09 8:58 ` [PATCH 3/3] add more test cases for timer Zhou Wenjian
2015-11-09 8:58 ` [PATCH 2/3] Fix the testcases so that the result will be more exact Zhou Wenjian
2015-11-09 18:07 ` [PATCH 1/3] add testcases for function definitions Josh Stone
2015-11-09 21:24 ` David Smith
2015-11-09 22:21 ` Josh Stone
2015-11-10 2:11 ` "Zhou, Wenjian/周文剑"
2015-11-10 2:31 ` Josh Stone
2015-11-10 2:51 ` "Zhou, Wenjian/周文剑"
2015-11-10 7:07 ` "Zhou, Wenjian/周文剑"
2015-11-10 17:34 ` Josh Stone
2015-11-11 6:23 ` "Zhou, Wenjian/周文剑"
2015-11-11 14:03 ` Frank Ch. Eigler
2015-11-11 19:07 ` David Smith [this message]
2015-11-12 2:57 ` "Zhou, Wenjian/周文剑"
2015-11-26 8:43 Zhou Wenjian
2015-12-01 3:21 ` "Zhou, Wenjian/周文剑"
2015-12-04 13:45 ` David Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=564391E3.4020802@redhat.com \
--to=dsmith@redhat.com \
--cc=fche@redhat.com \
--cc=jistone@redhat.com \
--cc=systemtap@sourceware.org \
--cc=zhouwj-fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).