Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH] starvation: honor -t instead of calibrating
@ 2026-08-21  5:53 Victor Cheng-Yen Yang via ltp
  2026-08-21  6:54 ` [LTP] " linuxtestproject.agent
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Victor Cheng-Yen Yang via ltp @ 2026-08-21  5:53 UTC (permalink / raw)
  To: ltp

tst_parse_int() returns 0 both when the option is absent and when it
parses successfully, so its return value cannot distinguish the two.

Use the zero-initialized timeout as the "not set" sentinel and skip
calibration entirely when -t is supplied correctly.

Signed-off-by: Victor Cheng-Yen Yang <cyyang772@andestech.com>
---
 testcases/kernel/sched/cfs-scheduler/starvation.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/sched/cfs-scheduler/starvation.c b/testcases/kernel/sched/cfs-scheduler/starvation.c
index 045254ba4..ff041bdcd 100644
--- a/testcases/kernel/sched/cfs-scheduler/starvation.c
+++ b/testcases/kernel/sched/cfs-scheduler/starvation.c
@@ -107,7 +107,8 @@ static void setup(void)
 
 	if (tst_parse_int(str_timeout, &timeout, 1, INT_MAX))
 		tst_brk(TBROK, "Invalid number of timeout '%s'", str_timeout);
-	else
+
+	if (!timeout)
 		timeout = callibrate() / 1000;
 
 	if (tst_has_slow_kconfig())
-- 
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [LTP] starvation: honor -t instead of calibrating
  2026-08-21  5:53 [LTP] [PATCH] starvation: honor -t instead of calibrating Victor Cheng-Yen Yang via ltp
@ 2026-08-21  6:54 ` linuxtestproject.agent
  2026-08-24 10:41 ` [LTP] [PATCH] " Andrea Cervesato via ltp
  2026-08-24 10:41 ` Andrea Cervesato via ltp
  2 siblings, 0 replies; 4+ messages in thread
From: linuxtestproject.agent @ 2026-08-21  6:54 UTC (permalink / raw)
  To: Victor Cheng-Yen Yang; +Cc: ltp

Hi Victor,

On Fri, Aug 21, 2026, Victor Cheng-Yen Yang wrote:
> starvation: honor -t instead of calibrating

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] [PATCH] starvation: honor -t instead of calibrating
  2026-08-21  5:53 [LTP] [PATCH] starvation: honor -t instead of calibrating Victor Cheng-Yen Yang via ltp
  2026-08-21  6:54 ` [LTP] " linuxtestproject.agent
@ 2026-08-24 10:41 ` Andrea Cervesato via ltp
  2026-08-24 10:41 ` Andrea Cervesato via ltp
  2 siblings, 0 replies; 4+ messages in thread
From: Andrea Cervesato via ltp @ 2026-08-24 10:41 UTC (permalink / raw)
  To: Victor Cheng-Yen Yang; +Cc: 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] [PATCH] starvation: honor -t instead of calibrating
  2026-08-21  5:53 [LTP] [PATCH] starvation: honor -t instead of calibrating Victor Cheng-Yen Yang via ltp
  2026-08-21  6:54 ` [LTP] " linuxtestproject.agent
  2026-08-24 10:41 ` [LTP] [PATCH] " Andrea Cervesato via ltp
@ 2026-08-24 10:41 ` Andrea Cervesato via ltp
  2 siblings, 0 replies; 4+ messages in thread
From: Andrea Cervesato via ltp @ 2026-08-24 10:41 UTC (permalink / raw)
  To: Victor Cheng-Yen Yang; +Cc: 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-08-24 10:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21  5:53 [LTP] [PATCH] starvation: honor -t instead of calibrating Victor Cheng-Yen Yang via ltp
2026-08-21  6:54 ` [LTP] " linuxtestproject.agent
2026-08-24 10:41 ` [LTP] [PATCH] " Andrea Cervesato via ltp
2026-08-24 10:41 ` Andrea Cervesato via ltp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox