blob: b7778c0f91b31db3f298b47d8839fb2d2344ffd7 [file] [log] [blame] [edit]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
AUTHOR = "Chrome OS Team"
NAME = "firmware_CorruptFwBodyAB"
PURPOSE = "Servo based both firmware body A and B corruption test"
CRITERIA = "This test will fail if firmware does not enter recovery mode"
SUITE = "faft"
TIME = "LONG"
TEST_CATEGORY = "Functional"
TEST_CLASS = "firmware"
TEST_TYPE = "server"
DOC = """
This test corrupts both firmware body A and B and checks the next boot results.
The expected behavior is different if the firmware preamble USE_RO_NORMAL
flag is enabled. In the case USE_RO_NORMAL ON, the firmware corruption
doesn't hurt the boot results since it boots the RO path directly and does
not load and verify the RW firmware body. In the case USE_RO_NORMAL OFF,
the firmware verification fails on loading RW firmware and enters recovery
mode. In this case, it requires a USB disk plugged-in, which contains a
Chrome OS test image (built by "build_image --test").
"""
def run_corruptbothfwbodyab(machine):
host = hosts.create_host(machine)
job.run_test("firmware_CorruptBothFwBodyAB", host=host, cmdline_args=args,
use_faft=True, disable_sysinfo=True,
dev_mode=False, tag="normal")
job.run_test("firmware_CorruptBothFwBodyAB", host=host, cmdline_args=args,
use_faft=True, disable_sysinfo=True,
dev_mode=True, tag="dev")
parallel_simple(run_corruptbothfwbodyab, machines)