public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "\"Zhou, Wenjian/周文剑\"" <zhouwj-fnst@cn.fujitsu.com>
To: <systemtap@sourceware.org>, David Smith <dsmith@redhat.com>
Subject: Re: [PATCH 1/3] add testcases for function definitions
Date: Tue, 01 Dec 2015 03:21:00 -0000	[thread overview]
Message-ID: <565D11C0.5000903@cn.fujitsu.com> (raw)
In-Reply-To: <1448527335-14750-1-git-send-email-zhouwj-fnst@cn.fujitsu.com>

Hello David,

These three patches also want to be reviewed.

-- 
Thanks
Zhou

On 11/26/2015 04:42 PM, Zhou Wenjian wrote:
> 	* testsuite/systemtap.base/func_definition.exp: New test case.
> 	* testsuite/systemtap.base/func_definition.stp: New test file.
> ---
>   testsuite/systemtap.base/func_definition.exp | 13 ++++++
>   testsuite/systemtap.base/func_definition.stp | 60 ++++++++++++++++++++++++++++
>   2 files changed, 73 insertions(+)
>   create mode 100755 testsuite/systemtap.base/func_definition.exp
>   create mode 100755 testsuite/systemtap.base/func_definition.stp
>
> diff --git a/testsuite/systemtap.base/func_definition.exp b/testsuite/systemtap.base/func_definition.exp
> new file mode 100755
> index 0000000..65abdb5
> --- /dev/null
> +++ b/testsuite/systemtap.base/func_definition.exp
> @@ -0,0 +1,13 @@
> +# Check function definitions
> +
> +set test "func_definition"
> +if {![installtest_p]} { untested "$test"; return }
> +
> +foreach runtime [get_runtime_list] {
> +    if {$runtime != ""} {
> +	stap_run $srcdir/$subdir/$test.stp no_load (${all_pass_string}){5} \
> +	    --runtime=$runtime
> +    } else {
> +	stap_run $srcdir/$subdir/$test.stp no_load (${all_pass_string}){5}
> +    }
> +}
> diff --git a/testsuite/systemtap.base/func_definition.stp b/testsuite/systemtap.base/func_definition.stp
> new file mode 100755
> index 0000000..eaa8d94
> --- /dev/null
> +++ b/testsuite/systemtap.base/func_definition.stp
> @@ -0,0 +1,60 @@
> +/*
> + * func_definition.stp
> + *
> + * Check function definitions
> + */
> +probe begin {
> +    println("systemtap starting probe")
> +}
> +
> +
> +function f1(arg:long)
> +{
> +    if (arg == 2015)
> +        println("systemtap test success")
> +    else
> +        printf("systemtap test failure - arg of f1:%d != 2015\n", arg)
> +}
> +
> +function f2(arg)
> +{
> +    if (arg == 2015)
> +        println("systemtap test success")
> +    else
> +        printf("systemtap test failure - arg of f2:%d != 2015\n", arg)
> +}
> +
> +function f3:long()
> +{
> +    return 2015
> +}
> +
> +function f4()
> +{
> +    return 2015
> +}
> +
> +function f5()
> +{
> +    println("systemtap test success")
> +}
> +
> +probe end {
> +    println("systemtap ending probe")
> +
> +    f1(2015)
> +
> +    f2(2015)
> +
> +    if (f3() == 2015)
> +        println("systemtap test success")
> +    else
> +        printf("systemtap test failure - return_value of f3:%d != 2015\n", f3())
> +
> +    if (f4() == 2015)
> +        println("systemtap test success")
> +    else
> +        printf("systemtap test failure - return_value of f4:%d != 2015\n", f4())
> +
> +    f5()
> +}
>


  parent reply	other threads:[~2015-12-01  3:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26  8:43 Zhou Wenjian
2015-11-26  8:44 ` [PATCH 3/3] add cases for break and continue Zhou Wenjian
2015-11-26  8:44 ` [PATCH 2/3] add more test cases for timer Zhou Wenjian
2015-12-01  3:21 ` "Zhou, Wenjian/周文剑" [this message]
2015-12-04 13:45   ` [PATCH 1/3] add testcases for function definitions David Smith
  -- strict thread matches above, loose matches on Subject: below --
2015-11-09  8:58 Zhou Wenjian
2015-11-09 18:07 ` 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
2015-11-12  2:57                   ` "Zhou, Wenjian/周文剑"

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=565D11C0.5000903@cn.fujitsu.com \
    --to=zhouwj-fnst@cn.fujitsu.com \
    --cc=dsmith@redhat.com \
    --cc=systemtap@sourceware.org \
    /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).