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 = "ChromeOS 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_state:WORKING, fingerprint" 22JOB_RETRIES = 0 23PY_VERSION = 3 24 25# This test uses futility and dev keys from autotest/files/server/cros/faft. 26REQUIRE_SSP = True 27 28DOC = """ 29Flashes new RW firmware with a rollback ID of '1' and verifies that all 30rollback state is set correctly. Then attempts to flash RW firmware with 31rollback ID of '0' and verifies that the RO version of firmware is running 32(i.e., not running older version). Finally, flashes RW firmware with rollback 33ID of '9' and validates that the RW version of '9' is running. 34""" 35 36test_images = [ 'TEST_IMAGE_DEV_RB_ZERO', 37 'TEST_IMAGE_DEV_RB_ONE', 38 'TEST_IMAGE_DEV_RB_NINE'] 39 40args_dict = utils.args_to_dict(args) 41servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 42 43def run(machine): 44 host = hosts.create_host(machine, servo_args=servo_args) 45 job.run_test("firmware_Fingerprint", host=host, 46 test_exe="obeys_rollback.sh", 47 test_exe_args=test_images, 48 use_dev_signed_fw=True) 49 50parallel_simple(run, machines) 51