Patchwork [1/2] linaro-pm-qa-utils: Add power management test utils

login
register
mail settings
Submitter chase maupin
Date March 18, 2014, 11:56 a.m.
Message ID <1395143773-26375-1-git-send-email-Chase.Maupin@ti.com>
Download mbox | patch
Permalink /patch/68819/
State New
Headers show

Comments

chase maupin - March 18, 2014, 11:56 a.m.
* The power management test utilities from Linaro can be used
  to test multiple PM features such as cpufreq, cpuidle, thermal
  control and suspend operations.
* These utilities are not platform specific and can be used by
  a broader base of users.

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
---
 .../linaro-pm-qa/linaro-pm-qa-utils_git.bb         |   63 ++++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 meta/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb
Koen Kooi - March 18, 2014, 12:29 p.m.
Op 18 mrt. 2014, om 12:56 heeft Chase Maupin <Chase.Maupin@ti.com> het volgende geschreven:

> * The power management test utilities from Linaro can be used
>  to test multiple PM features such as cpufreq, cpuidle, thermal
>  control and suspend operations.
> * These utilities are not platform specific and can be used by
>  a broader base of users.

PN should me 'pm-qa' or 'pm-qa-utils'. And it would fit better in meta-oe since it's not 'core' enough for oe-core.

> 
> Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
> ---
> .../linaro-pm-qa/linaro-pm-qa-utils_git.bb         |   63 ++++++++++++++++++++
> 1 file changed, 63 insertions(+)
> create mode 100644 meta/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb
> 
> diff --git a/meta/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb b/meta/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb
> new file mode 100644
> index 0000000..610f3a7
> --- /dev/null
> +++ b/meta/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb
> @@ -0,0 +1,63 @@
> +DESCRIPTION = "Utilities from Linaro for testing Power Management"
> +HOMEPAGE = "https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/PmQa"
> +
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> +
> +PV = "0.4.4"
> +
> +BRANCH ?= "master"
> +SRCREV = "fbc2762359b863dfbf4fd0bab1e8abd2a6125ed4"
> +
> +SRC_URI = "git://git.linaro.org/tools/pm-qa.git;protocol=git;branch=${BRANCH}"
> +
> +S = "${WORKDIR}/git"
> +
> +CFLAGS += "-pthread"
> +
> +do_compile () {
> +    # Find all the .c files in this project and build them.
> +    for x in `find . -name "*.c"`
> +    do
> +        util=`echo ${x} | sed s/.c$//`
> +        oe_runmake ${util}
> +    done
> +}
> +
> +do_install () {
> +    install -d ${D}${bindir}
> +    install -d ${D}${bindir}/linaro-pm-qa-include
> +
> +    # Install the compiled binaries the were built in the previous step
> +    for x in `find . -name "*.c"`
> +    do
> +        util=`echo ${x} | sed s/.c$//`
> +        util_basename=`basename ${util}`
> +        install -m 0755 ${util} ${D}${bindir}/${util_basename}
> +    done
> +
> +    # Install the helper scripts in the include directory
> +    for script in `find . -name "*.sh" | grep include`
> +    do
> +        # Remove hardcoded relative paths
> +        sed -i -e 's#..\/utils\/##' ${script}
> +
> +        script_basename=`basename ${script}`
> +        install -m 0755 $script ${D}${bindir}/linaro-pm-qa-include/${script_basename}
> +    done
> +
> +    # Install the shell scripts NOT in the include directory since those
> +    # will be installed elsewhere
> +    for script in `find . -name "*.sh" | grep -v include`
> +    do
> +        # if the script includes any helper scripts from the include
> +        # directory then change the include path to the absolute path
> +        # to reflect the install location of the helper scripts.
> +        sed -i -e "s#source ../include#source ${bindir}/linaro-pm-qa-include#g" ${script}
> +        # Remove hardcoded relative paths
> +        sed -i -e 's#..\/utils\/##' ${script}
> +
> +        script_basename=`basename ${script}`
> +        install -m 0755 $script ${D}${bindir}/${script_basename}
> +    done
> +}
> -- 
> 1.7.9.5
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
Richard Purdie - March 18, 2014, 12:56 p.m.
On Tue, 2014-03-18 at 13:29 +0100, Koen Kooi wrote:
> Op 18 mrt. 2014, om 12:56 heeft Chase Maupin <Chase.Maupin@ti.com> het volgende geschreven:
> 
> > * The power management test utilities from Linaro can be used
> >  to test multiple PM features such as cpufreq, cpuidle, thermal
> >  control and suspend operations.
> > * These utilities are not platform specific and can be used by
> >  a broader base of users.
> 
> PN should me 'pm-qa' or 'pm-qa-utils'.

