summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorYusuke Sato <yusukes@google.com>2015-07-31 08:47:48 -0700
committerYusuke Sato <yusukes@google.com>2015-08-03 11:36:21 -0700
commitb6c66dc0a3fbd8f76ad9ca5fb6d9049a784b7396 (patch)
tree6afadce4761b52dfa0e9c920ed0cce286a2500e5 /init
parent7b98bfcc9fa8678d32a729a41036dea864f262ab (diff)
downloadcore-b6c66dc0a3fbd8f76ad9ca5fb6d9049a784b7396.tar.gz
core-b6c66dc0a3fbd8f76ad9ca5fb6d9049a784b7396.tar.bz2
core-b6c66dc0a3fbd8f76ad9ca5fb6d9049a784b7396.zip
perfboot.py: warn if dm-verity is disabled
Disabling the feature sometimes skews benchmark results. Bug: 22207911 Change-Id: Idedc7eb14e3cc4e8687b0c0e2975f10a3c4154e5
Diffstat (limited to 'init')
-rwxr-xr-xinit/perfboot.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/init/perfboot.py b/init/perfboot.py
index 2cd469925..13da32879 100755
--- a/init/perfboot.py
+++ b/init/perfboot.py
@@ -205,6 +205,16 @@ def init_perf(device, output, record_list, tags):
atexit.register(cleanup)
+def check_dm_verity_settings(device):
+ device.wait()
+ for partition in ['system', 'vendor']:
+ verity_mode = device.get_prop('partition.%s.verified' % partition)
+ if verity_mode is None:
+ logging.warning('dm-verity is not enabled for /%s. Did you run '
+ 'adb disable-verity? That may skew the result.',
+ partition)
+
+
def read_event_tags(tags_file):
"""Reads event tags from |tags_file|."""
if not tags_file:
@@ -393,6 +403,7 @@ def main():
args.output = 'perf-%s-%s.tsv' % (
device.get_prop('ro.build.flavor'),
device.get_prop('ro.build.version.incremental'))
+ check_dm_verity_settings(device)
record_list = []
event_tags = read_event_tags(args.tags)