Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72488aa0 authored by Yusuke Sato's avatar Yusuke Sato Committed by Gerrit Code Review
Browse files

Merge "perfboot.py: warn if dm-verity is disabled"

parents 6bf93400 b6c66dc0
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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)