Agreed.

>  And it would fit better in meta-oe since it's not 'core' enough for oe-core.

I'm open to discussion on that. Certainly if there is just one user,
meta-oe would be appropriate. If these are generically useful and the
plan is we integrate these into the larger automated test picture,
oe-core may make sense.

So if there a bigger picture plan here? Would these make sense in the
broader picture?

Cheers,

Richard
chase maupin - March 18, 2014, 1:40 p.m.
>-----Original Message-----
>From: Richard Purdie [mailto:richard.purdie@linuxfoundation.org]
>Sent: Tuesday, March 18, 2014 7:56 AM
>To: Koen Kooi
>Cc: Maupin, Chase; openembedded-core@lists.openembedded.org
>Subject: Re: [OE-core] [PATCH 1/2] linaro-pm-qa-utils: Add power
>management test utils
>
>On Tue, 2014-03-18 at 13:29 +0100, Koen Kooi wrote:
>> Op 18 mrt. 2014, om 12:56 heeft Chase Maupin
><Chase.Maupin@ti.com> het volgende geschreven:
>>
>> > * The power management test utilities from Linaro can be used
>> >  to test multiple PM features such as cpufreq, cpuidle,
>thermal
>> >  control and suspend operations.
>> > * These utilities are not platform specific and can be used by
>> >  a broader base of users.
>>
>> PN should me 'pm-qa' or 'pm-qa-utils'.
>
>Agreed.

I'll change the name.

>
>>  And it would fit better in meta-oe since it's not 'core' enough
>for oe-core.
>
>I'm open to discussion on that. Certainly if there is just one
>user,
>meta-oe would be appropriate. If these are generically useful and
>the
>plan is we integrate these into the larger automated test picture,
>oe-core may make sense.
>
>So if there a bigger picture plan here? Would these make sense in
>the
>broader picture?

Well, we certainly use them for test and they are generic enough to apply to a broader audience which is why I thought to put them here first.  There is nothing TI specific and I don't think they are even necessarily ARM specific either.

>
>Cheers,
>
>Richard
Otavio Salvador - March 19, 2014, 10:38 p.m.
On Tue, Mar 18, 2014 at 9:56 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Tue, 2014-03-18 at 13:29 +0100, Koen Kooi wrote:
>> Op 18 mrt. 2014, om 12:56 heeft Chase Maupin <Chase.Maupin@ti.com> het volgende geschreven:
>>
>> > * The power management test utilities from Linaro can be used
>> >  to test multiple PM features such as cpufreq, cpuidle, thermal
>> >  control and suspend operations.
>> > * These utilities are not platform specific and can be used by
>> >  a broader base of users.
>>
>> PN should me 'pm-qa' or 'pm-qa-utils'.
>
> Agreed.
>
>>  And it would fit better in meta-oe since it's not 'core' enough for oe-core.
>
> I'm open to discussion on that. Certainly if there is just one user,
> meta-oe would be appropriate. If these are generically useful and the
> plan is we integrate these into the larger automated test picture,
> oe-core may make sense.
>
> So if there a bigger picture plan here? Would these make sense in the
> broader picture?

