summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHemanth Selam <hemanth.selam@gmail.com>2026-08-19 14:06:00 +0530
committerTejun Heo <tj@kernel.org>2026-08-19 10:04:43 -1000
commit0c893d170ff8efe7b4067552932d26e7defba307 (patch)
tree8e6ff0241f6a54810ce5c53872316ebd5baf455b /scripts
parent2d19207f3fc8e08bab3270af2e3835358ab1473a (diff)
downloadlinux-next-0c893d170ff8efe7b4067552932d26e7defba307.tar.gz
linux-next-0c893d170ff8efe7b4067552932d26e7defba307.zip
selftests/cgroup: set the test plan after the setup checks
The cgroup tests announce their plan before checking whether cgroup v2 is available, so on a host without it they promise a number of results and then skip out after the first one: TAP version 13 1..3 ok 1 # SKIP cgroup v2 isn't mounted # Planned tests != run tests (3 != 1) # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:1 error:0 ksft_exit_skip() can only emit a well formed "1..0 # SKIP" line while no plan has been printed, as the comment above it in kselftest.h points out. Move ksft_set_plan() below the setup checks that can skip, so that a skipped run reports: TAP version 13 1..0 # SKIP cgroup v2 isn't mounted Several of the tests skip more than once while setting up, for a missing or unwritable controller as well, so the plan goes after the last of them. test_core joins its two setup paths at the post_v2_setup label and sets the plan there. Reporting each planned test as skipped instead would keep the plan where it is, but the setup failures here mean the whole test cannot run rather than its individual cases being skipped, which is what "1..0 # SKIP" is for. Fixes: 1dc830ee4c15 ("selftests/cgroup: conform test to KTAP format output") Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com> Reviewed-by: Sarthak Sharma <sarthak.sharma@arm.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions