public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] cgroups: conditionally enable building cgroup tests
@ 2009-07-06 10:15 gowrishankar
  2009-07-06 11:38 ` Francesco RUNDO
  2009-07-06 15:51 ` Subrata Modak
  0 siblings, 2 replies; 15+ messages in thread
From: gowrishankar @ 2009-07-06 10:15 UTC (permalink / raw)
  To: subrata; +Cc: ltp-list

[-- Attachment #1: Type: text/plain, Size: 812 bytes --]

Hi Subrata,
Please accept the patch below.

Thanks,
Gowri
---
cgroups: conditionally enable building cgroup tests

controllers tests gets included into default ltp build if "/proc/cgroup"
exists. It stops the ltp build in realtime kernel environment where kernel
is new and supports cgroups, but necessary file "linux/cgroupstats.h" may not
exist in the base OS (like RHEL5.3). So configure command enables the build,
but actual build fails, due to missing header file.

Below patch proposes new symbol LTP_CHECK_CGROUPSTATS to check for header file
"linux/cgroupstats.h" and include controllers in the list of tests to build.

Tested the patch in non-RT as well as RT environment for the changes.

Signed-off-by: Gowrishankar <gowrishankar.m@in.ibm.com>
Tested-by: Gowrishankar <gowrishankar.m@in.ibm.com>
---


[-- Attachment #2: controllers-build.patch --]
[-- Type: text/x-patch, Size: 1608 bytes --]

Index: ltp-full-20090630/m4/ltp-cgroupstats.m4
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ ltp-full-20090630/m4/ltp-cgroupstats.m4	2009-07-03 13:41:55.000000000 +0530
@@ -0,0 +1,9 @@
+dnl
+dnl LTP_CHECK_CGROUPSTATS
+dnl ----------------------------
+dnl
+AC_DEFUN([LTP_CHECK_CGROUPSTATS],
+[dnl
+AC_CHECK_HEADERS(linux/cgroupstats.h,[LTP_CHECK_CGROUPSTATS_HEADER=yes])
+AC_SUBST(LTP_CHECK_CGROUPSTATS_HEADER)
+])
Index: ltp-full-20090630/configure.ac
===================================================================
--- ltp-full-20090630.orig/configure.ac	2009-07-03 13:59:48.000000000 +0530
+++ ltp-full-20090630/configure.ac	2009-07-03 14:00:14.000000000 +0530
@@ -21,5 +21,6 @@
 LTP_CHECK_SELINUX
 LTP_CHECK_CRYPTO
 LTP_CHECK_TASKSTATS
+LTP_CHECK_CGROUPSTATS
 
 AC_OUTPUT
Index: ltp-full-20090630/testcases/kernel/Makefile
===================================================================
--- ltp-full-20090630.orig/testcases/kernel/Makefile	2009-07-03 14:01:25.000000000 +0530
+++ ltp-full-20090630/testcases/kernel/Makefile	2009-07-03 14:02:42.000000000 +0530
@@ -1,6 +1,12 @@
-SUBDIRS = power_management numa containers controllers connectors include fs io ipc mem pty sched security syscalls timers
+include ../../config.mk
+
+SUBDIRS = power_management numa containers connectors include fs io ipc mem pty sched security syscalls timers
 UCLINUX_SUBDIRS = include syscalls
 
+ifeq ($(LTP_CHECK_CGROUPSTATS_HEADER),yes)
+	SUBDIRS+= controllers
+endif
+
 all:
 	@set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i ; done
 

[-- Attachment #3: Type: text/plain, Size: 79 bytes --]

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

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-07-08  7:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-06 10:15 [LTP] [PATCH] cgroups: conditionally enable building cgroup tests gowrishankar
2009-07-06 11:38 ` Francesco RUNDO
2009-07-06 12:00   ` gowrishankar
2009-07-06 12:42     ` Francesco RUNDO
2009-07-06 12:55       ` Subrata Modak
2009-07-06 13:05         ` Francesco RUNDO
2009-07-06 17:22     ` Garrett Cooper
2009-07-06 17:28   ` Garrett Cooper
2009-07-06 22:06     ` Mike Frysinger
2009-07-07  6:58       ` Francesco RUNDO
2009-07-07 14:24         ` Mike Frysinger
2009-07-08  7:40           ` Francesco RUNDO
2009-07-07  6:53     ` Francesco RUNDO
2009-07-07  9:11       ` Garrett Cooper
2009-07-06 15:51 ` Subrata Modak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox