set script "probe kernel.statement(-1).absolute {} probe timer.s(1) { exit() }" set test "bad kprobe registration" if {! [installtest_p]} { untested $test; return } spawn stap -g -w -e "$script" expect { -timeout 60 -re "^WARNING: probe .*registration error.*" { pass $test } eof { fail "$test (eof)" } timeout { fail "$test (timeout)" } } catch {close} catch {wait}