• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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, suite:faft_bios, suite:faft_bios_au_1, suite:faft_bios_au_2, suite:faft_bios_au_3, suite:faft_dev, suite:faft_lv5, suite:faft_bios_ec3po, suite:faft_bios_tot"
21TIME = "SHORT"
22TEST_CATEGORY = "Functional"
23TEST_CLASS = "firmware"
24TEST_TYPE = "server"
25JOB_RETRIES = 4
26
27DOC = """
28This test should run in developer mode. On runtime, this test modifies the
29kernel data key version of kernel b and modifies cgpt to reboot with kernel b.
30Check kernel data key version after reboot, and then recover kernel b's data
31key version to original version. Here also tries to reboot with kernel b after
32recovery. If sccuess, reboot with kernel a.
33"""
34
35args_dict = utils.args_to_dict(args)
36servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
37
38def run_updatekerneldatakeyversion(machine):
39    host = hosts.create_host(machine, servo_args=servo_args)
40    job.run_test("firmware_UpdateKernelDataKeyVersion", host=host,
41                 cmdline_args=args, disable_sysinfo=True, dev_mode=True,
42                 tag="dev")
43
44parallel_simple(run_updatekerneldatakeyversion, machines)
45