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