summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-04-26 13:18:13 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-01 16:22:46 +0100
commitcee685ca0d29b022e0665fccf58de006e7ffaef1 (patch)
tree614e98c3f53374424aac37f798ecbbe24f288715 /scripts
parent7d42ceae3a42f7a6580436b113c47aad37717293 (diff)
downloadpoky-cee685ca0d29b022e0665fccf58de006e7ffaef1.tar.gz
oeqa.buildperf: functionality to drop kernel caches
Add a new utility class for dropping Linux kernel caches. It uses sudo and tee to write to the drop_caches file. Checking if the user has the permissions to drop caches (without a password) is done by trying to writing an invalid value to the drop_caches file. This way, we will find if writing (with tee) is possible but not really dropping caches, yet. User can avoid giving the password by adding something like: <user> ALL = NOPASSWD: /usr/bin/tee /proc/sys/vm/drop_caches to the system sudoers file. (From OE-Core rev: c9cb248429ced50c96d11ba5361c272d4c9b9323) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/oe-build-perf-test4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/oe-build-perf-test b/scripts/oe-build-perf-test
index 9fb431045b..9589dee3ac 100755
--- a/scripts/oe-build-perf-test
+++ b/scripts/oe-build-perf-test
@@ -22,6 +22,7 @@ import sys
22sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/lib') 22sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/lib')
23import scriptpath 23import scriptpath
24scriptpath.add_oe_lib_path() 24scriptpath.add_oe_lib_path()
25from oeqa.buildperf import KernelDropCaches
25from oeqa.utils.commands import runCmd 26from oeqa.utils.commands import runCmd
26 27
27 28
@@ -71,6 +72,9 @@ def main(argv=None):
71 if not pre_run_sanity_check(): 72 if not pre_run_sanity_check():
72 return 1 73 return 1
73 74
75 # Check our capability to drop caches and ask pass if needed
76 KernelDropCaches.check()
77
74 return 0 78 return 0
75 79
76 80