On Wed, 2009-06-03 at 14:49 +0200, Francesco RUNDO wrote:This patch allows the cross-build of kernel/controllers (cgroups tests) testcase changing the policy to check the cgroups capability at build-time. Signed-off-by: Francesco Rundo <francesco.rundo@st.com>Great if that helps your CROSS_COMPILE environment. Merged. Regards-- Subrata--- ltp-full-20090430-cross/testcases/kernel/controllers/Makefile.orig 2009-05-26 15:37:35.140000000 +0200 +++ ltp-full-20090430-cross/testcases/kernel/controllers/Makefile 2009-05-28 13:36:36.669998000 +0200 @@ -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),)