Here is a bunch of scenarii I am planning to integrate to the pm-qa package.
Any idea or comment will be appreciate.
Note the test cases are designed for a specific host configured to
have a minimal number of services running on it and without any pending cron
jobs. This pre-requisite is needed in order to not alter the expected
results.
Thanks
-- Daniel
cpufreq:
--------
(1) test the cpufreq framework is available
check the following files are present in the sysfs path:
/sys/devices/system/cpu/cpu[0-9].*
-> cpufreq/scaling_available_frequencies
-> cpufreq/scaling_cur_freq
-> cpufreq/scaling_setspeed
There are also several other files:
-> cpufreq/cpuinfo_max_freq
-> cpufreq/cpuinfo_cur_freq
-> cpufreq/cpuinfo_min_freq
-> cpufreq/cpuinfo_transition_latency
-> cpufreq/stats/time_in_state
-> cpufreq/stats/total_trans
-> cpufreq/stats/trans_table
-> ...
Should we do some testing on that or do we assume it is not up to
Linaro to do that as being part of the generic cpufreq framework ?
(2) test the change of the frequency is effective in 'userspace' mode
- set the governor to 'userspace' policy
- for each frequency and cpu
- write the frequency
- wait at least cpuinfo_transition_latency
- read the frequency
- check the frequency is the expected one
(3) test the change of the frequencies affect the performances of a test
program
(*) Write a simple program which takes a cpu list as parameter in
order to set the affinity on it. This program computes the number
of cycles (eg. a simple counter) it did in 1 second and display
the result. In case more than one cpu is specified, a process is
created for each cpu, setting the affinity on it.
(**) - set the governor to userspace policy
- set the frequency to the lower value
- wait at least cpuinfo_transition_latency
- run the test (*) program for each cpu, combinate them and
concatenate the result to a file
- for each frequency rerun (**)
- check the result file contains noticeable increasing values
(3) test the load of the cpu affects the frequency with 'ondemand'
(*) write a simple program which does nothing more than consuming
cpu (no syscall)
for each cpu
- set the governor to 'ondemand'
- run (*) in background
- wait at least cpuinfo_transition_latency *
nr_scaling_available_frequencies
- read the frequency
- kill (*)
- check the frequency is equal to the higher frequency available
- wait at least cpuinfo_transition_latency *
nr_scaling_available_frequencies
- read the frequency
- check the frequency is the lowest available
(4) test the load of the cpu does not affect the frequency with 'userspace'
for each cpu
- set the governor to 'userspace'
- set the frequency between min and max frequencies
- wait at least cpuinfo_transition_latency *
nr_scaling_available_frequencies
- run (*) in background
- wait at least cpuinfo_transition_latency *
nr_scaling_available_frequencies
- read the frequency
- kill (*)
- check the frequency is equal to the one we set
(5) test the load of the cpu does not affect the frequency with 'powersave'
for each cpu
- set the governor to 'powersave'
- wait at least cpuinfo_transition_latency *
nr_scaling_available_frequencies
- check the frequency is the lowest available
- run (*) in background
- wait at least cpuinfo_transition_latency *
nr_scaling_available_frequencies - - read the frequency
- kill (*)
- check the frequency is the lowest available
(6) test the load of the cpu affects the frequency with 'conservative'
for each cpu
- set the governor to 'conservative'
for each freq step
- set the up_threshold to the freq step
- wait at least cpuinfo_transition_latency *
nr_scaling_available_frequencies
- run (*) in background
- wait at least cpuinfo_transition_latency *
nr_scaling_available_frequencies
- read the frequency
- check the frequency is equal to higher we have with the
freq_step
- kill (*)
_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev