Skip to contentSkip to conversation

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

PATCH New Zhao Gongyi 2 participants 2 messages Apr 25, 2021 – Apr 26, 2021

lore
Share & tools
lore
#0 lore raw

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

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".

---
 testcases/kernel/syscalls/open/open05.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
testcases/kernel/syscalls/open/open05.c +1 -2
index 051aec3b3..f5098be2d 100644
@@ -103,11 +103,10 @@ int main(int ac, char **av)
 				tst_resm(TFAIL, "Failures reported above");
 
 			close(fd);
-			cleanup();
-
 		}
 	}
 
+	cleanup();
 	tst_exit();
 }
 

--
2.17.1