--- a/authorisation/userpromptservice/database/test/tupsdb/source/tupsdbbase.cpp Wed Apr 14 17:48:59 2010 +0300
+++ b/authorisation/userpromptservice/database/test/tupsdb/source/tupsdbbase.cpp Tue Apr 27 18:28:15 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -348,7 +348,7 @@
}
-RPointerArray<CDecisionRecord> CUpsDbBaseStep::GetDecisionsL(CDecisionDbW &aUpsDb, CDecisionFilter &aFilter, TBool aCancel)
+void CUpsDbBaseStep::GetDecisionsL(CDecisionDbW &aUpsDb, CDecisionFilter &aFilter, TBool aCancel, RPointerArray<CDecisionRecord>& aRecordList)
/**
Get a set of decision records from the database. Uses multiple records lookup method (RDbView).
Prints the consumed time to perform this operation.
@@ -363,7 +363,6 @@
dbView->EvaluateView(iWaiter->iStatus);
TInt num = 0;
- RPointerArray<CDecisionRecord> recordList;
if(aCancel)
{
dbView->Cancel();
@@ -371,18 +370,16 @@
}
else
{
- iWaiter->WaitActiveL(KErrNone);
- CleanupClosePushL(recordList);
+ iWaiter->WaitActiveL(KErrNone);
CDecisionRecord *record = NULL;
while((record = dbView->NextDecisionL()) != NULL)
{
CleanupStack::PushL(record);
num++;
- recordList.AppendL(record);
+ aRecordList.AppendL(record);
CleanupStack::Pop(record);
}
- CleanupStack::Pop(&recordList);
}
//Timer is stopped
@@ -391,8 +388,6 @@
INFO_PRINTF3(_L("%d records retrieved in %Ld microseconds."), num, elapsedTime);
CleanupStack::PopAndDestroy(dbView);
-
- return recordList;
}
@@ -555,7 +550,7 @@
CDecisionRecord *record = NULL;
CDecisionFilter *filter = NULL;
- RPointerArray<CDecisionRecord> recordList;
+ RPointerArray<CDecisionRecord> recordList;
TBuf8<KUpsMaxFingerprintLength> bufFp;
TBuf8<KUpsMaxClientEntityLength> bufCe;
TBuf<KUpsDescriptionLength> bufDes;
@@ -572,16 +567,16 @@
InsertRecordL(aUpsDb,*record);
filter = CreateFilterLC(flag,clientId,evaluatorId,serviceId,serverId,bufFp,bufCe,policyVersion,recordId,bufDes,result,evaluatorInfo,EEqual);
- recordList = GetDecisionsL(aUpsDb,*filter,EFalse);
+ CleanupResetAndDestroyPushL(recordList);
+ GetDecisionsL(aUpsDb, *filter, EFalse, recordList);
if(recordList.Count() != 1)
{
SetTestStepResult(EFail);
+ CleanupStack::PopAndDestroy(3,record);
break;
}
- recordList.Close();
- CleanupStack::PopAndDestroy(2,record);
- }
-
+ CleanupStack::PopAndDestroy(3,record);
+ }
}
--- a/authorisation/userpromptservice/database/test/tupsdb/source/tupsdbperformance.cpp Wed Apr 14 17:48:59 2010 +0300
+++ b/authorisation/userpromptservice/database/test/tupsdb/source/tupsdbperformance.cpp Tue Apr 27 18:28:15 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -107,40 +107,41 @@
filter->SetClientSid(clientId,EEqual);
INFO_PRINTF2(_L("Lookup for ClientSid=%d"),clientId.iUid);
-
- RPointerArray<CDecisionRecord> recordList = GetDecisionsL(*decisionDb,*filter,EFalse);
- recordList.Reset();
- CleanupStack::PopAndDestroy(filter);
+ RPointerArray<CDecisionRecord> recordList;
+ CleanupResetAndDestroyPushL(recordList);
+
+ GetDecisionsL(*decisionDb, *filter, EFalse, recordList);
+ CleanupStack::PopAndDestroy(2, filter);
//Get a set of decision records with EvaluatorId
TUid evaluatorId = TUid::Uid(iRetrieveNum%iEvaluatorNum + 1000000 + iRecordNum);
filter = CDecisionFilter::NewLC();
filter->SetEvaluatorId(evaluatorId,EEqual);
-
+ CleanupResetAndDestroyPushL(recordList);
INFO_PRINTF2(_L("Lookup for EvaluatorId=%d"),evaluatorId.iUid);
- GetDecisionsL(*decisionDb,*filter,EFalse);
- CleanupStack::PopAndDestroy(filter);
+ GetDecisionsL(*decisionDb, *filter, EFalse, recordList);
+ CleanupStack::PopAndDestroy(2, filter);
//Get a set of decision records with ServiceId
TUid serviceId = TUid::Uid(iRetrieveNum%iServiceNum + 10000 + iRecordNum);
filter = CDecisionFilter::NewLC();
filter->SetServiceId(serviceId,EEqual);
-
+ CleanupResetAndDestroyPushL(recordList);
INFO_PRINTF2(_L("Lookup for ServiceId=%d"),serviceId.iUid);
- GetDecisionsL(*decisionDb,*filter,EFalse);
- CleanupStack::PopAndDestroy(filter);
+ GetDecisionsL(*decisionDb, *filter, EFalse, recordList);
+ CleanupStack::PopAndDestroy(2, filter);
//Get a set of decision records with ServerSid
TUid serverId = TUid::Uid(iRetrieveNum%iServerNum + 100000 + iRecordNum);
filter = CDecisionFilter::NewLC();
filter->SetServerSid(serverId,EEqual);
-
+ CleanupResetAndDestroyPushL(recordList);
INFO_PRINTF2(_L("Lookup for ServerSid=%d"),serverId.iUid);
- GetDecisionsL(*decisionDb,*filter,EFalse);
- CleanupStack::PopAndDestroy(filter);
+ GetDecisionsL(*decisionDb, *filter, EFalse, recordList);
+ CleanupStack::PopAndDestroy(2, filter);
//Lookup for Fingerprint
TBuf8<KDbMaxName>bufFP;
@@ -151,11 +152,11 @@
filter = CDecisionFilter::NewLC();
filter->SetFingerprintL(md5FP->Hash(bufFP),EEqual);
-
+ CleanupResetAndDestroyPushL(recordList);
INFO_PRINTF1(_L("Lookup for a Fingerprint"));
- GetDecisionsL(*decisionDb,*filter,EFalse);
- CleanupStack::PopAndDestroy(filter);
+ GetDecisionsL(*decisionDb, *filter, EFalse, recordList);
+ CleanupStack::PopAndDestroy(2, filter);
//Lookup for ClientEntity
TBuf8<KDbMaxName>bufCE;
@@ -166,11 +167,11 @@
filter = CDecisionFilter::NewLC();
filter->SetClientEntityL(md5CE->Hash(bufCE),EEqual);
-
+ CleanupResetAndDestroyPushL(recordList);
INFO_PRINTF1(_L("Lookup for a ClientEntity"));
- GetDecisionsL(*decisionDb,*filter,EFalse);
- CleanupStack::PopAndDestroy(filter);
+ GetDecisionsL(*decisionDb, *filter, EFalse, recordList);
+ CleanupStack::PopAndDestroy(2, filter);
//Get a single record
md5FP->Reset();
--- a/authorisation/userpromptservice/database/test/tupsdb/source/tupsdbstep.cpp Wed Apr 14 17:48:59 2010 +0300
+++ b/authorisation/userpromptservice/database/test/tupsdb/source/tupsdbstep.cpp Tue Apr 27 18:28:15 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -25,6 +25,7 @@
#include "tupsdbstep.h"
#include <test/testexecutelog.h>
+
using namespace UserPromptService;
@@ -449,23 +450,23 @@
upsDb = CDecisionDbW::NewL(iDbLocation,iFs);
CleanupStack::PushL(upsDb);
- RPointerArray<CDecisionRecord> recordList = GetDecisionsL(*upsDb,*filter,iCancel);
+ RPointerArray<CDecisionRecord> recordList;
+ CleanupResetAndDestroyPushL(recordList);
+ GetDecisionsL(*upsDb, *filter, iCancel, recordList);
TInt recNum;
recNum = recordList.Count();
if(recNum)
- {
- CleanupClosePushL(recordList);
+ {
OpenDecisionFileL(EFileWrite);
for(TInt i=0; i<recNum; ++i)
{
WriteDecisionL(*recordList[i]);
}
- CloseDecisionFile();
- CleanupStack::Pop(&recordList);
+ CloseDecisionFile();
}
- recordList.Close();
+ CleanupStack::PopAndDestroy(&recordList);
TInt expectedRecords;
if(EFalse == GetIntFromConfig(ConfigSection(),KExpectedRecords,expectedRecords))
--- a/authorisation/userpromptservice/database/test/tupsdb/source/tupsdbstep.h Wed Apr 14 17:48:59 2010 +0300
+++ b/authorisation/userpromptservice/database/test/tupsdb/source/tupsdbstep.h Tue Apr 27 18:28:15 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -32,6 +32,7 @@
#include <test/tefunit.h>
#include <hash.h>
#include "upscommon.h"
+#include <scs/cleanuputils.h>
using namespace UserPromptService;
@@ -113,7 +114,7 @@
CDecisionRecord *GetDecisionLC(CDecisionDbW &aUpsDb, CDecisionFilter &aFilter);
//Get a set of decision records from the database
- RPointerArray<CDecisionRecord> GetDecisionsL(CDecisionDbW &aUpsDb, CDecisionFilter &aFilter, TBool aCancel);
+ void GetDecisionsL(CDecisionDbW &aUpsDb, CDecisionFilter &aFilter, TBool aCancel, RPointerArray<CDecisionRecord>& aRecordList);
//Delete a set of records
void RemoveDecisionsL(CDecisionDbW &aUpsDb, CDecisionFilter &aFilter);
--- a/cryptomgmtlibs/securitytestfw/test/autotesting/hosts Wed Apr 14 17:48:59 2010 +0300
+++ b/cryptomgmtlibs/securitytestfw/test/autotesting/hosts Tue Apr 27 18:28:15 2010 +0300
@@ -1,2 +1,2 @@
-10.253.27.175 cam-ocsptest01.intra
-10.253.27.175 cam-OCSPTEST01.prod.ad.symbian.intra
+10.225.90.30 cam-ocsptest01.intra
+10.225.90.30 cam-OCSPTEST01.prod.ad.symbian.intra