summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/cgroup/test_cpu.c
diff options
context:
space:
mode:
authorGuopeng Zhang <zhangguopeng@kylinos.cn>2025-11-14 18:24:40 +0800
committerTejun Heo <tj@kernel.org>2025-11-14 08:12:57 -1000
commit1dc830ee4c155bff572a43a66b948e1c46483d6a (patch)
treec87d8a746174c719b11b36d61e8771df57686929 /tools/testing/selftests/cgroup/test_cpu.c
parentf23cb0ced8fb28ba65bf4ddaa2fcaf044c6894cc (diff)
selftests/cgroup: conform test to KTAP format output
Conform the layout, informational and status messages to KTAP. No functional change is intended other than the layout of output messages. Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn> Suggested-by: Sebastian Chlad <sebastian.chlad@suse.com> Acked-by: Michal Koutný <mkoutny@suse.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/testing/selftests/cgroup/test_cpu.c')
-rw-r--r--tools/testing/selftests/cgroup/test_cpu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/testing/selftests/cgroup/test_cpu.c b/tools/testing/selftests/cgroup/test_cpu.c
index 2a60e6c41940..36be3e820df2 100644
--- a/tools/testing/selftests/cgroup/test_cpu.c
+++ b/tools/testing/selftests/cgroup/test_cpu.c
@@ -796,8 +796,10 @@ struct cpucg_test {
int main(int argc, char *argv[])
{
char root[PATH_MAX];
- int i, ret = EXIT_SUCCESS;
+ int i;
+ ksft_print_header();
+ ksft_set_plan(ARRAY_SIZE(tests));
if (cg_find_unified_root(root, sizeof(root), NULL))
ksft_exit_skip("cgroup v2 isn't mounted\n");
@@ -814,11 +816,10 @@ int main(int argc, char *argv[])
ksft_test_result_skip("%s\n", tests[i].name);
break;
default:
- ret = EXIT_FAILURE;
ksft_test_result_fail("%s\n", tests[i].name);
break;
}
}
- return ret;
+ ksft_finished();
}