Add assertions to check the systemtap process in background.
Add the `-p PID` option to the `rlWaitForCmd`. The option checks the PID is
alive during the waiting.
See <cfa801fb17/src/synchronisation.sh (L194-L202)>
for the logic of the `-p` option.
Add an assertion to check the systemtap process after systemtap logging the
the text "starting run" before running the assertions for ruby commands. Because
systemtap can fail after logging the text as a possibility.
An example of the failure: https://access.redhat.com/solutions/3613871
This commit is contained in:
parent
9cbd536c42
commit
f1a5f8ab4d
1 changed files with 7 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue