kerneltest/e32test/dmav2/self_test.cpp
changeset 293 0659d0e1a03c
parent 199 189ece41fa29
equal deleted inserted replaced
291:206a6eaaeb71 293:0659d0e1a03c
    84 
    84 
    85 	test.Printf(_L("using PSL cookie %d (0x%08x)\n"), testChannel, testChannel);
    85 	test.Printf(_L("using PSL cookie %d (0x%08x)\n"), testChannel, testChannel);
    86 	test.Next(_L("Open channel"));
    86 	test.Next(_L("Open channel"));
    87 	TUint channelCookie=0;
    87 	TUint channelCookie=0;
    88 	r = session.ChannelOpen(testChannel, channelCookie);
    88 	r = session.ChannelOpen(testChannel, channelCookie);
    89 	test.Printf(_L("cookie recived = 0x%08x\n"), channelCookie);
    89 	test.Printf(_L("cookie received = 0x%08x\n"), channelCookie);
    90 	test_KErrNone(r);
    90 	test_KErrNone(r);
    91 
    91 
    92 	test.Next(_L("Get Channel caps"));
    92 	test.Next(_L("Get Channel caps"));
    93 	SDmacCaps channelCaps;
    93 	SDmacCaps channelCaps;
    94 	r = session.ChannelCaps(channelCookie, channelCaps);
    94 	r = session.ChannelCaps(channelCookie, channelCaps);
   132 	const TBool newPil = (extChannelCaps.iPILVersion > 1);
   132 	const TBool newPil = (extChannelCaps.iPILVersion > 1);
   133 
   133 
   134 	test.Next(_L("Create Dma request - max fragment size 32K"));
   134 	test.Next(_L("Create Dma request - max fragment size 32K"));
   135 	TUint reqCookie=0;
   135 	TUint reqCookie=0;
   136 	r = session.RequestCreateOld(channelCookie, reqCookie, 32 * KKilo);
   136 	r = session.RequestCreateOld(channelCookie, reqCookie, 32 * KKilo);
   137 	test.Printf(_L("cookie recived = 0x%08x\n"), reqCookie);
   137 	test.Printf(_L("cookie received = 0x%08x\n"), reqCookie);
   138 	test_KErrNone(r);
   138 	test_KErrNone(r);
   139 
   139 
   140 	if(newPil)
   140 	if(newPil)
   141 		{
   141 		{
   142 		test.Next(_L("Create Dma request (with new-style callback)"));
   142 		test.Next(_L("Create Dma request (with new-style callback)"));
   143 		TUint reqCookieNewStyle=0;
   143 		TUint reqCookieNewStyle=0;
   144 		r = session.RequestCreate(channelCookie, reqCookieNewStyle);
   144 		r = session.RequestCreate(channelCookie, reqCookieNewStyle);
   145 		test.Printf(_L("cookie recived = 0x%08x\n"), reqCookieNewStyle );
   145 		test.Printf(_L("cookie received = 0x%08x\n"), reqCookieNewStyle );
   146 		test_KErrNone(r);
   146 		test_KErrNone(r);
   147 
   147 
   148 		if(!aSimulatedDmac)
   148 		if(!aSimulatedDmac)
   149 			{
   149 			{
   150 			test.Next(_L("Fragment for ISR callback"));
   150 			test.Next(_L("Fragment for ISR callback"));
   312 	test.Start(_L("Unit test_Value of TDmaCapability::CompareToDmaCaps\n"));
   312 	test.Start(_L("Unit test_Value of TDmaCapability::CompareToDmaCaps\n"));
   313 // Note: The construction of the test description message
   313 // Note: The construction of the test description message
   314 // is horribly confusing. The _L macro will make the
   314 // is horribly confusing. The _L macro will make the
   315 // *first* string token wide, but not the next two.
   315 // *first* string token wide, but not the next two.
   316 // Therefore these must be made wide or compilier
   316 // Therefore these must be made wide or compilier
   317 // will complain about concatination of narrow and wide string
   317 // will complain about concatenation of narrow and wide string
   318 // literals
   318 // literals
   319 #define CAP_TEST(CAP, CAPSET, EXPCT)\
   319 #define CAP_TEST(CAP, CAPSET, EXPCT)\
   320 	{\
   320 	{\
   321 	test.Next(_L(#CAP L" against " L ## #CAPSET));\
   321 	test.Next(_L(#CAP L" against " L ## #CAPSET));\
   322 	TResult t = (CAP).CompareToDmaCaps(CAPSET);\
   322 	TResult t = (CAP).CompareToDmaCaps(CAPSET);\