I prefer if this is done in meta-oe first and we move to oe-core when
needed. For now it is at very beginning so we still does not know what
will be the real final picture of t.
Gary Thomas - March 20, 2014, 12:31 a.m.
On 2014-03-19 16:38, Otavio Salvador wrote:
> On Tue, Mar 18, 2014 at 9:56 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>> On Tue, 2014-03-18 at 13:29 +0100, Koen Kooi wrote:
>>> Op 18 mrt. 2014, om 12:56 heeft Chase Maupin <Chase.Maupin@ti.com> het volgende geschreven:
>>>
>>>> * The power management test utilities from Linaro can be used
>>>>  to test multiple PM features such as cpufreq, cpuidle, thermal
>>>>  control and suspend operations.
>>>> * These utilities are not platform specific and can be used by
>>>>  a broader base of users.
>>>
>>> PN should me 'pm-qa' or 'pm-qa-utils'.
>>
>> Agreed.
>>
>>>  And it would fit better in meta-oe since it's not 'core' enough for oe-core.
>>
>> I'm open to discussion on that. Certainly if there is just one user,
>> meta-oe would be appropriate. If these are generically useful and the
>> plan is we integrate these into the larger automated test picture,
>> oe-core may make sense.
>>
>> So if there a bigger picture plan here? Would these make sense in the
>> broader picture?
> 
> I prefer if this is done in meta-oe first and we move to oe-core when
> needed. For now it is at very beginning so we still does not know what
> will be the real final picture of t.
> 

What are you afraid of?  Putting this in OE-core _may_ make sense
if it serves a larger community, but having it there will not be
destabilizing, so why not?
Khem Raj - March 20, 2014, 12:45 a.m.
On Wed, Mar 19, 2014 at 5:31 PM, Gary Thomas <gary@mlbassoc.com> wrote:
>
> What are you afraid of?  Putting this in OE-core _may_ make sense
> if it serves a larger community, but having it there will not be
> destabilizing, so why not?

We should always strive towards making OE-Core leaner, therefore we
should evaluate the real common usecase. which means there must be a
good justification to add it there
Otavio Salvador - March 20, 2014, 11:57 a.m.
On Wed, Mar 19, 2014 at 9:45 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On Wed, Mar 19, 2014 at 5:31 PM, Gary Thomas <gary@mlbassoc.com> wrote:
>>
>> What are you afraid of?  Putting this in OE-core _may_ make sense
>> if it serves a larger community, but having it there will not be
>> destabilizing, so why not?
>
> We should always strive towards making OE-Core leaner, therefore we
> should evaluate the real common usecase. which means there must be a
> good justification to add it there

The OE-Core addition is something which ought to be done when
something becomes a 'standard' in our use or used by most. Until this
really happens this is still a goal. So better to move it to OE-Core
when we see the profit of doing it is good enough.
chase maupin - March 20, 2014, 12:23 p.m.
>-----Original Message-----
>From: openembedded-core-bounces@lists.openembedded.org
>[mailto:openembedded-core-bounces@lists.openembedded.org] On
>Behalf Of Khem Raj
>Sent: Wednesday, March 19, 2014 7:46 PM
>To: Gary Thomas
>Cc: Patches and discussions about the oe-core layer
>Subject: Re: [OE-core] [PATCH 1/2] linaro-pm-qa-utils: Add power
>management test utils
>
>On Wed, Mar 19, 2014 at 5:31 PM, Gary Thomas <gary@mlbassoc.com>
>wrote:
>>
>> What are you afraid of?  Putting this in OE-core _may_ make
>sense
>> if it serves a larger community, but having it there will not be
>> destabilizing, so why not?
>
>We should always strive towards making OE-Core leaner, therefore
>we
>should evaluate the real common usecase. which means there must be
>a
>good justification to add it there

So are there other people that have an interest in these utilities for testing power management features of the kernel?  It sounds like that is the question you have in order to help decide whether this is a common use case or not.

Koen, 

Do you know, or perhaps the Linaro QA team would know, how many people are using these utilities?

