Re: [LTP] [PATCH 1/4] ltp: posix message queue namespaces: first test

2009-03-04 Thread Subrata Modak
On Wed, 2009-03-04 at 08:15 -0600, Serge E. Hallyn wrote:
 Quoting Subrata Modak (subr...@linux.vnet.ibm.com):
  Thanks Serge  Nadia for contributing these tests to LTP. I had one
  round of testing before merging them. Please see the results and the
  config file attached.
 
 Hi Subrata,
 
 did you run this against -mm?

Nope. I thought that since CONFIG_POSIX_MQUEUE was enabled in my 2.6.27
default kernel, the tests should run successfully.

But, now i understand that there are code enhancements for
CONFIG_POSIX_MQUEUE which will be available only in the coming releases,
and, the tests will actually work well on the later releases. Thanks.

Regards-
Subrata

 
 (That 2.6.29 test in check_mqns_enabled.c should be for 2.6.30)
 
 -serge


--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


[LTP] [PATCH 1/4] ltp: posix message queue namespaces: first test

2009-03-03 Thread Serge E. Hallyn
Hi Subrata,

here is the version with updated copyrights and a README update.

thanks,
-serge

From caaabd21861b57d6943367efe54f36f9b3700b8d Mon Sep 17 00:00:00 2001
From: Nadia Derbey nadia.der...@bull.net
Date: Tue, 16 Dec 2008 21:38:03 +
Subject: [PATCH 1/4] ltp: posix message queue namespaces: first test

Add the first test for posix message queue namespaces, plus a
test to detect whether they are enabled.

Note that the kernel version check is currently bogus - these are
are in -mm.

Based on older version by Nadia Derbey.

Changelog:
Mar 02 2009: moved to the libclone do_clone() helper.

Signed-off-by: Nadia Derbey nadia.der...@bull.net
Signed-off-by: Serge Hallyn se...@us.ibm.com
---
 README |6 +
 testcases/kernel/containers/Makefile   |2 +-
 testcases/kernel/containers/README |4 +
 testcases/kernel/containers/container_test.sh  |9 ++
 testcases/kernel/containers/mqns/Makefile  |   42 +++
 .../kernel/containers/mqns/check_mqns_enabled.c|   55 +
 testcases/kernel/containers/mqns/mqns.h|   13 ++
 testcases/kernel/containers/mqns/mqns_01.c |  124 
 testcases/kernel/containers/mqns/runmqnstest.sh|   40 +++
 9 files changed, 294 insertions(+), 1 deletions(-)
 create mode 100644 testcases/kernel/containers/mqns/Makefile
 create mode 100644 testcases/kernel/containers/mqns/check_mqns_enabled.c
 create mode 100644 testcases/kernel/containers/mqns/mqns.h
 create mode 100644 testcases/kernel/containers/mqns/mqns_01.c
 create mode 100644 testcases/kernel/containers/mqns/runmqnstest.sh

diff --git a/README b/README
index 2aff787..e4a72a4 100644
--- a/README
+++ b/README
@@ -133,6 +133,12 @@ CONFIG_NET_NS=y
 CONFIG_VETH=y
 CONFIG_MACVLAN=y
 
+The IPC namespaces do not automatically enable IPC, so you may
+also want to have:
+
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
 
 -
 Enabling Kernel Configuration to test Controllers
diff --git a/testcases/kernel/containers/Makefile 
b/testcases/kernel/containers/Makefile
index d5f0811..9e1a4ba 100644
--- a/testcases/kernel/containers/Makefile
+++ b/testcases/kernel/containers/Makefile
@@ -18,7 +18,7 @@
 ##
##
 

 
-SUBDIRS := libclone utsname sysvipc pidns netns
+SUBDIRS := libclone utsname sysvipc pidns netns mqns
 
 all: check_for_unshare
@set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
diff --git a/testcases/kernel/containers/README 
b/testcases/kernel/containers/README
index f1e485b..fd0898f 100644
--- a/testcases/kernel/containers/README
+++ b/testcases/kernel/containers/README
@@ -37,6 +37,10 @@ each functionality README file for detail:
 
 sysvipc/*
Contains all the testcases related to IPC NS tests.
+posixmq/*
+   Contains all the testcases related to POSIX MQ NS tests.  These
+   are strictly speaking a part of the ipc namespaces, but can be
+   enabled in the kernel without SYSV IPC support.
 utsname/*
Contains all the testcases related to utsname tests.
 libclone/*
diff --git a/testcases/kernel/containers/container_test.sh 
b/testcases/kernel/containers/container_test.sh
index 911a6a4..755e910 100755
--- a/testcases/kernel/containers/container_test.sh
+++ b/testcases/kernel/containers/container_test.sh
@@ -54,6 +54,15 @@ else
echo Process id namespaces not enabled in kernel.  Not running pidns 
tests.
 fi
 
+check_mqns_enabled
+if [ $? -eq 0 ]; then
+   echo Running POSIX message queue tests.
+   runmqnstest.sh
+else
+   echo Posix message queues or ipc namespaces not enabled in kernel.
+   echo Not running mqns tests.
+fi
+
 check_netns_enabled
 if [ $? -eq 0 ]; then
echo Running netns tests.
diff --git a/testcases/kernel/containers/mqns/Makefile 
b/testcases/kernel/containers/mqns/Makefile
new file mode 100644
index 000..d9aba3d
--- /dev/null
+++ b/testcases/kernel/containers/mqns/Makefile
@@ -0,0 +1,42 @@
+
+##
##
+## Copyright (c) International Business Machines  Corp., 2009 
##
+## Copyright (c) Nadia Derbey, 2009   
##
+##
##
+## 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.
##
+##