• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5from autotest_lib.server import utils
6
7AUTHOR = "Chrome OS Team"
8NAME = "firmware_Fingerprint.ObeysRollback"
9PURPOSE = """
10Verify that fingerprint firmware rollback functions correctly.
11"""
12CRITERIA = """
13Fails if the rollback minimum version is not updated or min rollback version
14does not prevent running an older version.
15"""
16ATTRIBUTES = "suite:fingerprint"
17TIME = "SHORT"
18TEST_CATEGORY = "Functional"
19TEST_CLASS = "firmware"
20TEST_TYPE = "server"
21DEPENDENCIES = "servo, fingerprint"
22JOB_RETRIES = 0
23
24# This test uses futility and dev keys from autotest/files/server/cros/faft.
25REQUIRE_SSP = True
26
27DOC = """
28Flashes new RW firmware with a rollback ID of '1' and verifies that all
29rollback state is set correctly. Then attempts to flash RW firmware with
30rollback ID of '0' and verifies that the RO version of firmware is running
31(i.e., not running older version). Finally, flashes RW firmware with rollback
32ID of '9' and validates that the RW version of '9' is running.
33"""
34
35test_images = [ 'TEST_IMAGE_DEV_RB_ZERO',
36                'TEST_IMAGE_DEV_RB_ONE',
37                'TEST_IMAGE_DEV_RB_NINE']
38
39args_dict = utils.args_to_dict(args)
40servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
41
42def run(machine):
43    host = hosts.create_host(machine, servo_args=servo_args)
44    job.run_test("firmware_Fingerprint", host=host,
45                 test_exe="obeys_rollback.sh",
46                 test_exe_args=test_images,
47                 use_dev_signed_fw=True)
48
49parallel_simple(run, machines)
50