>--
>_______________________________________________
>Openembedded-core mailing list
>Openembedded-core@lists.openembedded.org
>http://lists.openembedded.org/mailman/listinfo/openembedded-core
Otavio Salvador - March 20, 2014, 1:15 p.m.
On Thu, Mar 20, 2014 at 9:23 AM, Maupin, Chase <chase.maupin@ti.com> wrote:
>>-----Original Message-----
>>From: openembedded-core-bounces@lists.openembedded.org
>>[mailto:openembedded-core-bounces@lists.openembedded.org] On
>>Behalf Of Khem Raj
>>Sent: Wednesday, March 19, 2014 7:46 PM
>>To: Gary Thomas
>>Cc: Patches and discussions about the oe-core layer
>>Subject: Re: [OE-core] [PATCH 1/2] linaro-pm-qa-utils: Add power
>>management test utils
>>
>>On Wed, Mar 19, 2014 at 5:31 PM, Gary Thomas <gary@mlbassoc.com>
>>wrote:
>>>
>>> What are you afraid of?  Putting this in OE-core _may_ make
>>sense
>>> if it serves a larger community, but having it there will not be
>>> destabilizing, so why not?
>>
>>We should always strive towards making OE-Core leaner, therefore
>>we
>>should evaluate the real common usecase. which means there must be
>>a
>>good justification to add it there
>
> So are there other people that have an interest in these utilities for testing power management features of the kernel?  It sounds like that is the question you have in order to help decide whether this is a common use case or not.
>
> Koen,
>
> Do you know, or perhaps the Linaro QA team would know, how many people are using these utilities?

I do; and I appreciate it being add. My point is start in meta-oe and
we move it here when needed.
chase maupin - March 20, 2014, 2:27 p.m.
>-----Original Message-----
>From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com]
>On Behalf Of Otavio Salvador
>Sent: Thursday, March 20, 2014 8:16 AM
>To: Maupin, Chase
>Cc: Khem Raj; Gary Thomas; Patches and discussions about the oe-
>core layer
>Subject: Re: [OE-core] [PATCH 1/2] linaro-pm-qa-utils: Add power
>management test utils
>
>On Thu, Mar 20, 2014 at 9:23 AM, Maupin, Chase
><chase.maupin@ti.com> wrote:
>>>-----Original Message-----
>>>From: openembedded-core-bounces@lists.openembedded.org
>>>[mailto:openembedded-core-bounces@lists.openembedded.org] On
>>>Behalf Of Khem Raj
>>>Sent: Wednesday, March 19, 2014 7:46 PM
>>>To: Gary Thomas
>>>Cc: Patches and discussions about the oe-core layer
>>>Subject: Re: [OE-core] [PATCH 1/2] linaro-pm-qa-utils: Add power
>>>management test utils
>>>
>>>On Wed, Mar 19, 2014 at 5:31 PM, Gary Thomas <gary@mlbassoc.com>
>>>wrote:
>>>>
>>>> What are you afraid of?  Putting this in OE-core _may_ make
>>>sense
>>>> if it serves a larger community, but having it there will not
>be
>>>> destabilizing, so why not?
>>>
>>>We should always strive towards making OE-Core leaner, therefore
>>>we
>>>should evaluate the real common usecase. which means there must
>be
>>>a
>>>good justification to add it there
>>
>> So are there other people that have an interest in these
>utilities for testing power management features of the kernel?  It
>sounds like that is the question you have in order to help decide
>whether this is a common use case or not.
>>
>> Koen,
>>
>> Do you know, or perhaps the Linaro QA team would know, how many
>people are using these utilities?
>
>I do; and I appreciate it being add. My point is start in meta-oe
>and
>we move it here when needed.

OK.  I'll make a patch for meta-oe.  Any issues with the second patch in the series adding mmc-utils?

