xref: /aosp_15_r20/external/autotest/server/site_tests/firmware_Cr50U2fPowerwash/control (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1# Copyright 2018 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 = "louiscollard, apronin"
8NAME = "firmware_Cr50U2fPowerwash"
9ATTRIBUTES = "suite:faft_cr50_pvt, suite:faft_cr50_prepvt"
10TIME = "SHORT"
11TEST_CATEGORY = "Functional"
12TEST_CLASS = "firmware"
13TEST_TYPE = "server"
14DEPENDENCIES="servo_state:WORKING"
15PY_VERSION = 3
16
17DOC = """
18This test issues a U2F_REGISTER command, clears the TPM, and checks that
19the previously issued key handle becomes invalid. This test ensures that
20after a powerwash, a device cannot be used to access resources on which
21the device was registered before powerwash.
22"""
23
24args_dict = utils.args_to_dict(args)
25servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
26
27def run_test(machine):
28    host = hosts.create_host(machine, servo_args=servo_args)
29    iterations = int(args_dict.get("iterations", 1))
30    job.run_test('firmware_Cr50U2fPowerwash', host=host, cmdline_args=args,
31                 iterations=iterations)
32
33parallel_simple(run_test, machines)
34