[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltp-list
Subject:    [LTP] [patch 6/9]  create binary for runnin all tcp testcase
From:       skumar () linux ! vnet ! ibm ! com
Date:       2008-08-29 11:17:34
Message-ID: 20080829111405.936202645 () malik-laptop ! in ! ibm ! com
[Download RAW message or body]

The coming patch stack fixes some of the testcases sent earlier on the list by Veerendra
and adds new testcases for testing network namespace. The patches provides infrastructure
for tcp testcass and add one testcase for ping command test.
Content-Disposition: inline; filename=create-binary-for-testing-tcp-commands.patch

This patch adds the binary to run all the tcp command testcase for the network
namespace containers. The existing parent.sh script has been used for these tests 
as the script to be running in the parent namespace to avoid large code size.
In case there is an exclusive requirement for communication among the child
and parent you need to create a separate setup to run your test.

Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>

Index: containers/netns/test_tcp.c
===================================================================
--- /dev/null
+++ containers/netns/test_tcp.c
@@ -0,0 +1,40 @@
+/*************************************************************************
+* Copyright (c) International Business Machines Corp., 2008
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+* the GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*
+***************************************************************************/
+/* ============================================================================
+* This testcase creates the child container to test the tcp command testcases
+* inside the child namespace. The following program uses the library libclone
+* api to create the Network namespace container and may be removed to use the
+* containers management tools in future.
+*
+* The scripts parent.sh, runalltcpcmdtests.sh are passed as the parameters
+* which will be running in the parent and child namespace respectively.
+* Since these tests do not need anything to execute in parent namespace, we
+* do not pass any script and just pass the NULL.
+*
+* Author: Sudhir Kumar <skumar@linux.vnet.ibm.com>   26/08/2008
+* ============================================================================*/
+
+
+#define NULL (void*)0
+extern int create_net_namespace(char *, char *);
+
+int main()
+{
+    int status;
+    status = create_net_namespace(NULL, "runalltcpcmdtests.sh");
+    return status;
+}

-- 
Regards
Sudhir Kumar
Linux Technology Center
IBM, India.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic