[PATCH v2] kernel:flock: Change tst_resm() followed by tst_exit() to tst_brkm()

Maninder Singh maninder1.s at samsung.com
Wed Jun 10 12:39:34 UTC 2015


Please ignore i posted in wrong community, sorry.


------- Original Message -------
Sender : Maninder Singh<maninder1.s at samsung.com> Software Engineer (2)/SRI-Delhi-Platform S/W 1 Team/Samsung Electronics 
Date : Jun 10, 2015 19:24 (GMT+09:00)
Title : [PATCH v2] kernel:flock: Change tst_resm() followed by tst_exit() to tst_brkm()

As in commit 9fa8ad0 Change tst_resm() followed by tst_exit() to tst_brkm()

Signed-off-by: Maninder Singh <maninder1.s at samsung.com>
Signed-off-by: Akhilesh Kumar <akhilesh.k at samsung.com>
---
 testcases/kernel/syscalls/flock/flock01.c |   12 ++----------
 testcases/kernel/syscalls/flock/flock06.c |   10 ++--------
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/testcases/kernel/syscalls/flock/flock01.c b/testcases/kernel/syscalls/flock/flock01.c
index c010608..44b30d1 100644
--- a/testcases/kernel/syscalls/flock/flock01.c
+++ b/testcases/kernel/syscalls/flock/flock01.c
@@ -156,16 +156,8 @@ void setup(void)
 
 	/* creating temporary file */
 	fd = creat(filename, 0644);
-	if (fd < 0) {
-		tst_resm(TFAIL, "creating a new file failed");
-
-		/* Removing temp directory */
-		tst_rmdir();
-
-		/* exit with resturn code appropriate for result */
-		tst_exit();
-
-	}
+	if (fd < 0)
+		tst_brkm(TFAIL, tst_rmdir, "creating a new file failed");
 }
 
 /*
diff --git a/testcases/kernel/syscalls/flock/flock06.c b/testcases/kernel/syscalls/flock/flock06.c
index 1f1e9c3..0065c53 100644
--- a/testcases/kernel/syscalls/flock/flock06.c
+++ b/testcases/kernel/syscalls/flock/flock06.c
@@ -160,14 +160,8 @@ void setup(void)
 
 	/* creating temporary file */
 	fd = creat(filename, 0666);
-	if (fd < 0) {
-		tst_resm(TFAIL, "creating a new file failed");
-
-		/* Removing temp dir */
-		tst_rmdir();
-
-		tst_exit();
-	}
+	if (fd < 0)
+		tst_brkm(TFAIL, tst_rmdir, "creating a new file failed");
 	close(fd);
 }
 
-- 
1.7.9.5
_______________________________________________
busybox mailing list
busybox at busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


More information about the busybox mailing list