serialserver/packetloopbackcsy/scripts/TE_PacketLoopback.script
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 //
       
     2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 //! @file
       
    17 //! Tests for packet loopback CSY
       
    18 
       
    19 PRINT Setup Configuration
       
    20 
       
    21 RUN_UTILS MakeReadWrite c:\loopback.ini
       
    22 RUN_UTILS CopyFile z:\TestData\configs\testloopback.ini c:\loopback.ini
       
    23 
       
    24 LOAD_SUITE TE_PacketLoopback
       
    25 
       
    26 START_TESTCASE			NET-PacketLoopbackCSY-0101
       
    27 //! @SYMTestCaseID		NET-PacketLoopbackCSY-0101
       
    28 //! @SYMTestCaseDesc Test that two different sets of loopback ports can read/write to their corresponding loopback port
       
    29 //! @SYMPREQ 398
       
    30 //! @SYMTestActions Open 4 ports, then write and read to each of them
       
    31 //! @SYMTestExpectedResults Reads and writes complete successfully
       
    32 //! @SYMTestPriority Low
       
    33 //! @SYMTestStatus Implemented
       
    34 //! @SYMTestType UT
       
    35 RUN_TEST_STEP 30 TE_PacketLoopback LoopbackTestStep1
       
    36 END_TESTCASE			NET-PacketLoopbackCSY-0101
       
    37 
       
    38 START_TESTCASE			NET-PacketLoopbackCSY-0102
       
    39 //! @SYMTestCaseID		NET-PacketLoopbackCSY-0102
       
    40 //! @SYMTestCaseDesc Test that writes are successfully queued and sent
       
    41 //! @SYMPREQ 398
       
    42 //! @SYMTestActions Open 2 ports, and write 2 packets sequentially to the other port
       
    43 //! @SYMTestExpectedResults Both writes are completed successfully
       
    44 //! @SYMTestPriority Low
       
    45 //! @SYMTestStatus Implemented
       
    46 //! @SYMTestType UT
       
    47 RUN_TEST_STEP 30 TE_PacketLoopback LoopbackTestStep2
       
    48 END_TESTCASE			NET-PacketLoopbackCSY-0102
       
    49 
       
    50 START_TESTCASE			NET-PacketLoopbackCSY-0103
       
    51 //! @SYMTestCaseID		NET-PacketLoopbackCSY-0103
       
    52 //! @SYMTestCaseDesc Test all different combinations of reading/writing
       
    53 //! @SYMPREQ 398
       
    54 //! @SYMTestActions Test the following orders: Read/write/data sent, Write/read/data sent, Write/data sent/read
       
    55 //! @SYMTestExpectedResults All data is sent successfully
       
    56 //! @SYMTestPriority Low
       
    57 //! @SYMTestStatus Implemented
       
    58 //! @SYMTestType UT
       
    59 RUN_TEST_STEP 30 TE_PacketLoopback LoopbackTestStep3
       
    60 END_TESTCASE			NET-PacketLoopbackCSY-0103
       
    61 
       
    62 START_TESTCASE			NET-PacketLoopbackCSY-0104
       
    63 //! @SYMTestCaseID		NET-PacketLoopbackCSY-0104
       
    64 //! @SYMTestCaseDesc Test reading/writing to an un-opened port, or a port whose loopback port is un-opened
       
    65 //! @SYMPREQ 398
       
    66 //! @SYMTestActions Read then write to an un-opened port
       
    67 //! @SYMTestExpectedResults Requests fail with KErrNotReady
       
    68 //! @SYMTestPriority Low 
       
    69 //! @SYMTestStatus Implemented
       
    70 //! @SYMTestType UT
       
    71 RUN_TEST_STEP 30 TE_PacketLoopback LoopbackTestStep4
       
    72 END_TESTCASE			NET-PacketLoopbackCSY-0104
       
    73 
       
    74 START_TESTCASE			NET-PacketLoopbackCSY-0105
       
    75 //! @SYMTestCaseID		NET-PacketLoopbackCSY-0105
       
    76 //! @SYMTestCaseDesc Test filling up the read and write queues
       
    77 //! @SYMPREQ 398
       
    78 //! @SYMTestActions Write more packets than the buffer size, then wait
       
    79 //! @SYMTestExpectedResults The entries written after the buffer was full are not completed
       
    80 //! @SYMTestPriority Low 
       
    81 //! @SYMTestStatus Implemented
       
    82 //! @SYMTestType UT
       
    83 RUN_TEST_STEP 30 TE_PacketLoopback LoopbackTestStep5
       
    84 END_TESTCASE			NET-PacketLoopbackCSY-0105
       
    85 
       
    86 START_TESTCASE			NET-PacketLoopbackCSY-0106
       
    87 //! @SYMTestCaseID		NET-PacketLoopbackCSY-0106
       
    88 //! @SYMTestCaseDesc Test reading an entry with too small a read buffer
       
    89 //! @SYMPREQ 398
       
    90 //! @SYMTestActions Read an entry with a buffer that is too small
       
    91 //! @SYMTestExpectedResults The read completes with error KErrOverflow
       
    92 //! @SYMTestPriority Low 
       
    93 //! @SYMTestStatus Implemented
       
    94 //! @SYMTestType UT
       
    95 RUN_TEST_STEP 30 TE_PacketLoopback LoopbackTestStep6
       
    96 END_TESTCASE			NET-PacketLoopbackCSY-0106
       
    97 
       
    98 START_TESTCASE			NET-PacketLoopbackCSY-0107
       
    99 //! @SYMTestCaseID		NET-PacketLoopbackCSY-0107
       
   100 //! @SYMTestCaseDesc Test issuing write with too large of a buffer
       
   101 //! @SYMPREQ 398
       
   102 //! @SYMTestActions Issue a write with a buffer that is larger than an IP packets max size
       
   103 //! @SYMTestExpectedResults The write completes with KErrArgument
       
   104 //! @SYMTestPriority Low 
       
   105 //! @SYMTestStatus Implemented
       
   106 //! @SYMTestType UT
       
   107 RUN_TEST_STEP 30 TE_PacketLoopback LoopbackTestStep7
       
   108 END_TESTCASE			NET-PacketLoopbackCSY-0107
       
   109 
       
   110 START_TESTCASE			NET-PacketLoopbackCSY-0108
       
   111 //! @SYMTestCaseID		NET-PacketLoopbackCSY-0108
       
   112 //! @SYMTestCaseDesc Test wrapping around the queue by issuing more writes than the queue size
       
   113 //! @SYMPREQ 398
       
   114 //! @SYMTestActions Issue more writes than the queue size
       
   115 //! @SYMTestExpectedResults Writes complete successfully
       
   116 //! @SYMTestPriority Low 
       
   117 //! @SYMTestStatus Implemented
       
   118 //! @SYMTestType UT
       
   119 RUN_TEST_STEP 30 TE_PacketLoopback LoopbackTestStep8
       
   120 END_TESTCASE			NET-PacketLoopbackCSY-0108
       
   121 
       
   122 START_TESTCASE			NET-PacketLoopbackCSY-0109
       
   123 //! @SYMTestCaseID		NET-PacketLoopbackCSY-0109
       
   124 //! @SYMTestCaseDesc Test read cancel
       
   125 //! @SYMPREQ 398
       
   126 //! @SYMTestActions Issue a read and cancel the request
       
   127 //! @SYMTestExpectedResults The request completes with result KErrCancelled
       
   128 //! @SYMTestPriority Low 
       
   129 //! @SYMTestStatus Implemented
       
   130 //! @SYMTestType UT
       
   131 RUN_TEST_STEP 30 TE_PacketLoopback LoopbackTestStep9
       
   132 END_TESTCASE			NET-PacketLoopbackCSY-0109
       
   133 
       
   134 START_TESTCASE			NET-PacketLoopbackCSY-0110
       
   135 //! @SYMTestCaseID		NET-PacketLoopbackCSY-0110
       
   136 //! @SYMTestCaseDesc Test flow control
       
   137 //! @SYMPREQ 398
       
   138 //! @SYMTestActions Start flow control then issue a write on 1 port and read on the opposite loopback port
       
   139 //! @SYMTestExpectedResults The read does not complete because flow control is on
       
   140 //! @SYMTestPriority Low 
       
   141 //! @SYMTestStatus Implemented
       
   142 //! @SYMTestType UT
       
   143 RUN_TEST_STEP 30 TE_PacketLoopback LoopbackTestStep10
       
   144 END_TESTCASE			NET-PacketLoopbackCSY-0110
       
   145 
       
   146 START_TESTCASE			NET-PacketLoopbackCSY-0111
       
   147 //! @SYMTestCaseID		NET-PacketLoopbackCSY-0111
       
   148 //! @SYMTestCaseDesc Test setting read result
       
   149 //! @SYMPREQ 398
       
   150 //! @SYMTestActions Set the next read result then issue a read, then set the next write result and issue a write
       
   151 //! @SYMTestExpectedResults The read and write complete with the configured result
       
   152 //! @SYMTestPriority Low 
       
   153 //! @SYMTestStatus Implemented
       
   154 //! @SYMTestType UT
       
   155 RUN_TEST_STEP 30 TE_PacketLoopback LoopbackTestStep11
       
   156 END_TESTCASE			NET-PacketLoopbackCSY-0111
       
   157 
       
   158 START_TESTCASE			NET-PacketLoopbackCSY-0112
       
   159 //! @SYMTestCaseID		NET-PacketLoopbackCSY-0112
       
   160 //! @SYMTestCaseDesc Test setting read result
       
   161 //! @SYMPREQ 398
       
   162 //! @SYMTestActions Set the next read result then issue a read, then set the next write result and issue a write
       
   163 //! @SYMTestExpectedResults The read and write complete with the configured result
       
   164 //! @SYMTestPriority Low 
       
   165 //! @SYMTestStatus Implemented
       
   166 //! @SYMTestType UT
       
   167 RUN_TEST_STEP 30 TE_PacketLoopback LoopbackTestStep12
       
   168 END_TESTCASE			NET-PacketLoopbackCSY-0112
       
   169 
       
   170 START_TESTCASE			NET-PacketLoopbackCSY-0113
       
   171 //! @SYMTestCaseID		NET-PacketLoopbackCSY-0113
       
   172 //! @SYMTestCaseDesc Test setting read result
       
   173 //! @SYMPREQ 398
       
   174 //! @SYMTestActions Set the next read result then issue a read, then set the next write result and issue a write
       
   175 //! @SYMTestExpectedResults The read and write complete with the configured result
       
   176 //! @SYMTestPriority Low 
       
   177 //! @SYMTestStatus Implemented
       
   178 //! @SYMTestType UT
       
   179 RUN_TEST_STEP 30 TE_PacketLoopback LoopbackTestStep13
       
   180 END_TESTCASE			NET-PacketLoopbackCSY-0113
       
   181 
       
   182 RUN_UTILS DeleteFile c:\loopback.ini
       
   183 RUN_UTILS CopyFile z:\TestData\configs\loopback.ini c:\loopback.ini
       
   184