All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] kernel/controllers/ testcase and CGROUPS support
@ 2009-06-03 12:49 Francesco RUNDO
  2009-06-04  9:27 ` Subrata Modak
  2009-06-04 11:29 ` Subrata Modak
  0 siblings, 2 replies; 6+ messages in thread
From: Francesco RUNDO @ 2009-06-03 12:49 UTC (permalink / raw)
  To: ltp-list

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

Hi All,

I'd like to submit a request to change the method to check if CGROUPS 
support is enabled and available or not.

I'm referring to the kernel/controllers/xxx testcase. I'm using the 
LTP-full-20090430 cross-compiled for SH based arch with a kernel 2.6.23

The used/released  method placed inside kernel/controllers/Makefile,  
tries to understand if the cgroups (and others related...) support has 
been enabled in the current kernel, performing a check in the root 
filesystem under "/proc". It makes something like that:

CHECK_CGROUP := $(shell test -f /proc/cgroups && echo 'cgroup')

Now, in the context of LTP built for i386, the above check works fine.

But what happen if LTP is cross-built ?

Unfortunately, the "/proc" entry checked by the above Makefile rule, is 
the ones placed in the host and not the "/proc" of the  target root 
filesysetm (in my case SH based target). This is wrong!

Moreover,  "/proc" is an entry which makes sense at runtime while it is 
useless at built time so the above check is "always" not applicable in 
case of LTP is built for other arch different from i386.

In order to cover the scenario in which LTP is cross-built, I've patched 
the Makefile , replacing the above rule with the following ones:

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
   ..............................................(the same rules placed 
in the original released Makefile).

The above checked header file "cgroupstats.h" is placed in the target 
rootfs.  If the cgroups support is available (and enabled...likely ;-) 
the above header is placed in the target rootfs. 

In that way, in case of cross-compilation (the env CROSS_COMPILE was 
defined) the check will be done in the header file instead of  /proc.

The env TARGET_DIR works like a "--prefix" fixing the path of the 
cross-target rootfs.

Of course, If you have another checks/methods which can be done to 
understand -at build time- if cgroups support is available and/or 
enabled -for target platform-, please feel free to post a comment to LTP.

Anyway, I'll attach the patch I've applied in our system.

Advices and feedbacks are welcome!

Regards
Francesco Rundo



[-- Attachment #2: ltp-full-20090430-fix-cgroups-testcase.patch --]
[-- Type: text/plain, Size: 1539 bytes --]

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>
--- 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),)

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

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get

[-- 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] 6+ messages in thread

* Re: [LTP] kernel/controllers/ testcase and CGROUPS support
  2009-06-03 12:49 [LTP] kernel/controllers/ testcase and CGROUPS support Francesco RUNDO
@ 2009-06-04  9:27 ` Subrata Modak
  2009-06-04 11:29 ` Subrata Modak
  1 sibling, 0 replies; 6+ messages in thread
From: Subrata Modak @ 2009-06-04  9:27 UTC (permalink / raw)
  To: Francesco RUNDO; +Cc: ltp-list

I will look into this.

Regards--
Subrata

On Wed, 2009-06-03 at 14:49 +0200, Francesco RUNDO wrote: 
> Hi All,
> 
> I'd like to submit a request to change the method to check if CGROUPS 
> support is enabled and available or not.
> 
> I'm referring to the kernel/controllers/xxx testcase. I'm using the 
> LTP-full-20090430 cross-compiled for SH based arch with a kernel 2.6.23
> 
> The used/released  method placed inside kernel/controllers/Makefile,  
> tries to understand if the cgroups (and others related...) support has 
> been enabled in the current kernel, performing a check in the root 
> filesystem under "/proc". It makes something like that:
> 
> CHECK_CGROUP := $(shell test -f /proc/cgroups && echo 'cgroup')
> 
> Now, in the context of LTP built for i386, the above check works fine.
> 
> But what happen if LTP is cross-built ?
> 
> Unfortunately, the "/proc" entry checked by the above Makefile rule, is 
> the ones placed in the host and not the "/proc" of the  target root 
> filesysetm (in my case SH based target). This is wrong!
> 
> Moreover,  "/proc" is an entry which makes sense at runtime while it is 
> useless at built time so the above check is "always" not applicable in 
> case of LTP is built for other arch different from i386.
> 
> In order to cover the scenario in which LTP is cross-built, I've patched 
> the Makefile , replacing the above rule with the following ones:
> 
> 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
>    ..............................................(the same rules placed 
> in the original released Makefile).
> 
> The above checked header file "cgroupstats.h" is placed in the target 
> rootfs.  If the cgroups support is available (and enabled...likely ;-) 
> the above header is placed in the target rootfs. 
> 
> In that way, in case of cross-compilation (the env CROSS_COMPILE was 
> defined) the check will be done in the header file instead of  /proc.
> 
> The env TARGET_DIR works like a "--prefix" fixing the path of the 
> cross-target rootfs.
> 
> Of course, If you have another checks/methods which can be done to 
> understand -at build time- if cgroups support is available and/or 
> enabled -for target platform-, please feel free to post a comment to LTP.
> 
> Anyway, I'll attach the patch I've applied in our system.
> 
> Advices and feedbacks are welcome!
> 
> Regards
> Francesco Rundo
> 
> 
> plain text document attachment
> (ltp-full-20090430-fix-cgroups-testcase.patch)
> 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>
> --- 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),)
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
> looking to deploy the next generation of Solaris that includes the latest 
> innovations from Sun and the OpenSource community. Download a copy and 
> enjoy capabilities such as Networking, Storage and Virtualization. 
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] kernel/controllers/ testcase and CGROUPS support
  2009-06-03 12:49 [LTP] kernel/controllers/ testcase and CGROUPS support Francesco RUNDO
  2009-06-04  9:27 ` Subrata Modak
@ 2009-06-04 11:29 ` Subrata Modak
  2009-06-11  7:59   ` Francesco RUNDO
  1 sibling, 1 reply; 6+ messages in thread
From: Subrata Modak @ 2009-06-04 11:29 UTC (permalink / raw)
  To: Francesco RUNDO; +Cc: ltp-list

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),)


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] kernel/controllers/ testcase and CGROUPS support
  2009-06-04 11:29 ` Subrata Modak
