]> code.ossystems Code Review - openembedded-core.git/commit
oeqa.buildperf: functionality to drop kernel caches
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 26 Apr 2016 10:18:13 +0000 (13:18 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Jul 2016 15:08:49 +0000 (16:08 +0100)
commitc9cb248429ced50c96d11ba5361c272d4c9b9323
tree3bdc4db4749df92b486e9ca20a6f2f93283baa89
parentb44af9051a9da8d2cddc7b071a896331967f15cc
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>
meta/lib/oeqa/buildperf/__init__.py
meta/lib/oeqa/buildperf/base.py [new file with mode: 0644]
scripts/oe-build-perf-test