summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/sdt.exp
diff options
context:
space:
mode:
authorStan Cox <scox@redhat.com>2009-06-15 12:16:17 -0400
committerStan Cox <scox@redhat.com>2009-06-15 12:16:17 -0400
commit5111fc3e27f24347f61db6465da934a19b553ee6 (patch)
treeefae54dced35c9ebddcc5b7f34bff2cc21e37d10 /testsuite/systemtap.base/sdt.exp
parentd438dd9bc070216016e02f4958fe9dea571712c9 (diff)
downloadsystemtap-steved-5111fc3e27f24347f61db6465da934a19b553ee6.tar.gz
systemtap-steved-5111fc3e27f24347f61db6465da934a19b553ee6.tar.xz
systemtap-steved-5111fc3e27f24347f61db6465da934a19b553ee6.zip
Add experimental utrace/kprobe sdt support
* sdt.h (EXPERIMENTAL_UTRACE_SDT, EXPERIMENTAL_KPROBE_SDT): New probe point macros. * dtrace: Add support for creating type debug info, currently invoked with --types. * tapsets.cxx (probe_table::convert_probe): New. (probe_table::convert_location): New. (dwarf_builder::build): Use it to simplify probe point handling. * sdt.exp (pbtype_flags, pbtype_mssgs): New to also test kprobe and utrace. * static_uprobes.exp (pbtype_flags, pbtype_mssgs): New to also test kprobe and utrace.
Diffstat (limited to 'testsuite/systemtap.base/sdt.exp')
-rw-r--r--testsuite/systemtap.base/sdt.exp37
1 files changed, 25 insertions, 12 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]}
}