From e361ac2bdb6f1996e020a5612cec71762b556e25 Mon Sep 17 00:00:00 2001 From: Malte Nuhn Date: Fri, 8 May 2009 12:20:33 -0400 Subject: context tapset: sid() function to return task session leader pid --- testsuite/buildok/context_test.stp | 1 + 1 file changed, 1 insertion(+) (limited to 'testsuite/buildok/context_test.stp') diff --git a/testsuite/buildok/context_test.stp b/testsuite/buildok/context_test.stp index 84f1cbf1..d0b42890 100755 --- a/testsuite/buildok/context_test.stp +++ b/testsuite/buildok/context_test.stp @@ -18,6 +18,7 @@ function print_stuff () { printf("gid is %d\n", gid()) printf("egid is %d\n", egid()) printf("pp is %s\n", pp()) + printf("sid is %d\n", sid()) } probe kernel.function("uptime_read_proc") ? { -- cgit From 7da77276c8a703a4dab1ed242801f3afd38864ea Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 8 May 2009 12:40:43 -0700 Subject: Simplify buildok/context_test.stp The test was using optional probes on uptime_read_proc, which doesn't exist anymore on 2.6.30. The problem is that when those optional probes are skipped, the test doesn't really do anything. For a buildok test of the context functions, the actual probe point doesn't matter, so I've changed it to just a begin probe that calls all of the functions. --- testsuite/buildok/context_test.stp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'testsuite/buildok/context_test.stp') diff --git a/testsuite/buildok/context_test.stp b/testsuite/buildok/context_test.stp index d0b42890..acc4ea07 100755 --- a/testsuite/buildok/context_test.stp +++ b/testsuite/buildok/context_test.stp @@ -1,6 +1,6 @@ #! stap -p4 -function print_stuff () { +probe begin { print_regs() print_backtrace() bt = backtrace() @@ -20,22 +20,3 @@ function print_stuff () { printf("pp is %s\n", pp()) printf("sid is %d\n", sid()) } - -probe kernel.function("uptime_read_proc") ? { - print("NOW IN UPTIME\n") - print_stuff () -} - -probe kernel.function("uptime_read_proc").return ? { - print("DONE WITH UPTIME\n") - print_stuff () - exit () -} - -probe begin { - print ("BEGIN\n") -} - -probe end { - print ("END\n") -} -- cgit