cgroups: conditionally enable building cgroup tests
PATCH 1/1 cgroups: conditionally enable building cgroup tests
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.
---
m4/ltp-cgroupstats.m4 new file +9 -0
@@ -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) +])
configure.ac +1 -0
@@ -21,5 +21,6 @@ LTP_CHECK_SELINUX LTP_CHECK_CRYPTO LTP_CHECK_TASKSTATS +LTP_CHECK_CGROUPSTATS AC_OUTPUT
testcases/kernel/Makefile +7 -1
@@ -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
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi Gowri,
I've already fixed the same issue you reported. I've tested it successfully.
Subrata has already merged my patch (please, find it in attachment).
Please, check it before to submit another patch.
Thanks
Regards
Francesco Rundo
Quoted 75 lines · gowrishankar
Hi Subrata,
Please accept the patch below.Thanks,
Gowri
---
cgroups: conditionally enable building cgroup testscontrollers 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_CGROUPSTATSto 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 <[email protected]>Tested-by Gowrishankar <[email protected]>---
------------------------------------------------------------------------
Index: ltp-full-20090630/m4/ltp-cgroupstats.m4
===================================================================m4/ltp-cgroupstats.m4 new file +9
-0@@ -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
===================================================================configure.ac +0
-0@@ -21,5 +21,6 @@
LTP_CHECK_SELINUXLTP_CHECK_CRYPTOLTP_CHECK_TASKSTATS
+LTP_CHECK_CGROUPSTATS
AC_OUTPUT
Index: ltp-full-20090630/testcases/kernel/Makefile
===================================================================testcases/kernel/Makefile +3
-1@@ -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 syscallstestcases/kernel/Makefile +4
-0+ifeq ($(LTP_CHECK_CGROUPSTATS_HEADER),yes) + SUBDIRS+= controllers +endif +all:
@set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i ; done------------------------------------------------------------------------
------------------------------------------------------------------------------
Quoted 8 lines
------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
This patch allows the cross-build of kernel/controllers (cgroups tests) testcase changing the policy to check the cgroups capability at build-time.
testcases/kernel/controllers/Makefile renamed from testcases/kernel/controllers/Makefile.orig +17 -0
@@ -1,10 +1,26 @@ +ifdef CROSS_COMPILE +CHECK_CGROUP := $(shell test -f $(TARGET_DIR)/usr/include/linux/cgroupstats.h && echo 'cgroup') +else CHECK_CGROUP := $(shell test -f /proc/cgroups && echo 'cgroup') CHECK_CPUCTL := $(shell grep -w cpu /proc/cgroups 2>/dev/null|cut -f1) CHECK_MEMCTL := $(shell grep -w memory /proc/cgroups 2>/dev/null|cut -f1) CHECK_BLOCKIOCTL := $(shell grep -w blockio /proc/cgroups 2>/dev/null|cut -f1) CHECK_FREEZER := $(shell grep -w freezer /proc/cgroups 2>/dev/null| cut -f1) CHECK_CPUSETCTL = $(shell grep -w cpuset /proc/cgroups 2>/dev/null|cut -f1) +endif +ifdef CROSS_COMPILE +ifeq ($(CHECK_CGROUP),cgroup) +SUBDIRS += cgroup +SUBDIRS += cpuctl +SUBDIRS += memctl +SUBDIRS += io-throttle +SUBDIRS += freezer +SUBDIRS += cpuset +else +$(info "Kernel is not compiled with control cgroup support") +endif +else ifeq ($(CHECK_CGROUP),cgroup) SUBDIRS += cgroup else
@@ -36,6 +52,7 @@ else $(info "Kernel is not compiled with cpuset resource controller support") endif +endif # If at least one of the controllers is available then build libcontrollers. ifneq ($(SUBDIRS),)
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi Francesco,
Quoted 8 lines · Francesco RUNDO
Hi Gowri,
I've already fixed the same issue you reported. I've tested it successfully.
Subrata has already merged my patch (please, find it in attachment).
Please, check it before to submit another patch.
I had already seen your patch and generated mine on top of Jun release (which has your fix for CROSS_COMPILE).Your patch could not help in a scenario where kernel has cgroup support but cgroupstat.h file is missing in base OS, and build failed. And hence, I am proposing this patch.
Thanks,
Gowri
Quoted 83 lines
Thanks
Regards
Francesco RundoQuoted 78 lines · gowrishankar
Hi Subrata,
Please accept the patch below.Thanks,
Gowri
---
cgroups: conditionally enable building cgroup testscontrollers 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_CGROUPSTATSto 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 <[email protected]>Tested-by Gowrishankar <[email protected]>---
------------------------------------------------------------------------
Index: ltp-full-20090630/m4/ltp-cgroupstats.m4
===================================================================m4/ltp-cgroupstats.m4 new file +9
-0@@ -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
===================================================================configure.ac +1
-0@@ -21,5 +21,6 @@ LTP_CHECK_SELINUX LTP_CHECK_CRYPTO LTP_CHECK_TASKSTATS +LTP_CHECK_CGROUPSTATS AC_OUTPUTIndex: ltp-full-20090630/testcases/kernel/Makefile
===================================================================testcases/kernel/Makefile +7
-3@@ -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 ------------------------------------------------------------------------ ------------------------------------------------------------------------------
Quoted 7 lines
Quoted 7 lines
------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi Gowri,
thanks so much for your quick reply.
My question is: "Is there a 'real' scenario in which cgroup is enabled in the Kernel without cgroupstat.h header" ?
Because I think the above scenario (cgroup enabled but no cgroupstat.h header) is wrong so that your patch provide a "cover" for an error placed in the system. Is it true ?
If my understanding is wrong, for me there are no concerns about your patch.
Regards
Francesco Rundo
Quoted 21 lines · gowrishankar
Hi Francesco,
Quoted 9 lines · Francesco RUNDO
Hi Gowri,
I've already fixed the same issue you reported. I've tested it successfully.
Subrata has already merged my patch (please, find it in attachment).
Please, check it before to submit another patch.
I had already seen your patch and generated mine on top of Jun release (which
has your fix for CROSS_COMPILE).Your patch could not help in a scenario where kernel has cgroup support butcgroupstat.hfile is missing in base OS, and
build failed. And hence, I am proposing this patch.
Quoted 110 lines
Thanks,
GowriQuoted 105 lines
Thanks
Regards
Francesco RundoQuoted 98 lines · gowrishankar
Hi Subrata,
Please accept the patch below.Thanks,
Gowri
---
cgroups: conditionally enable building cgroup testscontrollers 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_CGROUPSTATSto 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 <[email protected]>Tested-by Gowrishankar <[email protected]>---
------------------------------------------------------------------------
Index: ltp-full-20090630/m4/ltp-cgroupstats.m4
===================================================================m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +0
-013:41:55.000000000 +0530
m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +9
-0@@ -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
+0530m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +1
-0@@ -21,5 +21,6 @@ LTP_CHECK_SELINUX LTP_CHECK_CRYPTO LTP_CHECK_TASKSTATS +LTP_CHECK_CGROUPSTATS AC_OUTPUTIndex: 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 +0530m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +0
-1@@ -1,6 +1,12 @@ -SUBDIRS = power_management numa containers controllers connectorsinclude fs io ipc mem pty sched security syscalls timers
m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +3
-0+include ../../config.mk + +SUBDIRS = power_management numa containers connectors include fs ioipc mem pty sched security syscalls timers
UCLINUX_SUBDIRS= include syscallsm4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +4
-3+ifeq ($(LTP_CHECK_CGROUPSTATS_HEADER),yes) + SUBDIRS+= controllers +endif + all: @set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i ; done ------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 6 lines · Francesco RUNDO
Hi Gowri,
thanks so much for your quick reply.
My question is: "Is there a 'real' scenario in which cgroup is enabled in the Kernel withoutcgroupstat.hheader" ?
Yes, there can be many situations.
Quoted 4 lines
Because I think the above scenario (cgroup enabled but no
cgroupstat.hheader) is wrong so that your patch provide a "cover" for an error placed in the system. Is it true ?
Say you have a older distro with kernel 2.6.18, where those stuff are not there. Now, you have built kernel 2.6.30 on it with CGROUP enabled, and booted in that kernel. So, your kernel is enabled with CGROUP, but you may not have the user utilities like the libcgroup, etc. And until you upgrade your system with latest glibc-headers or kernel-headers, any build for userspace tools using CGROUP*.h fiel fail.
Regards--
Subrata
Quoted 139 lines
If my understanding is wrong, for me there are no concerns about your patch.
Regards
Francesco RundoQuoted 131 lines · gowrishankar
Hi Francesco,
Quoted 9 lines · Francesco RUNDO
Hi Gowri,
I've already fixed the same issue you reported. I've tested it successfully.
Subrata has already merged my patch (please, find it in attachment).
Please, check it before to submit another patch.
I had already seen your patch and generated mine on top of Jun release (which
has your fix for CROSS_COMPILE).Your patch could not help in a scenario where kernel has cgroup support butcgroupstat.hfile is missing in base OS, and
build failed. And hence, I am proposing this patch.Thanks,
GowriQuoted 105 lines
Thanks
Regards
Francesco RundoQuoted 98 lines · gowrishankar
Hi Subrata,
Please accept the patch below.Thanks,
Gowri
---
cgroups: conditionally enable building cgroup testscontrollers 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_CGROUPSTATSto 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 <[email protected]>Tested-by Gowrishankar <[email protected]>---
------------------------------------------------------------------------
Index: ltp-full-20090630/m4/ltp-cgroupstats.m4
===================================================================m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +0
-013:41:55.000000000 +0530
m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +9
-0@@ -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
+0530m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +1
-0@@ -21,5 +21,6 @@ LTP_CHECK_SELINUX LTP_CHECK_CRYPTO LTP_CHECK_TASKSTATS +LTP_CHECK_CGROUPSTATS AC_OUTPUTIndex: 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 +0530m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +0
-1@@ -1,6 +1,12 @@ -SUBDIRS = power_management numa containers controllers connectorsinclude fs io ipc mem pty sched security syscalls timers
m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +3
-0+include ../../config.mk + +SUBDIRS = power_management numa containers connectors include fs ioipc mem pty sched security syscalls timers
UCLINUX_SUBDIRS= include syscallsm4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +4
-3+ifeq ($(LTP_CHECK_CGROUPSTATS_HEADER),yes) + SUBDIRS+= controllers +endif + all: @set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i ; done ------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi Subrata,
Ok, thanks for your reply.
Currently I'm working with kernel 2.6.23-17 ported for SH platforms, without cgroup features.
My target was to understand if my previous patch can help Gowri....but I think no.... ;-)
Regards
Francesco Rundo
Quoted 27 lines · Subrata Modak
Quoted 7 lines · Francesco RUNDO
Hi Gowri,
thanks so much for your quick reply.
My question is: "Is there a 'real' scenario in which cgroup is enabled in the Kernel withoutcgroupstat.hheader" ?Yes, there can be many situations.
Quoted 4 lines
Because I think the above scenario (cgroup enabled but no
cgroupstat.hheader) is wrong so that your patch provide a "cover" for an error placed in the system. Is it true ?Say you have a older distro with kernel 2.6.18, where those stuff are not there. Now, you have built kernel 2.6.30 on it with CGROUP enabled, and booted in that kernel. So, your kernel is enabled with CGROUP, but you may not have the user utilities like the libcgroup, etc. And until you upgrade your system with latest glibc-headers or kernel-headers, any build for userspace tools using CGROUP*.h fiel fail.
Quoted 147 lines
Regards--
SubrataQuoted 138 lines
If my understanding is wrong, for me there are no concerns about your patch.
Regards
Francesco RundoQuoted 129 lines · gowrishankar
Hi Francesco,
Quoted 10 lines · Francesco RUNDO
Hi Gowri,
I've already fixed the same issue you reported. I've tested it successfully.
Subrata has already merged my patch (please, find it in attachment).
Please, check it before to submit another patch.
I had already seen your patch and generated mine on top of Jun release (which
has your fix for CROSS_COMPILE).Your patch could not help in a scenario where kernel has cgroup support butcgroupstat.hfile is missing in base OS, and build failed. And hence, I am proposing this patch.Thanks,
GowriQuoted 102 lines
Thanks
Regards
Francesco RundoQuoted 94 lines · gowrishankar
Hi Subrata,
Please accept the patch below.Thanks,
Gowri
---
cgroups: conditionally enable building cgroup testscontrollers 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_CGROUPSTATSto 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 <[email protected]>Tested-by Gowrishankar <[email protected]>---
------------------------------------------------------------------------
Index: ltp-full-20090630/m4/ltp-cgroupstats.m4
===================================================================m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +0
-013:41:55.000000000 +0530
m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +9
-0@@ -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
+0530m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +0
-0@@ -21,5 +21,6 @@
LTP_CHECK_SELINUXLTP_CHECK_CRYPTOLTP_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 +0530m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +0
-1@@ -1,6 +1,12 @@ -SUBDIRS = power_management numa containers controllers connectorsinclude fs io ipc mem pty sched security syscalls timers
m4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +3
-0+include ../../config.mk + +SUBDIRS = power_management numa containers connectors include fs ioipc mem pty sched security syscalls timers
UCLINUX_SUBDIRS= include syscallsm4/ltp-cgroupstats.m4 2009-07-03 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +4
-0+ifeq ($(LTP_CHECK_CGROUPSTATS_HEADER),yes) + SUBDIRS+= controllers +endif +all:
@set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i ; done------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 9 lines · gowrishankar
Hi Francesco,
Quoted 6 lines · Francesco RUNDO
Hi Gowri,
I've already fixed the same issue you reported. I've tested it successfully.
Subrata has already merged my patch (please, find it in attachment).
Quoted 7 lines
Quoted 2 lines
Please, check it before to submit another patch.
I had already seen your patch and generated mine on top of Jun release (which has your fix for CROSS_COMPILE).Your patch could not help in a scenario where kernel has cgroup support but
cgroupstat.hfile is missing in base OS, and build failed. And hence, I am proposing this patch.
It sounds like your issue is build related on your side, or the fact that whatever checks are run don't appropriately take into account necessary CFLAGS / CPPFLAGS.
Thanks,
-Garrett
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 7 lines · Francesco RUNDO
Hi Gowri,
I've already fixed the same issue you reported. I've tested it successfully.
Subrata has already merged my patch (please, find it in attachment).
Please, check it before to submit another patch.
At the end of the day, the real problem is that we're not using the --with- functionality in autoconf, e.g. --with-cgroups, and instead we're hacking a lot of noise into Makefile's.
Also, you could have called SUBDIRS += once, like so:
+SUBDIRS += cgroup cpuctl memctl io-throttle freezer cpuset
I can tell at first glance that that Makefile is a mess anyhow, because it's referencing _hardcoded_ /proc references and as such will fail to cross-compile properly if the target or the host are setup differently from one another, in the following two scenarios:
1. host has cgroups support and target doesn't. host will force the cgroups testcases to compile, and we'll either run into make failures, or CONF (if the source is setup properly).
2. target has cgroups support and host doesn't. target will miss out on cgroups testcases.
Thanks,
-Garrett
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 11 lines · On Monday 06 July 2009 13:28:00 Garrett Cooper wrote:
Quoted 6 lines · Francesco RUNDO
I've already fixed the same issue you reported. I've tested it successfully.
Subrata has already merged my patch (please, find it in attachment).
Please, check it before to submit another patch.
At the end of the day, the real problem is that we're not using the --with- functionality in autoconf, e.g. --with-cgroups, and instead we're hacking a lot of noise into Makefile's.
selectively compiling groups of code needs to be thought out before we start throwing --with-foo options at the problem. otherwise we'll still end up with crap, just in a different form.
Quoted 4 lines
I can tell at first glance that that
Makefileis a mess anyhow, because it's referencing _hardcoded_ /proc references and as such will fail to cross-compile properly if the target or the host are setup differently from one another, in the following two scenarios:
yes, the merged patch and that makefile suck. there should never be any filesystem check in a Makefile anymore. while peeking in /proc is somewhat forgivable, looking for headers never is ok. we have autoconf tests now and Gowri's approach looks like the correct one.
-mike
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 31 lines · Mike Frysinger
Quoted 6 lines · On Monday 06 July 2009 13:28:00 Garrett Cooper wrote:
Quoted 3 lines · Francesco RUNDO
I've already fixed the same issue you reported. I've tested it successfully.
Quoted 10 lines
Quoted 5 lines
Subrata has already merged my patch (please, find it in attachment).
Please, check it before to submit another patch.
At the end of the day, the real problem is that we're not using the --with- functionality in autoconf, e.g. --with-cgroups, and instead we're hacking a lot of noise into Makefile's.
selectively compiling groups of code needs to be thought out before we start throwing --with-foo options at the problem. otherwise we'll still end up with crap, just in a different form.
Quoted 6 lines
I can tell at first glance that that
Makefileis a mess anyhow, because it's referencing _hardcoded_ /proc references and as such will fail to cross-compile properly if the target or the host are setup differently from one another, in the following two scenarios:
Quoted 3 lines
yes, the merged patch and that makefile suck. there should never be any filesystem check in a
Makefileanymore. while peeking in /proc is somewhat forgivable, looking for headers never is ok. we have autoconf tests now and Gowri's approach looks like the correct one. -mike
I agree with your explanation. My patch tried to address an issue on the testcase when LTP is cross-compiled.
Thanks so much.
Best Regards
--
FR
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 23 lines · On Tuesday 07 July 2009 02:58:15 Francesco RUNDO wrote:
Quoted 22 lines · Mike Frysinger
Quoted 11 lines · On Monday 06 July 2009 13:28:00 Garrett Cooper wrote:
Quoted 6 lines · Francesco RUNDO
I've already fixed the same issue you reported. I've tested it successfully.
Subrata has already merged my patch (please, find it in attachment).
Please, check it before to submit another patch.
At the end of the day, the real problem is that we're not using the --with- functionality in autoconf, e.g. --with-cgroups, and instead we're hacking a lot of noise into Makefile's.
selectively compiling groups of code needs to be thought out before we start throwing --with-foo options at the problem. otherwise we'll still end up with crap, just in a different form.
Quoted 4 lines
I can tell at first glance that that
Makefileis a mess anyhow, because it's referencing _hardcoded_ /proc references and as such will fail to cross-compile properly if the target or the host are setup differently from one another, in the following two scenarios:
Quoted 7 lines
Quoted 4 lines
yes, the merged patch and that makefile suck. there should never be any filesystem check in a
Makefileanymore. while peeking in /proc is somewhat forgivable, looking for headers never is ok. we have autoconf tests now and Gowri's approach looks like the correct one.I agree with your explanation. My patch tried to address an issue on the testcase when LTP is cross-compiled.
i'm not faulting you ... you worked with what is available and common. we now have better methods of doing these checks, so we should transition to those. -mike
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 5 lines
we now
have better methods of doing these checks, so we should transition to those. -mike
Ok..no problem, what you say is exactly what I want to reach by contributing to LTP community.
Thanks again.
Francesco
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi Garrett,
thanks for your comment. Below, my consideration:
Quoted 9 lines · Garrett Cooper
Quoted 6 lines · Francesco RUNDO
Hi Gowri,
I've already fixed the same issue you reported. I've tested it successfully.
Subrata has already merged my patch (please, find it in attachment).
Quoted 8 lines
Quoted 3 lines
Please, check it before to submit another patch.
At the end of the day, the real problem is that we're not using the --with- functionality in autoconf, e.g. --with-cgroups, and instead we're hacking a lot of noise into Makefile's.
Yes, you're right but your advice can't be applicable in the system in which autoconf is not supported/used to build LTP (a possible scenario in the embedded system).
Quoted 10 lines
Also, you could have called SUBDIRS += once, like so:
+SUBDIRS += cgroup cpuctl memctl io-throttle freezer cpuset
I can tell at first glance that that
Makefileis a mess anyhow, because it's referencing _hardcoded_ /proc references and as such will fail to cross-compile properly if the target or the host are setup differently from one another, in the following two scenarios:
Yes, check at "/proc" isn't safe as can't be applicable in case of cross-compilation made off-line on the host.
I have provided a "work-around" patch to allow off-line cross-compilation trying to reduce the number of changes to be applied to the Makefile.
Regards
Francesco Rundo
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 19 lines · Francesco RUNDO
Hi Garrett,
thanks for your comment. Below, my consideration:
Garrett Cooper wrote:
On Mon, Jul 6, 2009 at 4:38 AM, Francesco RUNDO<[email protected]> wrote:
Hi Gowri,
I've already fixed the same issue you reported. I've tested it successfully.
Subrata has already merged my patch (please, find it in attachment).
Please, check it before to submit another patch.
Quoted 7 lines
At the end of the day, the real problem is that we're not using the --with- functionality in autoconf, e.g. --with-cgroups, and instead we're hacking a lot of noise into Makefile's.
Yes, you're right but your advice can't be applicable in the system in which autoconf is not supported/used to build LTP (a possible scenario in the embedded system).
Francisco,
Very soon cross-compilation will become a reality for LTP. We've been using cross-compilation with LTP fairly thoroughly in-house, but the solution's not even close to perfect. The one I'm working on now with HEAD is a lot more holistic, and hence we should be able to do away with manual compiles [of the source tree]. Manual submake compiles will still be possible.
So, embedded systems can go back to executing code instead of compiling it, like they should be... exercising *cc still is a good workout for an embedded system's process [and threading] scheduler and management system, but you can do it if you like and it'll no longer be a hard requirement =].
Cheers,
-Garrett
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 14 lines · gowrishankar
Hi Subrata,
Please accept the patch below.Thanks,
Gowri
---
cgroups: conditionally enable building cgroup testscontrollers 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.
Quoted 6 lines
Below patch proposes new symbol
LTP_CHECK_CGROUPSTATSto 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 <[email protected]>
Thanks Gowri.
Regards--
Subrata
Quoted 3 lines
Tested-by Gowrishankar <[email protected]>---
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list