From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87318 invoked by alias); 1 Dec 2015 03:21:15 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 87307 invoked by uid 89); 1 Dec 2015 03:21:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.5 required=5.0 tests=AWL,BAYES_20,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: heian.cn.fujitsu.com Received: from cn.fujitsu.com (HELO heian.cn.fujitsu.com) (59.151.112.132) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 01 Dec 2015 03:21:13 +0000 Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 01 Dec 2015 11:20:52 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id 4C448409256D; Tue, 1 Dec 2015 11:20:43 +0800 (CST) Received: from localhost.localdomain (10.167.226.48) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server id 14.3.181.6; Tue, 1 Dec 2015 11:20:42 +0800 Message-ID: <565D11C0.5000903@cn.fujitsu.com> Date: Tue, 01 Dec 2015 03:21:00 -0000 From: =?UTF-8?B?Ilpob3UsIFdlbmppYW4v5ZGo5paH5YmRIg==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: , David Smith Subject: Re: [PATCH 1/3] add testcases for function definitions References: <1448527335-14750-1-git-send-email-zhouwj-fnst@cn.fujitsu.com> In-Reply-To: <1448527335-14750-1-git-send-email-zhouwj-fnst@cn.fujitsu.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-yoursite-MailScanner-Information: Please contact the ISP for more information X-yoursite-MailScanner-ID: 4C448409256D.A81C6 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: zhouwj-fnst@cn.fujitsu.com X-IsSubscribed: yes X-SW-Source: 2015-q4/txt/msg00213.txt.bz2 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() > +} >