selftests: timers: Convert posix_timers test to generate KTAP output
authorMark Brown <broonie@kernel.org>
Wed, 27 Sep 2023 10:18:58 +0000 (12:18 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 5 Oct 2023 21:00:07 +0000 (15:00 -0600)
commit071af0c9e582bc47e379e39490a2bc1adfe4ec68
tree5ec86b87acc9469992c396eaa762b5240c4bdc14
parent47903c1d153d5178d54ea086e2bfa5298506f04f
selftests: timers: Convert posix_timers test to generate KTAP output

Currently the posix_timers test does not produce KTAP output but rather a
custom format. This means that we only get a pass/fail for the suite, not
for each individual test that the suite does. Convert to using the standard
kselftest output functions which result in KTAP output being generated.

As part of this fix the printing of diagnostics in the unlikely event that
the pthread APIs fail, these were using perror() but the API functions
directly return an error code instead of setting errno.

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/timers/posix_timers.c