public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 3/3] utrace-probe: testcases for $argN and $return support  on utrace-syscall probe
@ 2008-09-05 16:56 Masami Hiramatsu
  2008-09-09 15:21 ` Masami Hiramatsu
  0 siblings, 1 reply; 2+ messages in thread
From: Masami Hiramatsu @ 2008-09-05 16:56 UTC (permalink / raw)
  To: systemtap-ml

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

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


[-- Attachment #2: testsuite-per-process-syscall.patch --]
[-- Type: text/plain, Size: 2663 bytes --]

---
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>

 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]) }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/3] utrace-probe: testcases for $argN and $return support  on utrace-syscall probe
  2008-09-05 16:56 [PATCH 3/3] utrace-probe: testcases for $argN and $return support on utrace-syscall probe Masami Hiramatsu
@ 2008-09-09 15:21 ` Masami Hiramatsu
  0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2008-09-09 15:21 UTC (permalink / raw)
  To: systemtap-ml, David Smith

[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

Hi,

I added two semko testcases ($return->foo and $argN from .return).

Thank you,

Masami Hiramatsu wrote:
> 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


[-- Attachment #2: testsuite-per-process-syscall.patch --]
[-- Type: text/plain, Size: 3381 bytes --]

---
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>

 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 ++++
 testsuite/semko/utrace21.stp              |    4 ++++
 testsuite/semko/utrace22.stp              |    4 ++++
 9 files changed, 50 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]) }
Index: systemtap/testsuite/semko/utrace21.stp
===================================================================
--- /dev/null
+++ systemtap/testsuite/semko/utrace21.stp
@@ -0,0 +1,4 @@
+#! stap -p2
+
+# treat $return as a pointer/structure
+probe process("/bin/cat").syscall.return { print($return->foo) }
Index: systemtap/testsuite/semko/utrace22.stp
===================================================================
--- /dev/null
+++ systemtap/testsuite/semko/utrace22.stp
@@ -0,0 +1,4 @@
+#! stap -p2
+
+# access to $argN from syscall return
+probe process("/bin/cat").syscall.return { print($arg1) }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-09 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-05 16:56 [PATCH 3/3] utrace-probe: testcases for $argN and $return support on utrace-syscall probe Masami Hiramatsu
2008-09-09 15:21 ` Masami Hiramatsu

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).