>
>
>--
>Otavio Salvador                             O.S. Systems
>http://www.ossystems.com.br        http://code.ossystems.com.br
>Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
Otavio Salvador - March 20, 2014, 8:41 p.m.
On Thu, Mar 20, 2014 at 11:27 AM, Maupin, Chase <chase.maupin@ti.com> wrote:
>>-----Original Message-----
>>From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com]
>>On Behalf Of Otavio Salvador
>>Sent: Thursday, March 20, 2014 8:16 AM
>>To: Maupin, Chase
>>Cc: Khem Raj; Gary Thomas; Patches and discussions about the oe-
>>core layer
>>Subject: Re: [OE-core] [PATCH 1/2] linaro-pm-qa-utils: Add power
>>management test utils
>>
>>On Thu, Mar 20, 2014 at 9:23 AM, Maupin, Chase
>><chase.maupin@ti.com> wrote:
>>>>-----Original Message-----
>>>>From: openembedded-core-bounces@lists.openembedded.org
>>>>[mailto:openembedded-core-bounces@lists.openembedded.org] On
>>>>Behalf Of Khem Raj
>>>>Sent: Wednesday, March 19, 2014 7:46 PM
>>>>To: Gary Thomas
>>>>Cc: Patches and discussions about the oe-core layer
>>>>Subject: Re: [OE-core] [PATCH 1/2] linaro-pm-qa-utils: Add power
>>>>management test utils
>>>>
>>>>On Wed, Mar 19, 2014 at 5:31 PM, Gary Thomas <gary@mlbassoc.com>
>>>>wrote:
>>>>>
>>>>> What are you afraid of?  Putting this in OE-core _may_ make
>>>>sense
>>>>> if it serves a larger community, but having it there will not
>>be
>>>>> destabilizing, so why not?
>>>>
>>>>We should always strive towards making OE-Core leaner, therefore
>>>>we
>>>>should evaluate the real common usecase. which means there must
>>be
>>>>a
>>>>good justification to add it there
>>>
>>> So are there other people that have an interest in these
>>utilities for testing power management features of the kernel?  It
>>sounds like that is the question you have in order to help decide
>>whether this is a common use case or not.
>>>
>>> Koen,
>>>
>>> Do you know, or perhaps the Linaro QA team would know, how many
>>people are using these utilities?
>>
>>I do; and I appreciate it being add. My point is start in meta-oe
>>and
>>we move it here when needed.
>
> OK.  I'll make a patch for meta-oe.  Any issues with the second patch in the series adding mmc-utils?

I replied to it :)

Patch

diff --git a/meta/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb b/meta/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb
new file mode 100644
index 0000000..610f3a7
--- /dev/null
+++ b/meta/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb
@@ -0,0 +1,63 @@ 
+DESCRIPTION = "Utilities from Linaro for testing Power Management"
+HOMEPAGE = "https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/PmQa"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+PV = "0.4.4"
+
+BRANCH ?= "master"
+SRCREV = "fbc2762359b863dfbf4fd0bab1e8abd2a6125ed4"
+
+SRC_URI = "git://git.linaro.org/tools/pm-qa.git;protocol=git;branch=${BRANCH}"
+
+S = "${WORKDIR}/git"
+
+CFLAGS += "-pthread"
+
+do_compile () {
+    # Find all the .c files in this project and build them.
+    for x in `find . -name "*.c"`
+    do
+        util=`echo ${x} | sed s/.c$//`
+        oe_runmake ${util}
+    done
+}
+
+do_install () {
+    install -d ${D}${bindir}
+    install -d ${D}${bindir}/linaro-pm-qa-include
+
+    # Install the compiled binaries the were built in the previous step
+    for x in `find . -name "*.c"`
+    do
+        util=`echo ${x} | sed s/.c$//`
+        util_basename=`basename ${util}`
+        install -m 0755 ${util} ${D}${bindir}/${util_basename}
+    done
+
+    # Install the helper scripts in the include directory
+    for script in `find . -name "*.sh" | grep include`
+    do
+        # Remove hardcoded relative paths
+        sed -i -e 's#..\/utils\/##' ${script}
+
+        script_basename=`basename ${script}`
+        install -m 0755 $script ${D}${bindir}/linaro-pm-qa-include/${script_basename}
+    done
+
+    # Install the shell scripts NOT in the include directory since those
+    # will be installed elsewhere
+    for script in `find . -name "*.sh" | grep -v include`
+    do
+        # if the script includes any helper scripts from the include
+        # directory then change the include path to the absolute path
+        # to reflect the install location of the helper scripts.
+        sed -i -e "s#source ../include#source ${bindir}/linaro-pm-qa-include#g" ${script}
+        # Remove hardcoded relative paths
+        sed -i -e 's#..\/utils\/##' ${script}
+
+        script_basename=`basename ${script}`
+        install -m 0755 $script ${D}${bindir}/${script_basename}
+    done
+}