@ 2009-06-11  7:59   ` Francesco RUNDO
  2009-06-15 19:16     ` Subrata Modak
  0 siblings, 1 reply; 6+ messages in thread
From: Francesco RUNDO @ 2009-06-11  7:59 UTC (permalink / raw)
  To: subrata; +Cc: ltp-list


[-- Attachment #1.1: Type: text/plain, Size: 2048 bytes --]

Hi Subrata,

please, replace on the LTP main the previous patch with ones attached.
The attached patch add the right labels of ifdef.

Sorry for that.

Thanks in advance.
--
Francesco Rundo

Subrata Modak wrote:

>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),)
>>    
>>
>
>
>  
>

[-- Attachment #1.2: Type: text/html, Size: 2621 bytes --]

[-- Attachment #2: ltp-full-20090430-fix-cgroups-testcase.patch --]
[-- Type: text/plain, Size: 1533 bytes --]

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>
--- 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),)

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

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects

[-- 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] 6+ messages in thread

* Re: [LTP] kernel/controllers/ testcase and CGROUPS support
  2009-06-11  7:59   ` Francesco RUNDO
@ 2009-06-15 19:16     ` Subrata Modak
  2009-06-15 19:30       ` Francesco RUNDO
  0 siblings, 1 reply; 6+ messages in thread
From: Subrata Modak @ 2009-06-15 19:16 UTC (permalink / raw)
  To: Francesco RUNDO; +Cc: ltp-list

On Thu, 2009-06-11 at 09:59 +0200, Francesco RUNDO wrote:
> Hi Subrata,
> 
> please, replace on the LTP main the previous patch with ones attached.
> The attached patch add the right labels of ifdef.

Ok. I reverted the earlier one and applied this one. Please check the
CVS and let me know if everything is fine.

Regards--
Subrata

> 
> Sorry for that.
> 
> Thanks in advance.
> --
> Francesco Rundo
> 
> Subrata Modak wrote: 
> > 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),)
> > >     
> > 
> > 
> >   
> plain text document attachment
> (ltp-full-20090430-fix-cgroups-testcase.patch)
> 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>
> --- 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),)


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] kernel/controllers/ testcase and CGROUPS support
  2009-06-15 19:16     ` Subrata Modak
@ 2009-06-15 19:30       ` Francesco RUNDO
  0 siblings, 0 replies; 6+ messages in thread
From: Francesco RUNDO @ 2009-06-15 19:30 UTC (permalink / raw)
  To: subrata; +Cc: ltp-list


[-- Attachment #1.1: Type: text/plain, Size: 4295 bytes --]

Subrata,
Ok.
Thanks so much for your support.

Best Regards
Francesco Rundo

Subrata Modak wrote:

>On Thu, 2009-06-11 at 09:59 +0200, Francesco RUNDO wrote:
>  
>
>>Hi Subrata,
>>
>>please, replace on the LTP main the previous patch with ones attached.
>>The attached patch add the right labels of ifdef.
>>    
>>
>
>Ok. I reverted the earlier one and applied this one. Please check the
>CVS and let me know if everything is fine.
>
>Regards--
>Subrata
>
>  
>
>>Sorry for that.
>>
>>Thanks in advance.
>>--
>>Francesco Rundo
>>
>>Subrata Modak wrote: 
>>    
>>
>>>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),)
>>>>    
>>>>        
>>>>
>>>  
>>>      
>>>
>>plain text document attachment
>>(ltp-full-20090430-fix-cgroups-testcase.patch)
>>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>
>>--- 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),)
>>    
>>
>
>
>  
>

[-- Attachment #1.2: Type: text/html, Size: 4979 bytes --]

[-- Attachment #2: Type: text/plain, Size: 332 bytes --]

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects

[-- Attachment #3: 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] 6+ messages in thread

end of thread, other threads:[~2009-06-15 19:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-03 12:49 [LTP] kernel/controllers/ testcase and CGROUPS support Francesco RUNDO
2009-06-04  9:27 ` Subrata Modak
2009-06-04 11:29 ` Subrata Modak
2009-06-11  7:59   ` Francesco RUNDO
2009-06-15 19:16     ` Subrata Modak
2009-06-15 19:30       ` Francesco RUNDO

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.