Skip to content

Commit cb54064

Browse files
devnexengregkh
authored andcommitted
selftests/sched_ext: Add missing error check for exit__load()
[ Upstream commit 1d02346 ] 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: a5db781 ("sched_ext: Add selftests") Signed-off-by: David Carlier <devnexen@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 75849e1 commit cb54064

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • tools/testing/selftests/sched_ext

tools/testing/selftests/sched_ext/exit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static enum scx_test_status run(void *ctx)
3333
skel = exit__open();
3434
SCX_ENUM_INIT(skel);
3535
skel->rodata->exit_point = tc;
36-
exit__load(skel);
36+
SCX_FAIL_IF(exit__load(skel), "Failed to load skel");
3737
link = bpf_map__attach_struct_ops(skel->maps.exit_ops);
3838
if (!link) {
3939
SCX_ERR("Failed to attach scheduler");

0 commit comments

Comments
 (0)