selftests: ktap_helpers: Add helper to pass/fail test based on exit code
authorNícolas F. R. A. Prado <nfraprado@collabora.com>
Wed, 31 Jan 2024 22:02:41 +0000 (17:02 -0500)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 20 Feb 2024 22:53:08 +0000 (15:53 -0700)
commitd90b7c705c5d9b5cb6b71b8aaa773c031084056c
treec0630739b23123d289a46bc3f3492310a0b1ab53
parent6934eea2690b3c8a95224f2d1dacc2f13d3bf4ce
selftests: ktap_helpers: Add helper to pass/fail test based on exit code

Similar to the C counterpart, add a helper function that runs a command
and passes or fails the test based on the result.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/kselftest/ktap_helpers.sh