]> git.baikalelectronics.ru Git - kernel.git/commit
kselftest/arm64: Handle EINTR while reading data from children
authorMark Brown <broonie@kernel.org>
Wed, 21 Sep 2022 18:13:45 +0000 (19:13 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 29 Sep 2022 17:12:37 +0000 (18:12 +0100)
commit2bac7b95440b594a04933c749da35fd582ea2f62
tree6ece2528ad196837fb3f7929558d9a0d335d6511
parent46006e81eca2e0dc18edde6695bb6055e7ce2ee3
kselftest/arm64: Handle EINTR while reading data from children

Currently we treat any error when reading from the child as a failure and
don't read any more output from that child as a result. This ignores the
fact that it is valid for read() to return EINTR as the error code if there
is a signal pending so we could stop handling the output of children,
especially during exit when we will get some SIGCHLD signals delivered to
us. Fix this by pulling the read handling out into a separate function
which returns a flag if reads should be continued and wrapping it in a
loop.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220921181345.618085-4-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
tools/testing/selftests/arm64/fp/fp-stress.c