]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/sched_ext: Add missing error check for exit__load()
authorDavid Carlier <devnexen@gmail.com>
Fri, 13 Mar 2026 05:17:55 +0000 (05:17 +0000)
committerTejun Heo <tj@kernel.org>
Fri, 13 Mar 2026 17:00:45 +0000 (07:00 -1000)
exit__load(skel) was called without checking its return value.
Every other test in the suite wraps the load call with
SCX_FAIL_IF(). Add the missing check to be consistent with the
rest of the test suite.

Fixes: a5db7817af78 ("sched_ext: Add selftests")
Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/testing/selftests/sched_ext/exit.c

index ee25824b1cbe6d0cb4aa1ba866e67ce5c242b298..b987611789d16e571bb7aacd2a4d945302767640 100644 (file)
@@ -33,7 +33,7 @@ static enum scx_test_status run(void *ctx)
                skel = exit__open();
                SCX_ENUM_INIT(skel);
                skel->rodata->exit_point = tc;
-               exit__load(skel);
+               SCX_FAIL_IF(exit__load(skel), "Failed to load skel");
                link = bpf_map__attach_struct_ops(skel->maps.exit_ops);
                if (!link) {
                        SCX_ERR("Failed to attach scheduler");