kerneltest/e32test/dmav2/test_cases.cpp
branchRCL_3
changeset 256 c1f20ce4abcf
equal deleted inserted replaced
249:a179b74831c9 256:c1f20ce4abcf
       
     1 /*
       
     2 * Copyright (c) 2010 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 * This file contains statically defined test cases, a pointer to each
       
    16 * new test case should be entered in StaticTestArray
       
    17 *
       
    18 */
       
    19 
       
    20 #include "t_dma2.h"
       
    21 #include "cap_reqs.h"
       
    22 
       
    23 const TCallbackRecord threadCallback(TCallbackRecord::EThread,1);
       
    24 const TCallbackRecord isrCallback(TCallbackRecord::EIsr,1);
       
    25 
       
    26 const TInt size = 128 * KKilo;
       
    27 const TInt trans64K_1 = ((64 * KKilo) -1); // 65535
       
    28 
       
    29 //----------------------------------------------------------------------------------------------
       
    30 //! TestCaseID      KBASE-DMA-2571
       
    31 //! TestType        CIT
       
    32 //! PREQ            REQ
       
    33 //! TestCaseDesc    This test verifies the correct behavior of CancelAll API in the new DMA 
       
    34 //!					framework 
       
    35 //!
       
    36 //! TestActions     
       
    37 //!						1.	Open a DMA channel for a transfer.
       
    38 //!						2.  Queue multiple request on the DMA channel.
       
    39 //!						3.	Call CancelAll () on the DMA channel.
       
    40 //!						4.  Verify that all transfers have been cancelled.
       
    41 //!						5   Open a DMA channel for a transfer. This channel should support pause and resume.
       
    42 //!						6.  Call Pause () on the channel.
       
    43 //!						7.	Queue multiple request on the DMA channel.
       
    44 //!						8.	Call CancelAll () on the channel.
       
    45 //!						9.	Verify that all transfers have been cancelled.
       
    46 //!
       
    47 //!
       
    48 //! TestExpectedResults 1.  DMA channel opens and KErrNone returned.
       
    49 //!						2.  DMA queue request created and KErrNone returned.
       
    50 //!						3.  CancelAll () cancels all queued request.
       
    51 //!						4.  All queued request are cancelled
       
    52 //!						5.	DMA Request completes
       
    53 //!
       
    54 //!
       
    55 //! TestPriority        High
       
    56 //! TestStatus          Implemented
       
    57 //----------------------------------------------------------------------------------------------
       
    58 namespace CancelAllTest
       
    59 	{
       
    60 	const TInt size = 2 * KMega;
       
    61 	const TDmaTransferArgs transferArgArray[] = {
       
    62 		TDmaTransferArgs(0, size, size, KDmaMemAddr),
       
    63 		TDmaTransferArgs(2 * size, 3 * size, size, KDmaMemAddr)
       
    64 	};
       
    65 
       
    66 	TResultSet noTransferExpected = TResultSet()
       
    67 		.PostTransferResult(KErrNone)
       
    68 		.CallbackRecord(TCallbackRecord::Empty());
       
    69 
       
    70 	const TResultSet expected[] =
       
    71 		{
       
    72 		TResultSet(noTransferExpected),
       
    73 		TResultSet(noTransferExpected)
       
    74 		};
       
    75 
       
    76 	// Test that 2 requests can be queued on a paused channel
       
    77 	// then cleared using CancelAll.
       
    78 	// It is expected that no data will have been transferred to the
       
    79 	// destination buffer.
       
    80 	CCancelAllTest testcancelall =
       
    81 		CCancelAllTest(_L("CancelAllTest : Cancel and verify cancellation of requests"), 1, transferArgArray, expected, ARRAY_LENGTH(transferArgArray))
       
    82 			.SetPreTransferTest(&KPreTransferIncrBytes)
       
    83 			.SetPostTransferTest(&KCheckNoTransfer);
       
    84 
       
    85 	TTestCase testCase(&testcancelall,EFalse,capAboveV1,pauseRequired_skip);
       
    86 	}
       
    87 
       
    88 //--------------------------------------------------------------------------------------------
       
    89 //! TestCaseID      KBASE-DMA-2569
       
    90 //! TestType        CIT
       
    91 //! PREQ            REQ
       
    92 //! TestCaseDesc    This test verifies the correct behavior of Pause and Resume API in the new DMA 
       
    93 //!					framework 
       
    94 //!
       
    95 //! TestActions     
       
    96 //!						1.	Open a DMA channel for a transfer.
       
    97 //!						2.  Setup a DMA request and time how long the transfer takes
       
    98 //!						3.	Pause the DMA channel
       
    99 //!						4.  Repeat DMA transfer (queued asynchronously)
       
   100 //!						5.  Resume DMA Channel
       
   101 //! 
       
   102 //!	TestExpectedResults 1.  DMA channel opens and KErrNone returned.
       
   103 //!						2.  DMA request created and KErrNone returned.
       
   104 //!						3.  DMA channel Paused.
       
   105 //!						4.  Request queued and waits until Resume is called
       
   106 //!						5.	DMA Request completes
       
   107 //!
       
   108 //! TestPriority        High
       
   109 //! TestStatus          Implemented
       
   110 //----------------------------------------------------------------------------------------------
       
   111 namespace PauseResumeApiTest
       
   112 	{
       
   113 	const TInt srcAddr		= 0;
       
   114 	const TInt desAddr		= 2 * KMega;	
       
   115 	const TInt transferSize = 1 * KMega;	
       
   116 
       
   117 	TDmaTransferArgs transferArgs(srcAddr, desAddr, transferSize, KDmaMemAddr);
       
   118 	const TResultSet expectedResults(threadCallback);
       
   119 	CPauseResumeTest testPauseResume = CPauseResumeTest(_L("Pause and Resume Test"), 1, transferArgs, expectedResults); 
       
   120 	TTestCase testCasePauseResume(&testPauseResume, EFalse, capAboveV1,pauseRequired_skip);	
       
   121 	}
       
   122 //--------------------------------------------------------------------------------------------
       
   123 //! TestCaseID      KBASE-DMA-2572
       
   124 //! TestType        CIT
       
   125 //! PREQ            REQ
       
   126 //! TestCaseDesc    This test verifies the correct behavior of Pause and Resume API in the new DMA 
       
   127 //!					framework 
       
   128 //!
       
   129 //! TestActions     
       
   130 //!						1.	Open a DMA channel for a transfer.
       
   131 //!						2.  Pause and Resume DMA channel.
       
   132 //!						3.  Close DMA channel.
       
   133 //!					
       
   134 //! 
       
   135 //!	TestExpectedResults 1.  DMA channel opens and KErrNone returned.
       
   136 //!						2.  KErrNotSupported returned when Pause and Resume API are called.
       
   137 //!						3.	DMA channel closes and KErrNone returned.
       
   138 //!
       
   139 //! TestPriority        High
       
   140 //! TestStatus          Implemented
       
   141 //----------------------------------------------------------------------------------------------
       
   142 namespace PauseResumeApiNegTest
       
   143 	{
       
   144 	const TInt srcAddr		= 0;
       
   145 	const TInt desAddr		= 2 * KMega;	
       
   146 	const TInt transferSize = 1 * KMega;	
       
   147 
       
   148 	TDmaTransferArgs transferArgs(srcAddr, desAddr, transferSize, KDmaMemAddr);	
       
   149 
       
   150 	TResultSet noTransferExpected = TResultSet().
       
   151 		RequestResult(TRequestResults().CreationResult(KErrUnknown).FragmentationResult(KErrUnknown).QueueResult(KErrUnknown)).
       
   152 		CallbackRecord(TCallbackRecord::Empty()).
       
   153 		PostTransferResult(KErrUnknown);
       
   154 
       
   155 	CPauseResumeNegTest testPauseResumeNeg = CPauseResumeNegTest(_L("Pause and Resume Negative Test"), 1, transferArgs, noTransferExpected); 
       
   156 	TTestCase testCasePauseResumeNeg(&testPauseResumeNeg , EFalse, capAboveV1,pauseNotWanted);	
       
   157 	}
       
   158 //--------------------------------------------------------------------------------------------
       
   159 //! TestCaseID      KBASE-DMA-2560
       
   160 //! TestType        CIT
       
   161 //! PREQ            REQ
       
   162 //! TestCaseDesc    Simple DMA transfer test using CSingleTransferTest and New DMA APIs
       
   163 //!
       
   164 //! TestActions     
       
   165 //!						1.	Open a DMA channel for a transfer.
       
   166 //!						2.	Create single transfer test and run test
       
   167 //!				
       
   168 //!
       
   169 //!
       
   170 //! TestExpectedResults 
       
   171 //!						1.  DMA channel opens and KErrNone returned.
       
   172 //!						2.	DMA transfer completes with no errors.
       
   173 //!							
       
   174 //!
       
   175 //! TestPriority        High
       
   176 //! TestStatus          Implemented
       
   177 //----------------------------------------------------------------------------------------------
       
   178 namespace Simple_1
       
   179 	{
       
   180 	TDmaTransferArgs transferArgs(0, size, size, KDmaMemAddr);
       
   181 
       
   182 	const TResultSet expectedResults(threadCallback);
       
   183 
       
   184 	CSingleTransferTest simpleTest(_L("Simple Test - New DMA APIs"), 1, transferArgs, expectedResults);
       
   185 
       
   186 	TTestCase testCase(new (ELeave) CMultiVersionTest(&simpleTest), EFalse);
       
   187 	TTestCase testCaseConcurrent(new (ELeave) CMultiVersionTest(&simpleTest), ETrue);
       
   188 	}
       
   189 
       
   190 //----------------------------------------------------------------------------------------------
       
   191 //! TestCaseID      KBASE-DMA-2573
       
   192 //! TestType        CIT
       
   193 //! PREQ            REQ
       
   194 //! TestCaseDesc    DMA ISR Callback test (Isr Callback - use old request Ctor)
       
   195 //!
       
   196 //! TestActions     
       
   197 //!						1.	Setup DMA transfer to request a callback from ISR using old style DDmaRequest.
       
   198 //!						2.	Create single transfer test and run test
       
   199 //!						3.	Verify that DDmaRequest request fails
       
   200 //!
       
   201 //! TestExpectedResults 
       
   202 //!						1.  DMA channel opens and KErrNone returned.
       
   203 //!						2.	DMA transfer created with no errors.
       
   204 //!						3.	DDmaRequest request fails. 
       
   205 //!						
       
   206 //!
       
   207 //! TestPriority        High
       
   208 //! TestStatus          Implemented
       
   209 //----------------------------------------------------------------------------------------------
       
   210 namespace Callback
       
   211 	{
       
   212 	TDmaTransferArgs transferArgs(0, size, size, KDmaMemAddr, KDmaSyncAuto, KDmaRequestCallbackFromIsr);
       
   213 
       
   214 	const TResultSet expectedResults(isrCallback);
       
   215 
       
   216 	CSingleTransferTest isrTest(_L("Isr Callback"), 1, transferArgs, expectedResults);
       
   217 	TTestCase testCase(&isrTest, EFalse, capAboveV1);
       
   218 
       
   219 
       
   220 	const TRequestResults fragmentFails = TRequestResults().
       
   221 		FragmentationResult(KErrArgument).
       
   222 		QueueResult(KErrUnknown);
       
   223 
       
   224 	const TResultSet expectedResultsFail = TResultSet(EFalse).
       
   225 		ChannelOpenResult(KErrNone).
       
   226 		RequestResult(fragmentFails).
       
   227 		PostTransferResult(1); // PostTransferResult of 1 means buffers don't match
       
   228 
       
   229 	CSingleTransferTest isrTestOldRequest = CSingleTransferTest(_L("Isr Callback - use old request Ctor"), 1, transferArgs, expectedResultsFail)
       
   230 		.UseNewRequest(EFalse);
       
   231 	TTestCase testCaseOldRequest(&isrTestOldRequest, EFalse, capAboveV1);
       
   232 	}
       
   233 
       
   234 //----------------------------------------------------------------------------------------------
       
   235 //! TestCaseID      KBASE-DMA-2574,KBASE-DMA-2575
       
   236 //! TestType        CIT
       
   237 //! PREQ            REQ
       
   238 //! TestCaseDesc    DMA ISR Reque test
       
   239 //!
       
   240 //! TestActions     
       
   241 //!					1.	Setup DMA transfer to request a callback from ISR.
       
   242 //!					2.	Set up ISR to requeue the DMA request on the same channel and adjust its transfer parameters.
       
   243 //!					3.	Create single transfer test and run test
       
   244 //!					4.	Verify a client can queue the just completed DMA request from within an ISR callback.
       
   245 //!
       
   246 //! TestExpectedResults 
       
   247 //!					
       
   248 //!					DMA transfer completes and just completed request can be requeued from within an ISR 
       
   249 //!					callback on the same channel. Requeued DMA request completes successfully
       
   250 //!							
       
   251 //!
       
   252 //! TestPriority        High
       
   253 //! TestStatus          Implemented
       
   254 //----------------------------------------------------------------------------------------------
       
   255 namespace ISR_Reque
       
   256 	{
       
   257 	const TInt size = 4 * KKilo;
       
   258 	TDmaTransferArgs tferArgs(0, 2*size, size, KDmaMemAddr, KDmaSyncAuto, KDmaRequestCallbackFromIsr);
       
   259 
       
   260 	const TRequestResults requestResult(KErrNone, 1); // request must be in a single fragment
       
   261 
       
   262 	//-------------------------------------------------------------
       
   263 	//This case requeues 4 transfers at the end of an ISR callback
       
   264 	//-------------------------------------------------------------
       
   265 	namespace endOnIsrCb
       
   266 		{
       
   267 		TIsrRequeArgs requeArgs[] = {
       
   268 			TIsrRequeArgs(),
       
   269 			TIsrRequeArgs(size,3*size,size,0, ETrue),
       
   270 			TIsrRequeArgs(size,4*size,size,0, ETrue),
       
   271 			TIsrRequeArgs(0,5*size,size,0, ETrue),
       
   272 		};
       
   273 		const TInt count = ARRAY_LENGTH(requeArgs);
       
   274 
       
   275 		// we expect a cb for each requeue + 1 for the original
       
   276 		// transfer
       
   277 		const TCallbackRecord callbackRecord = TCallbackRecord(TCallbackRecord::EIsr, count + 1).IsrRedoResult(KErrNone);
       
   278 		const TResultSet expected(KErrNone, requestResult, KErrNone, callbackRecord);
       
   279 
       
   280 		TTestCase testCase(new (ELeave) CIsrRequeTest(_L("4 Requeues - end on isr cb"), 1, tferArgs, requeArgs, count, expected, &KPreTransferIncrBytes, &KCompareSrcDst), ETrue, capAboveV1);
       
   281 		}
       
   282 
       
   283 	//---------------------------------------------------------------
       
   284 	///This case requeues 4 transfers at the end of a thread callback
       
   285 	//---------------------------------------------------------------
       
   286 	namespace endOnThreadCb
       
   287 		{
       
   288 		TIsrRequeArgs requeArgs[] = {
       
   289 			TIsrRequeArgs(),
       
   290 			TIsrRequeArgs(size,3*size,size,0, ETrue),
       
   291 			TIsrRequeArgs(size,4*size,size,0, ETrue),
       
   292 			TIsrRequeArgs(0,5*size,size,0, EFalse),
       
   293 		};
       
   294 		const TInt count = ARRAY_LENGTH(requeArgs);
       
   295 
       
   296 		const TCallbackRecord callbackRecord = TCallbackRecord(TCallbackRecord::EThread, count + 1).IsrRedoResult(KErrNone);
       
   297 		const TResultSet expected(KErrNone, requestResult, KErrNone, callbackRecord);
       
   298 
       
   299 		TTestCase testCase(new (ELeave) CIsrRequeTest(_L("4 Requeues - end on thread cb"), 1, tferArgs, requeArgs, count, expected, &KPreTransferIncrBytes, &KCompareSrcDst), ETrue, capAboveV1);
       
   300 		}
       
   301 	
       
   302 	//----------------------------------------------------------------------------------------------
       
   303 	// This case requeues a transfer from within an thread callback after changing the transfer size
       
   304 	//----------------------------------------------------------------------------------------------
       
   305 	namespace changeSize
       
   306 		{
       
   307 		TIsrRequeArgs requeArgs[] = {
       
   308 			TIsrRequeArgs(3*size,5*size,2*size,0, EFalse),
       
   309 		};
       
   310 		const TInt count = ARRAY_LENGTH(requeArgs);
       
   311 
       
   312 		const TCallbackRecord callbackRecord = TCallbackRecord(TCallbackRecord::EThread, count + 1).IsrRedoResult(KErrNone);
       
   313 		const TResultSet expected(KErrNone, requestResult, KErrNone, callbackRecord);
       
   314 
       
   315 		TTestCase testCase(new (ELeave) CIsrRequeTest(_L("1 Requeues - change transfer size"), 1, tferArgs, requeArgs, count, expected, &KPreTransferIncrBytes, &KCompareSrcDst), ETrue, capAboveV1);
       
   316 		}
       
   317 
       
   318 	//--------------------------------------------------------------------------------------------
       
   319 	// This case requeues a just completed request from within an ISR callback 
       
   320 	//--------------------------------------------------------------------------------------------
       
   321 	namespace endOnRedo
       
   322 		{
       
   323 		// The transfer size has been made bigger than 4K so that we do not miss the second interrupt when tracing 
       
   324 		// enabled is. This indicates the PSL's interrupt handler misses an interrupt if it occurs during the interrupt.
       
   325 		const TInt size = 0x10000;
       
   326 		TDmaTransferArgs tferArgs(0, 2*size, size, KDmaMemAddr, KDmaSyncAuto, KDmaRequestCallbackFromIsr);
       
   327 
       
   328 		TIsrRequeArgs requeArgs[] = {
       
   329 			TIsrRequeArgs(3*size,5*size,2*size,0, ETrue),
       
   330 			TIsrRequeArgs() //repeat the previous transfer
       
   331 		};
       
   332 		const TInt count = ARRAY_LENGTH(requeArgs);
       
   333 
       
   334 		const TCallbackRecord callbackRecord = TCallbackRecord(TCallbackRecord::EIsr, count + 1).IsrRedoResult(KErrNone);
       
   335 		const TResultSet expected(KErrNone, requestResult, KErrNone, callbackRecord);
       
   336 
       
   337 		TTestCase testCase(new (ELeave) CIsrRequeTest(_L("2 Requeues - Isr redo request repeated"), 1, tferArgs, requeArgs, count, expected, &KPreTransferIncrBytes, &KCompareSrcDst), EFalse, capAboveV1);
       
   338 		}
       
   339 
       
   340 	//--------------------------------------------------------------------------------------------
       
   341 	// This case requeues a request from within an ISR callback using invalid requeue parameters
       
   342 	//--------------------------------------------------------------------------------------------
       
   343 	namespace invalidAddresses
       
   344 		{
       
   345 		TIsrRequeArgs requeArgs[] = {
       
   346 			TIsrRequeArgs(size, size)
       
   347 		};
       
   348 		const TInt count = ARRAY_LENGTH(requeArgs);
       
   349 
       
   350 		const TCallbackRecord callbackRecord = TCallbackRecord(TCallbackRecord::EIsr, 1).IsrRedoResult(KErrArgument);
       
   351 		const TResultSet expected(KErrNone, requestResult, KErrUnknown, callbackRecord);
       
   352 
       
   353 		// pre and post test would fail because of bad requeue parameters
       
   354 		TTestCase testCase(new (ELeave) CIsrRequeTest(_L("Requeue with matching addresses"), 1, tferArgs, requeArgs, count, expected, NULL, NULL), ETrue, capAboveV1);
       
   355 		}
       
   356 	//--------------------------------------------------------------------------------------------
       
   357 	// This case requeues a request containing more than 1 fragment from within an ISR callback
       
   358 	// 
       
   359 	//		
       
   360 	// This test case is currently caught by a FAULT instead of a return code
       
   361 	// as expected. Currently, the facility to return an error code to the test
       
   362 	// framework is not yet supported.
       
   363 	//
       
   364 	// It has been implemented to expect an error code of KErrGeneral as requeues for request that
       
   365 	// contains more than one fragments are not allowed. 
       
   366 	//--------------------------------------------------------------------------------------------
       
   367 	namespace multipleFragments
       
   368 		{
       
   369 		TIsrRequeArgs requeArgs[] = {
       
   370 			TIsrRequeArgs()
       
   371 		};
       
   372 		const TInt count = ARRAY_LENGTH(requeArgs);
       
   373 		const TRequestResults isrequestResult(KErrNone, 2); // request contains 2 fragments
       
   374 
       
   375 		const TCallbackRecord callbackRecord = TCallbackRecord(TCallbackRecord::EIsr, 1).IsrRedoResult(KErrGeneral);
       
   376 		TRequestResults results2Fragments = TRequestResults(isrequestResult).FragmentCount(2); 
       
   377 		const TResultSet expected(KErrNone, results2Fragments, KErrNone, callbackRecord);
       
   378 
       
   379 		TTestCase testCase(new (ELeave) CIsrRequeTest(_L("Attempt to Requeue 2 fragment request"), 1, tferArgs, requeArgs, count, expected, &KPreTransferIncrBytes, &KCompareSrcDst, size/2), ETrue, capAboveV1);
       
   380 
       
   381 		}
       
   382 	}	
       
   383 
       
   384 //----------------------------------------------------------------------------------------------
       
   385 //! TestCaseID      PBASE-DMA-FUNC-2586
       
   386 //! TestType        CIT
       
   387 //! PREQ            REQ
       
   388 //! TestCaseDesc    DMA Multiple transfer test
       
   389 //! TestActions     
       
   390 //!						1.Setup DMA transfer to using muliple transfers.
       
   391 //!						2.Create multipart transfer test and run test.	
       
   392 //!
       
   393 //!
       
   394 //! TestExpectedResults 
       
   395 //!						1.  DMA tranfer set up with no errors. 
       
   396 //!						2.	Multipart transfer tests completes with no issues.		
       
   397 //!							
       
   398 //!
       
   399 //! TestPriority        High
       
   400 //! TestStatus          Implemented
       
   401 //----------------------------------------------------------------------------------------------
       
   402 namespace Multipart
       
   403 	{
       
   404 	// need long transfer, to try and force adjacent
       
   405 	// requests to be concatinated
       
   406 	const TInt size = 2 * KMega;
       
   407 	const TDmaTransferArgs transferArgArray[] = {
       
   408 		TDmaTransferArgs(0, size, size, KDmaMemAddr),
       
   409 		TDmaTransferArgs(2 * size, 3 * size, size, KDmaMemAddr)
       
   410 	};
       
   411 
       
   412 	const TResultSet expected[] =
       
   413 		{
       
   414 		TResultSet(),
       
   415 		TResultSet()
       
   416 		};
       
   417 
       
   418 	CMultiTransferTest multipart =
       
   419 		CMultiTransferTest(_L("Sg request concatination"), 1, transferArgArray, expected, ARRAY_LENGTH(transferArgArray))
       
   420 			.SetPreTransferTest(&KPreTransferIncrBytes)
       
   421 			.SetPostTransferTest(&KCompareSrcDst);
       
   422 
       
   423 	TTestCase testCase(&multipart, EFalse, hwDesWanted_skip);
       
   424 	}
       
   425 
       
   426 //----------------------------------------------------------------------------------------------
       
   427 //! TestCaseID      KBASE-DMA-2580
       
   428 //! TestType        CIT
       
   429 //! PREQ            REQ
       
   430 //! TestCaseDesc    These tests attempt to queue ISR cb requests while the queue is not 
       
   431 //!					empty and queing normal requests when an ISR cb is pending
       
   432 //! TestActions     
       
   433 //!				
       
   434 //!					1.	Setup DMA transfer to request a callback from ISR.
       
   435 //!					2.	Create single transfer test and run test
       
   436 //!					3.	Queue another request using Queue()before ISR Callback completion
       
   437 //!					4.	Verify a DMA framework flags an error.
       
   438 //!
       
   439 //!
       
   440 //! TestExpectedResults 
       
   441 //!					DMA framework flags an error  if ISR callback has not been executed 
       
   442 //!					for the last time without re-queueing the initial transfer request		
       
   443 //!
       
   444 //! TestPriority        High
       
   445 //! TestStatus          Implemented
       
   446 //----------------------------------------------------------------------------------------------
       
   447 namespace IsrAndDfc
       
   448 	{
       
   449 	// This test case needs a long transfer so that 1st request is still queued when the second 
       
   450 	// one is queued. The use of Pause is recommended in order to guarantee this. For this case, 
       
   451 	// the size has been selected to ensure that the first isr callback request in IsrBeforeDfc
       
   452 	// will only have one fragment
       
   453 	const TInt size = 0x40000;
       
   454 	TDmaTransferArgs dfcTransfer(0, size, size, KDmaMemAddr);
       
   455 	TDmaTransferArgs isrTransfer(2*size, 3*size, size, KDmaMemAddr, KDmaSyncAuto, KDmaRequestCallbackFromIsr);
       
   456 
       
   457 	const TResultSet success = TResultSet();
       
   458 	TResultSet queueFailure = TResultSet().
       
   459 			RequestResult(TRequestResults().QueueResult(KErrGeneral)).
       
   460 			CallbackRecord(TCallbackRecord::Empty()).
       
   461 			PostTransferResult(1);
       
   462 
       
   463 	namespace DfcBeforeIsr
       
   464 		{
       
   465 		const TDmaTransferArgs transferArgArray[] = {
       
   466 			dfcTransfer,
       
   467 			isrTransfer
       
   468 		};
       
   469 
       
   470 		const TResultSet expected[] =
       
   471 			{
       
   472 			success,
       
   473 			queueFailure
       
   474 			};
       
   475 		CMultiTransferTest dfcBeforeIsr =
       
   476 			CMultiTransferTest(_L("DFC cb req before ISR cb req "), 1, transferArgArray, expected, ARRAY_LENGTH(transferArgArray))
       
   477 				.SetPreTransferTest(&KPreTransferIncrBytes)
       
   478 				.SetPostTransferTest(&KCompareSrcDst)
       
   479 				.PauseWhileQueuing();
       
   480 		TTestCase testCase(&dfcBeforeIsr, EFalse, pauseRequired_skip, capAboveV1);
       
   481 		}
       
   482 
       
   483 	namespace IsrBeforeDfc
       
   484 		{
       
   485 		const TDmaTransferArgs transferArgArray[] = {
       
   486 			isrTransfer,
       
   487 			dfcTransfer
       
   488 		};
       
   489 
       
   490 		TResultSet isrSuccess = TResultSet(success).CallbackRecord(isrCallback);
       
   491 		const TResultSet expected[] =
       
   492 			{
       
   493 			isrSuccess,
       
   494 			queueFailure
       
   495 			};
       
   496 		CMultiTransferTest dfcBeforeIsr =
       
   497 			CMultiTransferTest(_L("ISR cb req before DFC cb req "), 1, transferArgArray, expected, ARRAY_LENGTH(transferArgArray))
       
   498 				.SetPreTransferTest(&KPreTransferIncrBytes)
       
   499 				.SetPostTransferTest(&KCompareSrcDst)
       
   500 				.PauseWhileQueuing();
       
   501 		TTestCase testCase(&dfcBeforeIsr, EFalse, pauseRequired_skip, capAboveV1);
       
   502 		}
       
   503 
       
   504 	}
       
   505 
       
   506 //----------------------------------------------------------------------------------------------
       
   507 //! TestCaseID      PBASE-DMA-FUNC-2587
       
   508 //! TestType        CIT
       
   509 //! PREQ            REQ
       
   510 //! TestCaseDesc    DMA 2D transfer test
       
   511 //!
       
   512 //! TestActions     
       
   513 //!						1. Set up DMA transfer using TDmaTransArgs parameters specified in order to
       
   514 //!						   rotate an image by 90 degrees clockwise.
       
   515 //!						2. Verify that destination buffer gets transformed according to the DMA
       
   516 //!						   transfer arguments after transfer.
       
   517 //!
       
   518 //! TestExpectedResults 
       
   519 //!						1. DMA tranfer set up with no errors. 
       
   520 //!						2. Destination buffer gets transformed accordingly.
       
   521 //!							
       
   522 //!
       
   523 //! TestPriority        High
       
   524 //! TestStatus          Implemented
       
   525 //----------------------------------------------------------------------------------------------
       
   526 namespace _2D_Test
       
   527 	{
       
   528 	// Image @ 0x0 with 640x480 pixels and 24 bits/pixel.
       
   529 
       
   530 	TDmaTransferConfig src(
       
   531 		0, /*iAddr*/
       
   532 		3, /*iElementSize*/
       
   533 		6, /*iElementsPerFrame*/
       
   534 		4, /*iFramesPerTransfer*/
       
   535 		0, /*iElementSkip*/
       
   536 		0, /*iFrameSkip*/
       
   537 		KDmaMemAddr /*iFlags*/
       
   538 		);
       
   539 
       
   540 	TDmaTransferConfig dst(
       
   541 		0x708000, /*iAddr*/
       
   542 		3, /*iElementSize*/
       
   543 		640, /*iElementsPerFrame*/
       
   544 		480, /*iFramesPerTransfer*/
       
   545 		1437, /*iElementSkip*/
       
   546 		-920166, /*iFrameSkip*/
       
   547 		KDmaMemAddr /*iFlags*/
       
   548 		);
       
   549 
       
   550 	TDmaTransferArgs transferArgs2D(src, dst);
       
   551 
       
   552 	TResultSet expectedResults; //all KErrNone
       
   553 
       
   554 	//source buffer is currently filled with increasing values
       
   555 	//instead of an image, but the test is still valid
       
   556 	CSingleTransferTest transfer2d(_L("2D Transfer"), 1, transferArgs2D, expectedResults, 0, &KCompare2D);
       
   557 
       
   558 	TTestCase testCase2d(&transfer2d, EFalse, cap_2DRequired, capAboveV1);
       
   559 	}
       
   560 
       
   561 //----------------------------------------------------------------------------------------------
       
   562 //! TestCaseID      KBASE-DMA-2565
       
   563 //! TestType        CIT
       
   564 //! PREQ            REQ
       
   565 //! TestCaseDesc    DMA Fragmentation count test
       
   566 //!
       
   567 //! TestActions     
       
   568 //!					1.	Set up the arguments for Fragment using the setting in the test scenario table below.
       
   569 //!					2.	Create single transfer test and run test
       
   570 //!					3.	Verify that FragmentCount API returns the expected value and framework responds correctly
       
   571 //!					4.	Repeat steps 1 to 3 above until all the settings in the scenario table below have been used.
       
   572 //!
       
   573 //! TestExpectedResults 
       
   574 //!					On calling FragmentCount (), the number of fragments (descriptors / pseudo descriptors) that
       
   575 //!					the transfer request has been split into is returned. 
       
   576 //!					
       
   577 //!							
       
   578 //!
       
   579 //! TestPriority        High
       
   580 //! TestStatus          Implemented
       
   581 //----------------------------------------------------------------------------------------------
       
   582 namespace FragmentationCount
       
   583 	{
       
   584 	TDmaTransferArgs transferArgs(0, size, size, KDmaMemAddr);
       
   585 
       
   586 	const TRequestResults requestResult(KErrNone, 128);
       
   587 	const TResultSet expectedResults(KErrNone, requestResult, KErrNone, threadCallback);
       
   588 	CSingleTransferTest test1(_L("Fragmentation Count - 128 fragments"), 1, transferArgs, expectedResults, KKilo);
       
   589 	TTestCase testCase(new (ELeave) CMultiVersionTest(&test1), EFalse);
       
   590 
       
   591 	const TRequestResults requestResult2(KErrNone, 4);
       
   592 	const TResultSet expectedResults2(KErrNone, requestResult2, KErrNone, threadCallback);
       
   593 	CSingleTransferTest test2(_L("Fragmentation Count - 4 fragments"), 1, transferArgs, expectedResults2, 32*KKilo);
       
   594 	TTestCase testCase2(new (ELeave) CMultiVersionTest(&test2), EFalse);
       
   595 
       
   596 	// Also specifying an element size to get the PIL to further adjust the
       
   597 	// fragment size(s): element size = 32, transfer length = 128KB, max
       
   598 	// transfer length = 6500 bytes, # of fragments expected = 21 (20 with 6496
       
   599 	// bytes each + 1 with 1152 bytes).
       
   600 	TDmaTransferArgs transferArgs3(0, size, size, KDmaMemAddr, KDmaSyncAuto, 0, KDmaAddrModePostIncrement, 32);
       
   601 	const TRequestResults requestResult3(KErrNone, 21);
       
   602 	const TResultSet expectedResults3(KErrNone, requestResult3, KErrNone, threadCallback);
       
   603 	CSingleTransferTest test3(_L("Fragmentation Count - 21 fragments"),
       
   604 							  1, transferArgs3, expectedResults3, 6500);
       
   605 	TTestCase testCase3(new (ELeave) CMultiVersionTest(&test3), EFalse);
       
   606 	}
       
   607 
       
   608 //----------------------------------------------------------------------------------------------
       
   609 //! TestCaseID      KBASE-DMA-2584,KBASE-DMA-2585
       
   610 //! TestType        CIT
       
   611 //! PREQ            REQ
       
   612 //! TestCaseDesc    DMA Benchmark tests
       
   613 //!					To compare the speed of request fragmentation for a given transfer
       
   614 //!					between the new and old frameworks on the NaviEngine platform.
       
   615 //! TestActions     
       
   616 //!				1.	Fragment a memory to memory dma transfer of 4Mb, where both source and destination are physically contiguous. 
       
   617 //!				2.	Fragment using the default element size, and also with a 4K limit.
       
   618 //!				3.	Carry out for a channel using pseudo descriptors and for a scatter gather channel.
       
   619 //!
       
   620 //! TestExpectedResults 
       
   621 //!				 The results obtained for both framework versions should  be comparable.							
       
   622 //!
       
   623 //! TestPriority        High
       
   624 //! TestStatus          Implemented
       
   625 //-----------------------------------------------------------------------------------------------
       
   626 namespace Benchmark
       
   627 	{
       
   628 	const TInt bmIters = 10;
       
   629 	namespace Frag
       
   630 		{
       
   631 		const TInt size = 1 * KMega;
       
   632 		TDmaTransferArgs transferArgs(0, size, size, KDmaMemAddr);
       
   633 
       
   634 		TTestCase testCase_256K(new (ELeave) CDmaBmFragmentation(_L("1 MB transfer - 256K frag size"), bmIters, transferArgs, 256 * KKilo), EFalse);
       
   635 		TTestCase testCase_8K(new (ELeave) CDmaBmFragmentation(_L("1 MB transfer - 8K frag size"), bmIters, transferArgs, 8 * KKilo), EFalse);
       
   636 		}
       
   637 
       
   638 	namespace Transfer
       
   639 		{
       
   640 		namespace _4Bytes
       
   641 			{
       
   642 			const TInt size = 4;
       
   643 			TDmaTransferArgs transferArgs(0, size, size, KDmaMemAddr);
       
   644 
       
   645 			CDmaBmTransfer bmTest(_L("4 bytes"), bmIters, transferArgs, 0);
       
   646 			TTestCase testCase(&bmTest, EFalse);
       
   647 			}
       
   648 		namespace _128K
       
   649 			{
       
   650 			const TInt size = 128 * KKilo;
       
   651 			TDmaTransferArgs transferArgs(0, size, size, KDmaMemAddr);
       
   652 
       
   653 			TTestCase testCase_128(new (ELeave) CDmaBmTransfer(_L("128 K - 128K frag size"), bmIters, transferArgs, 128 * KKilo), EFalse);
       
   654 			TTestCase testCase_16(new (ELeave) CDmaBmTransfer(_L("128 K - 16K frag size"), bmIters, transferArgs, 16 * KKilo), EFalse);
       
   655 			TTestCase testCase_4(new (ELeave) CDmaBmTransfer(_L("128 K - 4K frag size"), bmIters, transferArgs, 4 * KKilo), EFalse);
       
   656 			TTestCase testCase_1(new (ELeave) CDmaBmTransfer(_L("128 K - 1K frag size"), bmIters, transferArgs, 1 * KKilo), EFalse);
       
   657 			}
       
   658 		namespace _4MB
       
   659 			{
       
   660 			const TInt size = 4 * KMega;
       
   661 			TDmaTransferArgs transferArgs(0, size, size, KDmaMemAddr);
       
   662 
       
   663 			CDmaBmTransfer bmTest(_L("4 MB"), bmIters, transferArgs, 0);
       
   664 			TTestCase testCase(&bmTest, EFalse);
       
   665 			}
       
   666 		}
       
   667 
       
   668 	/**
       
   669 	Compare time taken between queing and callback of 4 byte
       
   670 	request with both DFC and ISR callback
       
   671 	The new API calls are used
       
   672 	*/
       
   673 	namespace CompareIsrDfcCb
       
   674 		{
       
   675 		const TInt iterations = 50;
       
   676 
       
   677 		namespace Dfc
       
   678 			{
       
   679 			TResultSet expected = TResultSet(threadCallback).
       
   680 				PostTransferResult(KErrUnknown);
       
   681 
       
   682 			namespace _4Bytes
       
   683 				{
       
   684 				const TInt size = 4;
       
   685 				TDmaTransferArgs transferArgs(0, size, size, KDmaMemAddr);
       
   686 				CDmaBmTransfer bmTest = CDmaBmTransfer(_L("4 bytes DFC cb"), iterations, transferArgs, 0).
       
   687 					UseNewDmaApi(ETrue).
       
   688 					ExpectedResults(expected);
       
   689 				TTestCase testCase(&bmTest, EFalse, capAboveV1);
       
   690 				}
       
   691 			namespace _4K
       
   692 				{
       
   693 				const TInt size = 4 * KKilo;
       
   694 				TDmaTransferArgs transferArgs(0, size, size, KDmaMemAddr);
       
   695 				CDmaBmTransfer bmTest = CDmaBmTransfer(_L("4K DFC cb"), iterations, transferArgs, 0).
       
   696 					UseNewDmaApi(ETrue).
       
   697 					ExpectedResults(expected);
       
   698 				TTestCase testCase(&bmTest, EFalse, capAboveV1);
       
   699 				}
       
   700 			}
       
   701 
       
   702 		namespace Isr
       
   703 			{
       
   704 			TResultSet expected = TResultSet(isrCallback).
       
   705 				PostTransferResult(KErrUnknown);
       
   706 
       
   707 			namespace _4Bytes
       
   708 				{
       
   709 				const TInt size = 4;
       
   710 				TDmaTransferArgs transferArgs(0, size, size, KDmaMemAddr, KDmaSyncAuto, KDmaRequestCallbackFromIsr);
       
   711 				CDmaBmTransfer bmTest = CDmaBmTransfer(_L("4 bytes Isr cb"), iterations, transferArgs, 0).
       
   712 					UseNewDmaApi(ETrue).
       
   713 					ExpectedResults(expected);
       
   714 				TTestCase testCase(&bmTest, EFalse, capAboveV1);
       
   715 				}
       
   716 			namespace _4K
       
   717 				{
       
   718 				const TInt size = 4 * KKilo;
       
   719 				TDmaTransferArgs transferArgs(0, size, size, KDmaMemAddr, KDmaSyncAuto, KDmaRequestCallbackFromIsr);
       
   720 				CDmaBmTransfer bmTest = CDmaBmTransfer(_L("4K Isr cb"), iterations, transferArgs, 0).
       
   721 					UseNewDmaApi(ETrue).
       
   722 					ExpectedResults(expected);
       
   723 				TTestCase testCase(&bmTest, EFalse, capAboveV1);
       
   724 				}
       
   725 			}
       
   726 		}
       
   727 	}
       
   728 
       
   729 //----------------------------------------------------------------------------------------------
       
   730 //! TestCaseID      KBASE-DMA-2560
       
   731 //! TestCaseID      KBASE-DMA-2561
       
   732 //! TestType        CIT
       
   733 //! PREQ            REQ
       
   734 //! TestCaseDesc    Test new & old style fragment using CSingleTransferTest
       
   735 //!						Test Scenario 1 - DstAddr > SrcAddr & TransferSize=32K & Location is 
       
   736 //!						address of a memory buffer
       
   737 //! TestActions     
       
   738 //!						1.	Set up the arguments for aTransfeArgs using the settings below.
       
   739 //!							
       
   740 //!							SrcAddr		 = 4 * KKilo;
       
   741 //!							desAddr		 = 64 * KKilo;
       
   742 //!							transferSize = 32 * KKilo;	
       
   743 //!							iFlags		 = KDmaMemAddr;
       
   744 //!
       
   745 //!						2.	Setup expected result.
       
   746 //!						3.	Create single transfer test and run test
       
   747 //!
       
   748 //! TestExpectedResults 
       
   749 //!						1.  TransfeArgs set up in DMA framework
       
   750 //!						2.	Expected results set up in DMA framework					
       
   751 //!						3.	Fragment request completes and KErrNone returned
       
   752 //!
       
   753 //! TestPriority        High
       
   754 //! TestStatus          Implemented
       
   755 //----------------------------------------------------------------------------------------------
       
   756 namespace Fragment_1
       
   757 	{	
       
   758 	const TInt srcAddr = 4 * KKilo;
       
   759 	const TInt desAddr = 64 * KKilo;
       
   760 
       
   761 	const TInt transferSize =  32 * KKilo;
       
   762 	
       
   763 	TDmaTransferArgs transferArgs( srcAddr, desAddr, transferSize, KDmaMemAddr);
       
   764 
       
   765 	const TRequestResults requestResult(KErrNone, 32); 
       
   766 	const TResultSet expectedResults(KErrNone, requestResult, KErrNone, threadCallback);
       
   767 
       
   768 	CMultiVersionTest multiVersion(new (ELeave) CSingleTransferTest(_L("Fragment - Scenario 1"), 1, transferArgs, expectedResults,KKilo));
       
   769 
       
   770 	TTestCase testCase(&multiVersion, EFalse);
       
   771 	TTestCase testCaseConcurrent(&multiVersion, ETrue);
       
   772 	}
       
   773 
       
   774 //----------------------------------------------------------------------------------------------
       
   775 //! TestCaseID      KBASE-DMA-2560
       
   776 //! TestCaseID      KBASE-DMA-2561
       
   777 //! TestType        CIT
       
   778 //! PREQ            REQ
       
   779 //! TestCaseDesc    Test new & old style fragment using CSingleTransferTest
       
   780 //!						Test Scenario 3 -  TransferSize=0   
       
   781 //!
       
   782 //!						1.	Set up the arguments for aTransfeArgs using the settings below.
       
   783 //!							
       
   784 //!							SrcAddr		 = 32 * KKilo;
       
   785 //!							desAddr		 = 64 * KKilo;
       
   786 //!							transferSize = 0	
       
   787 //!							iFlags		 = KDmaMemAddr;
       
   788 //!
       
   789 //!						2.	Setup expected result.
       
   790 //!						3.	Create single transfer test and run test
       
   791 //!
       
   792 //!
       
   793 //! TestExpectedResults 
       
   794 //!
       
   795 //!						1.  TransfeArgs set up in DMA framework
       
   796 //!						2.	Expected results set up in DMA framework			
       
   797 //!						3.	Fragment request fails and KErrArgument returned
       
   798 //!
       
   799 //! TestPriority        High
       
   800 //! TestStatus          Implemented
       
   801 //----------------------------------------------------------------------------------------------
       
   802 namespace Fragment_2
       
   803 	{
       
   804 	const TInt srcAddr = 32 * KKilo;
       
   805 	const TInt desAddr = 64 * KKilo;
       
   806 	const TInt transferSize = 0;
       
   807 	
       
   808 	TDmaTransferArgs transferArgs( srcAddr, desAddr, transferSize,KDmaMemAddr);
       
   809 	const TRequestResults requestResult(KErrNone, 0, KErrArgument, KErrUnknown); 
       
   810 	const TResultSet expectedResults(KErrNone, requestResult, KErrNone, TCallbackRecord::Empty());
       
   811 
       
   812 
       
   813 	CMultiVersionTest multiVersion(new (ELeave) CSingleTransferTest(_L("Fragment - Scenario 3"), 1, transferArgs, expectedResults));
       
   814 
       
   815 	TTestCase testCase(&multiVersion, EFalse);
       
   816 	TTestCase testCaseConcurrent(&multiVersion, ETrue);
       
   817 	}
       
   818 
       
   819 //----------------------------------------------------------------------------------------------
       
   820 //! TestCaseID      KBASE-DMA-2560
       
   821 //! TestCaseID      KBASE-DMA-2561
       
   822 //! TestType        CIT
       
   823 //! PREQ            REQ
       
   824 //! TestCaseDesc    Test new & old style fragment using CSingleTransferTest
       
   825 //!						Test Scenario 4 -  TransferSize=1Byte   
       
   826 //!
       
   827 //!						1.	Set up the arguments for aTransfeArgs using the settings below.
       
   828 //!							
       
   829 //!							SrcAddr		 = 32K;
       
   830 //!							desAddr		 = 64K;
       
   831 //!							transferSize = 1 byte	
       
   832 //!							iFlags		 = KDmaMemAddr;
       
   833 //!
       
   834 //!						2.	Setup expected result.
       
   835 //!						3.	Create single transfer test and run test
       
   836 //!
       
   837 //! TestExpectedResults 
       
   838 //!
       
   839 //!						1.  TransfeArgs set up in DMA framework
       
   840 //!						2.	Expected results set up in DMA framework			
       
   841 //!						3.	Fragment request completes and KErrNone returned
       
   842 //!
       
   843 //! TestPriority        High
       
   844 //! TestStatus          Implemented
       
   845 //----------------------------------------------------------------------------------------------
       
   846 namespace Fragment_3
       
   847 	{	
       
   848 	const TInt srcAddr = 32 * KKilo;
       
   849 	const TInt desAddr = 64 * KKilo;
       
   850 	const TInt transferSize = 1;
       
   851 	
       
   852 	TDmaTransferArgs transferArgs(srcAddr, desAddr, transferSize, KDmaMemAddr);
       
   853 	const TRequestResults requestResult(KErrNone, 1);
       
   854 	const TResultSet expectedResults(KErrNone, requestResult, KErrNone, threadCallback);
       
   855 
       
   856 	CMultiVersionTest multiVersion(new (ELeave) CSingleTransferTest(_L("Fragment - Scenario 4"), 1, transferArgs, expectedResults));
       
   857 
       
   858 	TTestCase testCase(&multiVersion, EFalse);
       
   859 	TTestCase testCaseConcurrent(&multiVersion, ETrue);
       
   860 	}
       
   861 
       
   862 //----------------------------------------------------------------------------------------------
       
   863 //! TestCaseID      KBASE-DMA-2560
       
   864 //! TestCaseID      KBASE-DMA-2561
       
   865 //! TestType        CIT
       
   866 //! PREQ            REQ
       
   867 //! TestCaseDesc    Test new & old style fragment using CSingleTransferTest
       
   868 //!						Test Scenario 5 -  TransferSize=128KB    
       
   869 //!
       
   870 //!						1.	Set up the arguments for aTransfeArgs using the settings below.
       
   871 //!							
       
   872 //!							SrcAddr		 = 16K;
       
   873 //!							desAddr		 = 2MB;
       
   874 //!							transferSize = 1MB;
       
   875 //!							iFlags		 = KDmaMemAddr;
       
   876 //!
       
   877 //!						2.	Setup expected result.
       
   878 //!						3.	Create single transfer test and run test
       
   879 //!
       
   880 //! TestExpectedResults 
       
   881 //!
       
   882 //!						1.  TransfeArgs set up in DMA framework
       
   883 //!						2.	Expected results set up in DMA framework			
       
   884 //!						3.	Fragment request completes and KErrNone returned
       
   885 //!
       
   886 //! TestPriority        High
       
   887 //! TestStatus          Implemented
       
   888 //----------------------------------------------------------------------------------------------
       
   889 namespace Fragment_4
       
   890 	{
       
   891 	const TInt srcAddr		= 16 * KKilo;
       
   892 	const TInt desAddr		= 2 * KMega;	
       
   893 	const TInt transferSize = 1 * KMega;
       
   894 
       
   895 	TDmaTransferArgs transferArgs(srcAddr, desAddr, transferSize, KDmaMemAddr);
       
   896 	const TRequestResults requestResult(KErrNone); 
       
   897 	const TResultSet expectedResults(KErrNone, requestResult, KErrNone, threadCallback);
       
   898 
       
   899 	CMultiVersionTest multiVersion(new (ELeave) CSingleTransferTest(_L("Fragment - Scenario 5"), 1, transferArgs, expectedResults));
       
   900 
       
   901 	TTestCase testCase(&multiVersion, EFalse);
       
   902 	TTestCase testCaseConcurrent(&multiVersion, ETrue);
       
   903 	}
       
   904 
       
   905 //----------------------------------------------------------------------------------------------
       
   906 //! TestCaseID      KBASE-DMA-2560
       
   907 //! TestCaseID      KBASE-DMA-2561
       
   908 //! TestType        CIT
       
   909 //! PREQ            REQ
       
   910 //! TestCaseDesc    Test new & old style fragment using CSingleTransferTest
       
   911 //!						Test Scenario 6 -  TransferSize=3MB   
       
   912 //!
       
   913 //!						1.	Set up the arguments for aTransfeArgs using the settings below.
       
   914 //!							
       
   915 //!							SrcAddr		 = 16K;
       
   916 //!							desAddr		 = 4MB;
       
   917 //!							transferSize = 3MB 	
       
   918 //!							iFlags		 = KDmaMemAddr;
       
   919 //!
       
   920 //!						2.	Setup expected result.
       
   921 //!						3.	Create single transfer test and run test
       
   922 //!
       
   923 //! TestExpectedResults 
       
   924 //!
       
   925 //!						1.  TransfeArgs set up in DMA framework
       
   926 //!						2.	Expected results set up in DMA framework			
       
   927 //!						3.	Fragment request completes and KErrNone returned
       
   928 //!
       
   929 //! TestPriority        High
       
   930 //! TestStatus          Implemented
       
   931 //----------------------------------------------------------------------------------------------
       
   932 namespace Fragment_5
       
   933 	{
       
   934 	const TInt srcAddr = 16 * KKilo;
       
   935 	const TInt desAddr = 4 * KMega;
       
   936 	const TInt transferSize = 3 * KMega;
       
   937 
       
   938 	TDmaTransferArgs transferArgs(srcAddr, desAddr, transferSize, KDmaMemAddr);
       
   939 	const TRequestResults requestResult(KErrNone);
       
   940 	const TResultSet expectedResults(KErrNone, requestResult, KErrNone, threadCallback);
       
   941 
       
   942 	CMultiVersionTest multiVersion(new (ELeave) CSingleTransferTest(_L("Fragment - Scenario 6"), 1, transferArgs, expectedResults));
       
   943 
       
   944 	TTestCase testCase(&multiVersion, EFalse);
       
   945 	TTestCase testCaseConcurrent(&multiVersion, ETrue);
       
   946 	}
       
   947 
       
   948 
       
   949 //----------------------------------------------------------------------------------------------
       
   950 //! TestCaseID      KBASE-DMA-2562
       
   951 //! TestCaseID      KBASE-DMA-2563
       
   952 //! TestType        CIT
       
   953 //! PREQ            REQ
       
   954 //! TestCaseDesc    Test new and old style DDmaRequest using CSingleTransferTest
       
   955 //!						Test Scenario 1 -  aMaxTransferSize=0
       
   956 //!
       
   957 //!						1.	Set up the DDmaRequest using  aMaxTransferSize set to 0.
       
   958 //!						2.	Setup expected result.
       
   959 //!						3.	Create single transfer test and run test
       
   960 //!
       
   961 //! TestExpectedResults
       
   962 //!
       
   963 //!						1.  TransfeArgs set up in DMA framework
       
   964 //!						2.	Expected results set up in DMA framework
       
   965 //!						3.	DDmaRequest constructor behaves as expected and KErrArgument returned
       
   966 //!
       
   967 //! TestPriority        High
       
   968 //! TestStatus          Implemented
       
   969 //------------------------------------------------------------------------------------------------
       
   970 namespace DDmaRequest_1
       
   971 	{
       
   972 	const TInt desAddr = 4 * KKilo;
       
   973 	const TInt transferSize = 4 * KKilo;
       
   974 	TDmaTransferArgs transferArgs(0, desAddr, transferSize, KDmaMemAddr);
       
   975 
       
   976 	const TRequestResults requestResult(KErrNone, 0);
       
   977 	const TResultSet expectedResults(KErrNone, requestResult, KErrNone, threadCallback);
       
   978 
       
   979 	CMultiVersionTest multiVersion(new (ELeave) CSingleTransferTest(_L("DDmaRequest - Scenario 1"), 1, transferArgs, expectedResults,0));
       
   980 
       
   981 	TTestCase testCase(&multiVersion, EFalse);
       
   982 	TTestCase testCaseConcurrent(&multiVersion, ETrue);
       
   983 	}
       
   984 
       
   985 //!-------------------------------------------------------------------------------------------------
       
   986 //! TestCaseID      KBASE-DMA-2562
       
   987 //! TestCaseID      KBASE-DMA-2563
       
   988 //! TestType        CIT
       
   989 //! PREQ            REQ
       
   990 //! TestCaseDesc    Test new and old style DDmaRequest using CSingleTransferTest
       
   991 //!						Test Scenario 2 -  aMaxTransferSize= (64K - 1)   // 65535
       
   992 //!
       
   993 //!						1.	Set up the arguments for DDmaRequest using aMaxTransferSize set to (64K - 1).
       
   994 //!						2.	Setup expected result.
       
   995 //!						3.	Create single transfer test and run test
       
   996 //!
       
   997 //! TestExpectedResults
       
   998 //!
       
   999 //!						1.  TransfeArgs set up in DMA framework
       
  1000 //!						2.	Expected results set up in DMA framework
       
  1001 //!						3.	DDmaRequest constructor behaves as expected and KErrArgument returned
       
  1002 //!
       
  1003 //! TestPriority        High
       
  1004 //! TestStatus          Implemented
       
  1005 //---------------------------------------------------------------------------------------------------
       
  1006 namespace DDmaRequest_2
       
  1007 	{
       
  1008 	const TInt desAddr = 4 * KKilo;
       
  1009 	const TInt transferSize = 4 * KKilo;
       
  1010 	TDmaTransferArgs transferArgs(0, desAddr, transferSize, KDmaMemAddr);
       
  1011 
       
  1012 	const TRequestResults requestResult(KErrNone, 1);
       
  1013 	const TResultSet expectedResults(KErrNone, requestResult, KErrNone, threadCallback);
       
  1014 
       
  1015 	CMultiVersionTest multiVersion(new (ELeave) CSingleTransferTest(_L("DDmaRequest - Scenario 2"), 1, transferArgs, expectedResults, trans64K_1));
       
  1016 
       
  1017 	TTestCase testCase(&multiVersion, EFalse);
       
  1018 	TTestCase testCaseConcurrent(&multiVersion, ETrue);
       
  1019 	}
       
  1020 
       
  1021 //----------------------------------------------------------------------------------------------
       
  1022 //! TestCaseID      KBASE-DMA-2585
       
  1023 //! TestType        CIT
       
  1024 //! PREQ            REQ
       
  1025 //! TestCaseDesc    SmallFrags: This test provokes the failure seen in DEF140598
       
  1026 //!						The test checks that requests with small fragments
       
  1027 //!						do not trigger a spurious missed interrupt clean up
       
  1028 //!
       
  1029 //! TestActions     
       
  1030 //!						1.	Open a DMA channel for a transfer.
       
  1031 //!						2.	Create single transfer test using small frags and run test
       
  1032 //!
       
  1033 //! TestExpectedResults 
       
  1034 //!						1.  DMA channel opens and KErrNone returned.
       
  1035 //!						2.	DMA transfer completes with no errors.
       
  1036 //!
       
  1037 //! TestPriority        High
       
  1038 //! TestStatus          Implemented
       
  1039 //----------------------------------------------------------------------------------------------
       
  1040 namespace SmallFrags
       
  1041 	{
       
  1042 	const TInt size = 32;
       
  1043 	TDmaTransferArgs transferArgs(0, size, size, KDmaMemAddr);
       
  1044 
       
  1045 	const TResultSet expectedResults(threadCallback);
       
  1046 
       
  1047 	TTestCase testCase(
       
  1048 			new (ELeave) CMultiVersionTest(new (ELeave) CSingleTransferTest(_L("8 * 4byte frags"), 10, transferArgs, expectedResults, 4)),
       
  1049 			EFalse);
       
  1050 	}
       
  1051 
       
  1052 //----------------------------------------------------------------------------------------------
       
  1053 //! TestCaseID      KBASE-DMA-2568
       
  1054 //! TestType        CIT
       
  1055 //! PREQ            REQ
       
  1056 //! TestCaseDesc    This test checks the correct behaviour of Close API in the new DMA framework
       
  1057 //!
       
  1058 //! TestActions     
       
  1059 //!						1.  Open a DMA channel
       
  1060 //!						2.	Open DMA Channel again
       
  1061 //!						3	Close the DMA channel.
       
  1062 //!						4	Open DMA channel to verify that the DMA channel closed.						
       
  1063 //!
       
  1064 //! TestExpectedResults 
       
  1065 //!						1.  DMA channel opens and KErrNone returned.
       
  1066 //!						2.	DMA Framework returns KErrInUse as channel is already open.					
       
  1067 //!						3.	DMA channel closes and KErrNone returned.
       
  1068 //!						4.	DMA channel opens and KErrNone returned.						
       
  1069 //!							
       
  1070 //!
       
  1071 //! TestPriority        High
       
  1072 //! TestStatus          Implemented
       
  1073 //----------------------------------------------------------------------------------------------
       
  1074 namespace CloseApiTest
       
  1075 	{
       
  1076 	COpenCloseTest testCloseApi = COpenCloseTest(_L("Close API Test"), 1).RunOpenApiTest(EFalse); 
       
  1077 	TTestCase testCaseCloseApi(&testCloseApi, EFalse, capAboveV1);
       
  1078 	}
       
  1079 
       
  1080 //----------------------------------------------------------------------------------------------
       
  1081 //! TestCaseID      KBASE-DMA-2564
       
  1082 //! TestType        CIT
       
  1083 //! PREQ            REQ
       
  1084 //! TestCaseDesc    This test checks the correct behaviour of Open API in the new DMA framework
       
  1085 //!
       
  1086 //! TestActions     
       
  1087 //!						1.  Open a DMA channel
       
  1088 //!						2.	Verify that channel is really open by closing DMA channel
       
  1089 //!
       
  1090 //! TestExpectedResults 
       
  1091 //!						1.  DMA channel opens and KErrNone returned
       
  1092 //!						2.  DMA channel closes again returns KErrNone.
       
  1093 //!
       
  1094 //! TestPriority        High
       
  1095 //! TestStatus          Implemented
       
  1096 //----------------------------------------------------------------------------------------------
       
  1097 namespace OpenApiTest
       
  1098 	{
       
  1099 	COpenCloseTest testOpenApi = COpenCloseTest(_L("Open API Test"), 1).RunOpenApiTest(ETrue); 
       
  1100 	TTestCase testCaseOpenApi(&testOpenApi, EFalse, capAboveV1);
       
  1101 	}
       
  1102 
       
  1103 //----------------------------------------------------------------------------------------------
       
  1104 //! TestCaseID      KBASE-DMA-2567
       
  1105 //! TestType        CIT
       
  1106 //! PREQ            REQ
       
  1107 //! TestCaseDesc    This test verifies the correct behavior of TBool IsQueueEmpty() in the new DMA 
       
  1108 //!					framework and check its return value 
       
  1109 //!
       
  1110 //! TestActions     
       
  1111 //!						1.	Open a single DMA channel for a transfer.
       
  1112 //!						2.	Setup a DMA request and Fragment the request.
       
  1113 //!						3.	Call IsQueueEmpty().
       
  1114 //!						4.	Queue the DMA request.
       
  1115 //!						5.	Call IsQueueEmpty().
       
  1116 //! TestExpectedResults 
       
  1117 //!						1.  DMA channel opens and KErrNone returned.
       
  1118 //!						2.  DMA request created and fragmented and KErrNone returned.
       
  1119 //!						3.  IsQueueEmpty() returns ETrue.
       
  1120 //!						4.  Request queued and KErrNone returned
       
  1121 //!						5.	IsQueueEmpty() returns EFalse.
       
  1122 //!
       
  1123 //! TestPriority        High
       
  1124 //! TestStatus          Implemented
       
  1125 //----------------------------------------------------------------------------------------------
       
  1126 namespace IsQueueEmptyTest
       
  1127 	{
       
  1128 	const TInt size = 2 * KMega;
       
  1129 	const TDmaTransferArgs transferArgArray[] = {
       
  1130 		TDmaTransferArgs(0, size, size, KDmaMemAddr),
       
  1131 		TDmaTransferArgs(2 * size, 3 * size, size, KDmaMemAddr)
       
  1132 	};
       
  1133 
       
  1134 	const TResultSet expected[] =
       
  1135 		{
       
  1136 		TResultSet(),
       
  1137 		TResultSet()
       
  1138 		};
       
  1139 	const TResultSet expectedResults(isrCallback);
       
  1140 
       
  1141 	CIsQueueEmptyTest isQueueEmpty =
       
  1142 		CIsQueueEmptyTest(_L("IsQueueEmptyTest using muliple frags"), 1, transferArgArray, expected, ARRAY_LENGTH(transferArgArray))
       
  1143 			.SetPreTransferTest(&KPreTransferIncrBytes)
       
  1144 			.SetPostTransferTest(&KCompareSrcDst);
       
  1145 
       
  1146 	TTestCase testCase(&isQueueEmpty,EFalse,capAboveV1,pauseRequired_skip);
       
  1147 	}
       
  1148 
       
  1149 //--------------------------------------------------------------------------------------------
       
  1150 //! TestCaseID      KBASE-DMA-2573
       
  1151 //! TestType        CIT
       
  1152 //! PREQ            REQ
       
  1153 //! TestCaseDesc    This test verifies the correct behavior of the DMA Channel Linking API 
       
  1154 //!					in the new DMA framework 
       
  1155 //!
       
  1156 //! TestActions     
       
  1157 //!						1.	Open a DMA channel for a transfer.
       
  1158 //!						2.  Link and Unlink DMA channel.
       
  1159 //!						3.  Close DMA channel.
       
  1160 //!					
       
  1161 //! 
       
  1162 //!	TestExpectedResults 1.  DMA channel opens and KErrNone returned.
       
  1163 //!						2.  KErrNotSupported returned when DMA Linking and Unlinking API are called.
       
  1164 //!						3.	DMA channel closes and KErrNone returned.
       
  1165 //!
       
  1166 //! TestPriority        High
       
  1167 //! TestStatus          Implemented
       
  1168 //----------------------------------------------------------------------------------------------
       
  1169 namespace ChannelLinkingTest
       
  1170 	{
       
  1171 	const TInt srcAddr		= 0;
       
  1172 	const TInt desAddr		= 2 * KMega;	
       
  1173 	const TInt transferSize = 1 * KMega;	
       
  1174 
       
  1175 	TDmaTransferArgs transferArgs(srcAddr, desAddr, transferSize, KDmaMemAddr);	
       
  1176 
       
  1177 	TResultSet noTransferExpected = TResultSet().
       
  1178 		RequestResult(TRequestResults().CreationResult(KErrUnknown).FragmentationResult(KErrUnknown).QueueResult(KErrUnknown)).
       
  1179 		CallbackRecord(TCallbackRecord::Empty()).
       
  1180 		PostTransferResult(KErrUnknown);
       
  1181 
       
  1182 	CLinkChannelTest testChannelLinking = CLinkChannelTest(_L("DMA Channel Linking and Unlinking Negative Test"), 1, transferArgs, noTransferExpected); 
       
  1183 	TTestCase testCaseChannelLinking(&testChannelLinking , EFalse, capAboveV1,LinkingNotWanted);	
       
  1184 	}
       
  1185 
       
  1186 //--------------------------------------------------------------------------------------------
       
  1187 //! TestCaseID      KBASE-DMA-2574
       
  1188 //! TestType        CIT
       
  1189 //! PREQ            REQ
       
  1190 //! TestCaseDesc    This test verifies that the DMA Element Counting APIs can be called. The calls 
       
  1191 //!					to these functions are meant to be used to meet a code coverage requirement.These APIs
       
  1192 //!					are not yet supported so the functionality of the APIs are not currently tested.
       
  1193 //!
       
  1194 //! TestActions     
       
  1195 //!						1.	Open a DMA channel for a transfer.
       
  1196 //!						2.  Make calls to Element Counting APIs
       
  1197 //!						3.  Close DMA channel.
       
  1198 //!					
       
  1199 //! 
       
  1200 //!	TestExpectedResults 1.  DMA channel opens and KErrNone returned.
       
  1201 //!						2.  Element Counting APIs are called without crashing the framework
       
  1202 //!						3.	DMA channel closes and KErrNone returned.
       
  1203 //!
       
  1204 //! TestPriority        High
       
  1205 //! TestStatus          Implemented
       
  1206 //----------------------------------------------------------------------------------------------
       
  1207 namespace ElementCountingTest
       
  1208 	{
       
  1209 	const TInt srcAddr		= 0;
       
  1210 	const TInt desAddr		= 2 * KMega;	
       
  1211 	const TInt transferSize = 1 * KMega;	
       
  1212 
       
  1213 	TDmaTransferArgs transferArgs(srcAddr, desAddr, transferSize, KDmaMemAddr);	
       
  1214 
       
  1215 	const TResultSet expectedResults(threadCallback);
       
  1216 	CElementCountingTest testElementCounting(_L("DMA Element Counting Test"), 1, transferArgs, expectedResults);
       
  1217 	TTestCase testCaseElementCounting(&testElementCounting, EFalse, capAboveV1);
       
  1218 	}
       
  1219 
       
  1220 static TTestCase* StaticSimpleTestArray[] = {
       
  1221 	&Simple_1::testCase,
       
  1222 	&Simple_1::testCaseConcurrent,
       
  1223 };
       
  1224 
       
  1225 static TTestCase* StaticCallbackTestArray[] = {
       
  1226 	&Callback::testCase,
       
  1227 	&Callback::testCaseOldRequest,	
       
  1228 };
       
  1229 
       
  1230 static TTestCase* StaticIsrRequeTestArray[] = {
       
  1231 	&ISR_Reque::endOnRedo::testCase,
       
  1232 	&ISR_Reque::endOnIsrCb::testCase,
       
  1233 	&ISR_Reque::endOnThreadCb::testCase,
       
  1234 	&ISR_Reque::changeSize::testCase,
       
  1235 #ifdef _DEBUG
       
  1236 	&ISR_Reque::invalidAddresses::testCase, // addresses only checked in UDEB
       
  1237 #endif
       
  1238 #ifdef _REMOVEDTEST
       
  1239 	// This test case is currently caught by a FAULT instead of a return code
       
  1240 	// as expected. Currently, the facility to return an error code to the test
       
  1241 	// framework is not yet supported.
       
  1242 	&ISR_Reque::multipleFragments::testCase, 
       
  1243 #endif
       
  1244 };
       
  1245 
       
  1246 static TTestCase* StaticMultipartTestArray[] = {
       
  1247 	&Multipart::testCase,
       
  1248 };
       
  1249 
       
  1250 static TTestCase* StaticIsrAndDfcTestArray[] = {
       
  1251 	&IsrAndDfc::DfcBeforeIsr::testCase,
       
  1252 	&IsrAndDfc::IsrBeforeDfc::testCase,
       
  1253 };
       
  1254 
       
  1255 static TTestCase* Static2DTestArray[] = {
       
  1256 	&_2D_Test::testCase2d
       
  1257 };
       
  1258 
       
  1259 static TTestCase* StaticFragmentTestArray[] = {
       
  1260 	&FragmentationCount::testCase,
       
  1261 	&FragmentationCount::testCase2,
       
  1262 	&SmallFrags::testCase,
       
  1263 	&Fragment_1::testCase,
       
  1264 	&Fragment_1::testCaseConcurrent,
       
  1265 	&Fragment_2::testCase,
       
  1266 	&Fragment_2::testCaseConcurrent,
       
  1267 	&Fragment_3::testCase,
       
  1268 	&Fragment_3::testCaseConcurrent,
       
  1269 	&Fragment_4::testCase,
       
  1270 	&Fragment_4::testCaseConcurrent,
       
  1271 	&Fragment_5::testCase,
       
  1272 	&Fragment_5::testCaseConcurrent,
       
  1273 };
       
  1274 
       
  1275 static TTestCase* StaticBenchmarkTestArray[] = {
       
  1276 	// Benchmarks are only really meaningful
       
  1277 	// on UREL builds
       
  1278 	&Benchmark::Frag::testCase_256K,
       
  1279 	&Benchmark::Frag::testCase_8K,
       
  1280 	&Benchmark::Transfer::_128K::testCase_128,
       
  1281 	&Benchmark::Transfer::_128K::testCase_16,
       
  1282 	&Benchmark::Transfer::_128K::testCase_4,
       
  1283 	&Benchmark::Transfer::_128K::testCase_1,
       
  1284 	&Benchmark::Transfer::_4Bytes::testCase,
       
  1285 	&Benchmark::Transfer::_4MB::testCase,
       
  1286 	&Benchmark::CompareIsrDfcCb::Dfc::_4Bytes::testCase,
       
  1287 	&Benchmark::CompareIsrDfcCb::Isr::_4Bytes::testCase,
       
  1288 	&Benchmark::CompareIsrDfcCb::Dfc::_4K::testCase,
       
  1289 	&Benchmark::CompareIsrDfcCb::Isr::_4K::testCase,
       
  1290 };
       
  1291 
       
  1292 static TTestCase* StaticRequestTestArray[] = {
       
  1293 	&DDmaRequest_1::testCase,
       
  1294 	&DDmaRequest_1::testCaseConcurrent,
       
  1295 	&DDmaRequest_2::testCase,
       
  1296 	&DDmaRequest_2::testCaseConcurrent,
       
  1297 };
       
  1298 
       
  1299 static TTestCase* StaticChannelTestArray[] = {
       
  1300 	&CloseApiTest::testCaseCloseApi,
       
  1301 	&OpenApiTest::testCaseOpenApi,
       
  1302 };
       
  1303 
       
  1304 static TTestCase* StaticSuspendTestArray[] = {
       
  1305 	&PauseResumeApiTest::testCasePauseResume,  
       
  1306 	&PauseResumeApiNegTest::testCasePauseResumeNeg,
       
  1307 };
       
  1308 
       
  1309 static TTestCase* StaticQueueTestArray[] = {
       
  1310 	&CancelAllTest::testCase, 
       
  1311 	&IsQueueEmptyTest::testCase,	
       
  1312 };
       
  1313 
       
  1314 //Append new test cases here
       
  1315 static TTestCase* StaticTestArray[] = {
       
  1316 	&Simple_1::testCase,
       
  1317 	&Simple_1::testCaseConcurrent,	
       
  1318 	&Callback::testCase,
       
  1319 	&Callback::testCaseOldRequest,
       
  1320 	&ISR_Reque::endOnRedo::testCase,
       
  1321 	&ISR_Reque::endOnIsrCb::testCase,
       
  1322 	&ISR_Reque::endOnThreadCb::testCase,
       
  1323 	&ISR_Reque::changeSize::testCase,
       
  1324 #ifdef _DEBUG
       
  1325 	&ISR_Reque::invalidAddresses::testCase, // addresses only checked in UDEB
       
  1326 #endif
       
  1327 #ifdef _REMOVEDTEST
       
  1328 	// This test case is currently caught by a FAULT instead of a return code
       
  1329 	// as expected. Currently, the facility to return an error code to the test
       
  1330 	// framework is not yet supported.
       
  1331 	&ISR_Reque::multipleFragments::testCase, 
       
  1332 #endif
       
  1333 	&Multipart::testCase,
       
  1334 	&IsrAndDfc::DfcBeforeIsr::testCase,
       
  1335 	&IsrAndDfc::IsrBeforeDfc::testCase,
       
  1336 	&_2D_Test::testCase2d,
       
  1337 	&FragmentationCount::testCase,
       
  1338 	&FragmentationCount::testCase2,
       
  1339 	&FragmentationCount::testCase3,
       
  1340 	&SmallFrags::testCase,
       
  1341 #ifndef _DEBUG
       
  1342 	// Benchmarks are only really meaningful
       
  1343 	// on UREL builds
       
  1344 	&Benchmark::Frag::testCase_256K,
       
  1345 	&Benchmark::Frag::testCase_8K,
       
  1346 	&Benchmark::Transfer::_128K::testCase_128,
       
  1347 	&Benchmark::Transfer::_128K::testCase_16,
       
  1348 	&Benchmark::Transfer::_128K::testCase_4,
       
  1349 	&Benchmark::Transfer::_128K::testCase_1,
       
  1350 	&Benchmark::Transfer::_4Bytes::testCase,
       
  1351 	&Benchmark::Transfer::_4MB::testCase,
       
  1352 	&Benchmark::CompareIsrDfcCb::Dfc::_4Bytes::testCase,
       
  1353 	&Benchmark::CompareIsrDfcCb::Isr::_4Bytes::testCase,
       
  1354 	&Benchmark::CompareIsrDfcCb::Dfc::_4K::testCase,
       
  1355 	&Benchmark::CompareIsrDfcCb::Isr::_4K::testCase,
       
  1356 #endif
       
  1357 	&Fragment_1::testCase,
       
  1358 	&Fragment_1::testCaseConcurrent,
       
  1359 	&Fragment_2::testCase,
       
  1360 	&Fragment_2::testCaseConcurrent,
       
  1361 	&Fragment_3::testCase,
       
  1362 	&Fragment_3::testCaseConcurrent,
       
  1363 	&Fragment_4::testCase,
       
  1364 	&Fragment_4::testCaseConcurrent,
       
  1365 	&Fragment_5::testCase,
       
  1366 	&Fragment_5::testCaseConcurrent,	
       
  1367 	&DDmaRequest_1::testCase,
       
  1368 	&DDmaRequest_1::testCaseConcurrent,
       
  1369 	&DDmaRequest_2::testCase,
       
  1370 	&DDmaRequest_2::testCaseConcurrent,
       
  1371 	&CloseApiTest::testCaseCloseApi,
       
  1372 	&OpenApiTest::testCaseOpenApi,
       
  1373 	&PauseResumeApiTest::testCasePauseResume,  
       
  1374 	&PauseResumeApiNegTest::testCasePauseResumeNeg,	
       
  1375 	&CancelAllTest::testCase,
       
  1376 	&IsQueueEmptyTest::testCase,
       
  1377 	&ChannelLinkingTest::testCaseChannelLinking,
       
  1378 	&ElementCountingTest::testCaseElementCounting,
       
  1379 };
       
  1380 
       
  1381 RPointerArray<TTestCase> TestArray(StaticTestArray, ARRAY_LENGTH(StaticTestArray));
       
  1382 RPointerArray<TTestCase> TestArrayIsrAndDfc(StaticIsrAndDfcTestArray, ARRAY_LENGTH(StaticIsrAndDfcTestArray));
       
  1383 RPointerArray<TTestCase> TestArraySimple(StaticSimpleTestArray, ARRAY_LENGTH(StaticSimpleTestArray));
       
  1384 RPointerArray<TTestCase> TestArrayQueue(StaticQueueTestArray, ARRAY_LENGTH(StaticQueueTestArray));
       
  1385 RPointerArray<TTestCase> TestArrayChannel(StaticChannelTestArray, ARRAY_LENGTH(StaticChannelTestArray));
       
  1386 RPointerArray<TTestCase> TestArraySuspend(StaticSuspendTestArray, ARRAY_LENGTH(StaticSuspendTestArray));
       
  1387 RPointerArray<TTestCase> TestArrayFragment(StaticFragmentTestArray, ARRAY_LENGTH(StaticFragmentTestArray));
       
  1388 RPointerArray<TTestCase> TestArrayBenchmark(StaticBenchmarkTestArray, ARRAY_LENGTH(StaticBenchmarkTestArray));
       
  1389 RPointerArray<TTestCase> TestArray2DTest(Static2DTestArray, ARRAY_LENGTH(Static2DTestArray));
       
  1390 RPointerArray<TTestCase> TestArrayMultiPart(StaticMultipartTestArray, ARRAY_LENGTH(StaticMultipartTestArray));
       
  1391 RPointerArray<TTestCase> TestArrayIsrReque(StaticIsrRequeTestArray, ARRAY_LENGTH(StaticIsrRequeTestArray));
       
  1392 RPointerArray<TTestCase> TestArrayCallback(StaticCallbackTestArray, ARRAY_LENGTH(StaticCallbackTestArray));
       
  1393 RPointerArray<TTestCase> TestArrayRequest(StaticRequestTestArray, ARRAY_LENGTH(StaticRequestTestArray));