| 1 |
# Tests that uaddr matches the statement address of an SDT mark, |
| 2 |
# to show whether we're getting REG_IP munging right. |
| 3 |
|
| 4 |
set test "uprobe_uaddr_mark" |
| 5 |
set ::result_string {success} |
| 6 |
|
| 7 |
# Only run on make installcheck and uprobes present. |
| 8 |
if {! [installtest_p]} { untested "$test"; return } |
| 9 |
if {! [uprobes_p]} { untested "$test"; return } |
| 10 |
|
| 11 |
set testpath "$srcdir/$subdir" |
| 12 |
set testsrc "$testpath/$test.c" |
| 13 |
set testexe "[pwd]/$test" |
| 14 |
set testflags [sdt_includes] |
| 15 |
set teststp "$testpath/$test.stp" |
| 16 |
|
| 17 |
set res [target_compile $testsrc $testexe executable $testflags] |
| 18 |
if { $res != "" } { |
| 19 |
verbose "target_compile failed: $res" 2 |
| 20 |
fail "unable to compile $testsrc" |
| 21 |
return |
| 22 |
} |
| 23 |
|
| 24 |
stap_run3 $test $teststp -c $testexe |
| 25 |
|
| 26 |
catch {exec rm -f $test.exe} |