Change the fd validity check to < 0
PATCH 1/1 Change the fd validity check to < 0
--- testcases/kernel/controllers/cgroup/cgroup_core02.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/controllers/cgroup/cgroup_core02.c +2 -2
@@ -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 ); }
Signature · 5 lines
2.20.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Quoted 25 lines
--- testcases/kernel/controllers/cgroup/cgroup_core02.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)testcases/kernel/controllers/cgroup/cgroup_core02.c +2
-2@@ -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 ); }Signature · 5 lines
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
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp