diff -r 3eacc0623088 -r 55f2396f6d25 persistentstorage/sql/TEST/t_sqloom2.cpp --- a/persistentstorage/sql/TEST/t_sqloom2.cpp Fri Apr 16 16:49:27 2010 +0300 +++ b/persistentstorage/sql/TEST/t_sqloom2.cpp Mon May 03 14:09:14 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -261,7 +261,7 @@ err = KErrNoMemory; const TInt KMaxAllocation = TheOomTestType[i] == EServerSideTest ? KStmtOomTestAllocLimitServer : KStmtOomTestAllocLimitClient; TInt allocationNo = 0; - TInt failingAllocationNo = 0; + TInt failingAllocationNo = 0;//the real exit point of the OOM test. allocationNo is set KMaxAllocation times. while(allocationNo < KMaxAllocation) { MarkHandles(); @@ -726,7 +726,7 @@ err = KErrNoMemory; const TInt KMaxAllocation = TheOomTestType[i] == EServerSideTest ? KStmtOomTestAllocLimitServer : KStmtOomTestAllocLimitClient; TInt allocationNo = 0; - TInt failingAllocationNo = 0; + TInt failingAllocationNo = 0;//the real exit point of the OOM test. allocationNo is set KMaxAllocation times. while(allocationNo < KMaxAllocation) { MarkHandles(); @@ -795,7 +795,7 @@ } //"RSqlBlobReadStream::OpenL()/RSqlBlobReadStream::ReadL()" OOM test -void BlobReadStreamOpenL(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC) +void BlobReadStreamOpenL(RSqlDatabase& aDb, const TDesC& aAttachDbName) { RSqlBlobReadStream strm; CleanupClosePushL(strm); @@ -822,7 +822,7 @@ } //"RSqlBlobReadStream::OpenL()/RSqlBlobReadStream::SizeL()" OOM test -void BlobReadStreamSizeL(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC) +void BlobReadStreamSizeL(RSqlDatabase& aDb, const TDesC& aAttachDbName) { RSqlBlobReadStream strm; CleanupClosePushL(strm); @@ -840,7 +840,7 @@ } //"RSqlBlobWriteStream::OpenL()/RSqlBlobWriteStream::WriteL()" OOM test -void BlobWriteStreamOpenL(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC) +void BlobWriteStreamOpenL(RSqlDatabase& aDb, const TDesC& aAttachDbName) { RSqlBlobWriteStream strm; CleanupClosePushL(strm); @@ -864,7 +864,7 @@ } //"RSqlBlobWriteStream::OpenL()/RSqlBlobWriteStream::SizeL()" OOM test -void BlobWriteStreamSizeL(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC) +void BlobWriteStreamSizeL(RSqlDatabase& aDb, const TDesC& aAttachDbName) { RSqlBlobWriteStream strm; CleanupClosePushL(strm); @@ -882,7 +882,7 @@ } //"TSqlBlob::GetLC()" OOM test -void BlobWholeGet1L(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC) +void BlobWholeGet1L(RSqlDatabase& aDb, const TDesC& aAttachDbName) { HBufC8* buf = NULL; if(aAttachDbName.Length() > 0) @@ -898,7 +898,7 @@ } //"TSqlBlob::Get()" OOM test -void BlobWholeGet2L(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC) +void BlobWholeGet2L(RSqlDatabase& aDb, const TDesC& aAttachDbName) { if(aAttachDbName.Length() > 0) { @@ -911,7 +911,7 @@ } //"TSqlBlob::SetL()" OOM test -void BlobWholeSetL(RSqlDatabase& aDb, const TDesC& aAttachDbName = KNullDesC) +void BlobWholeSetL(RSqlDatabase& aDb, const TDesC& aAttachDbName) { if(aAttachDbName.Length() > 0) { @@ -961,7 +961,7 @@ err = KErrNoMemory; const TInt KMaxAllocation = TheOomTestType[i] == EServerSideTest ? KBlobOomTestAllocLimitServer : KBlobOomTestAllocLimitClient; TInt allocationNo = 0; - TInt failingAllocationNo = 0; + TInt failingAllocationNo = 0;//the real exit point of the OOM test. allocationNo is set KMaxAllocation times. while(allocationNo < KMaxAllocation) { MarkHandles(); @@ -976,7 +976,7 @@ } else { - TRAP(err, (*aBlobTestFuncPtrL)(db)); + TRAP(err, (*aBlobTestFuncPtrL)(db, KNullDesC)); } ResetHeapFailure(TheOomTestType[i]); @@ -1151,7 +1151,7 @@ err = KErrNoMemory; const TInt KMaxAllocation = TheOomTestType[i] == EServerSideTest ? KStmtOomTestAllocLimitServer : KStmtOomTestAllocLimitClient; TInt allocationNo = 0; - TInt failingAllocationNo = 0; + TInt failingAllocationNo = 0;//the real exit point of the OOM test. allocationNo is set KMaxAllocation times. while(allocationNo < KMaxAllocation) { MarkHandles();