diff --git a/testsuite/features/step_definitions/command_steps.rb b/testsuite/features/step_definitions/command_steps.rb index 9f395dc2cbb..56df3971fe2 100644 --- a/testsuite/features/step_definitions/command_steps.rb +++ b/testsuite/features/step_definitions/command_steps.rb @@ -579,16 +579,16 @@ end server.run('chmod +x /etc/ipmi/fake_ipmi_host.sh', verbose: true, check_errors: true) # Check if ipmi_sim is already running - if server.run('pgrep -f ipmi_sim', verbose: false, check_errors: false).empty? + if server.run('pgrep -f ipmi_sim', verbose: false, check_errors: false)[1] != 0 server.run('ipmi_sim -n < /dev/null > /dev/null &', verbose: true, check_errors: true) else - puts 'ipmi_sim is already running; skipping startup.' + log 'ipmi_sim is already running; skipping startup.' end end When(/^the server stops mocking an IPMI host$/) do get_target('server').run('pkill ipmi_sim') - get_target('server').run('pkill --full fake_ipmi_host.sh || :') + get_target('server').run('pkill --full fake_ipmi_host.sh', verbose: false, check_errors: false) end When(/^the controller starts mocking a Redfish host$/) do