This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/3] utrace-probe: testcases for $argN and $return support on utrace-syscall probe


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

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]