diff --git a/systemtap-static-probes-in-ruby/runtest.sh b/systemtap-static-probes-in-ruby/runtest.sh index cfac459..f128274 100755 --- a/systemtap-static-probes-in-ruby/runtest.sh +++ b/systemtap-static-probes-in-ruby/runtest.sh @@ -71,7 +71,13 @@ rlJournalStart echo -e "--_STAP_PID--\n${_STAP_PID}" # info # wait for systemtap to start - rlWaitForCmd "grep 'starting run' ${_STAP_OUT}" + rlWaitForCmd "grep 'starting run' ${_STAP_OUT}" -p "${_STAP_PID}" + sleep 1 + # check systemtap process, because systemtap can fail after logging + # "starting run". + rlRun "ps -q ${_STAP_PID}" 0 \ + "Checking systemtap process in background" \ + || rlRun -t "cat ${_STAP_OUT}" rlRun "$RUBY $RUBY_OPTS -e '1.0 + 9.0'" 0 "Running ruby interpreter: Float test" rlRun "$RUBY $RUBY_OPTS -e '[1, 2, 3].push(4)'" 0 "Running ruby interpreter: Array test"