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 = "mruthven" 8NAME = "firmware_Cr50RMAOpen" 9PURPOSE = "Verify RMA Open" 10ATTRIBUTES = "suite:faft_cr50_pvt, suite:faft_cr50_prepvt" 11TIME = "SHORT" 12TEST_TYPE = "server" 13DEPENDENCIES = "servo_state:WORKING" 14 15DOC = """ 16Verify Cr50 RMA behavoior 17 18Verify a couple of things: 19 - basic open from AP and command line 20 - Rate limiting 21 - Authcodes can't be reused once another challenge is generated. 22 - if the image is prod signed with mp flags, it isn't using test keys 23 24Generate the challenge and calculate the response using rma_reset -c. Verify 25open works and enables all of the ccd features. 26 27If the generated challenge has the wrong version, make sure the challenge 28generated with the test key fails. 29""" 30 31if 'args_dict' not in locals(): 32 args_dict = {} 33 34args_dict.update(utils.args_to_dict(args)) 35servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 36 37def run(machine): 38 host = hosts.create_host(machine, servo_args=servo_args) 39 40 iterations = int(args_dict.get("iterations", 1)) 41 42 job.run_test("firmware_Cr50RMAOpen", host=host, cmdline_args=args, 43 full_args=args_dict, iterations=iterations) 44 45parallel_simple(run, machines) 46