• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5import common
6from autotest_lib.client.cros.cellular.mbim_compliance \
7        import mbim_test_base
8from autotest_lib.client.cros.cellular.mbim_compliance.sequences \
9        import get_descriptors_sequence
10from autotest_lib.client.cros.cellular.mbim_compliance.sequences \
11        import mbim_close_sequence
12from autotest_lib.client.cros.cellular.mbim_compliance.sequences \
13        import mbim_open_generic_sequence
14
15
16class cellular_MbimComplianceCM10(mbim_test_base.MbimTestBase):
17    """
18    CM_10 Validation of Modem's Response to MBIM_CLOSE_MSG.
19
20    This test verifies that an MBIM_CLOSE_DONE message is issued by the
21    function in response to an MBIM_CLOSE_MSG message and checks TransactionId
22    and Status fields.
23
24    Reference:
25        [1] Universal Serial Bus Communication Class MBIM Compliance Testing: 41
26        http://www.usb.org/developers/docs/devclass_docs/MBIM-Compliance-1.0.pdf
27
28    """
29    version = 1
30
31    def run_internal(self):
32        """ Run CM_10 test. """
33        # Precondition
34        descriptors = get_descriptors_sequence.GetDescriptorsSequence(
35                self.device_context).run()
36        self.device_context.update_descriptor_cache(descriptors)
37        mbim_open_generic_sequence.MBIMOpenGenericSequence(
38                self.device_context).run()
39
40        # Step 1
41        close_message, response_message = mbim_close_sequence.MBIMCloseSequence(
42                self.device_context).run()
43