| 1 |
set test "test_unused" |
| 2 |
set testpath "$srcdir/$subdir" |
| 3 |
|
| 4 |
# Only run on make on machines that have dyninst support |
| 5 |
# FIXME |
| 6 |
|
| 7 |
set res [target_compile ${testpath}/${test}.c ${test} executable "additional_flags=-O2 additional_flags=-g"] |
| 8 |
if { $res != "" } { |
| 9 |
verbose "target_compile failed: $res" 2 |
| 10 |
fail "${test}: unable to compile ${test}.c" |
| 11 |
} |
| 12 |
|
| 13 |
set ok 0 |
| 14 |
|
| 15 |
spawn stap -vgp4 $srcdir/$subdir/$test.stp |
| 16 |
expect { |
| 17 |
-re "WARNING: write at 0x\[0-9a-fA-F\]+ will have no effect" {incr ok ; exp_continue} |
| 18 |
} |
| 19 |
|
| 20 |
if { $ok == 3 } { pass "$test" } { fail "$test" } |
| 21 |
|
| 22 |
# Cleanup |
| 23 |
if { $verbose == 0 } { catch { exec rm -f $test } } |