Skip to content

Commit dad8365

Browse files
EricccTaiwanhtejun
authored andcommitted
selftests/sched_ext: Fix dsq_move_to_local check
scan_dsq_pool() checked == 0 against scx_bpf_dsq_move_to_local(), which returns true on success. This inverted success and failure, causing peek_dsq_dispatch() to double-dispatch on success and skip the real_dsq fallback on failure. Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent a73aa3a commit dad8365

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/testing/selftests/sched_ext/peek_dsq.bpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static int scan_dsq_pool(void)
9595
record_peek_result(task->pid);
9696

9797
/* Try to move this task to local */
98-
if (!moved && scx_bpf_dsq_move_to_local(dsq_id, 0) == 0) {
98+
if (!moved && scx_bpf_dsq_move_to_local(dsq_id, 0)) {
9999
moved = 1;
100100
break;
101101
}

0 commit comments

Comments
 (0)