kselftest/arm64: Check that all children are producing output in fp-stress
authorMark Brown <broonie@kernel.org>
Mon, 17 Oct 2022 14:45:52 +0000 (15:45 +0100)
committerWill Deacon <will@kernel.org>
Tue, 8 Nov 2022 16:03:19 +0000 (16:03 +0000)
commit3a38ef2b3cb6b63c105247b5ea4a9cf600e673f0
treee851288296ec869457170cd2d16436914b555470
parentf0c4d9fc9cc9462659728d168387191387e903cc
kselftest/arm64: Check that all children are producing output in fp-stress

Currently we don't have an explicit check that when it's been a second
since we have seen output produced from the test programs starting up that
means all of them are running and we should start both sending signals and
timing out. This is not reliable, especially on very heavily loaded systems
where the test programs might take longer than a second to run.

We do skip sending signals to children that have not produced output yet
so we won't cause them to exit unexpectedly by sending a signal but this
can create confusion when interpreting output, for example appearing to
show the tests running for less time than expected or appearing to show
missed signal deliveries. Avoid issues by explicitly checking that we have
seen output from all the child processes before we start sending signals
or counting test run time.

This is especially likely on virtual platforms with large numbers of vector
lengths supported since the platforms are slow and there will be a lot of
tasks per CPU.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20221017144553.773176-2-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
tools/testing/selftests/arm64/fp/fp-stress.c