diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-04-26 13:18:13 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-01 16:08:49 +0100 |
commit | c9cb248429ced50c96d11ba5361c272d4c9b9323 (patch) | |
tree | 3bdc4db4749df92b486e9ca20a6f2f93283baa89 /meta/lib/oeqa/buildperf/__init__.py | |
parent | b44af9051a9da8d2cddc7b071a896331967f15cc (diff) | |
download | openembedded-core-contrib-c9cb248429ced50c96d11ba5361c272d4c9b9323.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.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oeqa/buildperf/__init__.py')
-rw-r--r-- | meta/lib/oeqa/buildperf/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/lib/oeqa/buildperf/__init__.py b/meta/lib/oeqa/buildperf/__init__.py index c9535591e2..bab122e4ec 100644 --- a/meta/lib/oeqa/buildperf/__init__.py +++ b/meta/lib/oeqa/buildperf/__init__.py @@ -10,3 +10,4 @@ # more details. # """Build performance tests""" +from .base import KernelDropCaches |