From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10681 invoked by alias); 5 Sep 2008 16:56:21 -0000 Received: (qmail 10615 invoked by uid 22791); 5 Sep 2008 16:56:21 -0000 X-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_20,KAM_MX,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 05 Sep 2008 16:55:43 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m85GtgSs024333 for ; Fri, 5 Sep 2008 12:55:42 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [10.16.255.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m85Gtfb8030552; Fri, 5 Sep 2008 12:55:41 -0400 Received: from [10.16.3.219] (dhcp-100-3-219.bos.redhat.com [10.16.3.219]) by mail.boston.redhat.com (8.13.1/8.13.1) with ESMTP id m85Gte38020677; Fri, 5 Sep 2008 12:55:41 -0400 Message-ID: <48C16421.8070400@redhat.com> Date: Fri, 05 Sep 2008 16:56:00 -0000 From: Masami Hiramatsu User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: systemtap-ml Subject: [PATCH 3/3] utrace-probe: testcases for $argN and $return support on utrace-syscall probe X-Enigmail-Version: 0.95.7 Content-Type: multipart/mixed; boundary="------------030602090301020600040905" X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-Virus-Checked: Checked by ClamAV on sourceware.org X-IsSubscribed: yes 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 X-SW-Source: 2008-q3/txt/msg00564.txt.bz2 This is a multi-part message in MIME format. --------------030602090301020600040905 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 246 Hi, Here is the patch which adds testcases for accessing $argN/$return from process.syscall. Thank you, -- Masami Hiramatsu Software Engineer Hitachi Computer Products (America) Inc. Software Solutions Division e-mail: mhiramat@redhat.com --------------030602090301020600040905 Content-Type: text/plain; name="testsuite-per-process-syscall.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="testsuite-per-process-syscall.patch" Content-length: 2663 --- Signed-off-by: Masami Hiramatsu testsuite/buildok/per-process-syscall.stp | 18 ++++++++++++++++++ testsuite/semko/utrace15.stp | 4 ++++ testsuite/semko/utrace16.stp | 4 ++++ testsuite/semko/utrace17.stp | 4 ++++ testsuite/semko/utrace18.stp | 4 ++++ testsuite/semko/utrace19.stp | 4 ++++ testsuite/semko/utrace20.stp | 4 ++++ 7 files changed, 42 insertions(+) Index: systemtap/testsuite/buildok/per-process-syscall.stp =================================================================== --- /dev/null +++ systemtap/testsuite/buildok/per-process-syscall.stp @@ -0,0 +1,18 @@ +#! stap -p4 +# +# per-process syscall trace test + +probe process.syscall { +print($syscall) +print($arg1) +print($arg2) +print($arg3) +print($arg4) +print($arg5) +print($arg6) +} + +probe process.syscall.return { +print($syscall) +print($return) +} Index: systemtap/testsuite/semko/utrace15.stp =================================================================== --- /dev/null +++ systemtap/testsuite/semko/utrace15.stp @@ -0,0 +1,4 @@ +#! stap -p2 + +# write to $argN +probe process("/bin/cat").syscall { $arg1 = 1 } Index: systemtap/testsuite/semko/utrace16.stp =================================================================== --- /dev/null +++ systemtap/testsuite/semko/utrace16.stp @@ -0,0 +1,4 @@ +#! stap -p2 + +# treat $argN as a pointer +probe process("/bin/cat").syscall { print($arg1->foo) } Index: systemtap/testsuite/semko/utrace17.stp =================================================================== --- /dev/null +++ systemtap/testsuite/semko/utrace17.stp @@ -0,0 +1,4 @@ +#! stap -p2 + +# treat $argN as an array +probe process("/bin/cat").syscall { print($arg1[0]) } Index: systemtap/testsuite/semko/utrace18.stp =================================================================== --- /dev/null +++ systemtap/testsuite/semko/utrace18.stp @@ -0,0 +1,4 @@ +#! stap -p2 + +# write to $return +probe process("/bin/cat").syscall.return { $return = 1 } Index: systemtap/testsuite/semko/utrace19.stp =================================================================== --- /dev/null +++ systemtap/testsuite/semko/utrace19.stp @@ -0,0 +1,4 @@ +#! stap -p2 + +# access to $return from syscall entry +probe process("/bin/cat").syscall { print($return) } Index: systemtap/testsuite/semko/utrace20.stp =================================================================== --- /dev/null +++ systemtap/testsuite/semko/utrace20.stp @@ -0,0 +1,4 @@ +#! stap -p2 + +# treat $return as an array +probe process("/bin/cat").syscall { print($return[0]) } --------------030602090301020600040905--