* [LTP] [PATCH] open_posix_testsuite/sched_yield: Fix sched_setscheduler() check @ 2026-09-28 8:36 yang.zhang 2026-09-29 7:06 ` [LTP] " linuxtestproject.agent 0 siblings, 1 reply; 4+ messages in thread From: yang.zhang @ 2026-09-28 8:36 UTC (permalink / raw) To: ltp; +Cc: yang.zhang From: "yang.zhang" <zhangyang01@kylinos.cn> POSIX specifies that sched_setscheduler() returns the former scheduling policy on success and -1 on failure. Treating every nonzero return value as an error incorrectly rejects valid previous policies. Check explicitly for -1. Signed-off-by: yang.zhang <zhangyang01@kylinos.cn> --- .../conformance/interfaces/sched_yield/1-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/1-1.c index 922b1aa1f..9c5189af9 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/1-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/1-1.c @@ -82,7 +82,7 @@ int test_main(int argc PTS_ATTRIBUTE_UNUSED, char **argv PTS_ATTRIBUTE_UNUSED) /* get in FIFO */ sp.sched_priority = sched_get_priority_min(SCHED_FIFO); rc = sched_setscheduler(getpid(), SCHED_FIFO, &sp); - if (rc) { + if (rc == -1) { ERR_LOG("sched_setscheduler", rc); return status; } -- 2.34.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] open_posix_testsuite/sched_yield: Fix sched_setscheduler() check 2026-09-28 8:36 [LTP] [PATCH] open_posix_testsuite/sched_yield: Fix sched_setscheduler() check yang.zhang @ 2026-09-29 7:06 ` linuxtestproject.agent 2026-10-05 12:10 ` Andrea Cervesato via ltp 2026-10-05 12:11 ` Andrea Cervesato via ltp 0 siblings, 2 replies; 4+ messages in thread From: linuxtestproject.agent @ 2026-09-29 7:06 UTC (permalink / raw) To: yang . zhang; +Cc: ltp Hi Yang, On Mon Sep 28 16:36:03 2026 +0800, yang.zhang wrote: > open_posix_testsuite/sched_yield: Fix sched_setscheduler() check Verdict - Reviewed --- Note: The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions. Regards, LTP AI Reviewer -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] open_posix_testsuite/sched_yield: Fix sched_setscheduler() check 2026-09-29 7:06 ` [LTP] " linuxtestproject.agent @ 2026-10-05 12:10 ` Andrea Cervesato via ltp 2026-10-05 12:11 ` Andrea Cervesato via ltp 1 sibling, 0 replies; 4+ messages in thread From: Andrea Cervesato via ltp @ 2026-10-05 12:10 UTC (permalink / raw) To: linuxtestproject.agent; +Cc: yang . zhang, ltp Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com> -- Andrea Cervesato SUSE QE Automation Engineer Linux andrea.cervesato@suse.com -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] open_posix_testsuite/sched_yield: Fix sched_setscheduler() check 2026-09-29 7:06 ` [LTP] " linuxtestproject.agent 2026-10-05 12:10 ` Andrea Cervesato via ltp @ 2026-10-05 12:11 ` Andrea Cervesato via ltp 1 sibling, 0 replies; 4+ messages in thread From: Andrea Cervesato via ltp @ 2026-10-05 12:11 UTC (permalink / raw) To: linuxtestproject.agent; +Cc: yang . zhang, ltp Merged, Thanks! -- Andrea Cervesato SUSE QE Automation Engineer Linux andrea.cervesato@suse.com -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-05 12:11 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-09-28 8:36 [LTP] [PATCH] open_posix_testsuite/sched_yield: Fix sched_setscheduler() check yang.zhang 2026-09-29 7:06 ` [LTP] " linuxtestproject.agent 2026-10-05 12:10 ` Andrea Cervesato via ltp 2026-10-05 12:11 ` Andrea Cervesato via ltp
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.