Skip to contentSkip to conversation

Power Management: Fix missing make targets.

PATCH In review Sachin Sant 4 participants 6 messages Nov 12, 2009 – Nov 26, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Power Management: Fix missing make targets.

Make sure required binaries used by the power management tests are compiled and installed properly. Without the required MAKE TARGETS the test fails with

<<<test_output>>>
Are we really executing this ? /opt/ltp/testcases/bin/runpwtests.sh: line 57: check_kv_arch: command not found
.....
Power_Management 7 TPASS : CPUIDLE sysfs tests passed
/opt/ltp/testcases/bin/runpwtests.sh: line 173: get_sched_values: command not found

Patch is against LTP October version.

---

testcases/kernel/power_management/Makefile +1 -1
diff -Naurp a/testcases/kernel/power_management/Makefile b/testcases/kernel/power_management/Makefile
@@ -26,6 +26,6 @@ $(eval $(call generate_vpath_rule,c,$(sr
 
 INSTALL_TARGETS		:= lib/*.py *.py *.sh
 
-MAKE_TARGETS		:=
+MAKE_TARGETS		:= check_kv_arch get_sched_values
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw

Hi

Patch to handle this issue was mailed on 20/8/2009. Garret Cooper had replied that makefile-infra-rework patch will take care of this requirement. If makefile-infra-rework patch is in this error should not have come up or makefile-rework-patch might have some issue.

Anyway there was reply from maintainer, the patch which I had sent will be integrated till Garret Cooper's patch gets in. I am not sure how this issue would have come up.
I feel its better to check in this patch to avoid Power Management test case failures.

Regards
Poornima

From:
[email protected]
To:
[email protected]
Cc:
[email protected]
Date:
11/12/2009 06:37 PM
Subject:
[LTP] [PATCH] Power Management: Fix missing make targets.

Make sure required binaries used by the power management tests are compiled and
installed properly. Without the required MAKE TARGETS the test fails with

<<<test_output>>>
Are we really executing this ? /opt/ltp/testcases/bin/runpwtests.sh: line 57: check_kv_arch: command not found
.....
Power_Management 7 TPASS : CPUIDLE sysfs tests passed
/opt/ltp/testcases/bin/runpwtests.sh: line 173: get_sched_values: command not
found

Patch is against LTP October version.

---
diff -Naurp a/testcases/kernel/power_management/Makefile b/testcases/kernel/power_management/Makefile
--- a/testcases/kernel/power_management/Makefile 2009-11-12 13:02:57.000000000 +0530
+++ b/testcases/kernel/power_management/Makefile 2009-11-12 13:04:03.000000000 +0530
@@ -26,6 +26,6 @@ $(eval $(call generate_vpath_rule,c,$(sr

INSTALL_TARGETS := lib/*.py *.py *.sh

-MAKE_TARGETS :=
+MAKE_TARGETS := check_kv_arch get_sched_values

include $(top_srcdir)/include/mk/generic_leaf_target.mk

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw

Garret,

Will you be fixing this ?

Regards--
Subrata

Quoted 82 lines · Poornima Nayak

Hi

Patch to handle this issue was mailed on 20/8/2009. Garret Cooper had replied that makefile-infra-rework patch will take care of this requirement. If makefile-infra-rework patch is in this error should not have come up or makefile-rework-patch might have some issue.

Anyway there was reply from maintainer, the patch which I had sent will be integrated till Garret Cooper's patch gets in. I am not sure how this issue would have come up.
I feel its better to check in this patch to avoid Power Management test case failures.

Regards
Poornima

From:
[email protected]
To:
[email protected]
Cc:
[email protected]
Date:
11/12/2009 06:37 PM
Subject:
[LTP] [PATCH] Power Management: Fix
missing make targets.

______________________________________________________________________

Make sure required binaries used by the power management tests are compiled and
installed properly. Without the required MAKE TARGETS the test fails with

<<<test_output>>>
Are we really executing this ? /opt/ltp/testcases/bin/runpwtests.sh: line 57: check_kv_arch: command not found
.....
Power_Management 7 TPASS : CPUIDLE sysfs tests passed
/opt/ltp/testcases/bin/runpwtests.sh: line 173: get_sched_values:
command not
found

Patch is against LTP October version.

---
diff -Naurp a/testcases/kernel/power_management/Makefile b/testcases/kernel/power_management/Makefile --- a/testcases/kernel/power_management/Makefile

2009-11-12 13:02:57.000000000 +0530
+++ b/testcases/kernel/power_management/Makefile
2009-11-12 13:04:03.000000000 +0530
(quoted diff) +0 -0
@@ -26,6 +26,6 @@ $(eval $(call generate_vpath_rule,c,$(sr
 

INSTALL_TARGETS := lib/*.py *.py *.sh

(quoted diff) +1 -1
-MAKE_TARGETS                                  :=
+MAKE_TARGETS                                  := check_kv_arch

get_sched_values

include $(top_srcdir)/include/mk/generic_leaf_target.mk

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Quoted 6 lines

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw
Quoted 70 lines · Subrata Modak

Garret,

Will you be fixing this ?

Regards--
Subrata

Quoted 62 lines · Poornima Nayak

Hi

Patch to handle this issue was mailed on 20/8/2009. Garret Cooper had replied that makefile-infra-rework patch will take care of this requirement. If makefile-infra-rework patch is in this error should not have come up or makefile-rework-patch might have some issue.

Anyway there was reply from maintainer, the patch which I had sent will be integrated till Garret Cooper's patch gets in. I am not sure how this issue would have come up.
I feel its better to check in this patch to avoid Power Management test case failures.

Regards
Poornima

From:
[email protected]
To:
[email protected]
Cc:
[email protected]
Date:
11/12/2009 06:37 PM
Subject:
[LTP] [PATCH] Power Management: Fix
missing make targets.

______________________________________________________________________

Make sure required binaries used by the power management tests are compiled and
installed properly. Without the required MAKE TARGETS the test fails with

<<<test_output>>>
Are we really executing this ? /opt/ltp/testcases/bin/runpwtests.sh: line 57: check_kv_arch: command not found
.....
Power_Management    7  TPASS  :  CPUIDLE sysfs tests passed /opt/ltp/testcases/bin/runpwtests.sh: line 173: get_sched_values:
command not
found

Patch is against LTP October version.

---
diff -Naurp a/testcases/kernel/power_management/Makefile b/testcases/kernel/power_management/Makefile --- a/testcases/kernel/power_management/Makefile

2009-11-12 13:02:57.000000000 +0530
+++ b/testcases/kernel/power_management/Makefile
2009-11-12 13:04:03.000000000 +0530
(quoted diff) +0 -0
@@ -26,6 +26,6 @@ $(eval $(call generate_vpath_rule,c,$(sr
 
Quoted 7 lines
Quoted 7 lines

INSTALL_TARGETS                                  := lib/*.py *.py *.sh

(quoted diff) +1 -1
-MAKE_TARGETS                                  :=
+MAKE_TARGETS                                  := check_kv_arch

get_sched_values

include $(top_srcdir)/include/mk/generic_leaf_target.mk

Just fixed on HEAD by adding proper tst_kvercmp checks. This
script needs to still be seriously cleaned up though, because it's not doing a _LOT_ of checks, like it should be, resulting in false positives:

gcooper@orangebox /scratch/ltp-dev2/ltp/testcases/kernel/power_management $ ./runpwtests.sh

Power_Management    1  TCONF  :  Not a suitable architecture for SCHED_MC test
Power_Management    2  TCONF  :  Required Hyper Threading support for

SCHED_SMT test
cat: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq: Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/check_cpufreq_sysfs_files.sh:
FAIL: cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
cat: /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq: Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/check_cpufreq_sysfs_files.sh:
FAIL: cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq
cat: /sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_cur_freq: Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/check_cpufreq_sysfs_files.sh:
FAIL: cat /sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_cur_freq
cat: /sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_cur_freq: Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/check_cpufreq_sysfs_files.sh:
FAIL: cat /sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_cur_freq
Power_Management 3 TFAIL : CPUFREQ sysfs tests
/scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- ondemand for cpu0 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- powersave for cpu0 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- userspace for cpu0 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- performance for cpu0 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- ondemand for cpu1 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- powersave for cpu1 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- userspace for cpu1 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- performance for cpu1 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- ondemand for cpu2 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- powersave for cpu2 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- userspace for cpu2 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- performance for cpu2 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- ondemand for cpu3 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- powersave for cpu3 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- userspace for cpu3 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- performance for cpu3
Power_Management 4 TFAIL : Changing governors
/scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_freq.sh:
line 14: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_freq.sh:
line 14: /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_freq.sh:
line 14: /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_freq.sh:
line 14: /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:
Permission denied
Power_Management 5 TFAIL : Changing frequncies
/scratch/ltp-dev2/ltp/testcases/kernel/power_management/pwkm_load_unload.sh:
line 17: modprobe: command not found /scratch/ltp-dev2/ltp/testcases/kernel/power_management/pwkm_load_unload.sh:
line 29: modprobe: command not found
Power_Management 6 TPASS : Loading and Unloading of governor
kernel modules /scratch/ltp-dev2/ltp/testcases/kernel/power_management/check_cpuidle_sysfs_files.sh:

PASS: Checking cpu idle sysfs files
Power_Management    7  TPASS  :  CPUIDLE sysfs tests passed
Power_Management    8  TFAIL  :  Timer migration interface missing

Thanks,
-Garrett

Update of /cvsroot/ltp/ltp/testcases/kernel/power_management In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4838

Modified Files:
Makefile runpwtests.sh
Removed Files:
check_kv_arch.c get_sched_values.c
Log Message:
1. Remove the .c files and all calls in runpwtests.sh because we can achieve the same thing through additional shell test logic.
2. Add the apicmds dependency.

--- get_sched_values.c DELETED ---

Index: runpwtests.sh
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/power_management/runpwtests.sh,v retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17

*** runpwtests.sh       29 Oct 2009 18:04:21 -0000      1.16
--- runpwtests.sh       16 Nov 2009 08:36:37 -0000      1.17

***************
*** 31,35 ****

# Exporting Required variables
- echo Are we really executing this ?
export TST_TOTAL=1
#LTPTMP=${TMP}
--- 31,34 ----
***************
*** 55,63 ****

# Checking required kernel version and architecture
! check_kv_arch
! RC=$?
! if [ $RC -eq 1 ] ; then
! tst_resm TCONF "Kernel version or Architecture not supported:
Not running testcases"
exit 0
fi

--- 54,86 ----

# Checking required kernel version and architecture
! tst_kvercmp 2 6 21; rc=$?
! if [ $rc -ne 1 -a $rc -ne 2 ] ; then
! tst_resm TCONF "Kernel version not supported; not running testcases"
exit 0
+ else
+ case "$(uname -m)" in
+ i[4-6]86|x86_64)
+ ;;
+ *)

+               tst_resm TCONF "Arch not supported; not running testcases"
+               exit 0
+               ;;

+ esac
+ fi
+
+ tst_kvercmp 2 6 29; rc=$?
+ if [ $rc -eq 2 ] ; then
+ max_sched_mc=2
+ max_sched_smt=2
+ else
+ max_sched_mc=1
+ max_sched_smt=1
+ fi
+
+ tst_kvercmp 2 6 31; rc=$?
+ if [ $rc -eq 1 -o $rc -eq 2 ] ; then
+ timer_migr_support_compatible=1
+ else
+ timer_migr_support_compatible=0
fi

***************
*** 165,176 ****

 # sched_domain test
! which python > /dev/null
! if [ $? -ne 0 ] ; then
       tst_resm TCONF "Python is not installed, CPU Consoldation\
 test cannot run"
 else
       if [ -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then
!               get_sched_values sched_mc; max_sched_mc=$?
!       echo "max sched mc $max_sched_mc"
               for sched_mc in `seq 0 $max_sched_mc`; do
                       : $(( TST_COUNT+=1))
--- 188,197 ----
 # sched_domain test
! if ! type python > /dev/null ; then
       tst_resm TCONF "Python is not installed, CPU Consoldation\
 test cannot run"
 else
       if [ -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then
!               echo "max sched mc $max_sched_mc"
               for sched_mc in `seq 0 $max_sched_mc`; do
                       : $(( TST_COUNT+=1))
***************
*** 191,197 ****

: $(( TST_COUNT+=1))
- check_kv_arch "timer_migration"; supp=$?
if [ -f /proc/sys/kernel/timer_migration ]; then
! if [ $supp -eq $YES ]; then
if test_timer_migration.sh; then tst_resm TPASS "Timer Migration interface test"
--- 212,217 ----

: $(( TST_COUNT+=1))
if [ -f /proc/sys/kernel/timer_migration ]; then
! if [ $timer_migr_support_compatible -eq $YES ]; then
if test_timer_migration.sh; then tst_resm TPASS "Timer Migration interface test"
***************
*** 202,206 ****
fi
else
! if [ $supp -eq $YES ]; then
RC=$?
tst_resm TFAIL "Timer migration interface missing"
--- 222,226 ----
fi
else
! if [ $timer_migr_support_compatible -eq $YES ]; then
RC=$?
tst_resm TFAIL "Timer migration interface missing"

Index: Makefile
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/power_management/Makefile,v retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8

*** Makefile    9 Oct 2009 17:55:49 -0000       1.7
--- Makefile    16 Nov 2009 08:36:37 -0000      1.8

***************
*** 27,31 ****
INSTALL_TARGETS := lib/*.py *.py *.sh

! MAKE_TARGETS :=

include $(top_srcdir)/include/mk/generic_leaf_target.mk
--- 27,31 ----
INSTALL_TARGETS := lib/*.py *.py *.sh

! MAKE_DEPS += $(APICMDS_DIR)/tst_kvercmp

include $(top_srcdir)/include/mk/generic_leaf_target.mk

--- check_kv_arch.c DELETED ---

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#4 lore raw

Hi Garret

I will fix those false positives displayed. But I have never seen them on my test setups.

Regards
Poornima

Garrett Cooper <[email protected]>
11/16/2009 02:09 PM

To
[email protected]
cc
[email protected], [email protected], Poornima Nayak/India/IBM@IBMIN
Subject
Re: [LTP] [PATCH] Power Management: Fix missing make targets.

Quoted 70 lines · Subrata Modak

Garret,

Will you be fixing this ?

Regards--
Subrata

Quoted 62 lines · Poornima Nayak

Hi

Patch to handle this issue was mailed on 20/8/2009. Garret Cooper had replied that makefile-infra-rework patch will take care of this requirement. If makefile-infra-rework patch is in this error should not have come up or makefile-rework-patch might have some issue.

Anyway there was reply from maintainer, the patch which I had sent will be integrated till Garret Cooper's patch gets in. I am not sure how this issue would have come up.
I feel its better to check in this patch to avoid Power Management test case failures.

Regards
Poornima

From:
[email protected]
To:
[email protected]
Cc:
[email protected]
Date:
11/12/2009 06:37 PM
Subject:
[LTP] [PATCH] Power Management: Fix
missing make targets.

______________________________________________________________________

Make sure required binaries used by the power management tests are compiled and
installed properly. Without the required MAKE TARGETS the test fails with

<<<test_output>>>
Are we really executing this ? /opt/ltp/testcases/bin/runpwtests.sh: line 57: check_kv_arch: command not found
.....
Power_Management 7 TPASS : CPUIDLE sysfs tests passed
/opt/ltp/testcases/bin/runpwtests.sh: line 173: get_sched_values:
command not
found

Patch is against LTP October version.

---
diff -Naurp a/testcases/kernel/power_management/Makefile b/testcases/kernel/power_management/Makefile --- a/testcases/kernel/power_management/Makefile

2009-11-12 13:02:57.000000000 +0530
+++ b/testcases/kernel/power_management/Makefile
2009-11-12 13:04:03.000000000 +0530
(quoted diff) +0 -0
@@ -26,6 +26,6 @@ $(eval $(call generate_vpath_rule,c,$(sr
 
Quoted 7 lines
Quoted 7 lines

INSTALL_TARGETS := lib/*.py *.py *.sh

(quoted diff) +1 -1
-MAKE_TARGETS                                  :=
+MAKE_TARGETS                                  := check_kv_arch

get_sched_values

include $(top_srcdir)/include/mk/generic_leaf_target.mk

Just fixed on HEAD by adding proper tst_kvercmp checks. This
script needs to still be seriously cleaned up though, because it's not doing a _LOT_ of checks, like it should be, resulting in false positives:

gcooper@orangebox /scratch/ltp-dev2/ltp/testcases/kernel/power_management $ ./runpwtests.sh
Power_Management 1 TCONF : Not a suitable architecture for SCHED_MC
test
Power_Management 2 TCONF : Required Hyper Threading support for
SCHED_SMT test
cat: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq: Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/check_cpufreq_sysfs_files.sh:
FAIL: cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
cat: /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq: Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/check_cpufreq_sysfs_files.sh:
FAIL: cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq
cat: /sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_cur_freq: Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/check_cpufreq_sysfs_files.sh:
FAIL: cat /sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_cur_freq
cat: /sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_cur_freq: Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/check_cpufreq_sysfs_files.sh:
FAIL: cat /sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_cur_freq
Power_Management 3 TFAIL : CPUFREQ sysfs tests
/scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- ondemand for cpu0 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- powersave for cpu0 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- userspace for cpu0 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- performance for cpu0 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- ondemand for cpu1 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- powersave for cpu1 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- userspace for cpu1 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- performance for cpu1 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- ondemand for cpu2 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- powersave for cpu2 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- userspace for cpu2 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- performance for cpu2 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- ondemand for cpu3 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- powersave for cpu3 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- userspace for cpu3 /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
line 14: /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_govr.sh:
FAIL: Unable to set governor -- performance for cpu3
Power_Management 4 TFAIL : Changing governors
/scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_freq.sh:
line 14: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_freq.sh:
line 14: /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_freq.sh:
line 14: /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:
Permission denied /scratch/ltp-dev2/ltp/testcases/kernel/power_management/change_freq.sh:
line 14: /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:
Permission denied
Power_Management 5 TFAIL : Changing frequncies
/scratch/ltp-dev2/ltp/testcases/kernel/power_management/pwkm_load_unload.sh:
line 17: modprobe: command not found /scratch/ltp-dev2/ltp/testcases/kernel/power_management/pwkm_load_unload.sh:
line 29: modprobe: command not found
Power_Management 6 TPASS : Loading and Unloading of governor
kernel modules /scratch/ltp-dev2/ltp/testcases/kernel/power_management/check_cpuidle_sysfs_files.sh:

PASS: Checking cpu idle sysfs files
Power_Management    7  TPASS  :  CPUIDLE sysfs tests passed
Power_Management    8  TFAIL  :  Timer migration interface missing

Thanks,
-Garrett

Update of /cvsroot/ltp/ltp/testcases/kernel/power_management In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4838

Modified Files:
Makefile runpwtests.sh
Removed Files:
check_kv_arch.c get_sched_values.c
Log Message:
1. Remove the .c files and all calls in runpwtests.sh because we can achieve the same thing through additional shell test logic.
2. Add the apicmds dependency.

--- get_sched_values.c DELETED ---

Index: runpwtests.sh
===================================================================
RCS file:
/cvsroot/ltp/ltp/testcases/kernel/power_management/runpwtests.sh,v retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17

*** runpwtests.sh       29 Oct 2009 18:04:21 -0000      1.16
--- runpwtests.sh       16 Nov 2009 08:36:37 -0000      1.17

***************
*** 31,35 ****

# Exporting Required variables
- echo Are we really executing this ?
export TST_TOTAL=1
#LTPTMP=${TMP}
--- 31,34 ----
***************
*** 55,63 ****

# Checking required kernel version and architecture
! check_kv_arch
! RC=$?
! if [ $RC -eq 1 ] ; then
! tst_resm TCONF "Kernel version or Architecture not supported:
Not running testcases"
exit 0
fi

--- 54,86 ----

# Checking required kernel version and architecture
! tst_kvercmp 2 6 21; rc=$?
! if [ $rc -ne 1 -a $rc -ne 2 ] ; then
! tst_resm TCONF "Kernel version not supported; not running
testcases"
exit 0
+ else
+ case "$(uname -m)" in
+ i[4-6]86|x86_64)
+ ;;
+ *)

+               tst_resm TCONF "Arch not supported; not running testcases"
+               exit 0
+               ;;

+ esac
+ fi
+
+ tst_kvercmp 2 6 29; rc=$?
+ if [ $rc -eq 2 ] ; then
+ max_sched_mc=2
+ max_sched_smt=2
+ else
+ max_sched_mc=1
+ max_sched_smt=1
+ fi
+
+ tst_kvercmp 2 6 31; rc=$?
+ if [ $rc -eq 1 -o $rc -eq 2 ] ; then
+ timer_migr_support_compatible=1
+ else
+ timer_migr_support_compatible=0
fi

***************
*** 165,176 ****

 # sched_domain test
! which python > /dev/null
! if [ $? -ne 0 ] ; then
       tst_resm TCONF "Python is not installed, CPU Consoldation\
 test cannot run"
 else
       if [ -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then
!               get_sched_values sched_mc; max_sched_mc=$?
!       echo "max sched mc $max_sched_mc"
               for sched_mc in `seq 0 $max_sched_mc`; do
                       : $(( TST_COUNT+=1))
--- 188,197 ----
 # sched_domain test
! if ! type python > /dev/null ; then
       tst_resm TCONF "Python is not installed, CPU Consoldation\
 test cannot run"
 else
       if [ -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then
!               echo "max sched mc $max_sched_mc"
               for sched_mc in `seq 0 $max_sched_mc`; do
                       : $(( TST_COUNT+=1))
***************
*** 191,197 ****

: $(( TST_COUNT+=1))
- check_kv_arch "timer_migration"; supp=$?
if [ -f /proc/sys/kernel/timer_migration ]; then
! if [ $supp -eq $YES ]; then
if test_timer_migration.sh; then tst_resm TPASS "Timer Migration interface test"
--- 212,217 ----

: $(( TST_COUNT+=1))
if [ -f /proc/sys/kernel/timer_migration ]; then
! if [ $timer_migr_support_compatible -eq $YES ]; then
if test_timer_migration.sh; then tst_resm TPASS "Timer Migration interface test"
***************
*** 202,206 ****
fi
else
! if [ $supp -eq $YES ]; then
RC=$?
tst_resm TFAIL "Timer migration interface missing"
--- 222,226 ----
fi
else
! if [ $timer_migr_support_compatible -eq $YES ]; then
RC=$?
tst_resm TFAIL "Timer migration interface missing"

Index: Makefile
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/power_management/Makefile,v retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8

*** Makefile    9 Oct 2009 17:55:49 -0000       1.7
--- Makefile    16 Nov 2009 08:36:37 -0000      1.8

***************
*** 27,31 ****
INSTALL_TARGETS := lib/*.py *.py *.sh

! MAKE_TARGETS :=

include $(top_srcdir)/include/mk/generic_leaf_target.mk
--- 27,31 ----
INSTALL_TARGETS := lib/*.py *.py *.sh

! MAKE_DEPS += $(APICMDS_DIR)/tst_kvercmp

include $(top_srcdir)/include/mk/generic_leaf_target.mk

--- check_kv_arch.c DELETED ---

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#5 lore raw
Quoted 5 lines · Poornima Nayak

Hi Garret

I will fix those false positives displayed. But I have never seen them on my test setups.

I ran into these issues with the following two configurations:

1. I'm not root.
2. sysfs exists, but power management isn't in the kernel (mips*, ppc, etc).

1. can be resolved through an added check in runpwtests.sh, and I know that
2. was resolved by adding sufficient tests to runpwtests.sh, to replace get_kv_arch, etc, but you'll run into that issue as well as many others, particularly if you run with 1.

HTH,
-Garrett

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list