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 = "Chrome OS Team" 8NAME = "firmware_UpdateKernelDataKeyVersion" 9PURPOSE = """ 10Servo based kernel update test which checks the kernel data key version. 11""" 12CRITERIA = """ 13This test will fail if one of the following conditions is met: 141. In Normal Mode. 152. After update, device restart with KERNEL A. 163. Kernel datakey version does not increase after update. 174. After recovery, device can't successfully restart. 185. Kernel datakey version does not recover to original version after recovery. 19""" 20ATTRIBUTES = "suite:faft_bios, suite:faft_bios_ro_qual, suite:faft_bios_rw_qual, suite:faft_dev, suite:faft_lv5, suite:faft_bios_ec3po, suite:faft_bios_tot" 21DEPENDENCIES = "servo_state:WORKING" 22TIME = "SHORT" 23TEST_CATEGORY = "Functional" 24TEST_CLASS = "firmware" 25TEST_TYPE = "server" 26JOB_RETRIES = 4 27 28DOC = """ 29This test should run in developer mode. On runtime, this test modifies the 30kernel data key version of kernel b and modifies cgpt to reboot with kernel b. 31Check kernel data key version after reboot, and then recover kernel b's data 32key version to original version. Here also tries to reboot with kernel b after 33recovery. If sccuess, reboot with kernel a. 34""" 35 36args_dict = utils.args_to_dict(args) 37servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 38 39def run_updatekerneldatakeyversion(machine): 40 host = hosts.create_host(machine, servo_args=servo_args) 41 job.run_test("firmware_UpdateKernelDataKeyVersion", host=host, 42 cmdline_args=args, disable_sysinfo=True, dev_mode=True, 43 tag="dev") 44 45parallel_simple(run_updatekerneldatakeyversion, machines) 46