• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 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_Fingerprint.SystemIsLocked"
9PURPOSE = """
10Verify that system_is_locked() is true in the firmware (i.e.,
11CONFIG_CMD_FPSENSOR_DEBUG) is disabled.
12"""
13CRITERIA = """
14Fails if FPMCU firmware is not locked.
15"""
16ATTRIBUTES = "suite:fingerprint"
17TIME = "SHORT"
18TEST_CATEGORY = "Functional"
19TEST_CLASS = "firmware"
20TEST_TYPE = "server"
21DEPENDENCIES = "servo_state:WORKING, fingerprint"
22JOB_RETRIES = 0
23
24DOC = """
25This test enables hardware and software write protection when setting up the
26test.
27
28When the test script starts, it runs a command that should be protected when
29"system_is_locked()" is enabled. The test verifies we get an ACCESS_DENIED
30error.
31"""
32
33test_images = ['TEST_IMAGE_ORIGINAL']
34
35args_dict = utils.args_to_dict(args)
36servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
37
38def run(machine):
39    host = hosts.create_host(machine, servo_args=servo_args)
40    job.run_test("firmware_Fingerprint", host=host,
41                 test_exe="system_is_locked.sh",
42                 test_exe_args=test_images,
43                 enable_hardware_write_protect=True,
44                 enable_software_write_protect=True)
45
46parallel_simple(run, machines)
47