Hi All,

Here is the patch you can find for code cleanup in pid namespace
testcases.

Changelog:

    - Removed extra line from pidns01.c, pidns02.c, pidns03.c
    - Added return for removing warning for non-void function.
    - Tested on x86, x86_64 & s390x boxes.


Thanks
Rishi
Description: Removal of warning and some extra comments.

Signed-off By : Rishikesh K Rajak <[EMAIL PROTECTED]>
---
Index: ltp-full-20080131/testcases/kernel/containers/pidns/pidns01.c
===================================================================
--- ltp-full-20080131.orig/testcases/kernel/containers/pidns/pidns01.c	2007-12-28 04:40:55.000000000 -0500
+++ ltp-full-20080131/testcases/kernel/containers/pidns/pidns01.c	2008-02-06 00:47:20.000000000 -0500
@@ -27,7 +27,7 @@
 * 2. When parent clone a process with flag CLONE_NEWPID, the parent process ID of
 * should be always zero.
 *
-* Total Tests: 6 assertions
+* Total Tests:
 *
 * Test Name: pidns01
 *
@@ -101,7 +101,10 @@
 		tst_resm(TFAIL, "FAIL: Got unexpected result of"
 			" cpid=%d ppid=%d\n", cpid, ppid);
 	}
-	tst_exit();
+	cleanup();
+
+	/* NOT REACHED */
+	return 0;
 }
 
 /***********************************************************************
Index: ltp-full-20080131/testcases/kernel/containers/pidns/pidns03.c
===================================================================
--- ltp-full-20080131.orig/testcases/kernel/containers/pidns/pidns03.c	2007-12-28 04:40:56.000000000 -0500
+++ ltp-full-20080131/testcases/kernel/containers/pidns/pidns03.c	2008-02-06 01:04:13.000000000 -0500
@@ -25,7 +25,7 @@
 * 1. When parent, clone a process with flag CLONE_NEWPID, see the process id
 * of the parent is existing after mounting /proc
 *
-* Total Tests: 6 assertions
+* Total Tests:
 *
 * Test Name: pidns03
 *
@@ -67,7 +67,6 @@
 char *TCID = "pid_namespace3";
 int TST_TOTAL;
 
-static void setup();
 static void cleanup();
 static int child_fn();
 
@@ -165,6 +164,9 @@
 	}
 
 	cleanup();
+
+	/* NOT REACHED */
+	return 0;
 }
 
 /*
Index: ltp-full-20080131/testcases/kernel/containers/pidns/pidns02.c
===================================================================
--- ltp-full-20080131.orig/testcases/kernel/containers/pidns/pidns02.c	2007-12-28 04:40:56.000000000 -0500
+++ ltp-full-20080131/testcases/kernel/containers/pidns/pidns02.c	2008-02-06 00:47:01.000000000 -0500
@@ -27,7 +27,7 @@
 * 2. When parent clone a process with flag CLONE_NEWPID, the parent process group ID
 * should be always one.
 *
-* Total Tests: 6 assertions
+* Total Tests
 *
 * Test Name: pidns02
 *
Index: ltp-full-20080131/testcases/kernel/containers/sysvipc/shmnstest.c
===================================================================
--- ltp-full-20080131.orig/testcases/kernel/containers/sysvipc/shmnstest.c	2007-12-28 04:48:30.000000000 -0500
+++ ltp-full-20080131/testcases/kernel/containers/sysvipc/shmnstest.c	2008-02-06 01:26:47.000000000 -0500
@@ -70,6 +70,9 @@
               shmctl(id, IPC_RMID, NULL);
       }
       tst_exit(0);
+
+      /* NOT REACHED */
+      return 0;
 }
 
 #define UNSHARESTR "unshare"
@@ -134,5 +137,9 @@
 
       /* destroy the key */
       shmctl(id, IPC_RMID, NULL);
+
       tst_exit(0);
+
+      /* NOT REACHED */
+      return 0;
 }
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to