epoll_creat01: Replace TST_PASS with TST_RET
PATCH 1/1 epoll_creat01: Replace TST_PASS with TST_RET
In TST_EXP_FD(), the value of TST_RET is the returned fd, not TST_PASS.
--- testcases/kernel/syscalls/epoll_create/epoll_create01.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
testcases/kernel/syscalls/epoll_create/epoll_create01.c +2 -3
@@ -26,9 +26,8 @@ static void run(unsigned int n) {TST_EXP_FD (tst_syscall (__NR_epoll_create, tc[n]),"epoll_create(%d)" , tc[n]); -if (!TST_PASS ) -return ; -SAFE_CLOSE (TST_PASS ); +if (TST_RET ) +SAFE_CLOSE (TST_RET ); }static struct tst_test test = {
--
2.25.1
PATCH 1/1 epoll_creat01: Replace TST_PASS with TST_RET
Hi,
Quoted 13 lines
In
TST_EXP_FD(), the value ofTST_RETis the returned fd, notTST_PASS.Fixes 081f940b2df00 ("epoll_create: Add test for epoll_create01")Signed-off-by Xie Ziyao <[email protected]>--- testcases/kernel/syscalls/epoll_create/epoll_create01.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)testcases/kernel/syscalls/epoll_create/epoll_create01.c +0
-0
testcases/kernel/syscalls/epoll_create/epoll_create01.c static void run(unsigned int n) · line 30
Quoted 8 lines
testcases/kernel/syscalls/epoll_create/epoll_create01.c +2
-3@@ -26,9 +26,8 @@ static void run(unsigned int n) {TST_EXP_FD (tst_syscall (__NR_epoll_create, tc[n]),"epoll_create(%d)" , tc[n]); -if (!TST_PASS ) -return ; -SAFE_CLOSE (TST_PASS ); +if (TST_RET ) +SAFE_CLOSE (TST_RET );
This patch fixes the incorrect use of TST_PASS in commit 081f940 ("epoll_create: Add test for epoll_create01"), which I noticed when reviewing the merged commit.
Sorry for this minor mistake.
Quoted 7 lines
testcases/kernel/syscalls/epoll_create/epoll_create01.c +0
-1}static struct tst_test test = { --2.25.1
Signature · 3 lines
Best Regards, Xie Ziyao E-mail: [email protected]
PATCH 1/1 epoll_creat01: Replace TST_PASS with TST_RET
In reply to Xie ZiyaoHi!
Quoted 5 lines
testcases/kernel/syscalls/epoll_create/epoll_create01.c +0
-0
testcases/kernel/syscalls/epoll_create/epoll_create01.c static void run(unsigned int n) · line 31
Quoted 9 lines
testcases/kernel/syscalls/epoll_create/epoll_create01.c +2
-3@@ -26,9 +26,8 @@ static void run(unsigned int n) {TST_EXP_FD (tst_syscall (__NR_epoll_create, tc[n]),"epoll_create(%d)" , tc[n]); -if (!TST_PASS ) -return ; -SAFE_CLOSE (TST_PASS ); +if (TST_RET ) +SAFE_CLOSE (TST_RET ); }
Isn't this broken as well?
As far as I can tell the if (!TST_PASS) part in the test is correct and we only have to change the TST_PASS to TST_RET in the SAFE_CLOSE().
So we should apply:
testcases/kernel/syscalls/epoll_create/epoll_create01.c +1 -1
@@ -28,7 +28,7 @@ static void run(unsigned int n)if (!TST_PASS )return ; -SAFE_CLOSE (TST_PASS ); +SAFE_CLOSE (TST_RET ); }static struct tst_test test = {
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 epoll_creat01: Replace TST_PASS with TST_RET
Hi, Cyril,
Quoted 17 lines
Hi!
Quoted 5 lines
testcases/kernel/syscalls/epoll_create/epoll_create01.c +0
-0testcases/kernel/syscalls/epoll_create/epoll_create01.c static void run(unsigned int n) · line 31
Quoted 9 lines
testcases/kernel/syscalls/epoll_create/epoll_create01.c +2
-3@@ -26,9 +26,8 @@ static void run(unsigned int n) {TST_EXP_FD (tst_syscall (__NR_epoll_create, tc[n]),"epoll_create(%d)" , tc[n]); -if (!TST_PASS ) -return ; -SAFE_CLOSE (TST_PASS ); +if (TST_RET ) +SAFE_CLOSE (TST_RET ); }Isn't this broken as well?
Quoted 2 lines
As far as I can tell the if (!TST_PASS) part in the test is correct and we only have to change the
TST_PASStoTST_RETin theSAFE_CLOSE().
Agree with you. By the way, would you mind helping to modify it?
Thanks a lot.
Quoted 18 lines
So we should apply:
testcases/kernel/syscalls/epoll_create/epoll_create01.c +1
-1@@ -28,7 +28,7 @@ static void run(unsigned int n)if (!TST_PASS )return ; -SAFE_CLOSE (TST_PASS ); +SAFE_CLOSE (TST_RET ); }static struct tst_test test = {
Signature · 3 lines
Best Regards, Xie Ziyao E-mail: [email protected]
PATCH 1/1 epoll_creat01: Replace TST_PASS with TST_RET
Hi,
Quoted 21 lines
Hi, Cyril,
Quoted 19 lines
Hi!
Quoted 6 lines
testcases/kernel/syscalls/epoll_create/epoll_create01.c +0
-0testcases/kernel/syscalls/epoll_create/epoll_create01.c static void run(unsigned int n) · line 32
Quoted 10 lines
testcases/kernel/syscalls/epoll_create/epoll_create01.c +2
-3@@ -26,9 +26,8 @@ static void run(unsigned int n) ? { ????? TST_EXP_FD(tst_syscall(__NR_epoll_create, tc[n]),"epoll_create(%d)" , tc[n]); -??? if (!TST_PASS) -??????? return; -??? SAFE_CLOSE(TST_PASS); +??? if (TST_RET) +??????? SAFE_CLOSE(TST_RET); ? }Isn't this broken as well?
Quoted 4 lines
Quoted 2 lines
As far as I can tell the if (!TST_PASS) part in the test is correct and we only have to change the
TST_PASStoTST_RETin theSAFE_CLOSE().Agree with you. By the way, would you mind helping to modify it?
I helped modify it, and thanks for your review.
Quoted 22 lines
Thanks a lot.
Quoted 19 lines
So we should apply:
testcases/kernel/syscalls/epoll_create/epoll_create01.c +1
-1@@ -28,7 +28,7 @@ static void run(unsigned int n) ???????? if (!TST_PASS) ???????????????? return; -?????? SAFE_CLOSE(TST_PASS); +?????? SAFE_CLOSE(TST_RET); ? } ? static struct tst_test test = {
Signature · 3 lines
Best Regards, Xie Ziyao E-mail: [email protected]