test/nvme: fix wait for spdk_tgt error code on exit

Just sending TERM signal to the background process doesn't
provide an information about the condition of terminated
process.

To catch failures in the background process killprocess
helper should be used to wait for its termination and
check error.


Change-Id: I294d4493cf69883aa481eb6f5e55b46ea4940c5c
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475017
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Tomasz Kulasek 2019-11-18 11:41:51 -05:00 committed by Tomasz Zawadzki
parent 8e70c6e320
commit 6227a37b0d

View File

@ -44,7 +44,7 @@ for ctrlr in $(ls /dev/spdk/nvme?); do
done
trap - SIGINT SIGTERM EXIT
kill $spdk_tgt_pid
killprocess $spdk_tgt_pid
report_test_completion spdk_nvme_cli_cuse
timing_exit nvme_cli_cuse