blob: 5273f554673c73a2b0d1ac7895b3969945afecb3 [file] [log] [blame]
Vic Yang38d48852012-08-28 10:40:02 +08001# 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
5AUTHOR = "Chrome OS Team"
6NAME = "firmware_ECWriteProtect"
7PURPOSE = "Servo based EC write protect test"
8CRITERIA = "This test will fail if EC write protect misbehaved"
9TIME = "LONG"
10TEST_CATEGORY = "Functional"
11TEST_CLASS = "firmware"
12TEST_TYPE = "server"
13
14DOC = """
15This test starts with RO normal mode and enables EC write protect. Software sync
16supposed to write protect the entire EC flash, so we expect the following
17write protect flags:
18 - wp_gpio_asserted
19 - ro_at_boot
20 - ro_now
21 - all_now
22These flags are checked under following situations:
23 - Cold reset. RO normal.
24 - Cold reset. Two stop.
25 - Cold reset by ectool. Two stop.
26At the end of the test, write protect is deactivated and firmware is restored to
27RO normal mode.
28"""
29
30def run_ecwriteprotect(machine):
31 host = hosts.create_host(machine)
32 job.run_test("firmware_ECWriteProtect", host=host, cmdline_args=args,
33 use_faft=True, disable_sysinfo=True,
34 dev_mode=True, tag="dev")
35
36parallel_simple(run_ecwriteprotect, machines)