* [LTP] [PATCH] pty03: Calculate test case count from test case array length
@ 2026-04-24 13:26 Martin Doucha
2026-04-24 13:45 ` [LTP] " linuxtestproject.agent
2026-04-25 6:11 ` [LTP] [PATCH] " Li Wang
0 siblings, 2 replies; 3+ messages in thread
From: Martin Doucha @ 2026-04-24 13:26 UTC (permalink / raw)
To: ltp
Use ARRAY_SIZE() to calculate test case count so that the number
does not need to be adjusted manually if anyone adds or removes
another line discipline to the list.
Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
The actual test cases start at ldiscs[1]. ldiscs[0] is a special value
for initializing the file descriptor before setting the real line
discipline.
testcases/kernel/pty/pty03.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/pty/pty03.c b/testcases/kernel/pty/pty03.c
index 99c659264..d4da24265 100644
--- a/testcases/kernel/pty/pty03.c
+++ b/testcases/kernel/pty/pty03.c
@@ -146,7 +146,7 @@ static void cleanup(void)
static struct tst_test test = {
.test = do_test,
- .tcnt = 9,
+ .tcnt = ARRAY_SIZE(ldiscs) - 1,
.setup = setup,
.cleanup = cleanup,
.needs_root = 1,
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] pty03: Calculate test case count from test case array length
2026-04-24 13:26 [LTP] [PATCH] pty03: Calculate test case count from test case array length Martin Doucha
@ 2026-04-24 13:45 ` linuxtestproject.agent
2026-04-25 6:11 ` [LTP] [PATCH] " Li Wang
1 sibling, 0 replies; 3+ messages in thread
From: linuxtestproject.agent @ 2026-04-24 13:45 UTC (permalink / raw)
To: Martin Doucha; +Cc: ltp, LTP AI Reviewer
Hi Martin,
On 2026-04-24, Martin Doucha wrote:
> pty03: Calculate test case count from test case array length
> - .tcnt = 9,
> + .tcnt = ARRAY_SIZE(ldiscs) - 1,
Reviewed-by: LTP AI Reviewer <ltp-ai@noreply.github.com>
---
Note:
Our agent completed the review of the patch. The full review can be
found at: https://patchwork.ozlabs.org/project/ltp/list/?series=501361
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] 3+ messages in thread
* Re: [LTP] [PATCH] pty03: Calculate test case count from test case array length
2026-04-24 13:26 [LTP] [PATCH] pty03: Calculate test case count from test case array length Martin Doucha
2026-04-24 13:45 ` [LTP] " linuxtestproject.agent
@ 2026-04-25 6:11 ` Li Wang
1 sibling, 0 replies; 3+ messages in thread
From: Li Wang @ 2026-04-25 6:11 UTC (permalink / raw)
To: Martin Doucha; +Cc: ltp
Patch merged, thanks!
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-25 6:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-24 13:26 [LTP] [PATCH] pty03: Calculate test case count from test case array length Martin Doucha
2026-04-24 13:45 ` [LTP] " linuxtestproject.agent
2026-04-25 6:11 ` [LTP] [PATCH] " Li Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox