Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/inlinedvars.exp

raw
1 set test "inlinedvars"
2 set ::result_string {call (22,84)
3 call2 (128,-22)
4 main (64,42)}
5
6 proc dyninst_kfails {index} {
7 # The dyninst runtime isn't multi-arch, it only works on the
8 # native architecture. PR14490.
9 if {! [all_compile_flag_native_p $index]} {
10 setup_kfail 14490 "*-*-*"
11 }
12 }
13
14 # Try both inlined and non-inlined compiles.
15 for {set i 0} {$i < [all_compile_flags]} {incr i} {
16 set extra_flag [all_compile_flag $i]
17 set extra_name [all_compile_flag_name $i]
18
19 set test_flags "additional_flags=-g $extra_flag"
20 set res [target_compile $srcdir/$subdir/$test.c $test.exe executable "$test_flags"]
21 if { $res != "" } {
22 verbose "target_compile failed: $res" 2
23 fail "$test-$extra_name compile"
24 untested "$test-$extra_name"
25 continue
26 } else {
27 pass "$test-$extra_name compile"
28 }
29
30 if {[installtest_p]} {
31 foreach runtime [get_runtime_list] {
32 if {$runtime != ""} {
33 if {[info procs ${runtime}_kfails] ne ""} { ${runtime}_kfails $i }
34 stap_run3 "$test-$extra_name-$runtime" $srcdir/$subdir/$test.stp \
35 -c ./$test.exe --runtime=$runtime
36 } elseif {[uprobes_p]} {
37 stap_run3 "$test-$extra_name" $srcdir/$subdir/$test.stp \
38 -c ./$test.exe
39 } else {
40 untested "$test-$extra_name"
41 }
42 }
43 } else {
44 untested "$test-$extra_name"
45 }
46 catch {exec rm -f $test.exe}
47 }