Tests: use "kill -0" for app existence check in NS tests
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 15 Oct 2019 20:50:46 +0000 (16:50 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 23 Oct 2019 22:47:09 +0000 (18:47 -0400)
commit70a7f9f74ac7fc5717056ff083eb7df905a056af
treec2a9722caa05767cdb50aa71714406308bca35e4
parent5f0d4e78e640b8baaf900fe52f491155ad6d8168
Tests: use "kill -0" for app existence check in NS tests

Removing the sleep 0.5 we hit a race where the "-f /proc/$pid_app"
test returns false immediately. Using "kill -0" protects us against
such races. From kill (2):

If sig is 0, then no signal is sent, but existence and permission
checks are still performed; this can be used to check for the
existence of a process ID or process group ID that the caller is
permitted to signal.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/kernel/test_ns_contexts_change
tests/regression/ust/namespaces/test_ns_contexts_change
This page took 0.030271 seconds and 4 git commands to generate.