diff mbox series

syscalls/open05: Move cleanup() to the end of test

Message ID 20210425091959.13609-1-zhaogongyi@huawei.com
State Accepted
Headers show
Series syscalls/open05: Move cleanup() to the end of test | expand

Commit Message

Zhao Gongyi April 25, 2021, 9:19 a.m. UTC
When the test run with the option of '-i', we need to move
cleanup() to the end of test, otherwist the test will fail,
and report: "TFAIL  :  open05.c:85: Expected EACCES got 2".

Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
---
 testcases/kernel/syscalls/open/open05.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--
2.17.1

Comments

Cyril Hrubis April 26, 2021, 2:30 p.m. UTC | #1
Hi!
Pushed, thanks.
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/open/open05.c b/testcases/kernel/syscalls/open/open05.c
index 051aec3b3..f5098be2d 100644
--- a/testcases/kernel/syscalls/open/open05.c
+++ b/testcases/kernel/syscalls/open/open05.c
@@ -103,11 +103,10 @@  int main(int ac, char **av)
 				tst_resm(TFAIL, "Failures reported above");

 			close(fd);
-			cleanup();
-
 		}
 	}

+	cleanup();
 	tst_exit();
 }