1 # Copyright (c) 2012 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 5 from autotest_lib.server import utils 6 7 AUTHOR = "Chrome OS Team" 8 NAME = "firmware_UpdateKernelSubkeyVersion" 9 PURPOSE = """ 10 Servo based firmware update test, and check kernel subkey version. 11 """ 12 CRITERIA = """ 13 This test will fail if following requrements are met: 14 1. fwid does not match shellball's (/usr/sbin/chromeos-firmwareupdate) fwid 15 2. Kernel subkey version does not match original kernel subkey version. 16 """ 17 ATTRIBUTES = "suite:faft_lv5" 18 SUITE = "faft_lv5" 19 TIME = "SHORT" 20 TEST_CATEGORY = "Functional" 21 TEST_CLASS = "firmware" 22 TEST_TYPE = "server" 23 JOB_RETRIES = 4 24 25 DOC = """ 26 This test requires firmware id matches fwid of shellball 27 chromeos-firmwareupdate. On runtime, this test modifies shellball and runs 28 autoupdate. Check kernel subkey version after boot with firmware B, and then 29 recover firmware A and B to original shellball. 30 """ 31 32 args_dict = utils.args_to_dict(args) 33 servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 34 35 def run_updatekernelsubkeyversion(machine): 36 host = hosts.create_host(machine, servo_args=servo_args) 37 job.run_test("firmware_UpdateKernelSubkeyVersion", host=host, 38 cmdline_args=args, disable_sysinfo=True, dev_mode=True, 39 tag="dev") 40 41 parallel_simple(run_updatekernelsubkeyversion, machines) 42