Skip to contentSkip to conversation

ltp updated.

LTP Rishi kesh K Rajak 2 participants 3 messages Mar 9, 2010 – Mar 10, 2010

lore
Share & tools
lore
#0 lore raw

The branch, master, has been updated

       via  c962f51674b971496e14ac4be0cc75da98b75fca (commit)
       via  17905ceabf2dc20e978dfa4ea3682197ad01bf9a (commit)
       via  bdfe0b2a9dd720c3013225cc4aa1628e77888b24 (commit)
       via  716d29883b11107c32313b1836bea447fecbaf1e (commit)
       via  58854395050b8a3bb2fa4e5e4401546925f6aad8 (commit)
       via  886918830ae73a7f4b5cc2d9bf8554ee9f393ed8 (commit)
       via  039e4bbd522168a5145d236faa4e13f402037390 (commit)
      from  63f0a8f554d28b28b207f41e42182e1b789333b6 (commit)

- Log ----------------------------------------------------------------- commit c962f51674b971496e14ac4be0cc75da98b75fca

Author: Rishikesh K Rajak <[email protected]>
Date:   Tue Mar 9 21:53:25 2010 +0530

Testing for post-receive-email

commit 17905ceabf2dc20e978dfa4ea3682197ad01bf9a

Author: Rishikesh K Rajak <[email protected]>
Date:   Tue Mar 9 14:11:41 2010 +0530

Merge branches 'next' and 'master'

-----------------------------------------------------------------------

Summary of changes:

 TODO                                               |    2 +-
 testcases/kernel/containers/Makefile               |    2 +
 .../check_netns_enabled.c => check_for_unshare.c}  |   60 +++++++++++---------
 .../kernel/controllers/freezer/run_freezer.sh      |    3 +-
 testcases/kernel/syscalls/libevent/Makefile.in     |    3 +-
 5 files changed, 40 insertions(+), 30 deletions(-)
 copy testcases/kernel/containers/{netns/check_netns_enabled.c => check_for_unshare.c} (52%)
TODO +1 -1
index 9eec828..1756168 100644
@@ -1,4 +1,4 @@
-The following things need to be rewritten // fixed:
+The following things need to be rewritten // fixed
 
 get_mempolicy01 // mbind01: They're using numa v1 calls which means that all
 versions of Linux / numa as of a few years ago aren't compatible with the API
testcases/kernel/containers/Makefile +2 -0
index 6a7810e..26f1856 100644
@@ -26,6 +26,8 @@ FILTER_OUT_DIRS		:= $(LIBDIR)
 
 LIB			:= $(LIBDIR)/libclone.a
 
+LIB			:= -ld
+
 INSTALL_TARGETS		:= *.sh 
 
 $(LIBDIR):
testcases/kernel/containers/check_for_unshare.c renamed from testcases/kernel/containers/netns/check_netns_enabled.c +33 -27

70 lines not on this page · raw message

testcases/kernel/controllers/freezer/run_freezer.sh +2 -1
index 3baf968..f66e321 100755
@@ -69,7 +69,8 @@ function test_setup()
 	export LTPBIN PATH TCID TST_COUNT TST_TOTAL CGROUPS_TESTROOT
 	tst_resm TINFO "Preparing to run: ${P} $@"
 
-	make all
+	# this is not require here
+	#make all
 }
 
 function test_prereqs()
testcases/kernel/syscalls/libevent/Makefile.in +2 -1
index d1d9af7..dd0138d 100644
@@ -99,6 +99,7 @@ LIBS = @LIBS@
 libevent_a_DEPENDENCIES =  @LIBOBJS@
 libevent_a_OBJECTS =  event.o buffer.o evbuffer.o
 AR = ar
+AR_FLAGS = cr
 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
@@ -219,7 +220,7 @@ maintainer-clean-compile:
 
 libevent.a: $(libevent_a_OBJECTS) $(libevent_a_DEPENDENCIES)
 	-rm -f libevent.a
-	$(AR) cru libevent.a $(libevent_a_OBJECTS) $(libevent_a_LIBADD)
+	$(AR) $(AR_FLAGS) libevent.a $(libevent_a_OBJECTS) $(libevent_a_LIBADD)
 	$(RANLIB) libevent.a
 
 install-man3:

hooks/post-receive

Signature · 12 lines
ltp

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 55 lines · Rishi kesh K Rajak

The branch, master, has been updated
      via  c962f51674b971496e14ac4be0cc75da98b75fca (commit) via  17905ceabf2dc20e978dfa4ea3682197ad01bf9a (commit) via  bdfe0b2a9dd720c3013225cc4aa1628e77888b24 (commit) via  716d29883b11107c32313b1836bea447fecbaf1e (commit) via  58854395050b8a3bb2fa4e5e4401546925f6aad8 (commit) via  886918830ae73a7f4b5cc2d9bf8554ee9f393ed8 (commit) via  039e4bbd522168a5145d236faa4e13f402037390 (commit) from  63f0a8f554d28b28b207f41e42182e1b789333b6 (commit)

