aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-01-13Add missing phony targetsandroid-arm64Luis Machado
The following patch adds some missing phony targets. 2019-01-11 Luis Machado <luis.machado@linaro.org> * Makefile: New phony target list. * Test.mk: Likewise. Signed-off-by: Luis Machado <luis.machado@linaro.org>
2019-01-13Add install targetLuis Machado
The following patch adds an install target so we can install the utils/scripts somewhere. The default prefix is /opt/pm-qa. 2019-01-11 Luis Machado <luis.machado@linaro.org> * Makefile (prefix, SRC, EXEC, SUBDIRS, INSTALL_FILES): New variables. (install): New target. * README: Document install target. Signed-off-by: Luis Machado <luis.machado@linaro.org>
2019-01-13Adjust compiler flag variablesLuis Machado
In order to pass additional compiler flags while still keeping the required flags intact (-pthread for example), we add a local set of flags on top of the exsiting CFLAGS. 2019-01-11 Luis Machado <luis.machado@linaro.org> * Test.mk (CFLAGS): Set to "-g -Wall" (FLAGS): New variable. Set to -pthread. Document variables. ($(EXEC): Use FLAGS. Signed-off-by: Luis Machado <luis.machado@linaro.org>
2019-01-13Invoke scripts with sudoLuis Machado
We were requiring the user to run the whole makefile as sudo. The following patch uses sudo to call the sanity check scripts and the functional tests only. 2019-01-11 Luis Machado <luis.machado@linaro.org> * Test.mk: Invoke sanity tests and functional tests with sudo. Signed-off-by: Luis Machado <luis.machado@linaro.org>
2019-01-13Remove utils/utils_sanity.shLuis Machado
This sanity check is a dummy one. It doesn't check anything at the moment, so deleting it seems to be appropriate. 2019-01-11 Luis Machado <luis.machado@linaro.org> * utils/utils_sanity.sh: Remove. Signed-off-by: Luis Machado <luis.machado@linaro.org>
2019-01-13Make the default target only build the utilsLuis Machado
The following patch adjusts the main Makefile and secondary Makefile (Test.mk) so the default target only builds the pm-qa utils from sources, without running the tests. Also document some variables and targets. 2018-01-11 Luis Machado <luis.machado@linaro.org> * Makefile: Document target "all". * README: Document how to build only the pm-qa utils. * Test.mk: Document misc variables and targets. (SRC): Hold list of all utils' .c files. ($(EXEC)): New target to build all utils from sources. (check): Move target closer to uncheck target. Signed-off-by: Luis Machado <luis.machado@linaro.org>
2018-08-11PMQA: Makefile: Support cross-compilationAmit Kucheria
Don't use gcc directly, use the CC variable to allow passing something like CC=aarch64-linux-gnu-gcc in order to cross compile to utils. This allows host-side compilation and bundling of the tools into a small ramdisk on the target. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2018-05-17functions: clean up whitespaceLisa Nguyen
In vi/vim, some code blocks were not aligned properly, and there were extra blank lines that needed to be removed. This should help to improve readability. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2018-05-17functions: switch to userspace governor in restore_frequencies()Thierry Escande
The governor needs to be set to 'userspace' before setting the original frequency back. This fixes cpufreq_06.sh that otherwise logs 'sh: echo: I/O error' messages in its log file. Signed-off-by: Thierry Escande <thierry.escande@linaro.org>
2018-05-17functions: fix loop increment in save_frequencies()Thierry Escande
The 'index' variable was not incremented ending with only the last cpu frequency saved in $frequencies_backup0. Signed-off-by: Thierry Escande <thierry.escande@linaro.org>
2017-10-18functions: correct get_os logicLi Zhijian
at commit aea49c3: functions: Fix logic for get_os() function To determine which OS the scripts are running on, check if the build.prop file exists instead of using the lsb_release command. If it does, then the scripts are running on Android; otherwise it's Ubuntu. From the changelog, we can know get_os() expect to return 2(means android) if build.prop file exists, but the code does not do that previouslly Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
2017-10-18thermal: add missing get_os before check the return valueLi Zhijian
'ps' have different output between Android and ubuntu, and test suite use get_os to determine which OS the scripts are running on. at commit 84479a38, thermal: Get correct PID for heat_cpu based on OS this patch want to get PID based on OS, but it looks thermal_06.sh forget to add get_os before checking the OS. Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
2017-05-08Move the cpuidle_killer binary to the cpuidle folderLisa Nguyen
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2017-05-08Add cpuidle_killer binary to utils directoryLisa Nguyen
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2017-05-05Add arm64 binaries to run with pm-qa on AndroidLisa Nguyen
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-09-15Fix build with Bionic 7.xBernhard Rosenkränzer
Change-Id: I98a495a9b6750f1ff33b7a6c4c875481e2698070 Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2016-09-12Version 0.5.2Lisa Nguyen
Summary of fixes in 0.5.2: - Recalculate amount of time passed into nanosleep function - Add check to find glmark2 first - Get correct PID column for heat_cpu program - Fixed array initialization to calculate freq deviation - Minor Android makefile updates Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-09-12functions: Fix logic for get_os() functionLisa Nguyen
To determine which OS the scripts are running on, check if the build.prop file exists instead of using the lsb_release command. If it does, then the scripts are running on Android; otherwise, it's Ubuntu. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-09-12nanosleep: recalculate the amount of time to sleepLisa Nguyen
In cases where the total number of nanoseconds equal or exceed the MAX_VALUE of the nanosleep function, recalculate and reassign the new values to tv_sec and tv_nsec. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-09-12thermal: Get correct PID for heat_cpu based on OSLisa Nguyen
When running the ps command, Android lists the pids in the second column whereas Ubuntu lists the pids in the first column. Check the os first before extracting the pid. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-09-12functions: Increment index in store_scaling_maxfreq() functionLisa Nguyen
In order to store the scaling frequencies for all cpus properly, increment the index in the array. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-09-12Increment the value of index when storing scaling governors for each cpuLisa Nguyen
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-09-12thermal: Add check for glmark2Lisa Nguyen
Check to see if glmark2 is installed before running specific thermal tests. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-06-20cpufreq: fixed array initializations to calculate freq deviationSaul Romero
Resolve 'err' messages by making changes to calculate sum and average of frequency measurements in cpufreq_06 test. In the function 'compute_freq_ratio' the frequency is stored in an array of variables by indirect reference (http://www.tldp.org/LDP/abs/html/ivr.html) but the variable 'index' that points to next element in the array is initialized to 0 every time hence overriding the values. The same happens for the function 'compute_freq_ratio_sum' where the 'index' variable is always initialized to 0 and the variable 'sum' is always set to 0 not adding the subsequent values. Hence these initializations must be deleted from those functions and written into the 'function check_deviation' for keeping the correct values of frequency and calculations of average and summatory. With these changes the tests can now calculate the real values of average for the frequencies and the deviations can be tested and the tests now passes. This patch fixes this bug: https://bugs.linaro.org/show_bug.cgi?id=2232 Signed-off-by: Saul Romero <saul.romero@arm.com> [lisa: Edit parts of commit message.] Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-01-26functions: Merge suspend_functions.sh into functions.shLisa Nguyen
Merge suspend_functions.sh into function.sh, so all the library functions will be in one file instead of multiple ones. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-01-25cputopology: Add test numbers 03 and 04 in cputopology/Android.mkLisa Nguyen
Since cputopology_03.sh and cputopology_04.sh are tests that have been recently added, make sure they get included when compiling for Android. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-01-22cputopology_04: Remove -1 option from ls commandLisa Nguyen
Android does not recognize the -1 option when running ls to check for directory contents. Without this fix, these errors will show up: ls: Unknown option '-1'. Aborting. ls: Unknown option '-1'. Aborting Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-01-19cpuhotplug: Check if the temp file exists firstLisa Nguyen
cpuhotplug_07.sh uses a temp file to run the uevent_reader program with. Check to see if the temp file exists first before continuing. Otherwise, users may run into errors such as these: grep: cpuhotplug_07.tmp: No such file or directory Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-11-19Version 0.5.1Lisa Nguyen
Summary of fixes in Version 0.5.1 - Replace bc commands with awk commands to perform simple arithmetic on systems that do not support bc - Fix regex to extract user id number in is_root() function - Error handling when sampling_rate is missing - Improve the logic of searching for thermal zones before running additional thermal subtests Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-11-19thermal: Fix display of cooling devices and thermal zonesLisa Nguyen
Improve the format to display lists of cooling devices and thermal zones for readability. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-11-19thermal: Create check_for_thermal_zones() functionLisa Nguyen
Create a function to check for thermal zones as an attempt to remove some redundant code. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-11-19thermal: Add checks to search for thermal zones firstLisa Nguyen
There are instances where PM-QA might be running on systems that do not have thermal zones and might have cooling systems instead; therefore some subtests may instantly fail because of it. Add more checks to see if thermal zones exist before continuing the thermal subtests. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-11-19cpufreq: Rewrite __check_freq_deviation() functionLisa Nguyen
Add the check to make sure that the array that stores frequency results is not empty before computing deviations. If the array is empty, return 1. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-11-19functions: Rewrite wait_latency() functionLisa Nguyen
Improve the logic on finding the sampling_rate. If the sampling_rate cannot be found at all, return 1. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-11-19functions: Look for thermal zones when neededLisa Nguyen
Look for thermal zones only when it's needed (e.g. in specific functions used by the thermal subtests), not every time the functions.sh file gets sourced. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-11-18Merge thermal_functions.sh into functions.shLisa Nguyen
In the process of combining all function libraries into one. Start with merging thermal_functions.sh into function.sh to make it easier for maintenance. Also modify the thermal subtests to source the functions.sh file only. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-11-18functions: Edit regex for is_root() functionLisa Nguyen
The regex for the is_root() needs to be updated to extract the user ID number properly. Otherwise, errors such as this one will come up: cpuhotplug_sanity.sh[28]: 0(root): bad number This patch would fix bug #1889: https://bugs.linaro.org/show_bug.cgi?id=1889 Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-11-18heat_cpu: Resolve the data format warningLisa Nguyen
Change the printf formats to resolve the following warnings: heat_cpu.c: In function ‘main’: heat_cpu.c:160:4: warning: format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=] printf("i: %i\n", i); heat_cpu.c:174:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=] printf("Error pthread_create failed for cpu%d\n", i); Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-11-18Switches/Android: Change value of LOCAL_MODULE_PATHLisa Nguyen
Change the value of LOCAL_MODULE_PATH in Switches/Android.mk file, so that Android systems can find the Switches.sh file properly. Without this patch, the following warnings would be generated: cpuidle_sanity.sh: ../include/functions.sh[26]: .: ../Switches/Switches.sh: No such file or directory This patch fixes bug #1335: https://bugs.linaro.org/show_bug.cgi?id=1335 Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-11-17Replace bc commandsLisa Nguyen
Some systems may not support the bc command. Replace with an alterative that performs simple floating- point arithmetic. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-04-22cputopology: add arm capacity calculation testLarry Bassel
Add test which verifies capacity calculation on arm architecture platforms. This will work on any platform that uses parse_dt_topology() arch hook to set cpu capacity. Currently only arm (not arm64) platforms do this. Signed-off-by: Larry Bassel <larry.bassel@linaro.org> Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
2015-04-21Update the README fileLisa Nguyen
Update the README file with bugs, questions, and contribution sections and fix the format for readability. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org> Acked-by: Amit Kucheria <amit.kucheria@linaro.org>
2015-04-01cputopology: add scheduler domain flag testLarry Bassel
Add test which checks and prints scheduler domain flags. Signed-off-by: Larry Bassel <larry.bassel@linaro.org> Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
2015-03-13include <sys/time.h>Bernhard Rosenkränzer
On glibc, <sys/timex.h> includes <sys/time.h> -- on Bionic, it doesn't, causing setitimer and gettimeofday to be undeclared Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Change-Id: Ibc7c1e31720f915be2e3d63ef0e9b7d156bda844
2015-03-06Version 0.5.0pm-qa-v0.5.0Lisa Nguyen
Summary of changes in Version 0.5.0: - Remove bashisms - Fix warnings and update makefiles to put PM-QA back into Android builds Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-03-06cpufreq: Remove unnecessary checksLisa Nguyen
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-03-06Test: Add sort functionLisa Nguyen
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-03-06Fix build with Bionic from AOSP masterBernhard Rosenkränzer
Current Bionic (including 5.0.x releases) provides timex, but still not adjtimex Change-Id: Ice82b5ad98ad94ad8ea241f629944a9e988dffbc Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2015-02-20Make sure pm-qa builds when we build systemimageVishal Bhoj
Signed-off-by: Vishal Bhoj <vishal.bhoj@hackbox.linaro.org>
2015-02-18Update path for Switches.shLisa Nguyen
In order to apply Vishal's new patches to get PM-QA back into the Android builds, the new location for the Switches.sh file is updated. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>