summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/debugpath.exp
blob: 9c42295d7e8acfc86c3a9539990f1916168249cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

set test "debugpath-bad"
spawn env SYSTEMTAP_DEBUGINFO_PATH=/dev/null stap -e "probe kernel.function(\"sys_open\") {}" -p4
expect {
	-re {^semantic error:.*missing.*debuginfo} { pass $test }
	timeout { fail "$test (timeout1)" }
	eof { fail "$test (eof)" }
}

wait

set test "debugpath-good"
set uname [exec /bin/uname -r]
spawn env SYSTEMTAP_DEBUGINFO_PATH=/lib/modules/$uname/build stap -e "probe kernel.function(\"sys_open\") {}" -p2
expect {
	-re {kernel.function.*pc=} { pass $test }
	timeout { fail "$test (timeout2)" }
	eof { fail "$test (eof)" }
}

wait