Home | History | Annotate | Download | only in cellular_MbimComplianceControlRequest
      1 # Copyright 2014 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 import common
      6 from autotest_lib.client.cros.cellular.mbim_compliance \
      7         import mbim_test_base
      8 from autotest_lib.client.cros.cellular.mbim_compliance.sequences \
      9         import get_descriptors_sequence
     10 from autotest_lib.client.cros.cellular.mbim_compliance.sequences \
     11         import mbim_open_generic_sequence
     12 
     13 
     14 class cellular_MbimComplianceCM01(mbim_test_base.MbimTestBase):
     15     """
     16     CM_01 Validation of |transaction_id| and |status_codes| in modem's
     17     response to MBIM_OPEN_MSG.
     18 
     19     This test verifies that MBIM_OPEN_DONE message is issued by the function
     20     in response to MBIM_OPEN_MSG message and checks TransactionId and
     21     Status fields.
     22 
     23     Reference:
     24         [1] Universal Serial Bus Communication Class MBIM Compliance Testing: 38
     25         http://www.usb.org/developers/docs/devclass_docs/MBIM-Compliance-1.0.pdf
     26 
     27     """
     28     version = 1
     29 
     30     def run_internal(self):
     31         """ Run the CM_01 test. """
     32         # Precondition.
     33         descriptors = get_descriptors_sequence.GetDescriptorsSequence(
     34                 self.device_context).run()
     35         self.device_context.update_descriptor_cache(descriptors)
     36 
     37         # Step 1
     38         open_message, response_message = (
     39                 mbim_open_generic_sequence.MBIMOpenGenericSequence(
     40                         self.device_context).run())
     41 
     42         # TODO(rpius): Complete the rest of the test
     43