diff -r 9200f38b1324 -r 042fd2753b8f telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/src/te_spudNetworkSideSteps.cpp --- a/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/src/te_spudNetworkSideSteps.cpp Wed Sep 15 13:30:43 2010 +0300 +++ b/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/src/te_spudNetworkSideSteps.cpp Wed Oct 13 15:51:46 2010 +0300 @@ -31,8 +31,6 @@ #include #include #include - -#define SYMBIAN_COMMSFW_MBUF_GOBBLER // include MACRO defined in mbufgobblerproviders.mmp, used to differentiate the MBUFGOBBLER component from the pass through layer which it is based on. #include #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY @@ -100,18 +98,7 @@ TestL(RProperty::Set(KUidPSCsyWriteResultCategory, aPortNum, aErrorCode), _L("Set PSCsy write result")); INFO_PRINTF3(_L("Next write on [PKTLOOPBACK::%d] is going to fail with [%d]"), aPortNum, aErrorCode); } - -void CSpudNetSideTestBase::ClearNextPktLoopbackCsyWriteL(TInt aPortNum) - { - TInt dummy(0); - TInt ret = RProperty::Get(KUidPSCsyWriteResultCategory, aPortNum, dummy); - if(ret != KErrNotFound) - { - RProperty::Set(KUidPSCsyWriteResultCategory, aPortNum, KErrNone); - } - INFO_PRINTF2(_L("Reset to KErrNone for the next write on [PKTLOOPBACK::%d] port"), aPortNum); - } - + /** Blocks until Nifman progress notification is received. @@ -1649,8 +1636,7 @@ StopInterfaceL(); StopSecondaryL(); - - ClearNextPktLoopbackCsyWriteL(loopbackPort); + return EPass; } @@ -1723,7 +1709,7 @@ User::Leave(KErrNotFound); } FailNextPktLoopbackCsyWriteL(loopbackPort, KErrCompletion); - + TRequestStatus sendStatus; iSocket.Send(KCommWriteData, 0, sendStatus); User::WaitForRequest(sendStatus); @@ -1734,8 +1720,6 @@ // In the meanwhile, we sneak in and stop the interface. StopInterfaceL(); - - ClearNextPktLoopbackCsyWriteL(loopbackPort); return EPass; }; @@ -2155,17 +2139,10 @@ CConnectionStart *primaryIfStart = CConnectionStart::NewLC(iEsock, *this, primaryIapId); CConnectionStart *secondaryIfStart = CConnectionStart::NewLC(iEsock, *this, secondaryIapId); - TRequestStatus progressReqSt; - primaryIfStart->iInterface.ProgressNotification(iProgressBuf, progressReqSt, KConnectionUp); - - WaitForProgressNotificationL(progressReqSt, KConnectionUp, 0); // We can wait here forever. Set timeout on test step. - - secondaryIfStart->iInterface.ProgressNotification(iProgressBuf, progressReqSt, KConnectionUp); - WaitForProgressNotificationL(progressReqSt, KConnectionUp, 0); // We can wait here forever. Set timeout on test step. - #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY WaitForQoSEventL(_L("SecondaryActivationEvent2"), _L("SecondaryActivationEvent2Reason")); #else + User::After(2*KTimeToStartSecondary); VerifySubconnectionCountL(_L("SubConnectionCount2"), PDPIAP); #endif @@ -2372,130 +2349,6 @@ return EPass; } -enum TVerdict CRawIpMinMaxMMU::RunTestStepL() - { - //Start 1st context - RConnection* conn1 = new (ELeave) RConnection(); - CleanupClosePushL(*conn1); - - TInt primaryIapId; - if (!GetIntFromConfig(ConfigSection(), _L("PrimaryIapId1"), primaryIapId)) - { - User::Leave(KErrNotFound); - } - - TCommDbConnPref conn1Pref; - conn1Pref.SetIapId(primaryIapId); - - INFO_PRINTF2(_L("Test starting Interface IAP ID == %d"), primaryIapId); - TestL(conn1->Open(iEsock), _L("RConnection::Open the interface")); - TestL(conn1->Start(conn1Pref), _L("RConnection::Start the interface")); - - //Start 2nd context - RConnection* conn2 = new (ELeave) RConnection(); - CleanupClosePushL(*conn2); - - if (!GetIntFromConfig(ConfigSection(), _L("PrimaryIapId2"), primaryIapId)) - { - User::Leave(KErrNotFound); - } - - TCommDbConnPref conn2Pref; - conn2Pref.SetIapId(primaryIapId); - - INFO_PRINTF2(_L("Test starting Interface IAP ID == %d"), primaryIapId); - TestL(conn2->Open(iEsock), _L("RConnection::Open the interface")); - TestL(conn2->Start(conn2Pref), _L("RConnection::Start the interface")); - - //Open & Connect 1st Socket - RSocket sock1; - TestL(sock1.Open(iEsock, KAfInet, KSockDatagram, KProtocolInetUdp, *conn1), _L("RSocket::Open")); - CleanupClosePushL(sock1); - TInetAddr localAddr; - localAddr.SetPort(KConfiguredTftFilter1DestPort); - TestL(sock1.Bind(localAddr), _L("Binding the local Socket")); - - TInetAddr dstAddr; - dstAddr.SetPort(KConfiguredTftFilter1SrcPort); - dstAddr.Input(KConfiguredTftFilter1SrcAddr); - - TRequestStatus status; - sock1.Connect(dstAddr, status); - User::WaitForRequest(status); - TestL(status.Int(), _L("RSocket::Connect status opening 1st socket")); - - //Open & Bind 2nd Socket - RSocket sock2; - TestL(sock2.Open(iEsock, KAfInet, KSockDatagram, KProtocolInetUdp, *conn2), _L("RSocket::Open")); - CleanupClosePushL(sock2); - localAddr.SetPort(KConfiguredTftFilter1SrcPort); - TestL(sock2.Bind(localAddr), _L("Binding the local Socket")); - - //then send & receive data. - const TInt KMaxMMU = 4000; - TBuf8 *sendBuf = new(ELeave) TBuf8(); - CleanupStack::PushL(sendBuf); - - TBuf8 *recvBuf = new(ELeave) TBuf8(); - CleanupStack::PushL(recvBuf); - - TBuf8 *recvBuf2 = new(ELeave) TBuf8(); - CleanupStack::PushL(recvBuf2); - - TInt end; - if (!GetIntFromConfig(ConfigSection(), _L("TestMaxMMU"), end)) - { - User::Leave(KErrNotFound); - } - - TInt begin; - if (!GetIntFromConfig(ConfigSection(), _L("TestMinMMU"), begin)) - { - User::Leave(KErrNotFound); - } - - if (begin > end) - { - User::Leave(KErrArgument); - } - - INFO_PRINTF3(_L("Sending data frame size from (%d) to (%d)"), begin, end); - TRequestStatus readStatus; - - for(TInt j=begin;j<=end;j++) - { - sendBuf->Zero(); - for (TInt i=0;iAppend(Math::Random() & 0x7f); - } - - recvBuf->Zero(); - sock2.Read(*recvBuf, readStatus); - sock1.Write(*sendBuf, status); - - User::WaitForRequest(status); - TESTL(status.Int() == 0); - User::WaitForRequest(readStatus); - TESTL(readStatus.Int() == 0); - if (sendBuf->Length() > recvBuf->Length()) - { - recvBuf2->Zero(); - sock2.Read(*recvBuf2, readStatus); - User::WaitForRequest(readStatus); - TESTL(readStatus.Int() == 0); - recvBuf->Append(*recvBuf2); - TESTL(sendBuf->Length() == recvBuf->Length()); - } - TESTL(recvBuf->Compare(*sendBuf) == 0); - } - - CleanupStack::PopAndDestroy(7); //conn1, conn2, sock1, sock2, sendBuf, recvBuf, recvBuf2 - - return EPass; - } - - enum TVerdict CRawIpMBufExhaustionRx::RunTestStepL() { /*