summaryrefslogtreecommitdiffstats
path: root/testsuite/buildok/context_test.stp
diff options
context:
space:
mode:
authorhunt <hunt>2005-09-04 09:40:46 +0000
committerhunt <hunt>2005-09-04 09:40:46 +0000
commit6c100036afcfa4d038f7a7af83bcbcb28f905d35 (patch)
treec5ca93e96ad425446c1e1be02f0ecf21509a8a6e /testsuite/buildok/context_test.stp
parente479d1f47a8d83737418674bb03f780220bc4ff4 (diff)
downloadsystemtap-steved-6c100036afcfa4d038f7a7af83bcbcb28f905d35.tar.gz
systemtap-steved-6c100036afcfa4d038f7a7af83bcbcb28f905d35.tar.xz
systemtap-steved-6c100036afcfa4d038f7a7af83bcbcb28f905d35.zip
2005-09-04 Martin Hunt <hunt@redhat.com>
* testsuite/buildok/context_test.stp: New test. * tapset/logging.stp (log): Call _stp_printf(). * stapfuncs.5.in: Add contextinfo funcs. * tapset/context.stp: Minor cleanup.
Diffstat (limited to 'testsuite/buildok/context_test.stp')
-rwxr-xr-xtestsuite/buildok/context_test.stp47
1 files changed, 47 insertions, 0 deletions
diff --git a/testsuite/buildok/context_test.stp b/testsuite/buildok/context_test.stp
new file mode 100755
index 00000000..9059c04c
--- /dev/null
+++ b/testsuite/buildok/context_test.stp
@@ -0,0 +1,47 @@
+#! stap -p4
+
+probe kernel.function("uptime_read_proc") {
+ print("NOW IN UPTIME\n")
+ print_regs()
+ print_backtrace()
+ bt = backtrace()
+ print("the stack is " . bt)
+ print("\n\n")
+ print_stack(bt)
+ print("\n\n")
+ log("name is " . execname())
+ log("pid is " . string(pid()))
+ log("parentname is " . pexecname())
+ log("ppid is " . string(ppid()))
+ log("uid is " . string(uid()))
+ log("euid is " . string(euid()))
+ log("gid is " . string(gid()))
+ log("egid is " . string(egid()))
+}
+
+probe kernel.function("uptime_read_proc").return {
+ print("DONE WITH UPTIME\n")
+ print_regs()
+ print_backtrace()
+ bt = backtrace()
+ print("the stack is " . bt)
+ print("\n\n")
+ print_stack(bt)
+ print("\n\n")
+ log("name is " . execname())
+ log("pid is " . string(pid()))
+ log("parentname is " . pexecname())
+ log("ppid is " . string(ppid()))
+ log("uid is " . string(uid()))
+ log("euid is " . string(euid()))
+ log("gid is " . string(gid()))
+ log("egid is " . string(egid()))
+}
+
+probe begin {
+ print ("BEGIN\n")
+}
+
+probe end {
+ print ("END\n")
+}