//
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//
//! @file
//! @SYMTestSuiteName COMMS-MBUFMGR
//! @SYMScriptTestEnvironment Standard Symbian HRP or emulator environment
//RUN_SCRIPT 102.script
PRINT TS_CTMBufMgr: Group test
PRINT ------------------------------
PRINT
LOAD_SUITE TS_CTMBufMgr.dll
PRINT ------------------------------
PRINT
START_TESTCASE COMINF-MBUFMGR-0100
//! @SYMTestCaseID COMINF-MBUFMGR-0100
PRINT Test 01: Create/Delete MBufMgr
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest01
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0100
START_TESTCASE COMINF-MBUFMGR-0200
//! @SYMTestCaseID COMINF-MBUFMGR-0200
PRINT Test 02: Alloc/Dealloc RMBuf
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest02
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0200
START_TESTCASE COMINF-MBUFMGR-0300
//! @SYMTestCaseID COMINF-MBUFMGR-0300
PRINT Test 03: Alloc/Dealloc RMBuf
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest03
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0300
START_TESTCASE COMINF-MBUFMGR-0400
//! @SYMTestCaseID COMINF-MBUFMGR-0400
PRINT Test 04: CopyIn/Out
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest04
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0400
START_TESTCASE COMINF-MBUFMGR-0500
//! @SYMTestCaseID COMINF-MBUFMGR-0500
PRINT Test 05: CopyIn/Out with Offset
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest05 ,z:\testdata\configs\MBufTest05-CopyIn.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0500
START_TESTCASE COMINF-MBUFMGR-0501
//! @SYMTestCaseID COMINF-MBUFMGR-0501
PRINT Test 05: CopyIn/Out with Offset
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest05 ,z:\testdata\configs\MBufTest05-CopyOut.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0501
START_TESTCASE COMINF-MBUFMGR-0600
//! @SYMTestCaseID COMINF-MBUFMGR-0600
PRINT Test 06: Split the chain on the first and only RMBuf
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest06 ,z:\testdata\configs\MBufTest06-1st.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0600
START_TESTCASE COMINF-MBUFMGR-0601
//! @SYMTestCaseID COMINF-MBUFMGR-0601
PRINT Test 06: Split the chain on the boundary of the 1st & 2nd RMBuf
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest06 ,z:\testdata\configs\MBufTest06-2nd.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0601
START_TESTCASE COMINF-MBUFMGR-0602
//! @SYMTestCaseID COMINF-MBUFMGR-0602
PRINT Test 06: Split the chain (containing 3 RMBufs) on the 2nd RMBuf
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest06 ,z:\testdata\configs\MBufTest06-3rd.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0602
START_TESTCASE COMINF-MBUFMGR-0700
//! @SYMTestCaseID COMINF-MBUFMGR-0700
PRINT Test 07: TrimStart the chain on the first and only RMBuf
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest07 ,z:\testdata\configs\MBufTest07-1st.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0700
START_TESTCASE COMINF-MBUFMGR-0701
//! @SYMTestCaseID COMINF-MBUFMGR-0701
PRINT Test 07: TrimStart the chain on the boundary of the 1st & 2nd RMBuf
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest07 ,z:\testdata\configs\MBufTest07-2nd.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0701
START_TESTCASE COMINF-MBUFMGR-0702
//! @SYMTestCaseID COMINF-MBUFMGR-0702
PRINT Test 07: TrimStart the chain (containing 3 RMBufs) on the 2nd RMBuf
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest07 ,z:\testdata\configs\MBufTest07-3rd.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0702
START_TESTCASE COMINF-MBUFMGR-0800
//! @SYMTestCaseID COMINF-MBUFMGR-0800
PRINT Test 08: TrimEnd the chain on the first and only RMBuf
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest08 ,z:\testdata\configs\MBufTest08-1st.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0800
START_TESTCASE COMINF-MBUFMGR-0801
//! @SYMTestCaseID COMINF-MBUFMGR-0801
PRINT Test 08: TrimEnd the chain on the boundary of the 1st & 2nd RMBuf
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest08 ,z:\testdata\configs\MBufTest08-2nd.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0801
START_TESTCASE COMINF-MBUFMGR-0802
//! @SYMTestCaseID COMINF-MBUFMGR-0802
PRINT Test 08: TrimEnd the chain (containing 3 RMBufs) on the 2nd RMBuf
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest08 ,z:\testdata\configs\MBufTest08-3rd.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0802
START_TESTCASE COMINF-MBUFMGR-0900
//! @SYMTestCaseID COMINF-MBUFMGR-0900
PRINT Test 09: Align - already aligned and fits
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest09 ,z:\testdata\configs\MBufTest09-1st.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0900
START_TESTCASE COMINF-MBUFMGR-0901
//! @SYMTestCaseID COMINF-MBUFMGR-0901
PRINT Test 09: Align - not aligned but fits
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest09 ,z:\testdata\configs\MBufTest09-2nd.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0901
START_TESTCASE COMINF-MBUFMGR-0902
//! @SYMTestCaseID COMINF-MBUFMGR-0902
PRINT Test 09: Align - already aligned but does not fit
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest09 ,z:\testdata\configs\MBufTest09-3rd.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0902
START_TESTCASE COMINF-MBUFMGR-0903
//! @SYMTestCaseID COMINF-MBUFMGR-0903
PRINT Test 09: Align - not aligned, does not fit
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest09 ,z:\testdata\configs\MBufTest09-4th.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-0903
START_TESTCASE COMINF-MBUFMGR-1000
//! @SYMTestCaseID COMINF-MBUFMGR-1000
PRINT Test 09: Align - not aligned, does not fit and it should free a RMBuf
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest09 ,z:\testdata\configs\MBufTest09-5th.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-1000
START_TESTCASE COMINF-MBUFMGR-1001
//! @SYMTestCaseID COMINF-MBUFMGR-1001
PRINT Test 10: CopyL
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest10 ,z:\testdata\configs\MBufTest10-1st.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-1001
START_TESTCASE COMINF-MBUFMGR-1100
//! @SYMTestCaseID COMINF-MBUFMGR-1100
PRINT Test 11: Async alloc
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest11
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-1100
START_TESTCASE COMINF-MBUFMGR-1200
//! @SYMTestCaseID COMINF-MBUFMGR-1200
PRINT Test 12: General test
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest12
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-1200
START_TESTCASE COMINF-MBUFMGR-1300
//! @SYMTestCaseID COMINF-MBUFMGR-1300
PRINT Test 13: Performance test
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest13 ,z:\testdata\configs\MBufTest13-1st.ini
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-1300
START_TESTCASE COMINF-MBUFMGR-1400
//! @SYMTestCaseID COMINF-MBUFMGR-1400
PRINT Test 14: Heap Free Check
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest14
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-1400
START_TESTCASE COMINF-MBUFMGR-1500
//! @SYMTestCaseID COMINF-MBUFMGR-1500
PRINT Test 15: Concurency
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest15
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-1500
START_TESTCASE COMINF-MBUFMGR-1600
//! @SYMTestCaseID COMINF-MBUFMGR-1600
PRINT Test 16: MemoryFull
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest16
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-1600
START_TESTCASE COMINF-MBUFMGR-1700
//! @SYMTestCaseID COMINF-MBUFMGR-1700
PRINT Test 17: Request Size Limit test
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest17
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-1700
// The COMINF-MBUFMGR-1800 test has been removed as part of PREQ2106 and
// shared buffer implementation. Note COMINF-MBUFMGR-1800 tries to do a
// best fit allocation which is not really neccassary and the algorithm has
// been relaxed.
START_TESTCASE COMINF-MBUFMGR-1900
//! @SYMTestCaseID COMINF-MBUFMGR-1900
PRINT Test 19: Prepend
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest19
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-1900
START_TESTCASE COMINF-MBUFMGR-2000
//! @SYMTestCaseID COMINF-MBUFMGR-2000
PRINT Test 20: PoolCeilingMemoryFull
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest20
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-2000
START_TESTCASE COMINF-MBUFMGR-2100
//! @SYMTestCaseID COMINF-MBUFMGR-2100
PRINT Test 21: commsbufsmiscellaneous
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest21
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-2100
START_TESTCASE COMINF-MBUFMGR-2200
//! @SYMTestCaseID COMINF-MBUFMGR-2200
PRINT Test 22: Append
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest22
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-2200
START_TESTCASE COMINF-MBUFMGR-2300
//! @SYMTestCaseID COMINF-MBUFMGR-2300
PRINT Test 23: RMBufQ
HANDLES_MARK
RUN_TEST_STEP 10000, TS_CTMBufMgr, MBufMgrTest23
HANDLES_CHECK
TEST_COMPLETE
PRINT ------------------------------
PRINT
END_TESTCASE COMINF-MBUFMGR-2300