| 1 |
# Check function definitions |
| 2 |
|
| 3 |
set test "func_definition" |
| 4 |
if {![installtest_p]} { untested "$test"; return } |
| 5 |
|
| 6 |
foreach runtime [get_runtime_list] { |
| 7 |
if {$runtime != ""} { |
| 8 |
stap_run $test no_load (${all_pass_string}){6} \ |
| 9 |
--runtime=$runtime $srcdir/$subdir/$test.stp |
| 10 |
} else { |
| 11 |
stap_run $test no_load (${all_pass_string}){6} $srcdir/$subdir/$test.stp |
| 12 |
} |
| 13 |
} |
| 14 |
|
| 15 |
set ok 0 |
| 16 |
set cmd "bash -c {$env(SYSTEMTAP_PATH)/stap -v -v -p3 $srcdir/$subdir/$test.stp |& grep -A 1 'function_names_over_128'}" |
| 17 |
eval spawn $cmd |
| 18 |
expect { |
| 19 |
-timeout 180 |
| 20 |
# Match shortened function declaration, definition, and reference |
| 21 |
-re { function_[0-9] } { incr ok; exp_continue } |
| 22 |
eof { } |
| 23 |
} |
| 24 |
|
| 25 |
if {$ok == 3} { |
| 26 |
pass "$test function name shorten" |
| 27 |
} else { |
| 28 |
fail "$test function name shorten ($ok!=3)" |
| 29 |
} |