Instead of logging the console message "skipped" and reporting success,
return a skip status for the test harness to catch.
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
These are skipped because they are not applicable if files/devices are
provided for a special test run. Note this in the return status.
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
For maintainability and clarity, eschew the use of integer literals in
reporting test statuses. Instead, use a helper enum which contains
various values from the GNU exitcode protocol. Returning 0 or 1 is
obvious, and in the previous commit the ability to read "skip" (77) was
implemented. The final exit status is 99, which indicates some kind of
error in running the test itself.
A partial migration of existing pass/fail values in test sources is
included.
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Old kernels incorrectly return EOWNERDEAD, catch that explicitly and
print a more clear error message to avoid unsuspecting users think
the test might be buggy, when it is the kernel.
Reword fallback error message too to make it clear these are unexpected
too.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
The code was exiting with success on unexpected success from the
function, and returning failure when the expected EOWNERDEAD was
getting returned. Remove spurious "child" from error message.
Signed-off-by: Guillem Jover <guillem@hadrons.org>