- Log ----------------------------------------------------------------- commit c962f51674b971496e14ac4be0cc75da98b75fca
Author: Rishikesh K Rajak <[email protected]>
Date:   Tue Mar 9 21:53:25 2010 +0530

   Testing for post-receive-email

commit 17905ceabf2dc20e978dfa4ea3682197ad01bf9a
Author: Rishikesh K Rajak <[email protected]>
Date:   Tue Mar 9 14:11:41 2010 +0530

   Merge branches 'next' and 'master'

-----------------------------------------------------------------------

Summary of changes:
 TODO                                               |    2 +- testcases/kernel/containers/Makefile               |    2 + .../check_netns_enabled.c => check_for_unshare.c}  |   60 +++++++++++--------- .../kernel/controllers/freezer/run_freezer.sh      |    3 +- testcases/kernel/syscalls/libevent/Makefile.in     |    3 +-

 5 files changed, 40 insertions(+), 30 deletions(-)

 copy testcases/kernel/containers/{netns/check_netns_enabled.c => check_for_unshare.c} (52%)

TODO +1 -1
index 9eec828..1756168 100644
@@ -1,4 +1,4 @@
-The following things need to be rewritten // fixed:
+The following things need to be rewritten // fixed
 

 get_mempolicy01 // mbind01: They're using numa v1 calls which means that all versions of Linux / numa as of a few years ago aren't compatible with the API

testcases/kernel/containers/Makefile +0 -0
index 6a7810e..26f1856 100644
@@ -26,6 +26,8 @@ FILTER_OUT_DIRS               := $(LIBDIR)
 

 LIB                    := $(LIBDIR)/libclone.a

testcases/kernel/containers/Makefile FILTER_OUT_DIRS := $(LIBDIR) · line 30

Quoted 2 lines
testcases/kernel/containers/Makefile +2 -0
+LIB                    := -ld
+

Wrong. Should be: LDLIBS += -ldl

Quoted 71 lines

 INSTALL_TARGETS                := *.sh

 $(LIBDIR):

testcases/kernel/containers/check_for_unshare.c renamed from testcases/kernel/containers/netns/check_netns_enabled.c +26 -26
similarity index 52%
copy from testcases/kernel/containers/netns/check_netns_enabled.c
copy to testcases/kernel/containers/check_for_unshare.c
index f6add06..06bdfd7 100644
@@ -13,37 +13,43 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  *
-* Author: Veerendra C <[email protected]>
+**************************************************************************/
+/*
+* Description:
+* This program verifies the kernel version to be no later than 2.6.16
+* And checks if the unshare() system call is defined using dlsym(),
+* in the Dynamically Linked Libraries.
  *
-* Net namespaces were introduced around 2.6.25.  Kernels before that,
-* assume they are not enabled.  Kernels after that, check for -EINVAL
-* when trying to use CLONE_NEWNET and CLONE_NEWNS.
-***************************************************************************/
-#include <stdio.h>
-#include <sched.h>
-#include "config.h"
-#include "libclone.h"
-#include "linux_syscall_numbers.h"
-#include "test.h"
+* Date : 26-11-2008
+* Author : Veerendra C <[email protected]>
+*/
 
-char *TCID = "check_netns_enabled";
-int TST_COUNT = 1;
-int TST_TOTAL = 1;
+#include <stdio.h>
+#include <stdlib.h>
+#include <dlfcn.h>
+#include <linux/version.h>
 
-#ifndef CLONE_NEWNET
-#define CLONE_NEWNET -1
-#endif
+int main(int argc, char **argv)
+{
+       void *handle;
+       void *ret;
+       char *error;
+       if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16))
+       return 1;
 
-#ifndef CLONE_NEWNS
-#define CLONE_NEWNS -1
-#endif
+       handle = dlopen(NULL, RTLD_LAZY);
+       if (!handle) {
+               fprintf(stderr, "%s\n", dlerror());
+               exit(1);
+       }
 
-int
-main()
-{
-       /* Checking if the kernel supports unshare with netns capabilities. */
-        if (syscall(__NR_unshare, CLONE_NEWNET | CLONE_NEWNS) < 0) {
-               tst_resm (TFAIL | TERRNO, "unshare syscall smoke test failed");
+       dlerror();    /* Clear any existing error */

testcases/kernel/containers/check_for_unshare.c line 55

Quoted 10 lines
testcases/kernel/containers/check_for_unshare.c renamed from testcases/kernel/containers/netns/check_netns_enabled.c +7 -1
+       ret = dlsym(handle, "unshare");
+       if ((error = dlerror()) != NULL)  {
+               fprintf(stderr, "Error: %s\n", error);
+               exit(1);
        }
-       tst_exit();
+
+       dlclose(handle);
+       return 0;
  }

-Garrett

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw
Quoted 6 lines · Garrett Cooper

testcases/kernel/containers/Makefile FILTER_OUT_DIRS := $(LIBDIR) · line 30

Quoted 2 lines · Rishi kesh K Rajak
testcases/kernel/containers/Makefile +2 -0
+LIB                    := -ld
+

Wrong. Should be: LDLIBS += -ldl

oops My mistake, thanks. One good advantage of sending mail to ltp-list automatically after each commit.

Thanks
-Rishi

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list