blob: b6543835f75f00883f216a654572fcd81c596e23 [file] [log] [blame]
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from autotest_lib.client.common_lib import utils
AUTHOR = "Chromium OS"
NAME = "autoupdate_CatchBadSignatures"
TIME = "MEDIUM"
TEST_CATEGORY = "Functional"
TEST_CLASS = "platform"
TEST_TYPE = "server"
SUITE = "bvt"
DOC = """
This is a test to verify that update_engine correctly checks
signatures in the metadata hash and the update payload itself. This is
achieved by feeding updates to update_engine where the private key
used to make the signature, intentionally does not match with the
public key used for verification.
To run locally, you must set up the file
src/third_party/autotest/files/shadow_config.ini
with the following content
[CROS]
devserver_dir = <full repo path>/src/platform/dev
dev_server = http://<hostname>:8080
and then start devserver.py outside the chroot:
$ src/platform/dev/devserver.py
With this in place, you can now run the test:
$ ./run_remote_tests.sh --fast \
--board=${BOARD} \
--remote=<DUT_IP> \
autoupdate_CatchBadSignatures
"""
def run_test(machine):
"""Execute a test configuration on a given machine."""
host = hosts.create_host(machine)
job.run_test("autoupdate_CatchBadSignatures", host=host)
# Invoke parallel tests.
parallel_simple(run_test, machines)