* [LTP] [PATCH v1] Change the fd validity check to < 0
@ 2026-03-05 6:23 成渭滨
2026-03-12 12:52 ` Andrea Cervesato via ltp
0 siblings, 1 reply; 2+ messages in thread
From: 成渭滨 @ 2026-03-05 6:23 UTC (permalink / raw)
To: ltp; +Cc: 成渭滨
---
testcases/kernel/controllers/cgroup/cgroup_core02.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/controllers/cgroup/cgroup_core02.c b/testcases/kernel/controllers/cgroup/cgroup_core02.c
index aba387197..a5c8c9684 100644
--- a/testcases/kernel/controllers/cgroup/cgroup_core02.c
+++ b/testcases/kernel/controllers/cgroup/cgroup_core02.c
@@ -77,8 +77,8 @@ static void test_lesser_ns_open(void)
SAFE_MUNMAP(stack, STACK_SIZE);
for (i = 0; i < targ.loops; i++) {
- if (targ.fds[i] < 1) {
- tst_res(TFAIL, "unexpected negative fd %d", targ.fds[i]);
+ if (targ.fds[i] < 0) {
+ tst_res(TFAIL, "unexpected invalid fd %d", targ.fds[i]);
exit(1);
}
--
2.20.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [LTP] [PATCH v1] Change the fd validity check to < 0
2026-03-05 6:23 [LTP] [PATCH v1] Change the fd validity check to < 0 成渭滨
@ 2026-03-12 12:52 ` Andrea Cervesato via ltp
0 siblings, 0 replies; 2+ messages in thread
From: Andrea Cervesato via ltp @ 2026-03-12 12:52 UTC (permalink / raw)
To: 成渭滨, ltp; +Cc: 成渭滨
Hi!
> ---
> testcases/kernel/controllers/cgroup/cgroup_core02.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/controllers/cgroup/cgroup_core02.c b/testcases/kernel/controllers/cgroup/cgroup_core02.c
> index aba387197..a5c8c9684 100644
> --- a/testcases/kernel/controllers/cgroup/cgroup_core02.c
> +++ b/testcases/kernel/controllers/cgroup/cgroup_core02.c
> @@ -77,8 +77,8 @@ static void test_lesser_ns_open(void)
> SAFE_MUNMAP(stack, STACK_SIZE);
>
> for (i = 0; i < targ.loops; i++) {
> - if (targ.fds[i] < 1) {
> - tst_res(TFAIL, "unexpected negative fd %d", targ.fds[i]);
> + if (targ.fds[i] < 0) {
> + tst_res(TFAIL, "unexpected invalid fd %d", targ.fds[i]);
> exit(1);
> }
>
> --
> 2.20.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
Technically, the message is not matching the logic, but is there a particular
case why you think this patch is needed?
Kind regards,
--
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] 2+ messages in thread
end of thread, other threads:[~2026-03-12 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 6:23 [LTP] [PATCH v1] Change the fd validity check to < 0 成渭滨
2026-03-12 12:52 ` 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