Style and conformance changes.
1. Strip all leading space.
2. Move tst_exit() to main().
3. Remove tst_exit() from cleanup().
4. Remove cluebat comments.
5. Reduce some unnecessary whitespace.
Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c
index 5cf2d66..bcbb52c 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c
@@ -129,10 +129,9 @@
*/
void setup(void)
{
- /* capture signals */
+
tst_sig(NOFORK, DEF_HANDLER, cleanup);
- /* Pause if that option was specified */
TEST_PAUSE;
/*
@@ -163,7 +162,6 @@
/* if it exists, remove the message queue */
rm_queue(msg_q_1);
- /* Remove the temporary directory */
tst_rmdir();
/*
@@ -172,6 +170,4 @@
*/
TEST_CLEANUP;
- /* exit with return code appropriate for results */
- tst_exit();
-}
+}
\ No newline at end of file
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c
index a9e687d..1ce9745 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c
@@ -143,10 +143,9 @@
*/
void setup(void)
{
- /* capture signals */
+
tst_sig(NOFORK, DEF_HANDLER, cleanup);
- /* Pause if that option was specified */
TEST_PAUSE;
/*
@@ -186,7 +185,6 @@
/* if it exists, remove the message queue */
rm_queue(msg_q_1);
- /* Remove the temporary directory */
tst_rmdir();
/*
@@ -195,6 +193,4 @@
*/
TEST_CLEANUP;
- /* exit with return code appropriate for results */
- tst_exit();
-}
+}
\ No newline at end of file
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c
index 121e29f..c282aaf 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c
@@ -123,10 +123,9 @@
*/
void setup(void)
{
- /* capture signals */
+
tst_sig(NOFORK, DEF_HANDLER, cleanup);
- /* Pause if that option was specified */
TEST_PAUSE;
/*
@@ -154,7 +153,6 @@
/* if it exists, remove the message queue */
rm_queue(msg_q_1);
- /* Remove the temporary directory */
tst_rmdir();
/*
@@ -163,6 +161,4 @@
*/
TEST_CLEANUP;
- /* exit with return code appropriate for results */
- tst_exit();
-}
+}
\ No newline at end of file
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c
index 783b09a..74aa141 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c
@@ -162,13 +162,11 @@
{
key_t msgkey2;
- /* capture signals */
tst_sig(NOFORK, DEF_HANDLER, cleanup);
/* Set up the expected error numbers for -e option */
TEST_EXP_ENOS(exp_enos);
- /* Pause if that option was specified */
TEST_PAUSE;
/* Switch to nobody user for correct error code collection */
@@ -216,7 +214,6 @@
rm_queue(msg_q_2);
- /* Remove the temporary directory */
tst_rmdir();
/*
@@ -225,6 +222,4 @@
*/
TEST_CLEANUP;
- /* exit with return code appropriate for results */
- tst_exit();
-}
+}
\ No newline at end of file
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
index 5de0144..b923f30 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
@@ -111,13 +111,12 @@
/* if it exists, remove the message queue */
rm_queue(msg_q_1);
- /* Remove the temporary directory */
tst_rmdir();
}
cleanup();
/**NOT REACHED**/
- return 0;
+ tst_exit();
}
/*
@@ -170,13 +169,11 @@
/* check for root as user id of process */
check_root();
- /* capture signals */
tst_sig(FORK, DEF_HANDLER, cleanup);
/* Set up the expected error numbers for -e option */
TEST_EXP_ENOS(exp_enos);
- /* Pause if that option was specified */
TEST_PAUSE;
/*
@@ -209,6 +206,4 @@
*/
TEST_CLEANUP;
- /* exit with return code appropriate for results */
- tst_exit();
-}
+}
\ No newline at end of file
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c
index 07494c5..702b43d 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c
@@ -124,8 +124,8 @@
***************************************************************/
cleanup();
- return 0;
-} /* End main */
+ tst_exit();
+}
/***************************************************************
* * setup() - performs all ONE TIME setup for this test.
@@ -137,7 +137,6 @@
*/
tst_sig(NOFORK, DEF_HANDLER, cleanup);
- /* Pause if that option was specified */
/* One cavet that hasn't been fixed yet. TEST_PAUSE contains the code to
* fork the test with the -c option. You want to make sure you do this
* before you create your temporary directory.
@@ -177,14 +176,11 @@
if ((status = msgctl(msqid, IPC_STAT, &buf)) != -1) {
(void)msgctl(msqid, IPC_RMID, NULL);
tst_resm(TFAIL, "msgctl(msqid, IPC_RMID) failed");
- tst_exit();
+
}
fflush(stdout);
- /* Remove the temporary directory */
tst_rmdir();
- /* exit with return code appropriate for results */
- tst_exit();
-}
+}
\ No newline at end of file
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c
index 0047ce6..6d3a04c 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c
@@ -334,7 +334,6 @@
*/
tst_sig(FORK, DEF_HANDLER, cleanup);
- /* Pause if that option was specified */
/* One cavet that hasn't been fixed yet. TEST_PAUSE contains the code to
* fork the test with the -c option. You want to make sure you do this
* before you create your temporary directory.
@@ -355,7 +354,7 @@
* ***************************************************************/
void cleanup()
{
- /* Remove the temporary directory */
+
tst_rmdir();
/*
@@ -364,6 +363,4 @@
*/
TEST_CLEANUP;
- /* exit with return code appropriate for results */
- tst_exit();
-}
+}
\ No newline at end of file
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c
index cac5d6b..a634045 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c
@@ -447,7 +447,6 @@
*/
tst_sig(FORK, DEF_HANDLER, cleanup);
- /* Pause if that option was specified */
/* One cavet that hasn't been fixed yet. TEST_PAUSE contains the code to
* fork the test with the -c option. You want to make sure you do this
* before you create your temporary directory.
@@ -491,7 +490,7 @@
if ((status = msgctl(tid, IPC_STAT, NULL)) != -1) {
(void)msgctl(tid, IPC_RMID, NULL);
tst_resm(TFAIL, "msgctl(tid, IPC_RMID) failed");
- tst_exit();
+
}
fflush(stdout);
@@ -501,6 +500,5 @@
*/
TEST_CLEANUP;
tst_rmdir();
- /* exit with return code appropriate for results */
- tst_exit();
-}
+
+}
\ No newline at end of file
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c
index 17aa706..30ca178 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c
@@ -615,7 +615,6 @@
*/
tst_sig(FORK, DEF_HANDLER, cleanup);
- /* Pause if that option was specified */
/* One cavet that hasn't been fixed yet. TEST_PAUSE contains the code to
* fork the test with the -c option. You want to make sure you do this
* before you create your temporary directory.
@@ -665,11 +664,10 @@
if ((status = msgctl(tid, IPC_STAT, NULL)) != -1) {
(void)msgctl(tid, IPC_RMID, NULL);
tst_resm(TFAIL, "msgctl(tid, IPC_RMID) failed");
- tst_exit();
+
}
fflush(stdout);
tst_rmdir();
- /* exit with return code appropriate for results */
- tst_exit();
-}
+
+}
\ No newline at end of file
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c
index 4ea4e0d..ee7235d 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c
@@ -444,7 +444,6 @@
*/
tst_sig(FORK, DEF_HANDLER, cleanup);
- /* Pause if that option was specified */
/* One cavet that hasn't been fixed yet. TEST_PAUSE contains the code to
* fork the test with the -c option. You want to make sure you do this
* before you create your temporary directory.
@@ -487,7 +486,7 @@
if ((status = msgctl(tid, IPC_STAT, NULL)) != -1) {
(void)msgctl(tid, IPC_RMID, NULL);
tst_resm(TFAIL, "msgctl(tid, IPC_RMID) failed");
- tst_exit();
+
}
fflush(stdout);
@@ -497,6 +496,5 @@
*/
TEST_CLEANUP;
tst_rmdir();
- /* exit with return code appropriate for results */
- tst_exit();
-}
+
+}
\ No newline at end of file
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl11.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl11.c
index bf74033..1183f8e 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl11.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl11.c
@@ -618,7 +618,6 @@
*/
tst_sig(FORK, DEF_HANDLER, cleanup);
- /* Pause if that option was specified */
/* One cavet that hasn't been fixed yet. TEST_PAUSE contains the code to
* fork the test with the -c option. You want to make sure you do this
* before you create your temporary directory.
@@ -682,11 +681,10 @@
if ((status = msgctl(tid, IPC_STAT, NULL)) != -1) {
(void)msgctl(tid, IPC_RMID, NULL);
tst_resm(TFAIL, "msgctl(tid, IPC_RMID) failed");
- tst_exit();
+
}
fflush(stdout);
tst_rmdir();
- /* exit with return code appropriate for results */
- tst_exit();
-}
+
+}
\ No newline at end of file