diff options
Diffstat (limited to 'testsuite/systemtap.base')
-rw-r--r-- | testsuite/systemtap.base/sdt.exp | 37 | ||||
-rw-r--r-- | testsuite/systemtap.base/sdt_types.stp | 4 | ||||
-rw-r--r-- | testsuite/systemtap.base/static_uprobes.exp | 90 | ||||
-rw-r--r-- | testsuite/systemtap.base/uprobes_exe.c | 29 | ||||
-rw-r--r-- | testsuite/systemtap.base/uprobes_lib.c | 21 | ||||
-rw-r--r-- | testsuite/systemtap.base/uprobes_lib.exp | 46 | ||||
-rw-r--r-- | testsuite/systemtap.base/uprobes_lib.stp | 15 | ||||
-rw-r--r-- | testsuite/systemtap.base/uprobes_uname.exp | 46 | ||||
-rw-r--r-- | testsuite/systemtap.base/uprobes_uname.stp | 7 | ||||
-rw-r--r-- | testsuite/systemtap.base/uprobes_ustack.exp | 97 | ||||
-rw-r--r-- | testsuite/systemtap.base/uprobes_ustack.stp | 35 |
11 files changed, 86 insertions, 341 deletions
diff --git a/testsuite/systemtap.base/sdt.exp b/testsuite/systemtap.base/sdt.exp index d24093e0..ea025391 100644 --- a/testsuite/systemtap.base/sdt.exp +++ b/testsuite/systemtap.base/sdt.exp @@ -12,6 +12,14 @@ set ::result_string {1 set extra_flags {{""} {additional_flags=-std=gnu89} {additional_flags=-ansi} {additional_flags=-pedantic} {additional_flags=-ansi additional_flags=-pedantic} {additional_flags=-O2} {additional_flags="-O3"}} +set pbtype_flags {{""} {additional_flags=-DEXPERIMENTAL_UTRACE_SDT} {additional_flags=-DEXPERIMENTAL_KPROBE_SDT}} +set pbtype_mssgs {{uprobe} {utrace} {kprobe}} + +# Iterate pbtype_flags +for {set p 0} {$p < [llength $pbtype_flags]} {incr p} { +set pbtype_flag [lindex $pbtype_flags $p] +set pbtype_mssg [lindex $pbtype_mssgs $p] + # Iterate extra_flags, trying each with C and C++ for {set i 0} {$i < [llength $extra_flags]} {incr i} { set extra_flag [lindex $extra_flags $i] @@ -22,24 +30,24 @@ set test_flags "additional_flags=-g" set test_flags "$test_flags additional_flags=-I$srcdir/../includes/sys" set test_flags "$test_flags additional_flags=-Wall" set test_flags "$test_flags additional_flags=-Wextra" -set test_flags "$test_flags additional_flags=-Werror" +set test_flags "$test_flags additional_flags=-Werror $pbtype_flag" set saveidx 0 set res [target_compile $srcdir/$subdir/$test.c $testprog executable "$test_flags $extra_flag"] if { $res != "" } { verbose "target_compile failed: $res" 2 - fail "compiling $test.c $extra_flag" - untested "$test $extra_flag" + fail "compiling $test.c $extra_flag $pbtype_mssg" + untested "$test $extra_flag $pbtype_mssg" continue } else { - pass "compiling $test.c $extra_flag" + pass "compiling $test.c $extra_flag $pbtype_mssg" } if {[installtest_p] && [utrace_p]} { - stap_run3 "$test $extra_flag" $srcdir/$subdir/$test.stp $testprog -c ./$testprog + stap_run3 "$test $extra_flag $pbtype_mssg" $srcdir/$subdir/$test.stp $testprog -c ./$testprog } else { - untested "$test $extra_flag" + untested "$test $extra_flag $pbtype_mssg" } catch {exec rm -f $testprog} @@ -50,22 +58,27 @@ set test_flags "additional_flags=-g" set test_flags "$test_flags additional_flags=-I$srcdir/../includes/sys" set test_flags "$test_flags additional_flags=-Wall" set test_flags "$test_flags additional_flags=-Werror" -set test_flags "$test_flags additional_flags=-x additional_flags=c++" +set test_flags "$test_flags additional_flags=-x additional_flags=c++ $pbtype_flag" set res [target_compile $srcdir/$subdir/$test.c $testprog executable "$test_flags $extra_flag"] if { $res != "" } { verbose "target_compile failed: $res" 2 - fail "compiling $test.c c++ $extra_flag" - untested "$test $extra_flag" + fail "compiling $test.c c++ $extra_flag $pbtype_mssg" + untested "$test $extra_flag $pbtype_mssg" continue } else { - pass "compiling $test.c c++ $extra_flag" + pass "compiling $test.c c++ $extra_flag $pbtype_mssg" } if {[installtest_p] && [utrace_p]} { - stap_run3 "$test c++ $extra_flag" $srcdir/$subdir/$test.stp $testprog -c ./$testprog + stap_run3 "$test c++ $extra_flag $pbtype_mssg" $srcdir/$subdir/$test.stp $testprog -c ./$testprog } else { - untested "$test c++ $extra_flag" + untested "$test c++ $extra_flag $pbtype_mssg $pbtype_mssg" } catch {exec rm -f $testprog} + +# for {set i 0} {$i < [llength $extra_flags]} +} + +# for {set i 0} {$i < [llength $pbtype_flags]} } diff --git a/testsuite/systemtap.base/sdt_types.stp b/testsuite/systemtap.base/sdt_types.stp index 654b0d18..5f9ebcab 100644 --- a/testsuite/systemtap.base/sdt_types.stp +++ b/testsuite/systemtap.base/sdt_types.stp @@ -68,9 +68,9 @@ probe process(@1).mark("short_int_var") probe process(@1).mark("const_short_int_var") { - if ($arg1 != -32767) + if ($arg1 != -32767) printf("FAIL: const_short_int_var\n") - else + else printf("PASS: const_short_int_var\n") } diff --git a/testsuite/systemtap.base/static_uprobes.exp b/testsuite/systemtap.base/static_uprobes.exp index 1e53d5d3..6a597646 100644 --- a/testsuite/systemtap.base/static_uprobes.exp +++ b/testsuite/systemtap.base/static_uprobes.exp @@ -1,21 +1,21 @@ -set test "static_uprobes" +set test "static_user_markers" # Test miscellaneous features of .mark probes # Compile a C program to use as the user-space probing target -set sup_srcpath "[pwd]/static_uprobes.c" -set sup_exepath "[pwd]/static_uprobes.x" -set supcplus_exepath "[pwd]/static_uprobes_cplus.x" +set sup_srcpath "[pwd]/static_user_markers.c" +set sup_exepath "[pwd]/static_user_markers.x" +set supcplus_exepath "[pwd]/static_user_markers_cplus.x" set fp [open $sup_srcpath "w"] puts $fp " #include <stdlib.h> #define USE_STAP_PROBE 1 -#include \"static_uprobes.h\" +#include \"static_user_markers_.h\" void bar (int i) { - STATIC_UPROBES_TEST_PROBE_2(i); + STATIC_USER_MARKERS_TEST_PROBE_2(i); if (i == 0) i = 1000; STAP_PROBE1(static_uprobes,test_probe_2,i); @@ -27,7 +27,7 @@ baz (int i, char* s) STAP_PROBE1(static_uprobes,test_probe_0,i); if (i == 0) i = 1000; - STATIC_UPROBES_TEST_PROBE_3(i,s); + STATIC_USER_MARKERS_TEST_PROBE_3(i,s); } void @@ -35,7 +35,7 @@ buz (int parm) { if (parm == 0) parm = 1000; - DTRACE_PROBE1(static_uprobes,test_probe_4,parm); + DTRACE_PROBE1(static_user_markers,test_probe_4,parm); } int @@ -48,33 +48,33 @@ main () " close $fp -set sup_stppath "[pwd]/static_uprobes.stp" +set sup_stppath "[pwd]/static_user_markers.stp" set fp [open $sup_stppath "w"] puts $fp " -probe process(\"static_uprobes.x\").mark(\"test_probe_0\") +probe process(\"static_user_markers.x\").mark(\"test_probe_0\") { printf(\"In test_probe_0 probe %#x\\n\", \$arg1) } -probe process(\"static_uprobes.x\").mark(\"test_probe_2\") +probe process(\"static_user_markers.x\").mark(\"test_probe_2\") { printf(\"In test_probe_2 probe %#x\\n\", \$arg1) } -probe process(\"static_uprobes.x\").mark(\"test_probe_3\") +probe process(\"static_user_markers.x\").mark(\"test_probe_3\") { printf(\"In test_probe_3 probe %#x %#x\\n\", \$arg1, \$arg2) } -probe process(\"static_uprobes.x\").mark(\"test_probe_4\") +probe process(\"static_user_markers.x\").mark(\"test_probe_4\") { printf(\"In test_probe_4 dtrace probe %#x\\n\", \$arg1) } " close $fp -set sup_dpath "[pwd]/static_uprobes.d" -set sup_hpath "[pwd]/static_uprobes.h" +set sup_dpath "[pwd]/static_user_markers_.d" +set sup_hpath "[pwd]/static_user_markers_.h" set fp [open $sup_dpath "w"] puts $fp " -provider static_uprobes { +provider static_user_markers { probe test_probe_1 (); probe test_probe_2 (int i); probe test_probe_3 (int i, char* x); @@ -97,7 +97,9 @@ if {[file exists $sup_hpath]} then { pass "$test dtrace" } else { fail "$test dtrace" + if { $verbose == 0 } { catch {exec rm -f $sup_srcpath $sup_hpath $sup_stppath} + } return } @@ -107,25 +109,38 @@ if {[installtest_p]} { set sdtdir $srcdir/../includes } +set pbtype_flags {{""} {additional_flags=-DEXPERIMENTAL_UTRACE_SDT} {additional_flags=-DEXPERIMENTAL_KPROBE_SDT}} +set pbtype_mssgs {{uprobe} {utrace} {kprobe}} + +# Iterate pbtype_flags +for {set i 0} {$i < [llength $pbtype_flags]} {incr i} { +set pbtype_flag [lindex $pbtype_flags $i] +set pbtype_mssg [lindex $pbtype_mssgs $i] +set testprog "sdt.c.exe.$i" + set sup_flags "additional_flags=-I$srcdir/../includes/sys" set sup_flags "$sup_flags additional_flags=-I$sdtdir" set sup_flags "$sup_flags additional_flags=-g" set sup_flags "$sup_flags additional_flags=-O" -set sup_flags "$sup_flags additional_flags=-I." +set sup_flags "$sup_flags additional_flags=-I. $pbtype_flag" set res [target_compile $sup_srcpath $sup_exepath executable $sup_flags] if { $res != "" } { verbose "target_compile failed: $res" 2 - fail "$test compiling C -g" + fail "$test compiling -g $pbtype_mssg" + if { $verbose == 0 } { catch {exec rm -f $sup_srcpath $sup_hpath $sup_stppath} + } return } else { - pass "$test compiling C -g" + pass "$test compiling -g $pbtype_mssg" } if {![installtest_p]} {untested $test; return} if {![utrace_p]} { untested "$test" + if { $verbose == 0 } { catch {exec rm -f $sup_srcpath} + } return } @@ -141,24 +156,28 @@ expect { -re {In test_probe_0 probe 0x3} { incr ok; exp_continue } -re {In test_probe_3 probe 0x3 0x[0-9a-f][0-9a-f]} { incr ok; exp_continue } -re {In test_probe_4 dtrace probe 0x4} { incr ok; exp_continue } - timeout { fail "$test C (timeout)" } + timeout { fail "$test (timeout)" } eof { } } wait -if {$ok == 5} { pass "$test C" } { fail "$test C ($ok)" } +if {$ok == 5} { + pass "$test $pbtype_mssg" +} else { + fail "$test ($ok) $pbtype_mssg" +} # Test passing various C types to .mark probes -set sup_flags "$sup_flags additional_flags=-O0" +set sup_flags "$sup_flags additional_flags=-O0 $pbtype_flag" set res [target_compile $srcdir/$subdir/sdt_types.c sdt_types.x executable $sup_flags] if { $res != "" } { verbose "target_compile failed: $res" 2 - fail "$test compiling types -g" + fail "$test compiling types -g $pbtype_mssg" return } else { - pass "$test compiling types -g" + pass "$test compiling types -g $pbtype_mssg" } set ok 0 @@ -169,16 +188,22 @@ expect { -timeout 180 -re {FAIL: [a-z_]+var} { regexp " .*$" $expect_out(0,string) s; incr ok; set fail "$fail $s"; exp_continue } - timeout { fail "$test C (timeout)" } + timeout { fail "$test (timeout) } eof { } } wait -if { $ok != 0 } { - fail "$test $fail" +set pbtype_mssgs {{uprobe} {utrace} {kprobe}} +if { $ok != 0} { + if { $pbtype_mssg == "uprobe" } { + fail "$test $fail $pbtype_mssg" + } else { + # (needs cast) + xfail "$test $fail $pbtype_mssg" + } } else { - pass "$test types" + pass "$test types $pbtype_mssg" } # Test .mark probe wildcard matching @@ -188,14 +213,17 @@ spawn stap -l "process(\"./sdt_types.x\").mark(\"*\")" expect { -timeout 180 -re {mark\(\"[a-z_]+\"\)} { incr ok; exp_continue } - timeout { fail "$test C (timeout)" } + timeout { fail "$test (timeout)" } eof { } } if { $ok == 45 } { - pass "$test wildcard" + pass "$test wildcard $pbtype_mssg" } else { - fail "$test wildcard ($ok)" + fail "$test wildcard ($ok) $pbtype_mssg" +} + +# for {set i 0} } if { $verbose == 0 } { diff --git a/testsuite/systemtap.base/uprobes_exe.c b/testsuite/systemtap.base/uprobes_exe.c deleted file mode 100644 index b4811335..00000000 --- a/testsuite/systemtap.base/uprobes_exe.c +++ /dev/null @@ -1,29 +0,0 @@ -/* uprobes_lib test case - * Copyright (C) 2009, Red Hat Inc. - * - * This file is part of systemtap, and is free software. You can - * redistribute it and/or modify it under the terms of the GNU General - * Public License (GPL); either version 2, or (at your option) any - * later version. - */ - -#include <unistd.h> - -// function from our library -int lib_main (void); - -void -main_func (int foo) -{ - if (foo > 1) - main_func (foo - 1); - else - lib_main(); -} - -int -main (int argc, char *argv[], char *envp[]) -{ - main_func (3); - return 0; -} diff --git a/testsuite/systemtap.base/uprobes_lib.c b/testsuite/systemtap.base/uprobes_lib.c deleted file mode 100644 index 25297b6b..00000000 --- a/testsuite/systemtap.base/uprobes_lib.c +++ /dev/null @@ -1,21 +0,0 @@ -/* uprobes_lib test case - library helper - * Copyright (C) 2009, Red Hat Inc. - * - * This file is part of systemtap, and is free software. You can - * redistribute it and/or modify it under the terms of the GNU General - * Public License (GPL); either version 2, or (at your option) any - * later version. - */ - -void -lib_func (int bar) -{ - if (bar > 1) - lib_func (bar - 1); -} - -void -lib_main () -{ - lib_func (3); -} diff --git a/testsuite/systemtap.base/uprobes_lib.exp b/testsuite/systemtap.base/uprobes_lib.exp deleted file mode 100644 index 313c01b6..00000000 --- a/testsuite/systemtap.base/uprobes_lib.exp +++ /dev/null @@ -1,46 +0,0 @@ -set test "uprobes_lib" -set testpath "$srcdir/$subdir" -set testsrc "$testpath/uprobes_exe.c" -set testsrclib "$testpath/uprobes_lib.c" -set testexe "./uprobes_exe" -set testlibname "uprobes_lib" -set testlibdir "." -set testso "$testlibdir/lib${testlibname}.so" -set testflags "additional_flags=-g additional_flags=-O" -set testlibflags "$testflags additional_flags=-fPIC additional_flags=-shared" -set maintestflags "$testflags additional_flags=-L$testlibdir additional_flags=-l$testlibname additional_flags=-Wl,-rpath,$testlibdir" - -# Compile our test program and library. -set res [target_compile $testsrclib $testso executable $testlibflags] -if { $res != "" } { - verbose "target_compile for $testso failed: $res" 2 - fail "$test compile $testsrclib" - return -} else { - pass "$test compile $testsrclib" -} - -set res [target_compile $testsrc $testexe executable $maintestflags] -if { $res != "" } { - verbose "target_compile failed: $res" 2 - fail "$test compile $testsrc" - return -} else { - pass "$test compile $testsrc" -} - -set ::result_string {main -main_func -main_func -main_func -lib_main -lib_func -lib_func -lib_func} - -# Only run on make installcheck -if {! [installtest_p]} { untested "$test"; return } -if {! [utrace_p]} { untested $test; return } -stap_run2 $srcdir/$subdir/$test.stp -c $testexe - -#exec rm -f $testexe $testso diff --git a/testsuite/systemtap.base/uprobes_lib.stp b/testsuite/systemtap.base/uprobes_lib.stp deleted file mode 100644 index 459351a4..00000000 --- a/testsuite/systemtap.base/uprobes_lib.stp +++ /dev/null @@ -1,15 +0,0 @@ -probe process("uprobes_exe").function("main") { - printf("main\n"); -} - -probe process("uprobes_exe").function("main_func") { - printf("main_func\n"); -} - -probe process("libuprobes_lib.so").function("lib_main") { - printf("lib_main\n"); -} - -probe process("libuprobes_lib.so").function("lib_func") { - printf("lib_func\n"); -} diff --git a/testsuite/systemtap.base/uprobes_uname.exp b/testsuite/systemtap.base/uprobes_uname.exp deleted file mode 100644 index 65e1ff70..00000000 --- a/testsuite/systemtap.base/uprobes_uname.exp +++ /dev/null @@ -1,46 +0,0 @@ -set test "uprobes_uname" -set testpath "$srcdir/$subdir" -set testsrc "$testpath/uprobes_exe.c" -set testsrclib "$testpath/uprobes_lib.c" -set testexe "./uprobes_exe" -set testlibname "uprobes_lib" -set testlibdir "." -set testso "$testlibdir/lib${testlibname}.so" -set testflags "additional_flags=-g additional_flags=-O" -set testlibflags "$testflags additional_flags=-fPIC additional_flags=-shared" -set maintestflags "$testflags additional_flags=-L$testlibdir additional_flags=-l$testlibname additional_flags=-Wl,-rpath,$testlibdir" - -# Compile our test program and library. -set res [target_compile $testsrclib $testso executable $testlibflags] -if { $res != "" } { - verbose "target_compile for $testso failed: $res" 2 - fail "$test compile $testsrclib" - return -} else { - pass "$test compile $testsrclib" -} - -set res [target_compile $testsrc $testexe executable $maintestflags] -if { $res != "" } { - verbose "target_compile failed: $res" 2 - fail "$test compile $testsrc" - return -} else { - pass "$test compile $testsrc" -} - -set ::result_string {exe: main=main -exe: main_func=main_func -exe: main_func=main_func -exe: main_func=main_func -lib: lib_main=lib_main -lib: lib_func=lib_func -lib: lib_func=lib_func -lib: lib_func=lib_func} - -# Only run on make installcheck -if {! [installtest_p]} { untested "$test"; return } -if {! [utrace_p]} { untested $test; return } -stap_run2 $srcdir/$subdir/$test.stp -c $testexe - -#exec rm -f $testexe $testso diff --git a/testsuite/systemtap.base/uprobes_uname.stp b/testsuite/systemtap.base/uprobes_uname.stp deleted file mode 100644 index a44d78d3..00000000 --- a/testsuite/systemtap.base/uprobes_uname.stp +++ /dev/null @@ -1,7 +0,0 @@ -probe process("uprobes_exe").function("*") { - printf("exe: %s=%s\n",probefunc(), usymname(uaddr())); -} - -probe process("libuprobes_lib.so").function("*") { - printf("lib: %s=%s\n",probefunc(), usymname(uaddr())); -} diff --git a/testsuite/systemtap.base/uprobes_ustack.exp b/testsuite/systemtap.base/uprobes_ustack.exp deleted file mode 100644 index bfc435e9..00000000 --- a/testsuite/systemtap.base/uprobes_ustack.exp +++ /dev/null @@ -1,97 +0,0 @@ -set test "uprobes_ustack" -set testpath "$srcdir/$subdir" -set testsrc "$testpath/uprobes_exe.c" -set testsrclib "$testpath/uprobes_lib.c" -set testexe "./uprobes_exe" -set testlibname "uprobes_lib" -set testlibdir "." -set testso "$testlibdir/lib${testlibname}.so" -set testflags "additional_flags=-g additional_flags=-O" -set testlibflags "$testflags additional_flags=-fPIC additional_flags=-shared" -set maintestflags "$testflags additional_flags=-L$testlibdir additional_flags=-l$testlibname additional_flags=-Wl,-rpath,$testlibdir" - -# Compile our test program and library. -set res [target_compile $testsrclib $testso executable $testlibflags] -if { $res != "" } { - verbose "target_compile for $testso failed: $res" 2 - fail "$test compile $testsrclib" - return -} else { - pass "$test compile $testsrclib" -} - -set res [target_compile $testsrc $testexe executable $maintestflags] -if { $res != "" } { - verbose "target_compile failed: $res" 2 - fail "$test compile $testsrc" - return -} else { - pass "$test compile $testsrc" -} - -set ::result_string {exe: main=main -exe: main_func=main_func -exe: main_func=main_func -exe: main_func=main_func -lib: lib_main=lib_main -lib: lib_func=lib_func -lib: lib_func=lib_func -lib: lib_func=lib_func} - -# Only run on make installcheck -if {! [installtest_p]} { untested "$test"; return } -if {! [utrace_p]} { untested $test; return } - -# Output is: -#print_ubacktrace exe 0 -# 0x080484ba : main_func+0xa/0x29 [.../uprobes_exe] -# 0x080484f6 : main+0x1d/0x37 [.../uprobes_exe] -#print_ustack exe 1 -# 0x080484ba : main_func+0xa/0x29 [.../uprobes_exe] -# 0x080484c9 : main_func+0x19/0x29 [.../uprobes_exe] -# 0x080484f6 : main+0x1d/0x37 [.../uprobes_exe] -#print_ubacktrace lib 2 -# 0x00db2422 : lib_func+0x16/0x2b [.../libuprobes_lib.so] -# 0x00db2455 : lib_main+0x1e/0x29 [.../libuprobes_lib.so] -# 0x080484d0 : main_func+0x20/0x29 [.../uprobes_exe] -# 0x080484c9 : main_func+0x19/0x29 [.../uprobes_exe] -# 0x080484c9 : main_func+0x19/0x29 [.../uprobes_exe] -# 0x080484f6 : main+0x1d/0x37 [.../uprobes_exe] -#print_ustack lib 3 -# 0x00db2422 : lib_func+0x16/0x2b [.../libuprobes_lib.so] -# 0x00db2431 : lib_func+0x25/0x2b [.../libuprobes_lib.so] -# 0x00db2455 : lib_main+0x1e/0x29 [.../libuprobes_lib.so] -# 0x080484d0 : main_func+0x20/0x29 [.../uprobes_exe] -# 0x080484c9 : main_func+0x19/0x29 [.../uprobes_exe] -# 0x080484c9 : main_func+0x19/0x29 [.../uprobes_exe] -# 0x080484f6 : main+0x1d/0x37 [.../uprobes_exe] - -set print 0 -set main 0 -set main_func 0 -set lib_main 0 -set lib_func 0 -# Needs extra space since on 64bit the last ubacktrace string is -# 7 entries * (16 hex + 2 for 0x + 1 space) = 133 chars. -# Default MAXSTRINGLEN is 128 chars. -spawn stap -DMAXSTRINGLEN=133 $srcdir/$subdir/$test.stp -c $testexe - -wait -expect { - -timeout 60 - -re {^print_[^\r\n]+\r\n} {incr print; exp_continue} - -re {^ 0x[a-f0-9]+ : main\+0x[^\r\n]+\r\n} {incr main; exp_continue} - -re {^ 0x[a-f0-9]+ : main_func\+0x[^\r\n]+\r\n} {incr main_func; exp_continue} - -re {^ 0x[a-f0-9]+ : lib_main\+0x[^\r\n]+\r\n} {incr lib_main; exp_continue} - -re {^ 0x[a-f0-9]+ : lib_func\+0x[^\r\n]+\r\n} {incr lib_func; exp_continue} - timeout { fail "$test (timeout)" } - eof { } -} - -if {$print == 4} {pass "$test print"} {fail "$test print ($print)"} -if {$main == 4} {pass "$test main"} {fail "$test main ($main)"} -if {$main_func == 9} {pass "$test main_func"} {fail "$test main_func ($main_func)"} -if {$lib_main == 2} {pass "$test lib_main"} {fail "$test lib_main ($lib_main)"} -if {$lib_func == 3} {pass "$test lib_func"} {fail "$test lib_func ($lib_func)"} - -#exec rm -f $testexe $testso diff --git a/testsuite/systemtap.base/uprobes_ustack.stp b/testsuite/systemtap.base/uprobes_ustack.stp deleted file mode 100644 index 6de03b42..00000000 --- a/testsuite/systemtap.base/uprobes_ustack.stp +++ /dev/null @@ -1,35 +0,0 @@ -// Prints backtrace from lib through exe twice using diffent ustack functions. - -global hits = 0; - -probe process("uprobes_exe").function("main_func") -{ - if (hits == 0) - { - log("print_ubacktrace exe 0"); - print_ubacktrace(); - hits++; - } - else if (hits == 1) - { - log("print_ustack exe 1"); - print_ustack(ubacktrace()); - hits++; - } -} - -probe process("libuprobes_lib.so").function("lib_func") -{ - if (hits == 2) - { - log("print_ubacktrace lib 2"); - print_ubacktrace(); - hits++; - } - else if (hits == 3) - { - log("print_ustack lib 3"); - print_ustack(ubacktrace()); - hits++; - } -} |