numam-spdk/test/nvme
Michal Berger 9ba80de0dd test/nvme: Don't wait for spdk_stub0 if stub dies prematurely
If stub terminates right after execution, e.g. due to lack of system
resources (requested number of cpu cores to run on, right amount of
memory, etc.) start_stub() would end up blocking forever since there
wouldn't be any entity around that would mknod spdk_stub0 for it to
break the loop.

Avoid the above scenario by checking if $stubpid is still visible
under procfs and return if it goes missing.

To make sure kill_stub() is still called to clean up after start_stub()
declare proper trap prior the call to start_stub().

Additionally, avoid potential stderr noise in case kill|wait are told
to act on a PID that's not visible in the ns anymore.

Change-Id: Ief41200c57957f84b4f96a54baabc8da1f27dd43
Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482653
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>
2020-02-04 20:22:23 +00:00
..
aer lib/nvme: add spdk_nvme_transport_available_by_name 2020-01-16 09:10:38 +00:00
deallocated_value test/nvme/deallocated_value: switch to spdk_*malloc(). 2019-07-05 03:48:51 +00:00
e2edp test/nvme/e2edp: switch to spdk_*malloc(). 2019-07-05 03:48:51 +00:00
err_injection nvme: replace cdw10 with specific union command 2019-12-06 14:43:41 +00:00
overhead test/nvme: Don't fail test for NVMe with no namespaces 2019-07-12 07:36:21 +00:00
perf test/nvme: fix shellcheck error 2020-01-17 18:07:30 +00:00
reset nvme: change retry count can be configured via bdev nvme driver 2019-08-09 00:44:50 +00:00
sgl test/nvme/sgl: switch to spdk_*malloc(). 2019-07-16 10:51:47 +00:00
startup test/nvme: Add nvme startup tool. 2019-10-23 17:03:56 +00:00
hotplug.sh test: shellcheck - apply rule SC2002 2020-01-17 14:07:39 +00:00
hw_hotplug.sh test: move report_test_completion into run_test 2020-01-14 07:49:08 +00:00
Makefile test/nvme: Add nvme startup tool. 2019-10-23 17:03:56 +00:00
nvme_opal.sh test/nvme_opal: use run_test framework 2020-01-07 12:15:34 +00:00
nvme.sh test/nvme: Don't wait for spdk_stub0 if stub dies prematurely 2020-02-04 20:22:23 +00:00
spdk_nvme_cli_cuse.sh test/nvme: cuse nvme-cli check if oacs firmware supported 2020-01-20 10:01:00 +00:00
spdk_nvme_cli.sh test/nvme: Don't wait for spdk_stub0 if stub dies prematurely 2020-02-04 20:22:23 +00:00
spdk_smartctl_cuse.sh test: move report_test_completion into run_test 2020-01-14 07:49:08 +00:00