7 Commits

Author SHA1 Message Date
Eli Schwartz c0cd89e898 tests: mark passing tests which exit early as skipped
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>
2022-06-28 10:37:33 -04:00
Eli Schwartz dd35f16b1d tests: emit a skip exit code if invoked with additional argv
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>
2022-06-28 10:37:33 -04:00
Eli Schwartz 3467e7ac6d tests: migrate some tests to use enum-based exit codes
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>
2022-06-28 10:37:33 -04:00
Guillem Jover a720f2b42f test/empty-eownerdead: Clarify unexpected error message
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>
2021-09-13 13:19:25 +02:00
Jens Axboe b9ab4f04c1 Revert "test/empty-eownerdead: Only expect EOWNERDEAD as test success"
This reverts commit 3ea0ee8505.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-09-07 12:49:36 -06:00
Guillem Jover 3ea0ee8505 test/empty-eownerdead: Only expect EOWNERDEAD as test success
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>
2021-09-07 04:03:59 +02:00
Jens Axboe d1ecbe9145 Add test case for empty submit/wait SQPOLL EOWNERDEAD failure case
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-08-14 09:00:33 -06:00