| 1 |
|
| 2 |
set test "debugpath-bad" |
| 3 |
spawn env SYSTEMTAP_DEBUGINFO_PATH=/dev/null DEBUGINFOD_URLS= stap -u -e "probe kernel.function(\"vfs_read\") {}" -wp4 |
| 4 |
expect { |
| 5 |
-re {^semantic error:.*missing.*debuginfo} { pass $test } |
| 6 |
-re {^semantic error:.*no.* match} { pass $test } |
| 7 |
timeout { fail "$test (timeout1)" } |
| 8 |
eof { fail "$test (eof)" } |
| 9 |
} |
| 10 |
catch { close }; catch { wait } |
| 11 |
|
| 12 |
set test "debugpath-good" |
| 13 |
set uname [exec /bin/uname -r] |
| 14 |
|
| 15 |
# Guess where debuginfo is installed |
| 16 |
if [file isdirectory /usr/lib/debug] { |
| 17 |
set debuginfo_path "/usr/lib/debug" |
| 18 |
} elseif [file isdirectory /lib/modules/$uname/build] { |
| 19 |
set debuginfo_path "/lib/modules/$uname/build" |
| 20 |
} else { |
| 21 |
set debuginfo_path "/lib/modules/$uname" |
| 22 |
} |
| 23 |
|
| 24 |
spawn env SYSTEMTAP_DEBUGINFO_PATH=$debuginfo_path stap -u -e "probe kernel.function(\"vfs_read\") {}" -wp2 |
| 25 |
expect { |
| 26 |
-re {kernel.function.*pc=} { pass $test } |
| 27 |
timeout { fail "$test (timeout2)" } |
| 28 |
eof { fail "$test (eof)" } |
| 29 |
} |
| 30 |
catch { close }; catch { wait } |