diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-09-30 14:20:17 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-09-30 14:20:17 -0600 |
commit | d1882992002afb3c42f43b753ab98e50e5e8f4ac (patch) | |
tree | b1231e409cfc76810feb92075fa15fc24259f449 | |
parent | c16017c714b4400feba079c7681baf5186c9c8dc (diff) |
test/msg-ring: don't mistake T_EXIT_SKIP for failure
A recent commit botched this. Have the first part error if the test
had an error, or just return T_EXIT_SKIP if it got skipped. And fixup
the last case to just check for T_EXIT_FAIL before printing that the
test failed, when it fact it did not.
Fixes: bb01691f6b44 ("test/msg-ring: handle the skip case for older kernels")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | test/msg-ring.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/msg-ring.c b/test/msg-ring.c index a1e207a..e861ddf 100644 --- a/test/msg-ring.c +++ b/test/msg-ring.c @@ -459,10 +459,12 @@ int main(int argc, char *argv[]) if (ret == T_EXIT_FAIL) { fprintf(stderr, "ring flags 0 failed\n"); return ret; + } else if (ret == T_EXIT_SKIP) { + return T_EXIT_SKIP; } ret = test(IORING_SETUP_SINGLE_ISSUER|IORING_SETUP_DEFER_TASKRUN); - if (ret != T_EXIT_FAIL) { + if (ret == T_EXIT_FAIL) { fprintf(stderr, "ring flags defer failed\n"); return ret; } |