diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2023-03-14 13:34:14 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-05-11 23:16:57 +0900 |
commit | 9e284d34b1c04d47c58abb77b327236f0e2f786d (patch) | |
tree | c2e9bc72f7e9ccd8be85b3519aa1c48b59caf7f5 /tools | |
parent | 08217fb43689ab2fde5cbf0b9a5302494fe0cdde (diff) | |
download | linux-stable-9e284d34b1c04d47c58abb77b327236f0e2f786d.tar.gz linux-stable-9e284d34b1c04d47c58abb77b327236f0e2f786d.tar.bz2 linux-stable-9e284d34b1c04d47c58abb77b327236f0e2f786d.zip |
selftests/clone3: fix number of tests in ksft_set_plan
[ Upstream commit d95debbdc528d50042807754d6085c15abc21768 ]
Commit 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME")
added an additional test, so the number passed to ksft_set_plan needs to
be bumped accordingly.
Also use ksft_finished() to print results and exit. This will catch future
mismatches between ksft_set_plan() and the number of tests being run.
Fixes: 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME")
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/clone3/clone3.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/clone3/clone3.c b/tools/testing/selftests/clone3/clone3.c index 4fce46afe6db..e495f895a2cd 100644 --- a/tools/testing/selftests/clone3/clone3.c +++ b/tools/testing/selftests/clone3/clone3.c @@ -129,7 +129,7 @@ int main(int argc, char *argv[]) uid_t uid = getuid(); ksft_print_header(); - ksft_set_plan(17); + ksft_set_plan(18); test_clone3_supported(); /* Just a simple clone3() should return 0.*/ @@ -198,5 +198,5 @@ int main(int argc, char *argv[]) /* Do a clone3() in a new time namespace */ test_clone3(CLONE_NEWTIME, 0, 0, CLONE3_ARGS_NO_TEST); - return !ksft_get_fail_cnt() ? ksft_exit_pass() : ksft_exit_fail(); + ksft_finished(); } |