Tom Wai-Hong Tam | 9cc6b35 | 2011-12-15 11:49:12 +0800 | [diff] [blame] | 1 | # Copyright (c) 2011 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 | AUTHOR = "Chrome OS Team" |
| 6 | NAME = "firmware_CorruptFwBodyAB" |
| 7 | PURPOSE = "Servo based both firmware body A and B corruption test" |
| 8 | CRITERIA = "This test will fail if firmware does not enter recovery mode" |
Tom Wai-Hong Tam | df6df51 | 2012-09-12 16:16:43 +0800 | [diff] [blame^] | 9 | SUITE = "faft,faft_dev,faft_lv3" |
Tom Wai-Hong Tam | 9cc6b35 | 2011-12-15 11:49:12 +0800 | [diff] [blame] | 10 | TIME = "LONG" |
| 11 | TEST_CATEGORY = "Functional" |
| 12 | TEST_CLASS = "firmware" |
| 13 | TEST_TYPE = "server" |
| 14 | |
| 15 | DOC = """ |
| 16 | This test corrupts both firmware body A and B and checks the next boot results. |
| 17 | |
| 18 | The expected behavior is different if the firmware preamble USE_RO_NORMAL |
Tom Wai-Hong Tam | d676004 | 2012-08-09 16:02:36 +0800 | [diff] [blame] | 19 | flag is enabled. In the case USE_RO_NORMAL ON, the firmware corruption |
Tom Wai-Hong Tam | 9cc6b35 | 2011-12-15 11:49:12 +0800 | [diff] [blame] | 20 | doesn't hurt the boot results since it boots the RO path directly and does |
| 21 | not load and verify the RW firmware body. In the case USE_RO_NORMAL OFF, |
| 22 | the firmware verification fails on loading RW firmware and enters recovery |
| 23 | mode. In this case, it requires a USB disk plugged-in, which contains a |
| 24 | Chrome OS test image (built by "build_image --test"). |
| 25 | """ |
| 26 | |
| 27 | def run_corruptbothfwbodyab(machine): |
| 28 | host = hosts.create_host(machine) |
| 29 | job.run_test("firmware_CorruptBothFwBodyAB", host=host, cmdline_args=args, |
| 30 | use_faft=True, disable_sysinfo=True, |
| 31 | dev_mode=True, tag="dev") |
| 32 | |
| 33 | parallel_simple(run_corruptbothfwbodyab, machines) |