telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/src/te_spudNetworkSideSteps.cpp
changeset 49 f50f4094acd7
parent 48 14460bf2a402
equal deleted inserted replaced
48:14460bf2a402 49:f50f4094acd7
    78 	return EPass;
    78 	return EPass;
    79 	}
    79 	}
    80 
    80 
    81 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
    81 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
    82 TVerdict CSpudNetSideTestBase::doTestStepPostambleL()
    82 TVerdict CSpudNetSideTestBase::doTestStepPostambleL()
    83 	{	
    83 	{
    84 	ClearPolicySelector2QosParametersTableL();
    84 	ClearPolicySelector2QosParametersTableL();
    85 	return TestStepResult();
    85 	return TestStepResult();
    86 	}
    86 	}
    87 #endif
    87 #endif
    88 
    88 
    95 		RProperty::Define(KUidPSCsyWriteResultCategory, aPortNum, KUidPSCsyWriteResultCategoryKeyType);
    95 		RProperty::Define(KUidPSCsyWriteResultCategory, aPortNum, KUidPSCsyWriteResultCategoryKeyType);
    96 		}
    96 		}
    97 	TestL(RProperty::Set(KUidPSCsyWriteResultCategory, aPortNum, aErrorCode), _L("Set PSCsy write result"));
    97 	TestL(RProperty::Set(KUidPSCsyWriteResultCategory, aPortNum, aErrorCode), _L("Set PSCsy write result"));
    98   	INFO_PRINTF3(_L("Next write on [PKTLOOPBACK::%d] is going to fail with [%d]"), aPortNum, aErrorCode);
    98   	INFO_PRINTF3(_L("Next write on [PKTLOOPBACK::%d] is going to fail with [%d]"), aPortNum, aErrorCode);
    99   	}
    99   	}
   100 	
   100 
       
   101 void CSpudNetSideTestBase::ClearNextPktLoopbackCsyWriteL(TInt aPortNum)
       
   102     {
       
   103     TInt dummy(0);
       
   104     TInt ret = RProperty::Get(KUidPSCsyWriteResultCategory, aPortNum, dummy);
       
   105     if(ret != KErrNotFound)
       
   106         {
       
   107         RProperty::Set(KUidPSCsyWriteResultCategory, aPortNum, KErrNone);
       
   108         }
       
   109     INFO_PRINTF2(_L("Reset to KErrNone for the next write on [PKTLOOPBACK::%d] port"), aPortNum);
       
   110     }
       
   111 
   101 /**
   112 /**
   102 Blocks until Nifman progress notification is received.
   113 Blocks until Nifman progress notification is received.
   103 
   114 
   104 
   115 
   105 @param aReqStatus Request status to wait on for the notification
   116 @param aReqStatus Request status to wait on for the notification
  1634 	// We don't bother listening for QoS failure in this particular test.
  1645 	// We don't bother listening for QoS failure in this particular test.
  1635 	StopInterfaceL();
  1646 	StopInterfaceL();
  1636 	
  1647 	
  1637 	StopSecondaryL();
  1648 	StopSecondaryL();
  1638 	
  1649 	
       
  1650 	ClearNextPktLoopbackCsyWriteL(loopbackPort);
  1639 	return EPass;
  1651 	return EPass;
  1640 	}
  1652 	}
  1641 
  1653 
  1642 /**
  1654 /**
  1643 Test RConnection:Stop on Spud, when the secondary PDP context is being deleted by GUQoS due to idle timeout.
  1655 Test RConnection:Stop on Spud, when the secondary PDP context is being deleted by GUQoS due to idle timeout.
  1717 	// Now the lower NIF has fired LinkLayerDown, and the primary context is being deleted.
  1729 	// Now the lower NIF has fired LinkLayerDown, and the primary context is being deleted.
  1718 	// Sim TSY delays the completion of the deletion request. 
  1730 	// Sim TSY delays the completion of the deletion request. 
  1719 	// In the meanwhile, we sneak in and stop the interface.
  1731 	// In the meanwhile, we sneak in and stop the interface.
  1720 	
  1732 	
  1721 	StopInterfaceL();
  1733 	StopInterfaceL();
       
  1734 	ClearNextPktLoopbackCsyWriteL(loopbackPort);
  1722 	return EPass;	
  1735 	return EPass;	
  1723 	};
  1736 	};
  1724 
  1737 
  1725 /**
  1738 /**
  1726 Test RConnection:Stop on Spud, when only the primary PDP context exists and is active (i.e. no secondaries)
  1739 Test RConnection:Stop on Spud, when only the primary PDP context exists and is active (i.e. no secondaries)
  1979 	TInt oppositeSecondaryIapId;
  1992 	TInt oppositeSecondaryIapId;
  1980 	TestBooleanTrueL(GetIntFromConfig(ConfigSection(), _L("IapId"), oppositeSecondaryIapId), _L("Get Iap ID for the rawipnif instance opposite the secondary context"));
  1993 	TestBooleanTrueL(GetIntFromConfig(ConfigSection(), _L("IapId"), oppositeSecondaryIapId), _L("Get Iap ID for the rawipnif instance opposite the secondary context"));
  1981 
  1994 
  1982 	// start rawipnif instance opposite the SPUD's secondary context, and open a socket on it
  1995 	// start rawipnif instance opposite the SPUD's secondary context, and open a socket on it
  1983 	CConnectionStart *secondaryIfStart = CConnectionStart::NewLC(iEsock, *this, oppositeSecondaryIapId);
  1996 	CConnectionStart *secondaryIfStart = CConnectionStart::NewLC(iEsock, *this, oppositeSecondaryIapId);
       
  1997 
       
  1998     TRequestStatus progressReqSt;   
       
  1999     
       
  2000 	secondaryIfStart->iInterface.ProgressNotification(iProgressBuf, progressReqSt, 7000);
       
  2001 	WaitForProgressNotificationL(progressReqSt, 7000, 0); // We can wait here forever. Set timeout on test step.
       
  2002 
  1984 #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
  2003 #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
  1985 	WaitForQoSEventL(_L("SecondaryActivationEvent2"), _L("SecondaryActivationEvent2Reason"));
  2004 	WaitForQoSEventL(_L("SecondaryActivationEvent2"), _L("SecondaryActivationEvent2Reason"));
  1986 #else
  2005 #else
  1987 	User::After(KTimeToStartSecondary);
  2006 	User::After(KTimeToStartSecondary);
  1988 	VerifySubconnectionCountL(_L("SubConnectionCount2"), defaultIapID);
  2007 	VerifySubconnectionCountL(_L("SubConnectionCount2"), defaultIapID);
  2243         
  2262         
  2244     	INFO_PRINTF2(_L("Test starting Interface IAP ID == %d"), primaryIapId);	
  2263     	INFO_PRINTF2(_L("Test starting Interface IAP ID == %d"), primaryIapId);	
  2245     	
  2264     	
  2246     	TestL(p->Open(iEsock), _L("RConnection::Open the interface"));
  2265     	TestL(p->Open(iEsock), _L("RConnection::Open the interface"));
  2247     	TestL(p->Start(iap1prefs),primaryCreationErr, _L("RConnection::Start the interface"));
  2266     	TestL(p->Start(iap1prefs),primaryCreationErr, _L("RConnection::Start the interface"));
       
  2267 	    }
       
  2268 
       
  2269 	//check if all contexts are still there
       
  2270 	for (TInt i = 0; i < maximumConnections; i++)
       
  2271 	    {
       
  2272         TBuf<32> primaryIap;
       
  2273         primaryIap.Format(KPrimaryIapFormatLit, i + 1);
       
  2274     	if (!GetIntFromConfig(ConfigSection(), primaryIap, primaryIapId))
       
  2275     		{
       
  2276     		User::Leave(KErrNotFound);
       
  2277     		}
       
  2278 		INFO_PRINTF2(_L("Verify context #%d is still there"), i);
       
  2279 		VerifySubconnectionCountL(2, primaryIapId);
       
  2280 		INFO_PRINTF2(_L("Context #%d is still there"), i);
  2248 	    }
  2281 	    }
  2249 
  2282 
  2250 	
  2283 	
  2251 	for (TInt i = (interfaces.Count() - 1); i >= 0; i--)
  2284 	for (TInt i = (interfaces.Count() - 1); i >= 0; i--)
  2252 	    {
  2285 	    {