Revision: 201035
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 02 Sep 2010 22:18:45 +0300
changeset 46 826b40dcb0a8
parent 41 3256212fc81f
child 49 7521e5afd3df
Revision: 201035 Kit: 201035
featuremgmt/featuremgr/engineering/reference_plugins/group/simple_feature_info_plugin.mmp
featuremgmt/featuremgr/group/bld.inf
featuremgmt/featuremgr/src/serverexe/featmgrfeatureregistry.cpp
featuremgmt/featuremgr/src/serverexe/featmgrfeatureregistry.h
featuremgmt/featuremgr/test/rtest/src/t_fmgrbackupresponse.cpp
featuremgmt/featuremgr/test/rtest/src/t_fmgrrestoreresponse.cpp
featuremgmt/featuremgr/test/tef/tef_efm_normal/src/component_test_steps.cpp
featuremgmt/featureregistry/group/bld.inf
loggingservices/eventlogger/LogServ/inc/LogServOperationBase.h
loggingservices/eventlogger/LogServ/inc/LogServOperationBase.inl
loggingservices/eventlogger/LogServ/src/LogServOperationBase.cpp
loggingservices/eventlogger/LogServ/src/LogServOperationQueue.cpp
loggingservices/eventlogger/LogServ/src/logservsession.cpp
loggingservices/eventlogger/LogWrap/inc/LOGWRAPLIMITS.H
loggingservices/eventlogger/Rom/logeng.iby
loggingservices/eventlogger/group/BLD.INF
loggingservices/eventlogger/test/src/t_logbadclient.cpp
loggingservices/filelogger/group/BLD.INF
loggingservices/rfilelogger/Logger/Group/bld.inf
package_map.xml
persistentstorage/centralrepository/cenrepnotifierhandler/group/bld.inf
persistentstorage/centralrepository/cenrepnotifierhandler/rom/cenrepnotifierhandler.iby
persistentstorage/centralrepository/cenrepsrv/backup.cpp
persistentstorage/centralrepository/cenrepsrv/backup.h
persistentstorage/centralrepository/cenrepsrv/install.cpp
persistentstorage/centralrepository/cenrepsrv/install.h
persistentstorage/centralrepository/cenrepsrv/obsrvr_noc.cpp
persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.cpp
persistentstorage/centralrepository/group/bld.inf
persistentstorage/centralrepository/group/centralrepository.iby
persistentstorage/centralrepository/group/centreptestdata.iby
persistentstorage/centralrepository/pccenrep/group/bld.inf
persistentstorage/centralrepository/test/testexecute/BUR/group/Te_centrep_BURsuite.mmp
persistentstorage/centralrepository/test/testexecute/BUR/group/te_centrep_burobserversuite.mmp
persistentstorage/centralrepository/test/testexecute/SWI/group/bld.inf
persistentstorage/centralrepository/test/testexecute/group/bld.inf
persistentstorage/centralrepository/test/testexecute/performance/bwins/CentRepPerfTestU.DEF
persistentstorage/centralrepository/test/testexecute/performance/config/perf.ini
persistentstorage/centralrepository/test/testexecute/performance/group/TE_CentRepPerfTest.iby
persistentstorage/centralrepository/test/testexecute/performance/group/TE_CentRepPerfTest.mmp
persistentstorage/centralrepository/test/testexecute/performance/group/bld.inf
persistentstorage/centralrepository/test/testexecute/performance/inc/TE_DefectTestStep.h
persistentstorage/centralrepository/test/testexecute/performance/inc/TE_FindPerfTestStep.h
persistentstorage/centralrepository/test/testexecute/performance/inc/TE_MemTestStep.h
persistentstorage/centralrepository/test/testexecute/performance/inc/TE_NotifyMemTestStep.h
persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCacheDisabledStep.h
persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCacheEnabledStep.h
persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCacheStepBase.h
persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestClientOpenStep.h
persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCompareStep.h
persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestServer.h
persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestStep.h
persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestStep.inl
persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestUtilities.h
persistentstorage/centralrepository/test/testexecute/performance/scripts/TE_PerfTest.script
persistentstorage/centralrepository/test/testexecute/performance/src/TE_DefectTestStep.cpp
persistentstorage/centralrepository/test/testexecute/performance/src/TE_FindPerfTestStep.cpp
persistentstorage/centralrepository/test/testexecute/performance/src/TE_MemTestStep.cpp
persistentstorage/centralrepository/test/testexecute/performance/src/TE_NotifyMemTestStep.cpp
persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCacheDisabledStep.cpp
persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCacheEnabledStep.cpp
persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCacheStepBase.cpp
persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestClientOpenStep.cpp
persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCompareStep.cpp
persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestServer.cpp
persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestStep.cpp
persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestUtilities.cpp
persistentstorage/dbms/group/BLD.INF
persistentstorage/dbms/pcdbms/group/bld.inf
persistentstorage/dbms/tdbms/t_dbbug.cpp
persistentstorage/dbms/tdbms/t_dbbug.mmp
persistentstorage/dbms/tdbms/t_dbperf2.cpp
persistentstorage/dbms/tdbms/t_dbsrv.cpp
persistentstorage/dbms/tdbms/t_dbsrv.mmp
persistentstorage/dbms/tdbms/t_dbstress.cpp
persistentstorage/dbms/tdbms/t_dbthrd.cpp
persistentstorage/sql/GROUP/BLD.INF
persistentstorage/sql/GROUP/t_sqldbconfigfile.mmp
persistentstorage/sql/OsLayer/os_symbian.cpp
persistentstorage/sql/SRC/Server/SqlBur.cpp
persistentstorage/sql/SRC/Server/SqlSrvResourceProfiler.cpp
persistentstorage/sql/SRC/Server/SqlSrvStatement.inl
persistentstorage/sql/TEST/t_sqldbconfigfile.cpp
persistentstorage/sql/TEST/t_sqldefect2.cpp
persistentstorage/sql/TEST/t_sqlood.cpp
persistentstorage/sql/TEST/t_sqloslayer.cpp
persistentstorage/sql/TEST/t_sqlperformance4.cpp
persistentstorage/sql/TEST/testexecute/SQLite/config/Robustness.ini.DEVBOARD
persistentstorage/sql/TEST/testexecute/SQLite/scripts/Robustness.script
persistentstorage/sql/TEST/testexecute/SQLite/src/cdtest.h
persistentstorage/sqlite3api/GROUP/BLD.INF
persistentstorage/sqlite3api/GROUP/sqlite3tests.iby
persistentstorage/sqlite3api/GROUP/t_sqliteapi.mmp
persistentstorage/sqlite3api/GROUP/t_sqlitedef.mmp
persistentstorage/sqlite3api/GROUP/t_sqliteperf.mmp
persistentstorage/sqlite3api/GROUP/t_sqliteperf2.mmp
persistentstorage/sqlite3api/GROUP/t_sqlitetclstarter.mmp
persistentstorage/sqlite3api/GROUP/t_sqlitewsd.mmp
persistentstorage/sqlite3api/TEST/sqliteTestUtl.cpp
persistentstorage/sqlite3api/TEST/sqliteTestUtl.h
persistentstorage/sqlite3api/TEST/t_sqliteapi.c
persistentstorage/sqlite3api/TEST/t_sqliteapi.txt
persistentstorage/sqlite3api/TEST/t_sqlitedef.cpp
persistentstorage/sqlite3api/TEST/t_sqliteperf.cpp
persistentstorage/sqlite3api/TEST/t_sqliteperf2.cpp
persistentstorage/sqlite3api/TEST/t_sqlitetclstarter.cpp
persistentstorage/sqlite3api/TEST/t_sqlitewsd.cpp
persistentstorage/store/INC/S32FILE.INL
persistentstorage/store/TFILE/t_storfperm.cpp
persistentstorage/store/group/BLD.INF
persistentstorage/store/pcstore/group/bld.inf
traceservices/commsdebugutility/group/BLD.INF
traceservices/commsdebugutility/group/commsdebugutility.iby
traceservices/commsdebugutility/group/te_commsdebugutility.iby
traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/bld.inf
traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/te_uloggermclsuite.iby
traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggermclsuite_noserial.script
traceservices/tracefw/ulogger/unit_test/group/bld.inf
traceservices/tracefw/ulogger/unit_test/group/te_automatedsuite.iby
traceservices/tracefw/ulogger/unit_test/scripts/te_automatedsuite_noserial.script
traceservices/tracefw/utf_trace_api/group/bld.inf
--- a/featuremgmt/featuremgr/engineering/reference_plugins/group/simple_feature_info_plugin.mmp	Wed Aug 18 11:30:17 2010 +0300
+++ b/featuremgmt/featuremgr/engineering/reference_plugins/group/simple_feature_info_plugin.mmp	Thu Sep 02 22:18:45 2010 +0300
@@ -22,8 +22,6 @@
 USERINCLUDE     ../inc
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-//SYSTEMINCLUDE 	/epoc32/include 
-//SYSTEMINCLUDE 	/epoc32/include/ecom
 
 SOURCEPATH      ../src
 SOURCE          simple_feature_info_plugin.cpp
--- a/featuremgmt/featuremgr/group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ b/featuremgmt/featuremgr/group/bld.inf	Thu Sep 02 22:18:45 2010 +0300
@@ -22,13 +22,13 @@
 
 PRJ_EXPORTS
 
-../inc/featmgr.h                SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featmgr.h)
-../inc/featurecontrol.h         SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featurecontrol.h)
-../inc/featurenotifier.h        SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featurenotifier.h)
-../inc/featurecmn.h             SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featurecmn.h)
-../inc/featdiscovery.h          SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(featdiscovery.h)
-../inc/featureinfoplugin.h      SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featureinfoplugin.h)
-../inc/featureinfoplugin.inl    SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featureinfoplugin.inl)
+../inc/featmgr.h                OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featmgr.h)
+../inc/featurecontrol.h         OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featurecontrol.h)
+../inc/featurenotifier.h        OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featurenotifier.h)
+../inc/featurecmn.h             OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featurecmn.h)
+../inc/featdiscovery.h          OS_LAYER_PUBLIC_EXPORT_PATH(featdiscovery.h)
+../inc/featureinfoplugin.h      OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featureinfoplugin.h)
+../inc/featureinfoplugin.inl    OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featureinfoplugin.inl)
 #ifdef SYMBIAN_OLD_EXPORT_LOCATION
 ../inc/featurepanics.h          /epoc32/include/featmgr/featurepanics.h
 #endif
--- a/featuremgmt/featuremgr/src/serverexe/featmgrfeatureregistry.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/featuremgmt/featuremgr/src/serverexe/featmgrfeatureregistry.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -163,6 +163,11 @@
         }
     else
         {
+        TBitFlags32 flags = iFeatureList[index].FeatureFlags();
+        flags.Assign( EFeatureSupported, KFeatureUnsupported );
+        TUint32 data = iFeatureList[index].FeatureData();
+        TFeatureServerEntry entry( aFeature.FeatureUid(), flags, data );
+        aFeature = entry;
         err = KFeatureUnsupported;
         }
 
@@ -269,10 +274,26 @@
     
     if( iSWIProcessId == aPrcId && iSWICacheFeature )
     	{
-		TBitFlags32 flags(0);
-    	flags.Assign( EFeatureSupported, aEnable );
-    	TFeatureServerEntry entry( aFeature, flags, *aData );    
-	    err = SWICacheCommand(ESWISetFeatAndData, entry);
+        TBitFlags32 flags(0);
+        flags.Assign( EFeatureSupported, aEnable );
+        TUint32 data = 0;
+        if( aData )
+            {
+            data = *aData;
+            }
+
+        TFeatureServerEntry entry( aFeature, flags, data );
+
+        // If aData is not null, we want to change the user data too
+        //  otherwise only change the feature status.
+        if( aData )
+            {
+            err = SWICacheCommand(ESWISetFeatAndData, entry);
+            }
+        else
+            {
+            err = SWICacheCommand(ESWISetFeat, entry);
+            }
     	}
     else 
     	{
@@ -1437,6 +1458,13 @@
 							EFeatureSupportUntouch,&data);
 				}
 				break;
+            case ESWISetFeat:
+                {
+                SetFeature( iSWICachedOperations[i].iFeatEntry.FeatureUid(),
+                            iSWICachedOperations[i].iFeatEntry.FeatureFlags().Value(),
+                            NULL);
+                }
+                break;
 			default:
 				break;
 				};
--- a/featuremgmt/featuremgr/src/serverexe/featmgrfeatureregistry.h	Wed Aug 18 11:30:17 2010 +0300
+++ b/featuremgmt/featuremgr/src/serverexe/featmgrfeatureregistry.h	Thu Sep 02 22:18:45 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 "Eclipse Public License v1.0"
@@ -69,7 +69,8 @@
 			ESWIAddFeat,
 			ESWIDeleteFeat,
 			ESWISetFeatAndData,
-			ESWISetFeatData
+			ESWISetFeatData,
+			ESWISetFeat
 			};
 		
 		/*
--- a/featuremgmt/featuremgr/test/rtest/src/t_fmgrbackupresponse.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/featuremgmt/featuremgr/test/rtest/src/t_fmgrbackupresponse.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -126,6 +126,11 @@
         TRequestStatus testStatus;
         CleanupClosePushL( testThread );
         
+        //Needs to ensure server is started before simulating backup operation
+        RFeatureControl rfc;
+        TTEST2( rfc.Connect(), KErrNone ); //This will start the server if not already started
+        rfc.Close();
+        
         simulate->Simulate_CheckRegFileL();
         
         // Simulate a backup
--- a/featuremgmt/featuremgr/test/rtest/src/t_fmgrrestoreresponse.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/featuremgmt/featuremgr/test/rtest/src/t_fmgrrestoreresponse.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -126,6 +126,11 @@
         TRequestStatus testStatus;
         CleanupClosePushL( testThread );
         
+        //Needs to ensure server is started before simulating backup operation
+        RFeatureControl rfc;
+        TTEST2( rfc.Connect(), KErrNone ); //This will start the server if not already started
+        rfc.Close();
+        
         simulate->Simulate_CheckRegFileL();
         
         // Simulate a restore
--- a/featuremgmt/featuremgr/test/tef/tef_efm_normal/src/component_test_steps.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/featuremgmt/featuremgr/test/tef/tef_efm_normal/src/component_test_steps.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -557,6 +557,16 @@
 		TESTDIAGNOSTICERROR(err==KErrNone, 
 				_L("RFeatureControl::AddFeature expects KErrNone for KNewUid3; returned value is = %d"),err);
 	
+		// Enable feature
+		err = control.EnableFeature(KNewUid1);
+		TESTDIAGNOSTICERROR(err==KErrNone, 
+		        _L("RFeatureControl::EnableFeature expects KErrNone for KNewUid1; returned value is = %d"),err);
+		
+		// Disable feature
+		err = control.DisableFeature(KNewUid1);
+		TESTDIAGNOSTICERROR(err==KErrNone, 
+		        _L("RFeatureControl::DisableFeature expects KErrNone for KNewUid1; returned value is = %d"),err);
+		
 		// Set features
 		err = control.SetFeature(KNewUid1, ETrue, KChangeData);
 		TESTDIAGNOSTICERROR(err==KErrNone, 
@@ -1606,6 +1616,63 @@
 	// Wait before starting the next test
 	User::After(100000);
 	
+	////////////////////////////////////////////////////////////////////////////////////////////
+	// SCENARIO 18: Successful installation and features manipulation (Enable/Disable without modifying data)
+	// Add Feature with user data -> P&S install -> SWIStart -> Enable/Disable Feature -> 
+	//  -> SWIEnd -> P&S success -> No change to user data
+	////////////////////////////////////////////////////////////////////////////////////////////
+    INFO_PRINTF1(_L("SCENARIO 18: Successful installation and Enable or Disable feature should not modify userdata"));
+    // Launching dummyswi.exe
+    err = process.Create(KDummySWIPath, _L("1"));   // 1 = install success
+    TESTDIAGNOSTICERROR(err==KErrNone,
+               _L("RProcess::Create expects KErrNone, returned value is = %d"),err);
+    if( err==KErrNone )
+        {
+        process.Resume();
+    
+        // Allow P&S to complete initialising
+        User::After(200000);
+        
+        err = control.Open();
+        TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::Open failed, returned value is = %d"),err);
+        
+        err = control.AddFeature(entry1);
+        TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::AddFeature expects KErrNone for KNewUid1; returned value is = %d"),err);
+        
+        err = control.SWIStart();
+        TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::SWIStart expects KErrNone; returned value is = %d"),err);
+        
+        // Enable feature
+        err = control.EnableFeature(KNewUid1);
+        TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::EnableFeature expects KErrNone for KNewUid1; returned value is = %d"),err);
+        
+        // Disable feature
+        err = control.DisableFeature(KNewUid1);
+        TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::EnableFeature expects KErrNone for KNewUid1; returned value is = %d"),err);
+        
+        err = control.SWIEnd();
+        TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::SWIEnd expects KErrNone; returned value is = %d"),err);
+        
+        // Delay until the P&S property is set to ESASwisStatusSuccess in dummyswi.exe to indicate successful installation
+        User::After(1500000);
+        
+        err = control.FeatureSupported(query1);
+        TESTDIAGNOSTICERROR(err==KErrNone, _L("TFeatureEntry::FeatureData expects 0 for KNewUid1; returned value is = %d"),err);
+        TESTDIAGNOSTICERROR(query1.FeatureData()==KDefaultData1, _L("TFeatureEntry::FeatureData expects non-zero for KNewUid1; returned value is = %d"), err);
+        
+        // Delete KNewUid1
+        err = control.DeleteFeature(KNewUid1);
+        TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::DeleteFeature expects KErrNone for KNewUid1; returned value is = %d"),err);
+        
+        query1 = TFeatureEntry(KNewUid1);
+        
+        control.Close();
+
+        }
+    process.Close();
+    // Wait before starting the next test
+    User::After(100000);
+	
 
 	return TestStepResult();
 	}
--- a/featuremgmt/featureregistry/group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ b/featuremgmt/featureregistry/group/bld.inf	Thu Sep 02 22:18:45 2010 +0300
@@ -17,9 +17,9 @@
 DEFAULT
 
 PRJ_EXPORTS
-../inc/featreg.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featreg.h)
-../inc/featreg.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featreg.inl)
-../inc/featregpan.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featregpan.h)
+../inc/featreg.h OS_LAYER_PLATFORM_EXPORT_PATH(featreg.h)
+../inc/featreg.inl OS_LAYER_PLATFORM_EXPORT_PATH(featreg.inl)
+../inc/featregpan.h OS_LAYER_PLATFORM_EXPORT_PATH(featregpan.h)
 ./featreg.iby /epoc32/rom/include/featreg.iby
 
 PRJ_MMPFILES
--- a/loggingservices/eventlogger/LogServ/inc/LogServOperationBase.h	Wed Aug 18 11:30:17 2010 +0300
+++ b/loggingservices/eventlogger/LogServ/inc/LogServOperationBase.h	Thu Sep 02 22:18:45 2010 +0300
@@ -72,6 +72,7 @@
 	inline TLogOperationType Type() const;
 	inline TLogServSessionId SessionId();
 	static TUint QueueOffset();
+	inline void SetMessageCompletion(const TBool aMessageCompletion);
 
 protected:
 	inline RMessage2& Message();
@@ -84,6 +85,7 @@
 	TLogClientServerData iClientServerData;
 	TLogServSessionId iSessionId;
 	TSglQueLink iServerLink;
+	TBool iMessageCompletion;
 	};
 
 
--- a/loggingservices/eventlogger/LogServ/inc/LogServOperationBase.inl	Wed Aug 18 11:30:17 2010 +0300
+++ b/loggingservices/eventlogger/LogServ/inc/LogServOperationBase.inl	Thu Sep 02 22:18:45 2010 +0300
@@ -31,7 +31,7 @@
 
 inline TBool CLogServOperationBase::HaveMessagePointer() const
 	{
-	return (iMessage != RMessage2());
+	return (!iMessage.IsNull());
 	}
 
 inline void CLogServOperationBase::ClearMessagePointer()
@@ -74,4 +74,9 @@
 	return iClientServerData;
 	}
 
+inline void CLogServOperationBase::SetMessageCompletion(const TBool aMessageCompletion)
+	{
+	iMessageCompletion = aMessageCompletion;
+	}
+
 #endif
--- a/loggingservices/eventlogger/LogServ/src/LogServOperationBase.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/loggingservices/eventlogger/LogServ/src/LogServOperationBase.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -29,7 +29,8 @@
 	iPackage(aPackage), 
 	iMessage(aMessage),
 	iClientServerData(aClientServerData),
-	iSessionId(aSessionId)
+	iSessionId(aSessionId),
+	iMessageCompletion(ETrue)
 	{
 	// Queue this operations
 	OperationManager().OMOperationQueueAdd(*this);
@@ -63,8 +64,12 @@
 //
 void CLogServOperationBase::Complete(TInt aCompletionCode)
 	{
-	__ASSERT_ALWAYS(iMessage != RMessage2(), Panic(ELogNoOutstandingAsyncRequest));
-	iMessage.Complete(aCompletionCode);
+	__ASSERT_ALWAYS(! iMessage.IsNull(), Panic(ELogNoOutstandingAsyncRequest));
+	
+	if (iMessageCompletion)
+	  {
+	  iMessage.Complete(aCompletionCode);
+	  }
 
 	// Unnecessary?
 	iMessage = RMessage2();
--- a/loggingservices/eventlogger/LogServ/src/LogServOperationQueue.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/loggingservices/eventlogger/LogServ/src/LogServOperationQueue.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -133,9 +133,14 @@
 		// This should complete the request with KErrCancel causing RunL to leave
 		// RunError completes the request and removes the operation from the pending queue
 		iTaskInterface.TaskCancelCurrent();
+
 		//
-		if	(!aCompleteRequest)
-			iCurrentOperation->ClearMessagePointer();
+		// Do not complete the message when the operation completes
+		//
+		if (!aCompleteRequest)
+			{
+			iCurrentOperation->SetMessageCompletion(aCompleteRequest);
+			}
 		}
 	else
 		{
--- a/loggingservices/eventlogger/LogServ/src/logservsession.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/loggingservices/eventlogger/LogServ/src/logservsession.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -59,7 +59,8 @@
 	{
 	LOGTEXT3("CLogServSession::~CLogServSession() - client logging off: %S, %d", &iClientThreadName, iSessionId);
 
-	iOperationManager.OMCancel(iSessionId, ETrue);
+	// Set second parameter to not complete the message, otherwise if the client has died a KERN-EXEC 44 will be generated.
+	iOperationManager.OMCancel(iSessionId, EFalse);
 	
 	delete iPackage;
 	delete iNotify;
--- a/loggingservices/eventlogger/LogWrap/inc/LOGWRAPLIMITS.H	Wed Aug 18 11:30:17 2010 +0300
+++ b/loggingservices/eventlogger/LogWrap/inc/LOGWRAPLIMITS.H	Thu Sep 02 22:18:45 2010 +0300
@@ -21,7 +21,7 @@
 
 /**
 String lengths
-@publishedPartner
+@publishedAll
 @released
 */
 const TInt KLogMaxRemotePartyLength = 64;
@@ -34,7 +34,7 @@
 
 /**
 Limits
-@publishedPartner
+@publishedAll
 @released
 */
    
--- a/loggingservices/eventlogger/Rom/logeng.iby	Wed Aug 18 11:30:17 2010 +0300
+++ b/loggingservices/eventlogger/Rom/logeng.iby	Thu Sep 02 22:18:45 2010 +0300
@@ -23,16 +23,16 @@
 REM The Log Engine
 
 #ifndef NO_LOG_ENGINE_IN_ROM
-file=ABI_DIR\BUILD_DIR\LogWrap.dll	System\Libs\LogWrap.dll
-file=ABI_DIR\BUILD_DIR\LogCli.dll	System\Libs\LogCli.dll
-file=ABI_DIR\BUILD_DIR\LogCntModel.dll	System\Libs\LogCntModel.dll
-file=ABI_DIR\BUILD_DIR\LogServ.exe	System\Programs\LogServ.exe
+file=ABI_DIR\BUILD_DIR\logwrap.dll	System\Libs\LogWrap.dll
+file=ABI_DIR\BUILD_DIR\logcli.dll	System\Libs\LogCli.dll
+file=ABI_DIR\BUILD_DIR\logcntmodel.dll	System\Libs\LogCntModel.dll
+file=ABI_DIR\BUILD_DIR\logserv.exe	System\Programs\LogServ.exe
 
 data=ZPRIVATE\101f401d\backup_registration.xml private\101f401d\backup_registration.xml
 
 #include "logeng.hby"
 #else
-file=ABI_DIR\BUILD_DIR\LogStub.dll	System\Libs\LogWrap.dll
+file=ABI_DIR\BUILD_DIR\logstub.dll	System\Libs\LogWrap.dll
 #endif
 
 #endif
--- a/loggingservices/eventlogger/group/BLD.INF	Wed Aug 18 11:30:17 2010 +0300
+++ b/loggingservices/eventlogger/group/BLD.INF	Thu Sep 02 22:18:45 2010 +0300
@@ -21,29 +21,29 @@
 
 PRJ_EXPORTS
 
-../LogWrap/inc/LOGWRAP.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logwrap.h)
-../LogWrap/inc/LOGWRAPCONST.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logwrapconst.h)
-../LogWrap/inc/LOGWRAPLIMITS.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(logwraplimits.h)
-../LogWrap/inc/LOGWRAP.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logwrap.inl)
-../LogWrap/inc/LOGWRAP.HRH /epoc32/include/logwrap.hrh
-../LogWrap/inc/LOGFILTERANDEVENTCONSTANTS.HRH /epoc32/include/logfilterandeventconstants.hrh
-../LogWrap/inc/LOGENG.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logeng.h)
-../LogWrap/inc/LOGENGDURATIONS.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(logengdurations.h)
-../LogWrap/inc/LOGENGEVENTS.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(logengevents.h)
-../LogWrap/inc/LOGSMSPDUDATA.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logsmspdudata.h)
-../LogCli/inc/LOGCLI.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logcli.h)
-../LogCli/inc/LOGCLI.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logcli.inl)
-../LogCli/inc/LOGVIEW.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logview.h)
-../LogCli/inc/LOGVIEW.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logview.inl)
-../LogCli/inc/LogViewChangeObserver.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logviewchangeobserver.h)
-../LogCli/inc/LogClientChangeObserver.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logclientchangeobserver.h)
+../LogWrap/inc/LOGWRAP.H OS_LAYER_PUBLIC_EXPORT_PATH(logwrap.h)
+../LogWrap/inc/LOGWRAPCONST.H OS_LAYER_PUBLIC_EXPORT_PATH(logwrapconst.h)
+../LogWrap/inc/LOGWRAPLIMITS.H OS_LAYER_PUBLIC_EXPORT_PATH(logwraplimits.h)
+../LogWrap/inc/LOGWRAP.INL OS_LAYER_PUBLIC_EXPORT_PATH(logwrap.inl)
+../LogWrap/inc/LOGWRAP.HRH OS_LAYER_PUBLIC_EXPORT_PATH(logwrap.hrh)
+../LogWrap/inc/LOGFILTERANDEVENTCONSTANTS.HRH OS_LAYER_PUBLIC_EXPORT_PATH(logfilterandeventconstants.hrh)
+../LogWrap/inc/LOGENG.H OS_LAYER_PUBLIC_EXPORT_PATH(logeng.h)
+../LogWrap/inc/LOGENGDURATIONS.H OS_LAYER_PLATFORM_EXPORT_PATH(logengdurations.h)
+../LogWrap/inc/LOGENGEVENTS.H OS_LAYER_PLATFORM_EXPORT_PATH(logengevents.h)
+../LogWrap/inc/LOGSMSPDUDATA.H OS_LAYER_PUBLIC_EXPORT_PATH(logsmspdudata.h)
+../LogCli/inc/LOGCLI.H OS_LAYER_PUBLIC_EXPORT_PATH(logcli.h)
+../LogCli/inc/LOGCLI.INL OS_LAYER_PUBLIC_EXPORT_PATH(logcli.inl)
+../LogCli/inc/LOGVIEW.H OS_LAYER_PUBLIC_EXPORT_PATH(logview.h)
+../LogCli/inc/LOGVIEW.INL OS_LAYER_PUBLIC_EXPORT_PATH(logview.inl)
+../LogCli/inc/LogViewChangeObserver.h OS_LAYER_PUBLIC_EXPORT_PATH(logviewchangeobserver.h)
+../LogCli/inc/LogClientChangeObserver.h OS_LAYER_PUBLIC_EXPORT_PATH(logclientchangeobserver.h)
 
 
 ../Rom/logeng.iby /epoc32/rom/include/logeng.iby
 ../Rom/logeng.hby /epoc32/rom/include/logeng.hby
 
-../logcntmodel/inc/logcntmodel.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(logcntmodel.h)
-../logcntmodel/inc/logcntdef.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(logcntdef.h)
+../logcntmodel/inc/logcntmodel.h OS_LAYER_PLATFORM_EXPORT_PATH(logcntmodel.h)
+../logcntmodel/inc/logcntdef.h OS_LAYER_PLATFORM_EXPORT_PATH(logcntdef.h)
 
 backup_registration.xml z:/private/101f401d/backup_registration.xml
 
--- a/loggingservices/eventlogger/test/src/t_logbadclient.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/loggingservices/eventlogger/test/src/t_logbadclient.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -213,6 +213,50 @@
 	return KErrNone;		
 	}
 
+//////////////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+//Thread function to detect a crash in the server.
+//The server should run for the duration of the test.
+// return KErrAbort: If failure to start server
+// return KErrServerTerminated: If server process is terminated 
+
+TInt ServerWatcherFunc(TAny* /*aData*/)
+	{
+	__UHEAP_MARK;
+
+	_LIT(KLogEngServerName,"LogServ*");
+
+	TInt err;
+
+	// Start the server if not already running
+	RLogSession sess;
+	err = sess.Connect();
+	if (err != KErrNone)
+		return KErrAbort;
+	sess.Close();
+
+	TFindProcess findProcess(KLogEngServerName);
+	TFullName result;
+	if ( findProcess.Next(result) != KErrNone )
+		return KErrAbort;
+	
+	RProcess server;
+	if( server.Open(findProcess, EOwnerProcess) != KErrNone)
+		return KErrAbort;
+
+	TRequestStatus status;
+	server.Logon(status);	
+ 	User::WaitForRequest(status);
+	
+	server.Close();
+	
+	__UHEAP_MARKEND;
+
+	return KErrServerTerminated;
+	}
+
+
 /**
 @SYMTestCaseID			PDS-LOGENG-UT-4045
 @SYMTestCaseDesc		In a loop, where the loop iterations are less than KTestIterCount (5000 at the moment), 
@@ -227,6 +271,13 @@
 */	
 void BadClientTest()
 	{
+	// Start a thread to watch the server process
+	RThread serverWatcher;
+	TInt err = serverWatcher.Create(_L("ServerWatcher"), &ServerWatcherFunc, 0x2000, 0x1000, 0x10000, NULL, EOwnerProcess);
+	TRequestStatus serverStatus;
+	serverWatcher.Logon(serverStatus);
+	serverWatcher.Resume();
+
 	TThreadData* p = new TThreadData;
 	TEST(p != NULL);
 	TThreadData& data = *p;
@@ -243,7 +294,7 @@
 		User::After(200000);
 		_LIT(KTestThreadName, "TLBCThr");
 		RThread thread;
-		TInt err = thread.Create(KTestThreadName, &ThreadFunc1, 0x2000, 0x1000, 0x10000, &data, EOwnerProcess);
+		err = thread.Create(KTestThreadName, &ThreadFunc1, 0x2000, 0x1000, 0x10000, &data, EOwnerProcess);
 		if(err == KErrAlreadyExists)
 			{
 			TheTest.Printf(_L("##Iteration %d. Function %d. Thread \"%S\" already exists!\r\n"), data.iIteration, data.iFunction, &KTestThreadName);
@@ -274,7 +325,15 @@
 		thread.Logon(status);
 		TEST2(status.Int(), KRequestPending);
 		thread.Resume();
-		User::WaitForRequest(status);
+		User::WaitForRequest(status, serverStatus);
+
+		// If the Server has crashed then we must fail		
+		if (serverStatus != KRequestPending) 
+			{
+			TheTest.Printf(_L("##Iteration=%d, Function=%d, Status1=%d, Status2=%d\r\n"), data.iIteration, data.iFunction, status.Int(), serverStatus.Int());
+			break;
+			}
+
 		TExitType exitType = thread.ExitType();
 		TInt exitReason = thread.ExitReason();
 		thread.Close();
@@ -310,6 +369,13 @@
 			}
 		}//for
 	delete p;
+
+
+	// Check to see if the server crashed and not detected by client
+	TEST(serverStatus.Int() == KRequestPending);
+	serverWatcher.Kill(KErrCancel);
+	serverWatcher.Close();
+		
 	}
 
 /**
--- a/loggingservices/filelogger/group/BLD.INF	Wed Aug 18 11:30:17 2010 +0300
+++ b/loggingservices/filelogger/group/BLD.INF	Thu Sep 02 22:18:45 2010 +0300
@@ -23,8 +23,8 @@
 
 PRJ_EXPORTS
 
-../INC/FLOGGER.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(flogger.h)
-../INC/FLOGGER.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(flogger.inl)
+../INC/FLOGGER.H OS_LAYER_PUBLIC_EXPORT_PATH(flogger.h)
+../INC/FLOGGER.INL OS_LAYER_PUBLIC_EXPORT_PATH(flogger.inl)
 
 ../group/flogger.iby	/epoc32/rom/include/flogger.iby
 
--- a/loggingservices/rfilelogger/Logger/Group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ b/loggingservices/rfilelogger/Logger/Group/bld.inf	Thu Sep 02 22:18:45 2010 +0300
@@ -16,8 +16,8 @@
 #include "../te_RFileLogger/group/bld.inf"
 
 PRJ_EXPORTS
-../inc/RFileLogger.h            SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(test/rfilelogger.h)
-../inc/RFileLoggermacro.h       SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(test/rfileloggermacro.h)
+../inc/RFileLogger.h            OS_LAYER_PLATFORM_EXPORT_PATH(test/rfilelogger.h)
+../inc/RFileLoggermacro.h       OS_LAYER_PLATFORM_EXPORT_PATH(test/rfileloggermacro.h)
 RFilelogger.iby                 /epoc32/rom/include/rfilelogger.iby
 
 PRJ_MMPFILES
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_map.xml	Thu Sep 02 22:18:45 2010 +0300
@@ -0,0 +1,1 @@
+<PackageMap root="sf" layer="os"/>
--- a/persistentstorage/centralrepository/cenrepnotifierhandler/group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/cenrepnotifierhandler/group/bld.inf	Thu Sep 02 22:18:45 2010 +0300
@@ -20,7 +20,7 @@
 
 PRJ_EXPORTS
 
-../inc/cenrepnotifyhandler.h		SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(cenrepnotifyhandler.h)
+../inc/cenrepnotifyhandler.h		OS_LAYER_PUBLIC_EXPORT_PATH(cenrepnotifyhandler.h)
 ../rom/cenrepnotifierhandler.iby	/epoc32/rom/include/cenrepnotifierhandler.iby
 
 PRJ_MMPFILES
--- a/persistentstorage/centralrepository/cenrepnotifierhandler/rom/cenrepnotifierhandler.iby	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/cenrepnotifierhandler/rom/cenrepnotifierhandler.iby	Thu Sep 02 22:18:45 2010 +0300
@@ -18,7 +18,7 @@
 #define __CENREPNOTIFHANDLER_IBY__
 
 //file content
-file=ABI_DIR\BUILD_DIR\CENREPNOTIFHANDLER.DLL	System\Libs\CENREPNOTIFHANDLER.DLL
+file=ABI_DIR\BUILD_DIR\cenrepnotifhandler.dll	System\Libs\CENREPNOTIFHANDLER.DLL
 
 #endif
 
--- a/persistentstorage/centralrepository/cenrepsrv/backup.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/cenrepsrv/backup.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -385,6 +385,15 @@
 	}
 
 
+void CRepositoryBackupClient::RestoreRepositoryAndListL(TUid repositoryUid, CDirectFileStore* store, TStreamId settingsStreamId, TStreamId deletedSettingsStreamId, TInt& repIndex)
+    {
+    // Add the restored repository to the restored repositories list.
+    // Pass its changed-keys list to further restoring functions to add entries for post-restoration notification.
+    repIndex = AddRestoredRepositoryL(repositoryUid);
+    iRepository->RestoreRepositoryContentsL(*store, settingsStreamId, deletedSettingsStreamId, *iRestoredRepositoriesArray[repIndex]);
+    iRepository->CommitChangesL();
+    }
+
 	
 //
 // CRepositoryBackupClient::RestoreCompleteL
@@ -420,7 +429,6 @@
 		}		
 
 
-
 	// Get the root stream and attempt to read a backup file header from it
 	TStreamId rootStreamId = store->Root() ;
 	RStoreReadStream rootStream ;
@@ -462,8 +470,8 @@
 	
 	// Iterate through index and attempt restore of each repository stream
 	// we find in it.
-	restoreStreamIndex->Reset() ;	
-	TUid repositoryUid ;
+	restoreStreamIndex->Reset();	
+	TUid repositoryUid;
 	TStreamId settingsStreamId(KNullStreamIdValue);
 	TStreamId deletedSettingsStreamId(KNullStreamIdValue);
 	TStreamId installedSettingsStreamId(KNullStreamIdValue);
@@ -472,12 +480,10 @@
 		{
 		iRepository->OpenL(repositoryUid, *iNotifier, EFalse);
 		iRepository->FailAllTransactions();
-		// Add the restored repository to the restored repositories list.
-		// Pass its changed-keys list to further restoring functions to add entries for post-restoration notification.
-		TInt repIndex = AddRestoredRepositoryL(repositoryUid);
-		iRepository->RestoreRepositoryContentsL(*store, settingsStreamId, deletedSettingsStreamId, *iRestoredRepositoriesArray[repIndex]);
-		iRepository->CommitChangesL();
+		TInt repIndex;
+		TRAPD(err, RestoreRepositoryAndListL(repositoryUid, store, settingsStreamId, deletedSettingsStreamId, repIndex));
 		iRepository->Close();
+	    User::LeaveIfError(err);
 		// If the backup contains an installed repository containing default values for the settings, read them in
 		if (installedSettingsStreamId != KNullStreamId)
 			{
--- a/persistentstorage/centralrepository/cenrepsrv/backup.h	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/cenrepsrv/backup.h	Thu Sep 02 22:18:45 2010 +0300
@@ -170,6 +170,8 @@
 	TUint GetDataChecksum(TDriveNumber aDrive);
 	void CompleteOwnerIdLookupTableL();
 	
+	void RestoreRepositoryAndListL(TUid repositoryUid, CDirectFileStore* store, TStreamId settingsStreamId, TStreamId deletedSettingsStreamId,TInt& repIndex);
+	
 private:
 	// Usual active object stuff
 	void RunL() ;
--- a/persistentstorage/centralrepository/cenrepsrv/install.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/cenrepsrv/install.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -227,110 +227,116 @@
 	// Find added or updated entries
 	ReadInstallDirL(iCurrentInstallDirEntries);
 		
-	TInt newCount=iCurrentInstallDirEntries.Count();
-	TInt currentCount=iInstallEntryArray.Count();
-	TInt i;
-	TInt r;
-	TInt operation;
-
-	// If both counts are 0, we shouldn't have been notified, just return
-	if( (newCount==0) && (currentCount==0))
-		return;
-	
-	if(aStartup)
-		{
-		operation=ESASwisNone;
-		}
-	else
-		{
-		operation=iSWIOperation;
-		}
-
 	// We don't want cache activity during SWI operations
 	TServerResources::iCacheManager->DisableCache();
 
-	if( newCount==0)						// currentCount > 0, newCount = 0
-		{									// All installed files have been deleted
-		// Handle deletes of all files
-		for(i=0;i<currentCount;i++)
-			{
-			iInstallEntryArray[i]->HandleFileDeleteL(operation);
-			}
-		// Free memory of elements
-		iInstallEntryArray.ResetAndDestroy();
-		}
-	else 
-		{	
-		if( currentCount==0)				// currentCount = 0, newCount > 0
-			{								// All new files need to be handled
-			for(i=0;i<newCount;i++)
-				{
-				CInstallEntry* newEntry=iCurrentInstallDirEntries[i];
-				newEntry->HandleFileCreateL(operation);
-				}
-			}
-		else								// currentCount > 0, newCount > 0
-			{
-			// Find added and modified entries by going through new entries and
-			// looking for them in current array
-			for(i=0;i<newCount;i++)
-				{
-				CInstallEntry* newEntry=iCurrentInstallDirEntries[i];
-				r=iInstallEntryArray.Find( newEntry, MatchEntries);
-				// If we find new entry in current array, check modification date
-				if(r>=KErrNone)
-					{
-					CInstallEntry* currentEntry=iInstallEntryArray[r];
-					if( newEntry->Modified() > currentEntry->Modified())
-						{												
-						// Deal with newly installed file, note use newEntry
-						// so we use new timestamp
-						newEntry->HandleFileUpdateL(operation);
-						}
-					}
-				else if(r==KErrNotFound)		// File has been added
-					{
-					// Handle add
-					newEntry->HandleFileCreateL(operation);
-					// Don't leave on KErrNotFound
-					r=KErrNone;
-					}
-				User::LeaveIfError(r);
-				}
-	
-			// Find deleted entries by going through current entries and looking for them 
-			// in new array
-			for(i=0;i<currentCount;i++)
-				{
-				CInstallEntry* currentEntry=iInstallEntryArray[i];
-				r=iCurrentInstallDirEntries.Find( currentEntry, MatchEntries);
-				// If we don't find current entry in new array, it's been deleted
-				if(r==KErrNotFound)
-					{
-					// Deal with uninstalls
-					currentEntry->HandleFileDeleteL(operation);
-					// Don't leave on KErrNotFound
-					r=KErrNone;
-					}
-				User::LeaveIfError(r);
-				}
-			}
-
-		// Clear out old list
-		iInstallEntryArray.ResetAndDestroy();
-		
-		// Re-read directory - if any files were corrupt they have been deleted
-		// during the merge, so we need to re-read in case this has occurred
-		ReadInstallDirL(iInstallEntryArray);
-		}
-		
-	SaveInstallDirL();
-	iCurrentInstallDirEntries.ResetAndDestroy();
+	TRAPD(err, HandleFileChangesL(aStartup));
 	
 	// SWI operations finished, enable cache
-	TServerResources::iCacheManager->EnableCache();				
+	TServerResources::iCacheManager->EnableCache();
+	User::LeaveIfError(err);
 	} 
 
+void CCentRepSWIWatcher::HandleFileChangesL(TBool aStartup)
+    {
+    TInt newCount=iCurrentInstallDirEntries.Count();
+    TInt currentCount=iInstallEntryArray.Count();
+    TInt i;
+    TInt r;
+    TInt operation;
+
+    // If both counts are 0, we shouldn't have been notified, just return
+    if( (newCount==0) && (currentCount==0))
+        return;
+    
+    if(aStartup)
+        {
+        operation=ESASwisNone;
+        }
+    else
+        {
+        operation=iSWIOperation;
+        }
+
+    if( newCount==0)                        // currentCount > 0, newCount = 0
+        {                                   // All installed files have been deleted
+        // Handle deletes of all files
+        for(i=0;i<currentCount;i++)
+            {
+            iInstallEntryArray[i]->HandleFileDeleteL(operation);
+            }
+        // Free memory of elements
+        iInstallEntryArray.ResetAndDestroy();
+        }
+    else 
+        {   
+        if( currentCount==0)                // currentCount = 0, newCount > 0
+            {                               // All new files need to be handled
+            for(i=0;i<newCount;i++)
+                {
+                CInstallEntry* newEntry=iCurrentInstallDirEntries[i];
+                newEntry->HandleFileCreateL(operation);
+                }
+            }
+        else                                // currentCount > 0, newCount > 0
+            {
+            // Find added and modified entries by going through new entries and
+            // looking for them in current array
+            for(i=0;i<newCount;i++)
+                {
+                CInstallEntry* newEntry=iCurrentInstallDirEntries[i];
+                r=iInstallEntryArray.Find( newEntry, MatchEntries);
+                // If we find new entry in current array, check modification date
+                if(r>=KErrNone)
+                    {
+                    CInstallEntry* currentEntry=iInstallEntryArray[r];
+                    if( newEntry->Modified() > currentEntry->Modified())
+                        {                                               
+                        // Deal with newly installed file, note use newEntry
+                        // so we use new timestamp
+                        newEntry->HandleFileUpdateL(operation);
+                        }
+                    }
+                else if(r==KErrNotFound)        // File has been added
+                    {
+                    // Handle add
+                    newEntry->HandleFileCreateL(operation);
+                    // Don't leave on KErrNotFound
+                    r=KErrNone;
+                    }
+                User::LeaveIfError(r);
+                }
+    
+            // Find deleted entries by going through current entries and looking for them 
+            // in new array
+            for(i=0;i<currentCount;i++)
+                {
+                CInstallEntry* currentEntry=iInstallEntryArray[i];
+                r=iCurrentInstallDirEntries.Find( currentEntry, MatchEntries);
+                // If we don't find current entry in new array, it's been deleted
+                if(r==KErrNotFound)
+                    {
+                    // Deal with uninstalls
+                    currentEntry->HandleFileDeleteL(operation);
+                    // Don't leave on KErrNotFound
+                    r=KErrNone;
+                    }
+                User::LeaveIfError(r);
+                }
+            }
+
+        // Clear out old list
+        iInstallEntryArray.ResetAndDestroy();
+        
+        // Re-read directory - if any files were corrupt they have been deleted
+        // during the merge, so we need to re-read in case this has occurred
+        ReadInstallDirL(iInstallEntryArray);
+        }
+        
+    SaveInstallDirL();
+    iCurrentInstallDirEntries.ResetAndDestroy();
+    }
+
 CInstallEntry::CInstallEntry() :
 	iUid(KNullUid),
 	iModified(0),
--- a/persistentstorage/centralrepository/cenrepsrv/install.h	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/cenrepsrv/install.h	Thu Sep 02 22:18:45 2010 +0300
@@ -60,7 +60,7 @@
 	void Start();
 	~CCentRepSWIWatcher();
 	void HandleSWIEventL(TInt swiProperty);
-    void FindChangedEntriesL(TBool aStartup=EFalse);		
+    void FindChangedEntriesL(TBool aStartup=EFalse);
 	//From CActive
 protected:	
 	void RunL();
@@ -72,11 +72,11 @@
 	void ConstructL();
 	
 	void ReadInstallDirL(RPointerArray<CInstallEntry>& aEntryArray);
-
 	
 	void SaveInstallDirL();
 	void GetInstallDirL();
 	void ReadAndInternalizeInstallDirL(const TDesC& aInstallDirFilePath);
+	void HandleFileChangesL(TBool aStartup);
 	
 	static TBool MatchEntries(const CInstallEntry &aSource, const CInstallEntry &aTarget);
 
--- a/persistentstorage/centralrepository/cenrepsrv/obsrvr_noc.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/cenrepsrv/obsrvr_noc.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -704,29 +704,23 @@
 	TInt biggestBlock;
 	TInt firstAvail = myHeap.Available(biggestBlock);
 	
-	aRepository = CSharedRepository::NewL(aUid);
+	TRAPD(err, aRepository = CSharedRepository::NewL(aUid));
 #ifdef CACHE_OOM_TESTABILITY
-	if ((aRepository==NULL)&&!iTrapOOMOnOpen)	
+	if ((err!=KErrNone)&&!iTrapOOMOnOpen)	
 		{
-		User::Leave(KErrNoMemory);
+		User::Leave(err);
 		}
 #endif	
-	if ((aRepository==NULL)&&TServerResources::iCacheManager->Enabled())
+	if ((err!=KErrNone)&&TServerResources::iCacheManager->Enabled())
 		{
 		// If cache enabled, try recovery by releasing the cache
 		TServerResources::iCacheManager->FlushCache(EFalse);
 		// retry
 		aRepository = CSharedRepository::NewL(aUid);
+		err = KErrNone;
 		}
-	// If still no memory, return error
-	if (aRepository==NULL)
-		{
-		User::Leave(KErrNoMemory);
-		}
-	else // successfully created the object, so push it into the cleanup stack
-		{
-		CleanupStack::PushL(aRepository);
-		}
+	User::LeaveIfError(err);
+	CleanupStack::PushL(aRepository);
 		
 	// Now that we have enough memory for the object and constructed it properly
 	// we try to load it. We trap all errors, either from leaving functions or error code
--- a/persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -32,12 +32,25 @@
 	{
 	iNotifier = &aObserver;
 	
-	iRepository = TServerResources::iObserver->AccessL(aUid, aFailIfNotFound);
+	TServerResources::iObserver->iObservers.ReserveL(1);
+	
+	TServerResources::iObserver->AddSharedRepositoryInfoL(aUid);
+	
+	TRAPD( err, iRepository = TServerResources::iObserver->AccessL(aUid, aFailIfNotFound) );
+	
 	//store uid
-	iUid = aUid;	
-
-	TServerResources::iObserver->AddObserverL(aUid, this);
-	TServerResources::iObserver->AddSharedRepositoryInfoL(aUid);
+	iUid = aUid;
+	
+	if (err == KErrNone)
+	    {
+        TRAP( err, TServerResources::iObserver->AddObserverL(aUid, this) );
+	    }
+	    
+	if (err != KErrNone)
+        {
+        TServerResources::iObserver->RemoveSharedRepositoryInfo(aUid);
+        User::Leave(err);
+        }
 	}
 
 void CServerRepository::Close()
@@ -398,6 +411,7 @@
 					  {
 					  if(err == KErrNoMemory)
 					    {
+                        repository->Close();
 					    User::LeaveNoMemory();
 					    }
 				      else
@@ -652,21 +666,27 @@
 			
 		// Create install rep for merging
  		CSharedRepository *installRep = 0;
- 		TServerResources::iObserver->LoadRepositoryLC(aUid, ETrue, installRep, CIniFileIn::EInstallOnly);
+ 		TRAPD( err, TServerResources::iObserver->LoadRepositoryLC(aUid, ETrue, installRep, CIniFileIn::EInstallOnly); CleanupStack::Pop(installRep) );
 	
-		// Perform merge
-		iRepository->HandleUpdateMergeL(aModified, *installRep);
-						
-		CleanupStack::PopAndDestroy(installRep);
-		Close();
+		if (err == KErrNone)
+            {
+            // Perform merge
+            TRAP( err, iRepository->HandleUpdateMergeL(aModified, *installRep) );
+            }
+        if (installRep!=NULL)
+            {
+            delete installRep;
+            }
+        Close();
+        User::LeaveIfError(err);
 		}
 	else	// No ROM or persists
 		{
 		// Create install rep for persisting
 		OpenL(aUid, aNotifier);
-	
-		iRepository->CommitChangesL();
-		Close();
+		TRAPD(err, iRepository->CommitChangesL());
+	    Close();
+	    User::LeaveIfError(err);
 		}
 	}
 
@@ -698,13 +718,19 @@
 		
 		// Create ROM rep for merging
 	 	CSharedRepository *romRep = 0;
-		TServerResources::iObserver->LoadRepositoryLC(aUid, ETrue, romRep, CIniFileIn::ERomOnly);
+		TRAPD( err, TServerResources::iObserver->LoadRepositoryLC(aUid, ETrue, romRep, CIniFileIn::ERomOnly); CleanupStack::Pop(romRep) );
 
-		// Perform merge
-		iRepository->HandleDeleteMergeL(*romRep);
-		
-		CleanupStack::PopAndDestroy(romRep);
+		if (err == KErrNone)
+		    {
+            // Perform merge
+            TRAP( err, iRepository->HandleDeleteMergeL(*romRep) );
+		    }
+		if (romRep!=NULL)
+		    {
+            delete romRep;
+		    }
 		Close();
+		User::LeaveIfError(err);
 		}
 	else											// No ROM file, this is a complete uninstall
 		{		
--- a/persistentstorage/centralrepository/group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/group/bld.inf	Thu Sep 02 22:18:45 2010 +0300
@@ -14,7 +14,7 @@
 //
 
 PRJ_EXPORTS
-../include/centralrepository.h                  SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(centralrepository.h)
+../include/centralrepository.h                  OS_LAYER_PUBLIC_EXPORT_PATH(centralrepository.h)
 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS 
     #ifdef SYMBIAN_OLD_EXPORT_LOCATION
         ../include/centralrepositoryinternal.h  /epoc32/include/centralrepositoryinternal.h
@@ -40,7 +40,8 @@
 PRJ_TESTEXPORTS
 // Stub sis file required by various tests.
 
-#ifdef __SERIES60_
+//define PDS_FULL_UI_TEST in the rom build command for Full S60 UI build
+#if defined(__SERIES60_) && defined(PDS_FULL_UI_TEST)
 ../test/testexecute/SWI/data/rnd_sis/centrepswiteststub.sis     z:/system/install/centrepswiteststub.sis
 #else
 ../test/testexecute/SWI/data/techview_sis/centrepswiteststub.sis     z:/system/install/centrepswiteststub.sis
@@ -54,7 +55,7 @@
 centreptestdata.iby                                     /epoc32/rom/include/centreptestdata.iby
 
 // For pccenrep tests.
-../pccenrep/include/centralrepository.h                 SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/centralrepository.h)
+../pccenrep/include/centralrepository.h                 OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/centralrepository.h)
 
 ../test/testexecute/SWI/data/certstore/swicertstore.dat	z:/resource/versions/swicertstore.dat
 
@@ -176,7 +177,8 @@
 ../test/00000003.txt            z:/private/102081e4/00000003.txt
 ../test/00112273.txt            z:/private/10202be9/00112273.txt
 
-#ifdef __SERIES60_
+//define PDS_FULL_UI_TEST in the rom build command for Full S60 UI build
+#if defined(__SERIES60_) && defined(PDS_FULL_UI_TEST)
 ../test/rnd_RF1.sis             z:/private/10202be9/rf1.sis
 ../test/rnd_RF2.sis             z:/private/10202be9/rf2.sis
 ../test/rnd_RF3.sis             z:/private/10202be9/rf3.sis
--- a/persistentstorage/centralrepository/group/centralrepository.iby	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/group/centralrepository.iby	Thu Sep 02 22:18:45 2010 +0300
@@ -23,7 +23,7 @@
 
 #include <bsul.iby>
 
-data=ZPRIVATE\10202BE9\backup_registration.xml PRIVATE\10202BE9\backup_registration.xml
+data=ZPRIVATE\10202be9\backup_registration.xml PRIVATE\10202BE9\backup_registration.xml
 
 #ifdef SYMBIAN_CENREPNOTIFIERHANDLER
 //Core OS extension
--- a/persistentstorage/centralrepository/group/centreptestdata.iby	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/group/centreptestdata.iby	Thu Sep 02 22:18:45 2010 +0300
@@ -1,4 +1,4 @@
-// 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 "Eclipse Public License v1.0"
@@ -104,6 +104,12 @@
 
 #ifndef __CENTRALREPOSITORYTECHVIEWRTESTS_IBY__
 data=DATAZ_\PRIVATE\10202BE9\babababa.txt PRIVATE\10202BE9\babababa.txt
+#ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+     #ifdef PDS_TEST_MULTIROFS
+        // Emulated multirofs regression testing.
+        data=DATAZ_\private\10202be9\babababa.txt         private\10202be9\babababa.txt[01-00]
+    #endif // PDS_TEST_MULTIROFS
+#endif // SYMBIAN_CENTREP_SUPPORT_MULTIROFS
 #ifdef SYMBIAN_BAFL_SYSUTIL
 #include <centrepswiteststub.iby>
 data=DATAZ_\PRIVATE\10202BE9\10033333.txt PRIVATE\10202BE9\10033333.txt
@@ -119,13 +125,24 @@
 data=DATAZ_\PRIVATE\10202BE9\10043337.txt PRIVATE\10202BE9\10043337.txt
 data=DATAZ_\PRIVATE\10202BE9\10043338.txt PRIVATE\10202BE9\10043338.txt
 data=DATAZ_\PRIVATE\10202BE9\10033333_modified.cre	PRIVATE\10202BE9\10033333_modified.cre
+data=DATAZ_\private\10202be9\cabacaba.txt             private\10202be9\cabacaba.txt
+data=DATAZ_\private\10202be9\cadacada.txt             private\10202be9\cadacada.txt
+#ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+    #ifdef PDS_TEST_MULTIROFS
+        //Emulated multirofs regression testing
+        data=DATAZ_\private\10202be9\10033333.txt     private\10202be9\10033333.txt[01-00]
+        data=DATAZ_\private\10202be9\10043336.txt     private\10202be9\10043336.txt[01-00]
+        data=DATAZ_\private\10202be9\10043337.txt     private\10202be9\10043337.txt[01-00]
+        data=DATAZ_\private\10202be9\10043338.txt     private\10202be9\10043338.txt[01-00]
+    #endif // PDS_TEST_MULTIROFS
+#endif // SYMBIAN_CENTREP_SUPPORT_MULTIROFS
 #ifndef __TE_SYSUTILTEFTESTS_IBY__
 data=DATAZ_\RESOURCE\versions\sw.txt	RESOURCE\versions\sw.txt
-#endif
+#endif // __TE_SYSUTILTEFTESTS_IBY__
 data=DATAZ_\PRIVATE\10202BE9\sw_modified.txt	PRIVATE\10202BE9\sw_modified.txt
 data=DATAZ_\PRIVATE\10202BE9\sw_modified1.txt	PRIVATE\10202BE9\sw_modified1.txt
 data=DATAZ_\PRIVATE\10202BE9\RF1.sis	PRIVATE\10202BE9\RF1.sis
 data=DATAZ_\PRIVATE\10202BE9\RF4.sis	PRIVATE\10202BE9\RF4.sis
-#endif
-#endif
+#endif // SYMBIAN_BAFL_SYSUTIL
+#endif // __CENTRALREPOSITORYTECHVIEWRTESTS_IBY__
 #endif //__CENTREPTESTDATA_IBY__
--- a/persistentstorage/centralrepository/pccenrep/group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/pccenrep/group/bld.inf	Thu Sep 02 22:18:45 2010 +0300
@@ -18,7 +18,7 @@
 
 
 PRJ_EXPORTS
-../include/centralrepository.h	 SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/centralrepository.h)
+../include/centralrepository.h	 OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/centralrepository.h)
 
 
 PRJ_TESTEXPORTS
--- a/persistentstorage/centralrepository/test/testexecute/BUR/group/Te_centrep_BURsuite.mmp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/group/Te_centrep_BURsuite.mmp	Thu Sep 02 22:18:45 2010 +0300
@@ -32,15 +32,11 @@
 USERINCLUDE   ../src
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-//SYSTEMINCLUDE /epoc32/include/test
 
 LIBRARY  	euser.lib
 LIBRARY		testexecuteutils.lib 
 LIBRARY		testexecutelogclient.lib 
-
-//LIBRARY		efsrv.lib
 LIBRARY		centralrepository.lib
-//LIBRARY		bafl.lib
 
 CAPABILITY ALL -Tcb
 
--- a/persistentstorage/centralrepository/test/testexecute/BUR/group/te_centrep_burobserversuite.mmp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/group/te_centrep_burobserversuite.mmp	Thu Sep 02 22:18:45 2010 +0300
@@ -29,15 +29,11 @@
 USERINCLUDE   ../src
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-//SYSTEMINCLUDE /epoc32/include/test
 
 LIBRARY  	euser.lib
 LIBRARY		testexecuteutils.lib 
 LIBRARY		testexecutelogclient.lib 
-
-//LIBRARY		efsrv.lib
 LIBRARY		centralrepository.lib
-//LIBRARY		bafl.lib
 
 CAPABILITY ALL -Tcb
 
--- a/persistentstorage/centralrepository/test/testexecute/SWI/group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/group/bld.inf	Thu Sep 02 22:18:45 2010 +0300
@@ -65,7 +65,9 @@
 ../data/certstore/swicertstore.dat						z:/resource/swicertstore.dat
 ./swicertstoredat.iby										/epoc32/rom/include/swicertstoredat.iby
 
-#ifdef __SERIES60_
+
+//define PDS_FULL_UI_TEST in the rom build command for Full S60 UI build
+#if defined(__SERIES60_) && defined(PDS_FULL_UI_TEST)
 
 // SP tests...
 ../data/rnd_sis/KS12s.sis                       z:/tef_centralrepository/ks12s.sis
--- a/persistentstorage/centralrepository/test/testexecute/group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/centralrepository/test/testexecute/group/bld.inf	Thu Sep 02 22:18:45 2010 +0300
@@ -14,7 +14,6 @@
 //
 
 
-#include "../performance/group/bld.inf"
 #include "../convtool/group/bld.inf"
 #ifdef CENTREP_MW_TESTS
 	#include "../SWI/group/bld.inf"
--- a/persistentstorage/centralrepository/test/testexecute/performance/bwins/CentRepPerfTestU.DEF	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	?NewServer@@YAHXZ @ 1 NONAME ; int NewServer(void)
-
--- a/persistentstorage/centralrepository/test/testexecute/performance/config/perf.ini	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-[boottest]
-TestMode=1
-
-[timingtest1]
-TestMode=0
-Output=ResultSet1
-
-[timingtest2]
-TestMode=0
-Output=ResultSet2
-
-[Shared]
-shared_data_num = 2
-shared_name_1 = ResultSet1
-shared_name_2 = ResultSet2
\ No newline at end of file
--- a/persistentstorage/centralrepository/test/testexecute/performance/group/TE_CentRepPerfTest.iby	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2009 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef __TE_CENTREP_PERFTEST_IBY__
-#define __TE_CENTREP_PERFTEST_IBY__
-
-#include <testexecute.iby>
-
-// centrep test dlls
-#include <centreptesthelper.iby>
-
-// centrep test data
-#include <centreptestdata.iby>
-
-file=ABI_DIR\BUILD_DIR\CentRepPerfTest.exe		System\bin\CentRepPerfTest.exe
-
-data=DATAZ_\TEF_CentralRepository\perf.ini 			TEF_CentralRepository\perf.ini
-data=DATAZ_\TEF_CentralRepository\TE_PerfTest.script 	TEF_CentralRepository\TE_PerfTest.Script
-
-#endif //__TE_CENTREP_PERFTEST_IBY__
--- a/persistentstorage/centralrepository/test/testexecute/performance/group/TE_CentRepPerfTest.mmp	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-TARGET			centrepperftest.exe
-CAPABILITY AllFiles ReadUserData WriteUserData
-TARGETTYPE		exe
-UID			0x1000007A 0x1027431A
-
-SMPSAFE
-
-SOURCEPATH	../src
-SOURCE		TE_PerfTestUtilities.cpp
-SOURCE		TE_PerfTestCompareStep.cpp
-SOURCE		TE_PerfTestCacheStepBase.cpp
-SOURCE		TE_PerfTestCacheEnabledStep.cpp
-SOURCE		TE_PerfTestCacheDisabledStep.cpp
-SOURCE		TE_PerfTestStep.cpp
-SOURCE		TE_MemTestStep.cpp
-SOURCE		TE_FindPerfTestStep.cpp
-SOURCE		TE_PerfTestServer.cpp
-SOURCE		TE_DefectTestStep.cpp
-SOURCE		TE_PerfTestClientOpenStep.cpp
-SOURCE		TE_NotifyMemTestStep.cpp
-
-USERINCLUDE	../inc
-USERINCLUDE	../../../../cenrepsrv
-USERINCLUDE	../../../../common/inc
-USERINCLUDE	../../../../include
-USERINCLUDE	../../../../test
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-LIBRARY     	euser.lib
-LIBRARY		testexecuteutils.lib
-LIBRARY		testexecutelogclient.lib
-LIBRARY		hal.lib 
-LIBRARY		centralrepository.lib
-LIBRARY		t_cenrep_helper.lib bafl.lib efsrv.lib
-
--- a/persistentstorage/centralrepository/test/testexecute/performance/group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-PRJ_TESTMMPFILES
-
-TE_CentRepPerfTest.mmp manual
-
-PRJ_TESTEXPORTS
-../scripts/TE_PerfTest.script z:/tef_centralrepository/te_perftest.script
-../config/perf.ini z:/tef_centralrepository/perf.ini
-
-TE_CentRepPerfTest.iby			/epoc32/rom/include/te_centrepperftest.iby
--- a/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_DefectTestStep.h	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
- 
-#ifndef __TE_DEFECTTESTSTEP_H__
-#define __TE_DEFECTTESTSTEP_H__
-
-#include <test/testexecutestepbase.h>
-
-_LIT(KPerfTestDefectStepDEF057491, "CentRepDefectTest057491");
-_LIT(KPerfTestDefectStepDEF059633, "CentRepDefectTest059633");
-
-class CPerfTestDefectStep057491 : public CTestStep
-	{
-public:
-	CPerfTestDefectStep057491();
-	virtual TVerdict doTestStepL(void);
-	};
-
-class CPerfTestDefectStep059633 : public CTestStep
-	{
-public:
-	CPerfTestDefectStep059633();
-	virtual TVerdict doTestStepL(void);
-	};
-
-#endif // __TE_DEFECTTESTSTEP_H__
--- a/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_FindPerfTestStep.h	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// TE_MemTestStep.h
-// 
-//
- 
-#ifndef __TE_FINDPERFTESTSTEP_H__
-#define __TE_FINDPERFTESTSTEP_H__
-
-#include <test/testexecutestepbase.h>
-
-_LIT(KFindPerfTestName, "CentRepFindPerfTest");
-
-class CFindPerfTestStep : public CTestStep
-	{
-public:
-	CFindPerfTestStep();
-	virtual TVerdict doTestStepL(void);
-	};
-
-#endif // __TE_FINDPERFTESTSTEP_H__
--- a/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_MemTestStep.h	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
- 
-#ifndef __TE_MEMTESTSTEP_H__
-#define __TE_MEMTESTSTEP_H__
-
-#include <test/testexecutestepbase.h>
-
-_LIT(KMemTestName, "CentRepMemTestLogger");
-
-#ifdef __CENTREP_SERVER_MEMTEST__
-// Class for storing initial and final heap size readings for specific
-// location and identifier
-class TMemTestResult
-	{
-public:
-	inline TMemTestResult(TInt32 aLocation, TInt32 aIdentifier, TBool aIsComplete) 
-		: iLocation(aLocation), iIdentifier(aIdentifier), iIsComplete(aIsComplete) { }
-	//location where the memory reading is done
-	TInt32 iLocation;
-	//identifier of the memory reading (e.g. repository id, 10th reading etc)
-	TInt32 iIdentifier;
-	//whether both initial and final heap size readings are valid
-	TBool iIsComplete;
-	//heap size before the operation starts
-	TInt32 iInitHeapSize;
-	//heap size after the operation ends
-	TInt32 iFinalHeapSize;
-	};
-#endif //__CENTREP_SERVER_MEMTEST__
-	
-class CMemTestStep : public CTestStep
-	{
-public:
-	CMemTestStep();
-	virtual TVerdict doTestStepL(void);
-protected:
-#ifdef __CENTREP_SERVER_MEMTEST__
-	virtual void ProcessMemTestResults(TAny* aRawData, TInt32 aRawCount, RArray<TMemTestResult>& aMemTestResults);
-#endif //__CENTREP_SERVER_MEMTEST__
-	};
-
-#endif // __TE_MEMTESTSTEP_H__
--- a/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_NotifyMemTestStep.h	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/**
-* Copyright (c) 2006-2009 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This file define all the common values thoughout your test project
-* 
-*
-*/
-
-
-
-/**
- @file
-*/
-#ifndef __TE_NOTIFYMEMTESTSTEP_H__
-#define __TE_NOTIFYMEMTESTSTEP_H__
-
-#include <test/testexecutestepbase.h>
-#include "TE_MemTestStep.h"
-
-_LIT(KNotifyMemTestStep, "NotifyMemTestStep");
-
-class CNotifyMemTestStep : public CMemTestStep
-	{
-public:
-	inline CNotifyMemTestStep(){SetTestStepName(KNotifyMemTestStep);};
-	virtual TVerdict doTestStepL(void);
-protected:
-#ifdef __CENTREP_SERVER_MEMTEST__
-	virtual void ProcessMemTestResults(TAny* aRawData, TInt32 aRawCount, RArray<TMemTestResult>& aMemTestResults);
-#endif //__CENTREP_SERVER_MEMTEST__
-	};
-
-#endif //__TE_NOTIFYMEMTESTSTEP_H__
--- a/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCacheDisabledStep.h	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// TE_PerfTestCacheEnabledStep.h
-// 
-//
- 
-#ifndef __TE_PERFTESTCACHEDISABLEDSTEP_H__
-#define __TE_PERFTESTCACHEDISABLEDSTEP_H__
-
-#include "TE_PerfTestCacheStepBase.h"
-
-//--------------------------------
-// class CPerfTestCacheDisabledStep
-//--------------------------------
-
-_LIT(KPerfTestCacheDisabledStep, "PerfTestCacheDisabledStep");
-
-class CPerfTestCacheDisabledStep : public CPerfTestCacheStepBase
-	{
-public:
-	CPerfTestCacheDisabledStep();
-	virtual TVerdict doTestStepL(void);
-	};
-
-#endif
--- a/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCacheEnabledStep.h	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
- 
-#ifndef __TE_PERFTESTCACHEENABLEDSTEP_H__
-#define __TE_PERFTESTCACHEENABLEDSTEP_H__
-
-#include "TE_PerfTestCacheStepBase.h"
-
-//--------------------------------
-// class CPerfTestCacheEnabledStep
-//--------------------------------
-_LIT(KPerfTestCacheEnabledStep, "PerfTestCacheEnabledStep");
-
-class CPerfTestCacheEnabledStep : public CPerfTestCacheStepBase
-	{
-public:
-	CPerfTestCacheEnabledStep();
-	virtual TVerdict doTestStepL(void);
-	};
-
-#endif
--- a/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCacheStepBase.h	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/**
-* Copyright (c) 2005-2009 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This file define all the common values thoughout your test project
-* 
-*
-*/
-
-
-
-/**
- @file
-*/
-#ifndef __TE_PERFTESTCACHESTEPBASE_H__
-#define __TE_PERFTESTCACHESTEPBASE_H__
-
-#include <test/testexecutestepbase.h>
-
-class CPerfTestCacheStepBase : public CTestStep
-	{
-public:
-	CPerfTestCacheStepBase() {};
-	void CommonTestStepL(void);
-	};
-
-#endif //__TE_PERFTESTCACHESTEPBASE_H__
--- a/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestClientOpenStep.h	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-// Copyright (c) 2006-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
- 
-#ifndef __TE_PERFTESTCLIENTOPENSTEP_H__
-#define __TE_PERFTESTCLIENTOPENSTEP_H__
-
-#include <test/testexecutestepbase.h>
-
-//--------------------------------
-// class CPerfTestClientOpenStep
-//--------------------------------
-
-_LIT(KPerfTestClientOpenName, "PerfTestClientOpenStep");
-
-class CPerfTestClientOpenStep : public CTestStep
-	{
-public:
-	CPerfTestClientOpenStep();
-	virtual TVerdict doTestStepL(void);
-	};
-
-#endif //__TE_PERFTESTCLIENTOPENSTEP_H__
--- a/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCompareStep.h	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
- 
-#ifndef __TE_PERFTESTCOMPARESTEP_H__
-#define __TE_PERFTESTCOMPARESTEP_H__
-
-#include "TE_PerfTestCacheStepBase.h"
-
-//--------------------------------
-// class CPerfTestCompareStep
-//--------------------------------
-_LIT(KPerfTestCompareStep, "PerfTestCompareStep");
-
-class CPerfTestCompareStep : public CTestStep
-	{
-public:
-	CPerfTestCompareStep();
-	virtual TVerdict doTestStepL(void);
-
-protected:
-	class TSummary
-		{
-	public:
-		TBuf<20> iName;
-		TUint iUseCount;
-		TUint32 iSumElapsedTicks;
-		};
-	void ReadResults(RArray<TSummary> &aArray, TBuf<KMaxFileName> &aString);
-	RArray<TSummary> iResults1;
-	RArray<TSummary> iResults2;
-	};
-
-#endif
--- a/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestServer.h	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#ifndef __TE_PERFTESTSERVER_H__
-#define __TE_PERFTESTSERVER_H__
-#include <test/testexecuteserverbase.h>
-		
-class CPerfTestServer : public CTestServer
-	{
-public:
-	static CPerfTestServer* NewL();
-	virtual CTestStep* CreateTestStep(const TDesC& aStepName);
-	};
-#endif
--- a/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestStep.h	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
- 
-#ifndef __TE_PERFTESTSTEP_H__
-#define __TE_PERFTESTSTEP_H__
-
-#include <e32std.h>
-#include <test/testexecutestepbase.h>
-
-class TRepStatistics
-	{
-public:
-#ifdef __WINS__
-	#ifdef _DEBUG
-		enum { KTicks2LoadFromCache = 70 }; // emulator UDEB
-	#else
-		enum { KTicks2LoadFromCache = 40 }; // emulator UREL
-	#endif
-#else
-	#ifdef _DEBUG
-		enum { KTicks2LoadFromCache = 90 }; // armv5 UDEB
-	#else
-		enum { KTicks2LoadFromCache = 60 }; // armv5 UREL
-	#endif
-#endif
-
-	inline TRepStatistics();
-	inline TRepStatistics(const TRepStatistics& aRepStatistics);
-    inline TRepStatistics(TUint32 aRepUid, TUint32 aLoadTicks);
-    inline TBool MatchUid(TUint32 aRepUid) const;
-    void AddData(TUint32 aElapsedTicks);
-
-	TUint32 iRepUid;
-	TUint   iUseCount; // how many times the rep is open
-	TUint32 iSumLoadTicks;
-	TUint   iCacheMisses; // how many times rep need to be reloaded
-	};
-
-//-----------------------------------------------
-
-class TIpcStatistics
-	{
-public:
-	inline TIpcStatistics();
-	void AddData(TUint32 aElapsedTicks);
-
-	TUint iUseCount;
-	TUint32 iSumElapsedTicks;
-	};
-
-//-----------------------------------------------
-
-_LIT(KGetPerfTestResults, "GetPerfTestResults");
-_LIT(KIniTestMode, "TestMode");
-_LIT(KResultsSection, "Output");
-
-class CPerfTestStep : public CTestStep
-	{
-public:
-	enum TTestModes
-		{
-		ETiming,
-		EBoot
-		};
-
-	inline CPerfTestStep(){SetTestStepName(KGetPerfTestResults);};
-	virtual TVerdict doTestStepL(void);
-
-private:
-	void ConvertTickToSecAndMilli(TUint32 aTick, TUint& aSec, TUint& aMilliSec);
-
-private:
-	TInt iTickFreq;
-	};
-
-#include "TE_PerfTestStep.inl"
-
-#endif
--- a/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestStep.inl	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-// class TRepStatistics
-inline TRepStatistics::TRepStatistics()
-	: iRepUid(0), iUseCount(0), iSumLoadTicks(0), iCacheMisses(0)
-	{
-	}
-
-inline TRepStatistics::TRepStatistics(const TRepStatistics& aRepStatistics)
-	{
-	iRepUid = aRepStatistics.iRepUid;
-	iUseCount = aRepStatistics.iUseCount;
-	iSumLoadTicks = aRepStatistics.iSumLoadTicks;
-	iCacheMisses = aRepStatistics.iCacheMisses;
-	}
-
-inline TRepStatistics::TRepStatistics(TUint32 aRepUid, TUint32 aLoadTicks)
-	: iRepUid(aRepUid), iUseCount(1), iSumLoadTicks(aLoadTicks), iCacheMisses(0)
-	{
-	}
-
-inline TBool TRepStatistics::MatchUid(TUint32 aRepUid) const
-	{
-	return iRepUid == aRepUid;
-	}
-
-//-------------------------------------
-// class TIpcStatistics
-
-inline TIpcStatistics::TIpcStatistics()
-	: iUseCount(0), iSumElapsedTicks(0)
-	{
-	}
-
--- a/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestUtilities.h	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-// Copyright (c) 2006-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// TE_MemTestFileOpenStep.h
-// 
-//
- 
-#ifndef __TE_PERFTESTUTILITIES_H__
-#define __TE_PERFTESTUTILITIES_H__
-
-#include <e32base.h>
-
-//Utility function that converts fast counter result to milliseconds in real
-TReal FastCountToMillisecondsInReal(TInt aFastCount);
-
-//Utility function that converts fast counter result to microseconds in real
-TReal FastCountToMicrosecondsInReal(TInt aFastCount);
-
-//Utility function that converts fast counter result to milliseconds in int
-TUint64 FastCountToMillisecondsInInt(TInt aFastCount);
-
-//Utility function that converts fast counter result to microseconds in int
-TUint64 FastCountToMicrosecondsInInt(TInt aFastCount);
-
-//Utility function that measures the free ram size in bytes
-TInt FreeRamSize();
-
-//Utility function to cleanup cache
-void CleanupRepositoryCache();
-
-#endif //__TE_PERFTESTUTILITIES_H__
-
--- a/persistentstorage/centralrepository/test/testexecute/performance/scripts/TE_PerfTest.script	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-// Copyright (c) 2006-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-//! @file
-//! @SYMTestSuiteName PDS-TEF-CENTREP-PERFORMANCE
-//! @SYMScriptTestEnvironment TEF
-//! @internalComponent
-//! @test
-
-PRINT CentralRepository TEF Performance Tests
-
-LOAD_SUITE CentRepPerfTest
-
-//Delay to make sure that boot has completed.
-DELAY 60000
-
-START_TESTCASE  SYSLIBS-CENTRALREPOSITORY-PT-1424
-//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1424
-//! @SYMTestCaseDesc Measure CPU time usage by CentralRepositorySrv during boot
-//! @SYMTestPriority Critical
-//! @SYMTestActions  Retrieve performance data collected by CentRep server, analyze, and
-//!    print out a summary of the performance data.
-//! @SYMTestExpectedResults This test always passes. Engineers working on CentRep 
-//!    improvement will run this suite before and after submission to gage actual
-//!    savings in CPU time.
-//! @SYMPREQ PREQ1192
-//! @SYMTestStatus Defined
-RUN_TEST_STEP 300 CentRepPerfTest GetPerfTestResults z:\TEF_CentralRepository\perf.ini boottest
-
-END_TESTCASE   SYSLIBS-CENTRALREPOSITORY-PT-1424
-
-START_TESTCASE  SYSLIBS-CENTRALREPOSITORY-PT-1425
-//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1425
-//! @SYMTestCaseDesc Measure Heap usage by CentralRepositorySrv repositories during boot
-//! @SYMTestPriority Critical
-//! @SYMTestActions  Retrieve performance data collected by CentRep server, analyze, and
-//!    print out a summary.
-//! @SYMTestExpectedResults This test always passes. Engineers working on CentRep 
-//!    improvement will run this suite before and after submission to gauge actual
-//!    savings in RAM usage of repositories.
-//! @SYMPREQ PREQ1192
-//! @SYMTestStatus Defined
-RUN_TEST_STEP 300 CentRepPerfTest CentRepMemTestLogger
-
-END_TESTCASE   SYSLIBS-CENTRALREPOSITORY-PT-1425
-
-START_TESTCASE  SYSLIBS-CENTRALREPOSITORY-PT-1459
-//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1459
-//! @SYMTestCaseDesc Measure CPU time used by CentRep client and server for Find~L API.
-//! @SYMTestPriority Critical
-//! @SYMTestActions  Call Find~L API and measure the time it takes for completion then 
-//!                 report the summary.
-//! @SYMTestExpectedResults This test always passes. Engineers working on CentRep 
-//!    improvement will run this suite before and after submission to gauge actual
-//!    savings in CPU time.
-//! @SYMPREQ PREQ1192
-//! @SYMTestStatus Defined
-RUN_TEST_STEP 300 CentRepPerfTest CentRepFindPerfTest
-END_TESTCASE   SYSLIBS-CENTRALREPOSITORY-PT-1459
-
-START_TESTCASE  SYSLIBS-CENTRALREPOSITORY-PT-1423 //CachePerformance
-SHARED_DATA z:\TEF_CentralRepository\perf.ini Shared
-//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1423
-//! @SYMTestCaseDesc Measure cached repository access time in CentralRepository 
-//! @SYMTestPriority High
-//! @SYMTestActions  Bring up server, connect, access repositories, retrieve performance 
-//!    data, analyze, and print out a summary of the performance data.
-//! @SYMTestExpectedResults This test always passes. Engineers working on CentRep 
-//!    improvement will run this suite before and after submission to gage actual
-//!    savings in CPU time.
-//! @SYMPREQ PREQ1192
-//! @SYMTestStatus Defined
-
-	RUN_TEST_STEP 1200 CentRepPerfTest PerfTestCacheEnabledStep
-	PRINT --- Performance data for repository access with Caching ENABLED  ---
-	RUN_TEST_STEP 300 CentRepPerfTest GetPerfTestResults z:\TEF_CentralRepository\perf.ini timingtest1
-	RUN_TEST_STEP 1200 CentRepPerfTest PerfTestCacheDisabledStep
-	PRINT --- Performance data for repository access with Caching DISABLED ---
-	RUN_TEST_STEP 300 CentRepPerfTest GetPerfTestResults z:\TEF_CentralRepository\perf.ini timingtest2
-	RUN_TEST_STEP 300 CentRepPerfTest PerfTestCompareStep z:\TEF_CentralRepository\perf.ini Shared
-END_TESTCASE  SYSLIBS-CENTRALREPOSITORY-PT-1423 //CachePerformance
-
-START_TESTCASE  SYSLIBS-CENTRALREPOSITORY-PT-1482
-//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1482
-//! @SYMTestCaseDesc Central repository persists operation performance could be improved
-//! @SYMTestPriority High
-//! @SYMTestActions  Calculate Average time to open large repository from ROM file, average time to open 
-//!    large repository from persists file and average time to write large repository to persists file. 
-//! @SYMTestExpectedResults This test always passes. 
-//! @SYMDEF DEF057491
-//! @SYMTestStatus Defined
-RUN_TEST_STEP 300 CentRepPerfTest CentRepDefectTest057491
-END_TESTCASE  SYSLIBS-CENTRALREPOSITORY-PT-1482
-
-
-START_TESTCASE  SYSLIBS-CENTRALREPOSITORY-PT-1483
-//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1483
-//! @SYMTestCaseDesc Central Repository adds 11s to 9.1 NAND boot time
-//! @SYMTestPriority High
-//! @SYMTestActions  Calculate time to open text based rep from ROM, time to open binary rep from ROM,
-//!    average time to open text based rep from ROM, average time to open binary rep from ROM, 
-//!    compare results and prove that opening .ini is slower than opening .cre files 
-//! @SYMTestExpectedResults This test always passes. 
-//! @SYMDEF DEF059633
-//! @SYMTestStatus Defined
-RUN_TEST_STEP 300 CentRepPerfTest CentRepDefectTest059633
-
-END_TESTCASE  SYSLIBS-CENTRALREPOSITORY-PT-1483
-
-
-START_TESTCASE  SYSLIBS-CENTRALREPOSITORY-PT-1657
-//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1657
-//! @SYMTestCaseDesc Measure the time to open/close multiple repositories from a single thread
-//! @SYMTestPriority High
-//! @SYMTestActions  Measure CPU time, open n repositories, measure CPU time, report the time it 
-//!                 takes to open all repositories. Measure CPU time, close n repositories, measure
-//!                 CPU time, report the time it takes to close all repositories. Repeat all of 
-//!                 the steps for n=1..5
-//! @SYMTestExpectedResults This test always passes. Engineers working on CentRep improvements 
-//!                 will run this suite before and after submission to gauge actual savings 
-//!                 in CPU time.
-//! @SYMPREQ PREQ1228
-//! @SYMTestStatus Defined
-RUN_TEST_STEP 300 CentRepPerfTest PerfTestClientOpenStep
-END_TESTCASE  SYSLIBS-CENTRALREPOSITORY-PT-1657
-
-START_TESTCASE    SYSLIBS-CENTRALREPOSITORY-PT-1658  //Notify-OnlyRAM
-//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1658
-//! @SYMTestCaseDesc Notify-only client optimization RAM usage test
-//! @SYMTestPriority High
-//! @SYMTestActions  Retrieve memory usage data collected by CentRep server, analyze, and
-//!    print out a summary during certain stages of the lifetime of session objects.
-//! @SYMTestExpectedResults This test always pass. Engineers working on CentRep 
-//!    improvement will run this suite before and after submission to gauge actual
-//!    savings in RAM usage of repositories.
-//! @SYMPREQ PREQ1228
-//! @SYMTestStatus Defined
-
-	RUN_TEST_STEP 300 CentRepPerfTest NotifyMemTestStep
-END_TESTCASE    SYSLIBS-CENTRALREPOSITORY-PT-1658  //Notify-OnlyRAM
--- a/persistentstorage/centralrepository/test/testexecute/performance/src/TE_DefectTestStep.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,287 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "TE_DefectTestStep.h"
-#include "TE_PerfTestUtilities.h"
-#include <centralrepository.h>
-#include "t_cenrep_helper.h"
-#include "srvdefs.h"
-#include "srvreqs.h"
-#include <bautils.h>
-#include "cachemgr.h"
-
-#ifdef __CENTREP_SERVER_CACHETEST__
-
-const TUid KUidLargeRepository          = { 0xCCCCCC01 };
-const TUid KUidRep1						= { 0x00000100 };
-const TUid KUidLargeCreRepository       = { 0xCCCCCC02 };
-
-const TUint32 KNewInt = 1000;
-const TInt KIntValue = 1234;
-
-const TInt KNumOfAttempts = 10;
-
-_LIT(KZRep1File, 				"z:\\private\\10202BE9\\00000100.txt");
-_LIT(KCRep1TxtFile,				"c:\\private\\10202BE9\\persists\\00000100.txt");
-_LIT(KCRep1CreFile,				"c:\\private\\10202BE9\\persists\\00000100.cre");
-#endif
-
-CPerfTestDefectStep057491::CPerfTestDefectStep057491()
-	{
-	SetTestStepName(KPerfTestDefectStepDEF057491);
-	}
-	
-TVerdict CPerfTestDefectStep057491::doTestStepL()
-	{
-#ifndef __CENTREP_SERVER_CACHETEST__
-	return EPass;
-#else	
-	SetTestStepResult(EFail);
-	
-	CRepository* rep;
-	TInt64 totalRomMs=0;
-	TInt64 totalCreMs=0;
-	TInt64 totalRepWriteMs=0;
-	
-   	TUint32 startFastCounter;	
-   	TUint64 fastCounterromOpenMicroseconds;
-   	TUint64 fastCounterrepWriteMicroseconds;
-   	TUint64 fastCountercreOpenMicroseconds;
-	
-	// Flush and disable cache for this test
-	TInt r;
-	r = SetGetParameters(TIpcArgs(EDisableCache));
-	TEST(r==KErrNone);
-
-	// Time opening and writing repository
-	for(TInt i=0; i<KNumOfAttempts;i++)
-		{
-		// Get start time for ROM file
-	    startFastCounter = User::FastCounter();
-		User::LeaveIfNull(rep = CRepository::NewLC(KUidLargeRepository));
-		
-		// Get finish time for ROM file
-		fastCounterromOpenMicroseconds = FastCountToMicrosecondsInInt(User::FastCounter() - startFastCounter);
-		totalRomMs+=fastCounterromOpenMicroseconds;
-		Logger().WriteFormat(_L("Time to open large repos from ROM      file = %lu microseconds\n"), fastCounterromOpenMicroseconds);
-		
-	    startFastCounter = User::FastCounter();
-		TInt r = rep->Create(KNewInt, KIntValue);
-		fastCounterrepWriteMicroseconds = FastCountToMicrosecondsInInt(User::FastCounter() - startFastCounter);
-		totalRepWriteMs+=fastCounterrepWriteMicroseconds;
-		Logger().WriteFormat(_L("Time to write large repos              file = %lu microseconds\n"), fastCounterrepWriteMicroseconds);
-
-		TEST(r==KErrNone);
-		
-		// Close repository
-		CleanupStack::PopAndDestroy(rep);
-		
-		// Get start time and ticks for .cre file
-	    startFastCounter = User::FastCounter();
-		
-		// Open repository 
-		User::LeaveIfNull(rep = CRepository::NewLC(KUidLargeRepository));
-		
-		// Get finish time and ticks for .cre file
-		fastCountercreOpenMicroseconds  = FastCountToMicrosecondsInInt(User::FastCounter() - startFastCounter);
-		totalCreMs+=fastCountercreOpenMicroseconds;
-		Logger().WriteFormat(_L("Time to open large repos from persists file = %lu microseconds\n"), fastCountercreOpenMicroseconds);
-
-#if !defined(__WINS__) && !defined(__WINSCW__)
-		TEST(fastCounterromOpenMicroseconds>fastCountercreOpenMicroseconds);
-#endif		
-		const TUint32 	KIntKey1 		= 8847616;
-		const TInt 		KIntKey1Value 	= 1;
-		const TUint32 	KIntKey2 		= 139068928;
-		const TInt 		KIntKey2Value 	= 30;
-		const TUint32 	KIntKey3 		= 2373975808UL;
-		const TInt 		KIntKey3Value 	= -1920991488;
-		
-		// Test 3 random int key values from repository
-		TInt keyValue;
-		r=rep->Get(KIntKey1, keyValue);
-		TEST(r == KErrNone);
-		TEST(keyValue == KIntKey1Value);
-
-		r=rep->Get(KIntKey2, keyValue);
-		TEST(r == KErrNone);
-		TEST(keyValue == KIntKey2Value);
-		
-		r=rep->Get(KIntKey3, keyValue);
-		TEST(r == KErrNone);
-		TEST(keyValue == KIntKey3Value);
-		
-		// Close repository
-		CleanupStack::PopAndDestroy(rep);
-
-		CleanupFileFromCDriveL(KUidLargeRepository);
-		}
-	
-	Logger().WriteFormat(_L("Average time to open large repos from ROM      file = %lu ms\n"), totalRomMs/KNumOfAttempts);
-	Logger().WriteFormat(_L("Average time to open large repos from persists file = %lu ms\n"), totalCreMs/KNumOfAttempts);		
-	Logger().WriteFormat(_L("Average time to write large repos to  persists file = %lu ms\n"), totalRepWriteMs/KNumOfAttempts);		
-
-	RFs fs;			
-	User::LeaveIfError(fs.Connect());
-	CleanupClosePushL(fs);
-	CFileMan* fm = CFileMan::NewL(fs);
-	CleanupStack::PushL(fm);
-	// Copy a repository txt file to the C:
-	User::LeaveIfError(fm->Copy(KZRep1File, KCPersistsDir));
-	// Reset read-only bit
-	User::LeaveIfError(fm->Attribs(KCRep1TxtFile,0,KEntryAttReadOnly,TTime(0)));
-	// Check it exists
-	TEST( BaflUtils::FileExists (fs, KCRep1TxtFile));	
-	
-	// Open repository
-	User::LeaveIfNull(rep = CRepository::NewLC(KUidRep1));
-	
-	// Create a setting
-	r = rep->Create(KNewInt, KIntValue);
-	TEST(r == KErrNone);
-	
-	// Check persists file exists
-	TEST(BaflUtils::FileExists (fs, KCRep1CreFile));	
-
-	// Check that .txt file is gone	
-	TEST(BaflUtils::FileExists (fs, KCRep1TxtFile) == EFalse);	
-
-	// Close the repository
-	CleanupStack::PopAndDestroy(rep);
-	
-	CleanupStack::PopAndDestroy(2);		// fm, fs
-
-	CleanupFileFromCDriveL(KUidRep1);
-
-	// Enable cache
-	r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize));
-	TEST(r==KErrNone);
-
-	SetTestStepResult(EPass);
-	
-	return TestStepResult();
-#endif
-	}
-
-CPerfTestDefectStep059633::CPerfTestDefectStep059633()
-	{
-	SetTestStepName(KPerfTestDefectStepDEF059633);
-	}
-
-TVerdict CPerfTestDefectStep059633::doTestStepL()
-	{
-#ifndef __CENTREP_SERVER_CACHETEST__
-	return EPass;
-#else	
-	SetTestStepResult(EFail);
-
-	// Flush and disable cache for this test
-	TInt r;
-	r = SetGetParameters(TIpcArgs(EDisableCache));
-	TEST(r==KErrNone);
-
-	CleanupFileFromCDriveL(KUidLargeRepository);
-	CleanupFileFromCDriveL(KUidLargeCreRepository);
-
-   	CRepository* rep; 
-   	
-   	TUint32 startFastCounter;
-   	TUint64 fastCountertimeToOpenLargeIniRep;
-   	TUint64 fastCountertimeToOpenLargeCreRep;
-   	TUint64 fastCountertimeToOpenXLargeInis;
-   	TUint64 fastCountertimeToOpenXLargeCres;
-    
-    //=========================================================================================
-   	//Single .ini - opening
-    startFastCounter = User::FastCounter();
-	User::LeaveIfNull(rep = CRepository::NewLC(KUidLargeRepository));
-	fastCountertimeToOpenLargeIniRep = FastCountToMicrosecondsInInt(User::FastCounter() - startFastCounter);
-	Logger().WriteFormat(_L("Time to open text based rep from ROM = %lu microseconds\n\n"), fastCountertimeToOpenLargeIniRep);
-	CleanupStack::PopAndDestroy(rep);
-	
-    //=========================================================================================
-	//KNumOfAttempts .ini
-	
-	startFastCounter = User::FastCounter();	
-	for (TInt i=0; i<KNumOfAttempts; i++)
-	    {
-	    User::LeaveIfNull(rep = CRepository::NewLC(KUidLargeRepository));
-	    CleanupStack::PopAndDestroy(rep);
-	    }
-	fastCountertimeToOpenXLargeInis = FastCountToMicrosecondsInInt(User::FastCounter() - startFastCounter);
-
-	//=========================================================================================
-	//single .cre
-	startFastCounter = User::FastCounter();	
-	User::LeaveIfNull(rep = CRepository::NewLC(KUidLargeCreRepository));
-	fastCountertimeToOpenLargeCreRep = FastCountToMicrosecondsInInt(User::FastCounter() - startFastCounter);
-	Logger().WriteFormat(_L("Time to open binary rep from ROM = %lu microseconds\n\n"), fastCountertimeToOpenLargeCreRep);
-	CleanupStack::PopAndDestroy(rep);
-	
-	//=========================================================================================
-	//KNumOfAttempts .cre
-	startFastCounter = User::FastCounter();	
-	for (TInt j=0; j<KNumOfAttempts; j++)
-	    {	    
-  	    User::LeaveIfNull(rep = CRepository::NewLC(KUidLargeCreRepository));
-  	    CleanupStack::PopAndDestroy(rep);
-	    }
-	fastCountertimeToOpenXLargeCres = FastCountToMicrosecondsInInt(User::FastCounter() - startFastCounter);
-
-    //=========================================================================================	    
-	//average 
-	TInt64 averageFastCounterTimeToOpenIni = fastCountertimeToOpenXLargeInis / KNumOfAttempts;
-	Logger().WriteFormat(_L("Average time to open text based rep from ROM = %lu  microseconds\n\n"), averageFastCounterTimeToOpenIni);
-	
-	TInt64 averageFastCounterTimeToOpenCre = fastCountertimeToOpenXLargeCres / KNumOfAttempts;
-	Logger().WriteFormat(_L("Average time to open binary rep from ROM = %lu  microseconds\n\n"), averageFastCounterTimeToOpenCre);
-  	
-  	//=========================================================================================
-    //prove that opening .ini is slower than opening .cre files 
-    // (even though the difference is now much less after the performance 
-    // improvements of PREQ 1192, the test is now much more precise by using fastcounter)
-#if !defined(__WINS__) && !defined(__WINSCW__)
-    TEST(fastCountertimeToOpenLargeIniRep > fastCountertimeToOpenLargeCreRep);
-    TEST(fastCountertimeToOpenXLargeInis > fastCountertimeToOpenXLargeCres);
-    TEST(averageFastCounterTimeToOpenIni > averageFastCounterTimeToOpenCre);
-#endif		
-
-    //==========================================================================================
-    //benchmarks - open
-	#if !defined(__WINS__) && !defined(__WINSCW__)
-	    #ifdef _DEBUG
-      	  	const TInt64 KOpenCreTime  = 150000; //armv5 debug
-	    #else
-      	   const TInt64 KOpenCreTime  = 75000;  //armv5 urel
-      	#endif
-	
-	TEST(averageFastCounterTimeToOpenCre < KOpenCreTime);      	
-	
-    #endif//!defined(__WINS__) && !defined(__WINSCW__)
-
-    //========================================================================
-
-	CleanupFileFromCDriveL(KUidLargeRepository);
-	CleanupFileFromCDriveL(KUidLargeCreRepository);
-
-	// Enable cache
-	r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize));
-	TEST(r==KErrNone);
-
-	SetTestStepResult(EPass);
-	
-	return TestStepResult();
-#endif
-	}
--- a/persistentstorage/centralrepository/test/testexecute/performance/src/TE_FindPerfTestStep.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "TE_FindPerfTestStep.h"
-#include "TE_PerfTestUtilities.h"
-#include <centralrepository.h>
-#include "centralrepositoryinternal.h"
-#include <hal.h>
-#include <hal_data.h>
-
-using namespace NCentralRepositoryConstants;
-
-const TUid KUidFindPerfTestRepositorySmTxt = { 0x00000105 };
-
-CFindPerfTestStep::CFindPerfTestStep()
-	{
-	SetTestStepName(KFindPerfTestName);
-	}
-	
-// doTestStepL
-// This test fetches the memory data collected by
-// CentRep server, processes it and reports the result.
-TVerdict CFindPerfTestStep::doTestStepL()
-	{
-	SetTestStepResult(EFail);
-	
- 	CRepository* repository = NULL;
-	TRAPD(res, repository = CRepository::NewL(KUidFindPerfTestRepositorySmTxt));
-	TESTL(res == KErrNone);
-	TESTL(repository != NULL);
-	CleanupStack::PushL(repository);
-
-	//if the KCentRepFindBufSize has been increased to a value more then 16 then test 
-	//repository "KUidFindPerfTestRepositorySmTxt" needs to be updated otherwise this 
-	//test will start failing. In this case the repository should be updated to have
-	//more entries.
-	TESTL(KCentRepFindBufSize<=16);
-
-	RArray<TUint32> foundIds;
-	TUint32 accumulatedTicks = 0;
-	for(TInt j=1; j<=KCentRepFindBufSize; j++)
-		{
-		accumulatedTicks = 0;
-		for(TInt i=0; i<100; i++)
-			{
-			TInt r = KErrNone;
-			TUint32 startTick = User::FastCounter();
-			r = repository->FindEqL(0, 0, j, foundIds);
-			TUint32 endTick = User::FastCounter();
-
-			//check for errors
-			TESTL(r == KErrNone);
-			//check that number of found ids is as expected
-			TESTL(foundIds.Count() == j);
-						
-			accumulatedTicks += endTick - startTick;
-			}
-		
-		INFO_PRINTF3(_L("Total time spent to find settings of count %d is %f[ms]"), j, FastCountToMillisecondsInReal(accumulatedTicks));
-		}
-
-	//now run it one more time for settings of count more than KCentRepFindBufSize
-	for(TInt j=1; j<=KCentRepFindBufSize; j++)
-		{
-		accumulatedTicks = 0;
-		for(TInt i=0; i<100; i++)
-			{
-			TInt r = KErrNone;
-			TUint32 startTick = User::FastCounter();
-			r = repository->FindNeqL(0, 0, j, foundIds);
-			TUint32 endTick = User::FastCounter();
-			
-			//check for errors
-			TESTL(r == KErrNone);
-			//check that number of found ids is as expected
-			TESTL(foundIds.Count() > KCentRepFindBufSize);
-			
-			accumulatedTicks += endTick - startTick;
-			}
-		
-		INFO_PRINTF3(_L("Total time spent to find settings of count %d is %f[ms]"), foundIds.Count(), FastCountToMillisecondsInReal(accumulatedTicks));
-		}
-		
-	CleanupStack::PopAndDestroy(repository);
-	repository = NULL;
-
-	SetTestStepResult(EPass);
-	
-	return TestStepResult();
-	}
-
--- a/persistentstorage/centralrepository/test/testexecute/performance/src/TE_MemTestStep.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <centralrepository.h>
-#include "t_cenrep_helper.h"
-#include "srvPerf.h"
-#include "srvreqs.h"
-#include "TE_MemTestStep.h"
-
-#ifdef __CENTREP_SERVER_MEMTEST__
-// Method used for TIdentityRelation for TMemTestResult arrays
-TBool MatchMemTestResult(const TMemTestResult& aKey, const TMemTestResult& aIndexItem)
-	{
-	return aIndexItem.iLocation   == aKey.iLocation   && 
-		   aIndexItem.iIdentifier == aKey.iIdentifier && 
-		   aIndexItem.iIsComplete == aKey.iIsComplete;
-	}
-
-void CMemTestStep::ProcessMemTestResults(TAny* aRawData, TInt32 aRawCount, RArray<TMemTestResult>& aMemTestResults)
-	{
-	ASSERT(aRawCount);
-	ASSERT(aRawCount>=3);
-	
-	for(TInt i=0; i+2<aRawCount;)
-		{
-		TInt32 value1 = static_cast<TInt32*>(aRawData)[i++];
-		TInt32 value2 = static_cast<TInt32*>(aRawData)[i++];
-		TInt32 value3 = static_cast<TInt32*>(aRawData)[i++];
-		
-		if(value1 == KMagicMemTestOutOfBounds && value2 == KMagicMemTestOutOfBounds && value2 == KMagicMemTestOutOfBounds)
-			{
-			WARN_PRINTF1(_L("Memory test was not able to store all the requested values. Only the stored values will be reported."));
-			}
-		else
-			{
-			TMemTestResult result(value1, value2, EFalse);
-			//look for not completed memTestResult that match the criteria
-			TIdentityRelation<TMemTestResult> identity(MatchMemTestResult);
-			
-			TInt idx = aMemTestResults.Find(result, identity);
-			if(idx == KErrNotFound)
-				{
-				result.iInitHeapSize = value3;
-				aMemTestResults.Append(result);
-				}
-			else
-				{
-				TMemTestResult& foundResult = aMemTestResults[idx];
-				foundResult.iFinalHeapSize = value3;
-				foundResult.iIsComplete = ETrue;
-				}
-			}
-		}
-	}
-#endif //__CENTREP_SERVER_MEMTEST__
-
-CMemTestStep::CMemTestStep()
-	{
-	SetTestStepName(KMemTestName);
-	}
-	
-// doTestStepL
-// This test fetches the memory data collected by
-// CentRep server, processes it and reports the result.
-TVerdict CMemTestStep::doTestStepL()
-	{
-#ifdef __CENTREP_SERVER_MEMTEST__
-	SetTestStepResult(EFail);
-	// Pause a few seconds to ensure startup sequence is finished.
-#ifdef __WINS__
- 	const TTimeIntervalMicroSeconds32 interval = 12000000;
-#else
- 	const TTimeIntervalMicroSeconds32 interval = 4000000;
-#endif
- 	User::After(interval);
-
-	TAny* buf = User::AllocL((KMemBufMaxEntry) * sizeof(TInt32));
-	CleanupStack::PushL(buf);
-	TPtr8 pBuf(static_cast<TUint8*>(buf), (KMemBufMaxEntry) * sizeof(TInt32));
-	TInt numEntries;
-	TPckg<TInt> pNumEntries(numEntries);
-	TInt error = SetGetParameters(TIpcArgs(EGetMemResults, &pNumEntries, &pBuf));
-
-	if(error == KErrNone && numEntries > 0)
-		{
-		RArray<TMemTestResult> memTestResults;
-		
-		ProcessMemTestResults(buf, numEntries, memTestResults);
-		
-		TInt count = memTestResults.Count();
-		for(TInt i=0; i<count; i++)
-			{
-			TMemTestResult& result = memTestResults[i];
-			if(result.iIsComplete)
-				{
-				if(result.iLocation == EMemLcnRepositoryOpen)
-					{
-					Logger().WriteFormat(_L("Memory usage for repository [%08X]: %d"), 
-										 result.iIdentifier, 
-										 result.iFinalHeapSize - result.iInitHeapSize);
-					}
-				else if(result.iLocation == EMemLcnOnDemand)
-					{
-					Logger().WriteFormat(_L("Heap memory usage of Centrep server at step %d: %d"), 
-										 result.iIdentifier, 					
-										 result.iFinalHeapSize);
-					static TInt prevResult;
-					switch (result.iIdentifier)
-						{
-						case 1: TESTL(result.iFinalHeapSize > prevResult); break;
-						case 3: TESTL(result.iFinalHeapSize < prevResult); break;
-						case 4: TESTL(result.iFinalHeapSize > prevResult); break;						
-						}
-					prevResult = result.iFinalHeapSize;
-					}
-				else
-					{
-					Logger().WriteFormat(_L("Memory usage at location[%d] for identifier[%d]: %d"),
-										 result.iLocation, 
-										 result.iIdentifier, 
-										 result.iFinalHeapSize - result.iInitHeapSize);
-					}
-				}
-			else
-				{
-				Logger().WriteFormat(_L("Incomplete memory reading at location[%d] for identifier[%d]"),
-									 result.iLocation, 
-									 result.iIdentifier);
-				}
-			}
-		}
-	
-    CleanupStack::PopAndDestroy();
-
-	if(error == KErrNone)
-		{
-		SetTestStepResult(EPass);
-		}
-#else
-	WARN_PRINTF1(_L("Memory test macro __CENTREP_SERVER_MEMTEST__ is not defined. Test was not run."));
-#endif //__CENTREP_SERVER_MEMTEST__
-
-	return TestStepResult();
-	}
-
--- a/persistentstorage/centralrepository/test/testexecute/performance/src/TE_NotifyMemTestStep.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-// Copyright (c) 2006-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "TE_NotifyMemTestStep.h"
-#include "TE_PerfTestUtilities.h"
-#include "t_cenrep_helper.h"
-#include <centralrepository.h>
-#include "srvreqs.h"
-#include "srvPerf.h"
-#include "srvdefs.h"
-#include "cachemgr.h"
-
-//--------------------------------
-// class CNotifyMemTestStep
-//--------------------------------
-
-#if defined(__CENTREP_SERVER_MEMTEST__) 
-const TUid KUidTestRepository1 				= { 0x00000001 };
-const TUid KUidCacheTestRepositorySmTxt		= { 0x00000100 };
-const TUid KUidCacheTestRepositoryMedTxt    = { 0x10057522 };
-const TUid KUidCacheTestRepositorySmCre		= { 0x22222221 };
-const TUid KUidCacheTestRepositoryLrgCre	= { 0xCCCCCC02 };
-
-const TInt KKey1 = 1;
-const TInt KKey2 = 0x201;
-const TInt KKey3 = 8585472;
-const TInt KKey4 = 22;
-#endif
-
-#ifdef __CENTREP_SERVER_MEMTEST__
-void CNotifyMemTestStep::ProcessMemTestResults(TAny* aRawData, TInt32 aRawCount, RArray<TMemTestResult>& aMemTestResults)
-	{
-	ASSERT(aRawCount);
-	ASSERT(aRawCount>=3);
-	
-	for(TInt i=0; i+2<aRawCount;)
-		{
-		TInt32 value1 = static_cast<TInt32*>(aRawData)[i++];
-		TInt32 value2 = static_cast<TInt32*>(aRawData)[i++];
-		TInt32 value3 = static_cast<TInt32*>(aRawData)[i++];
-		
-		if(value1 == KMagicMemTestOutOfBounds && value2 == KMagicMemTestOutOfBounds && value2 == KMagicMemTestOutOfBounds)
-			{
-			WARN_PRINTF1(_L("Memory test was not able to store all the requested values. Only the stored values will be reported."));
-			}
-		else
-			{
-			TMemTestResult result(value1, value2, ETrue);
-			if(result.iLocation == EMemLcnOnDemand)
-				{
-				result.iInitHeapSize = 0;
-				result.iFinalHeapSize = value3;
-				aMemTestResults.Append(result);
-				}
-			}
-		}
-	}
-#endif //__CENTREP_SERVER_MEMTEST__
-
-/**
-@SYMTestCaseID		SYSLIBS-CENTRALREPOSITORY-PT-1658
-@SYMTestCaseDesc	Notify-only client optimization RAM usage test
-@SYMTestPriority	High
-@SYMTestActions		Retrieve memory usage data collected by CentRep server, analyze, and
-	print out a summary during certain stages of the lifetime of session objects.
-@SYMTestExpectedResults This test always pass. Engineers working on CentRep 
-	improvement will run this suite before and after submission to gauge actual
-	savings in RAM usage of repositories.
-@SYMPREQ			PREQ 1228 Symbian OS v9.3 System Quality: Performance, ROM and RAM targets 
-*/	
-TVerdict CNotifyMemTestStep::doTestStepL()
-	{
-#if defined(__CENTREP_SERVER_MEMTEST__)
-
-	SetTestStepResult(EFail);
-
-	TInt testSteps = 0;
-	TInt r;
-	
-	// Make sure cache is empty before we start
-#ifdef __CENTREP_SERVER_CACHETEST__
-	r = SetGetParameters(TIpcArgs(EDisableCache));
-	TESTL(r==KErrNone);
-	r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize));
-	TESTL(r==KErrNone);
-#else //__CENTREP_SERVER_CACHETEST__
-	CleanupRepositoryCache();
-#endif //__CENTREP_SERVER_CACHETEST__
-	//Reset RAM test data
-	r = SetGetParameters(TIpcArgs(ERestartMemTests));
-	TESTL(r==KErrNone);
-
-	// Start of test
-	Logger().WriteFormat(_L("Step %d, RAM at the beginning of test"),testSteps);
-	r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++));
-	TESTL(r==KErrNone);
-
-	CRepository* repository1;
-	User::LeaveIfNull(repository1 = CRepository::NewLC(KUidTestRepository1));
-	CRepository* repository2;
-	User::LeaveIfNull(repository2 = CRepository::NewLC(KUidCacheTestRepositorySmTxt));
-	CRepository* repository3;
-	User::LeaveIfNull(repository3 = CRepository::NewLC(KUidCacheTestRepositoryMedTxt));
-	CRepository* repository4;
-	User::LeaveIfNull(repository4 = CRepository::NewLC(KUidCacheTestRepositorySmCre));
-	CRepository* repository5;
-	User::LeaveIfNull(repository5 = CRepository::NewLC(KUidCacheTestRepositoryLrgCre));
-
-	// Reps automatically loaded by Init
-	Logger().WriteFormat(_L("Step %d, RAM after sessions created"),testSteps);	
-	r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++));
-	TESTL(r==KErrNone);
-
-	TInt i;
-	r = repository1->Get(KKey1, i);
-	TESTL(r==KErrNone);
-	r = repository2->Get(KKey2, i);
-	TESTL(r==KErrNone);
-	r = repository3->Get(KKey4, i);
-	TESTL(r==KErrNone);
-	r = repository4->Get(KKey1, i);
-	TESTL(r==KErrNone);
-	r = repository5->Get(KKey3, i);
-	TESTL(r==KErrNone);
-
-	// Get's don't change memory usage because reps are already loaded/in cache
-	Logger().WriteFormat(_L("Step %d, RAM after Get() calls"),testSteps);		
-	r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++));
-	TESTL(r==KErrNone);
-
-#ifdef __CENTREP_SERVER_CACHETEST__
-	r = SetGetParameters(TIpcArgs(EDisableCache));
-	TESTL(r==KErrNone);
-	r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize));
-	TESTL(r==KErrNone);
-#else //__CENTREP_SERVER_CACHETEST__
-	CleanupRepositoryCache();
-#endif //__CENTREP_SERVER_CACHETEST__
-
-	// Memory freed after reps are evicted
-	Logger().WriteFormat(_L("Step %d, RAM after delaying for eviction"),testSteps);			
-	r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++));
-	TESTL(r==KErrNone);
-	
-	r = repository1->Get(KKey1, i);
-	TESTL(r==KErrNone);
-	r = repository2->Get(KKey2, i);
-	TESTL(r==KErrNone);
-	r = repository3->Get(KKey4, i);
-	TESTL(r==KErrNone);
-	r = repository4->Get(KKey1, i);
-	TESTL(r==KErrNone);
-	r = repository5->Get(KKey3, i);
-	TESTL(r==KErrNone);
-
-	// This time Get's trigger loads 
-	Logger().WriteFormat(_L("Step %d, RAM after Get() calls"),testSteps);			
-	r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++));
-	TESTL(r==KErrNone);
-
-	CleanupStack::PopAndDestroy(5);
-
-	// Closing sessions don't unload the reps because of coarse grained caching
-	Logger().WriteFormat(_L("Step %d, RAM after sessions are closed"),testSteps);				
-	r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++));
-	TESTL(r==KErrNone);
-
-#ifdef __CENTREP_SERVER_CACHETEST__
-	r = SetGetParameters(TIpcArgs(EDisableCache));
-	TESTL(r==KErrNone);
-	r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize));
-	TESTL(r==KErrNone);
-#else //__CENTREP_SERVER_CACHETEST__
-	CleanupRepositoryCache();
-#endif //__CENTREP_SERVER_CACHETEST__
-
-	// Reps are unloaded by cache manager
-	Logger().WriteFormat(_L("Step %d, RAM after delaying for eviction"),testSteps);					
-	r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++));
-	TESTL(r==KErrNone);
-
-	// call inherited function to get the results
-	SetTestStepResult(CMemTestStep::doTestStepL());
-	
-	return TestStepResult();
-#else // defined(__CENTREP_SERVER_MEMTEST__)
-
-	_LIT(KWarnMemTestMacroOff, "Memory test macro __CENTREP_SERVER_MEMTEST__ is disabled. Test not run.");
-	WARN_PRINTF1(KWarnMemTestMacroOff);
- 
-	return EPass;	
-# endif  // defined(__CENTREP_SERVER_MEMTEST__)
-
-
-
-	}
--- a/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCacheDisabledStep.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <centralrepository.h>
-#include "t_cenrep_helper.h"
-#include "srvreqs.h"
-#include "TE_PerfTestCacheDisabledStep.h"
-
-//---------------------------------
-// class CPerfTestCacheDisabledStep
-//---------------------------------
-
-CPerfTestCacheDisabledStep::CPerfTestCacheDisabledStep() 
-	{
-	SetTestStepName(KPerfTestCacheDisabledStep);
-	}
-
-// doTestStepL
-// Implement the pure virtual function.
-// This accesses a small and a large repository various times when cache is 
-// enabled and disabled.
-TVerdict CPerfTestCacheDisabledStep::doTestStepL()
-	{
-#ifndef __CENTREP_SERVER_CACHETEST__
-	return EPass;
-#else	
-    SetTestStepResult(EFail);	
-
-	TInt r;
-	
-	r = SetGetParameters(TIpcArgs(EDisableCache));
-	TESTL(r==KErrNone);
-	
-	CommonTestStepL();
-	
-	return TestStepResult();	
-#endif	
-	}
-
--- a/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCacheEnabledStep.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <centralrepository.h>
-#include "srvreqs.h"
-#include "srvdefs.h"
-#include "t_cenrep_helper.h"
-#include "TE_PerfTestCacheEnabledStep.h"
-#include "cachemgr.h"
-
-//--------------------------------
-// class CPerfTestCacheEnabledStep
-//--------------------------------
-
-CPerfTestCacheEnabledStep::CPerfTestCacheEnabledStep() 
-	{
-	SetTestStepName(KPerfTestCacheEnabledStep);
-	}
-
-// doTestStepL
-// Implement the pure virtual function.
-// This accesses a small and a large repository various times when cache is 
-// enabled and disabled.
-TVerdict CPerfTestCacheEnabledStep::doTestStepL()
-	{
-#ifndef __CENTREP_SERVER_CACHETEST__
-	return EPass;
-#else	
-    SetTestStepResult(EFail);	
-	
-	TInt r;
-
-	r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize));
-	// Shouldn't leave here if SetGetParameters is not supported (when running with old server)
-
-	TEST(r==KErrNone);
-
-	CommonTestStepL();
-
-	return TestStepResult();
-#endif	
-	}
-
--- a/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCacheStepBase.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// TE_PerfTestCacheEnabledStep.cpp
-// 
-//
-
-#include "TE_PerfTestCacheStepBase.h"
-#include <centralrepository.h>
-#include "t_cenrep_helper.h"
-#include "srvreqs.h"
-
-//--------------------------------
-// class CPerfTestCacheStepBase
-//--------------------------------
-
-#if defined(__CENTREP_SERVER_CACHETEST__) && defined(__CENTREP_SERVER_PERFTEST__)
-const TUid KUidCacheTestRepositorySmTxt		= { 0x00000002 };
-const TUid KUidCacheTestRepositoryLrgTxt	= { 0xCCCCCC01 };
-const TUid KUidCacheTestRepositorySmCre		= { 0x22222221 };
-const TUid KUidCacheTestRepositoryLrgCre	= { 0xCCCCCC02 };
-#endif
-
-// CommonTestStepL
-// This function accesses a small and a large repository various times 
-// when cache is enabled and disabled.
-void CPerfTestCacheStepBase::CommonTestStepL()
-	{
-	SetTestStepResult(EFail);
-
-#if defined(__CENTREP_SERVER_CACHETEST__) && defined(__CENTREP_SERVER_PERFTEST__)
-	TInt r = SetGetParameters(TIpcArgs(ERestartPerfTests));
-	TEST(r==KErrNone);
-	
- 	CRepository* repository;
- 	TInt i;
- 	// Access small text rep 5 times in a row
-	for(i=0; i<5; i++)
-		{
-		User::LeaveIfNull(repository = CRepository::NewL(KUidCacheTestRepositorySmTxt));
-		delete repository;
-		repository = NULL;
-		User::After(200000); // delay 200ms before access
-		}
-
- 	// Access large text rep 5 times in a row
-	for(i=0; i<5; i++)
-		{
-		User::LeaveIfNull(repository = CRepository::NewL(KUidCacheTestRepositoryLrgTxt));
-		delete repository;
-		repository = NULL;
-		User::After(200000); // delay 200ms before access
-		}
-
- 	// Access small binary rep 20 times in a row
-	for(i=0; i<20; i++)
-		{
-		User::LeaveIfNull(repository = CRepository::NewL(KUidCacheTestRepositorySmCre));
-		delete repository;
-		repository = NULL;
-		User::After(200000); // delay 200ms before access
-		}
-
- 	// Access large binary rep 20 times in a row
-	for(i=0; i<20; i++)
-		{
-		User::LeaveIfNull(repository = CRepository::NewL(KUidCacheTestRepositoryLrgCre));
-		delete repository;
-		repository = NULL;
-		User::After(200000); // delay 200ms before access
-		}
-	SetTestStepResult(EPass);
-
-#endif
-	}
--- a/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestClientOpenStep.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-// Copyright (c) 2006-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "TE_PerfTestClientOpenStep.h"
-#include "TE_PerfTestUtilities.h"
-#include "t_cenrep_helper.h"
-#include "srvreqs.h"
-#include "srvdefs.h"
-#include <centralrepository.h>
-#include "cachemgr.h"
-
-#ifdef __CENTREP_SERVER_CACHETEST__
-
-const TInt KMaxRepositories = 5;
-const TInt KIterationCount = 100;
-const TUid KUidClientOpenTestRepositoryIds[KMaxRepositories] = { 0x00000106,
-                                                                 0x00000107,
-                                                                 0x00000108,
-                                                                 0x00000109,
-                                                                 0x0000010A };
-#endif //__CENTREP_SERVER_CACHETEST__
-
-CPerfTestClientOpenStep::CPerfTestClientOpenStep()
-	{
-	SetTestStepName(KPerfTestClientOpenName);
-	}
-	
-// doTestStepL
-// This test fetches the memory data collected by
-// CentRep server, processes it and reports the result.
-TVerdict CPerfTestClientOpenStep::doTestStepL()
-	{
-	SetTestStepResult(EFail);
-
-#ifndef __CENTREP_SERVER_CACHETEST__
-	WARN_PRINTF1(_L("Test macro __CENTREP_SERVER_CACHETEST__ is not defined. Unable to disable cache. Test was not run."));
-#else
-	CRepository* repositories[KMaxRepositories];
-	TReal openResults[KMaxRepositories];
-	TReal closeResults[KMaxRepositories];
-	TInt res = KErrNone;
-	
-	//enable cache back.
-	res = SetGetParameters(TIpcArgs(EDisableCache, KDefaultEvictionTimeout, KDefaultCacheSize));
-	TESTL(res == KErrNone);
-	
-	for(TInt i=0; i<KMaxRepositories; i++)
-		{
-		openResults[i] = 0;
-		closeResults[i] = 0;
-		}
-	
-	for(TInt k=0; k<KIterationCount; k++)
-		{
-		//all of these operations are repeated for 100 times. Otherwise the measurement value
-		//is too small to have an accurate value
-		for(TInt i=0; i<KMaxRepositories; i++)
-			{
-			TUint32 startTick = 0;
-			TUint32 endTick = 0;
-			
-			//open repositories and measure how long it takes to open them.
-			for(TInt j=0; j<=i; j++)
-				{
-				startTick = User::FastCounter();
-				TRAP(res, repositories[j] = CRepository::NewL(KUidClientOpenTestRepositoryIds[j]));
-				endTick = User::FastCounter();
-				openResults[i] += endTick - startTick;
-				
-				TESTL(res == KErrNone);
-				TESTL(repositories[j] != NULL);
-				CleanupStack::PushL(repositories[j]);
-				}
-
-			//close repositories in the reverse order, make sure cleanup stack is happy.
-			for(TInt j=i; j>=0; j--)
-				{
-				startTick = User::FastCounter();
-				CleanupStack::PopAndDestroy(repositories[j]);
-				endTick = User::FastCounter();
-				closeResults[i] += endTick - startTick;
-
-				repositories[j] = NULL;
-				}
-			}
-		}
-		
-	for(TInt i=0; i<KMaxRepositories; i++)
-		{
-		INFO_PRINTF4(_L("Total time spent to open %d times %d repositories is %f[ns]"), KIterationCount, i+1, FastCountToMicrosecondsInReal(openResults[i]));
-		INFO_PRINTF4(_L("Total time spent to close %d times %d repositories is %f[ns]"), KIterationCount, i+1, FastCountToMicrosecondsInReal(closeResults[i]));
-		}
-
-	//enable cache back.
-	res = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize));
-	TESTL(res == KErrNone);
-	
-#endif	
-	SetTestStepResult(EPass);
-
-	return TestStepResult();
-	}
-
--- a/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCompareStep.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "TE_PerfTestCompareStep.h"
-#include "t_cenrep_helper.h"
-#include <centralrepository.h>
-#include "srvreqs.h"
-#include "srvdefs.h"
-#include "cachemgr.h"
-
-//--------------------------------
-// class CPerfTestCompareStep
-//--------------------------------
-
-CPerfTestCompareStep::CPerfTestCompareStep() 
-	{
-	SetTestStepName(KPerfTestCompareStep);
-	}
-
-// doTestStepL
-// Implement the pure virtual function.
-// Comapre the results of previous timing tests
-TVerdict CPerfTestCompareStep::doTestStepL()
-	{
-#ifndef __CENTREP_SERVER_CACHETEST__
-	return EPass;
-#else	
-    SetTestStepResult(EFail);
-
-	// To make sure future tests in this harness run under caching
-	TInt r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize));
-
-	TPtrC resultSection1;
-	_LIT(KSharedName1, "shared_name_1");
-	TInt bRet = GetStringFromConfig(ConfigSection(), KSharedName1, resultSection1);
-	TESTL(bRet==1);
-
-	TPtrC resultSection2;
-	_LIT(KSharedName2, "shared_name_2");
-	bRet = GetStringFromConfig(ConfigSection(), KSharedName2, resultSection2);
-	TESTL(bRet==1);
-	
-	TBuf<KMaxFileName> sharedString; 
-		
-	ReadSharedDataL(resultSection1, sharedString);
-	
-	ReadResults(iResults1, sharedString);
-	sharedString.Zero();
-	ReadSharedDataL(resultSection2, sharedString);
-	ReadResults(iResults2, sharedString);
-	
-	TESTL(iResults1.Count()==iResults2.Count());
-	
-	for(TInt i=0; i<iResults1.Count(); i++)
-		{
-		TESTL(iResults1[i].iUseCount==iResults2[i].iUseCount);
-#if defined __WINS__ || defined __WINSCW__
-		// This test is deactivated for emulator builds.
-      		// Emulator build runs produce inconsistent results when running this 
-	      	// test on ONB machines, probably because of uncontrolled CPU and disk 
-      		// activity on the host system caused by previous build and test commands
-#else	
-		// Expect an increase in performance
-		TESTL(iResults1[i].iSumElapsedTicks<iResults2[i].iSumElapsedTicks);
-#endif
-		}
-	
-	SetTestStepResult(EPass);		
-	
-	return TestStepResult();
-#endif //__CENTREP_SERVER_CACHETEST__	
-	}
-
-void CPerfTestCompareStep::ReadResults(RArray<TSummary>& aArray, TBuf<KMaxFileName>& aString) 
-	{
-	TLex analyse(aString);
-	
-	TInt items;
-	TSummary summary;	
-
-	for(TInt i=0; i<2; i++)
-		{
-		analyse.Val(items);
-		analyse.SkipSpaceAndMark();
-		for(TInt i=0;i<items;i++)
-			{
-			analyse.SkipCharacters();		
-			TPtrC token = analyse.MarkedToken();
-			summary.iName.Copy(token);
-			analyse.SkipSpaceAndMark();
-			analyse.Val(summary.iUseCount);
-			analyse.SkipSpaceAndMark();
-			analyse.Val(summary.iSumElapsedTicks,EDecimal);
-			analyse.SkipSpaceAndMark();
-			aArray.Append(summary);
-			}
-		}
-	}
--- a/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestServer.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "TE_PerfTestServer.h"
-#include "TE_PerfTestStep.h"
-#include "TE_MemTestStep.h"
-#include "TE_FindPerfTestStep.h"
-#include "TE_PerfTestCacheEnabledStep.h"
-#include "TE_PerfTestCacheDisabledStep.h"
-#include "TE_PerfTestCompareStep.h"
-#include "TE_DefectTestStep.h"
-#include "TE_PerfTestClientOpenStep.h"
-#include "TE_NotifyMemTestStep.h"
-
-_LIT(KServerName, "CentRepPerfTest");
-
-CPerfTestServer* CPerfTestServer::NewL()
-	{
-	CPerfTestServer* server = new (ELeave) CPerfTestServer();
-	CleanupStack::PushL(server);
-	// CServer base class call
-	server->StartL(KServerName);
-	CleanupStack::Pop(server);
-	return server;
-	}
-	
-LOCAL_C void MainL()
-	{
-	// Leave the hooks in for platform security
-#if (defined __DATA_CAGING__)
-	RProcess().DataCaging(RProcess::EDataCagingOn);
-	RProcess().SecureApi(RProcess::ESecureApiOn);
-#endif
-	
-	CActiveScheduler* sched=NULL;
-	sched=new(ELeave) CActiveScheduler;
-	CActiveScheduler::Install(sched);
-	CPerfTestServer* server = NULL;
-	// Create the CTestServer derived server
-	TRAPD(err,server = CPerfTestServer::NewL());
-	if (KErrNone == err)
-		{
-		// Sync with the client and enter the active scheduler
-		RProcess::Rendezvous(KErrNone);
-		sched->Start();
-		}
-	delete server;
-	delete sched;
-	}
-
-GLDEF_C TInt E32Main()
-	{
-	CTrapCleanup* cleanup = CTrapCleanup::New();
-	if(cleanup == NULL)
-		{
-		return KErrNoMemory;
-		}
-	TRAPD(err,MainL());
-	delete cleanup;
-	return err;
-    }
-
-CTestStep* CPerfTestServer::CreateTestStep(const TDesC& aStepName)
-	{
-	CTestStep* testStep = NULL;
-
-	if (aStepName == KGetPerfTestResults)
-		{
-		testStep = new CPerfTestStep();
-		}
-	else if (aStepName == KMemTestName)
-		{
-		testStep = new CMemTestStep();
-		}
-	else if (aStepName == KFindPerfTestName)
-		{
-		testStep = new CFindPerfTestStep();
-		}
-	else if (aStepName == KPerfTestCacheEnabledStep)
-		{
-		testStep = new CPerfTestCacheEnabledStep();
-		}
-	else if (aStepName == KPerfTestCacheDisabledStep)
-		{
-		testStep = new CPerfTestCacheDisabledStep();
-		}
-	else if (aStepName == KPerfTestCompareStep)
-		{
-		testStep = new CPerfTestCompareStep();
-		}
-	else if (aStepName == KPerfTestDefectStepDEF057491)
-		{
-		testStep = new CPerfTestDefectStep057491();
-		}
-	else if (aStepName == KPerfTestDefectStepDEF059633)
-		{
-		testStep = new CPerfTestDefectStep059633();
-		}
-	else if (aStepName == KPerfTestClientOpenName)
-		{
-		testStep = new CPerfTestClientOpenStep();
-		}
-	else if (aStepName == KNotifyMemTestStep)
-		{
-		testStep = new CNotifyMemTestStep();
-		}
-
-	return testStep;
-	}
-	
--- a/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestStep.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,432 +0,0 @@
-// Copyright (c) 2005-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-
-#include <e32std.h>
-#include <centralrepository.h>
-#include "t_cenrep_helper.h"
-#include <hal.h>
-#include <hal_data.h>
-#include "srvPerf.h"
-#include "srvreqs.h"
-#include "TE_PerfTestStep.h"
-
-#ifdef __CENTREP_SERVER_PERFTEST__
-
-// Function DecodeEventAndData
-// Extract the high 8-bit event Id and the low 24-bit data
-// from the 32 bit integer.
-//
-// param aEntry - the 32 bit integer to decode
-// param aEventId - return the EventId Id.
-// param aData - return the 24-bit data value
-inline
-void DecodeEventAndData(TUint32 aEntry, TUint& aEventId, TUint32& aData)
-	{
-	aEventId = (aEntry >> KEventIdShiftBits) & KEventIdMask;
-	aData = aEntry & KDataMask;
-	}
-
-// Function FindRepUid
-// Search for the given Repository UID in aArray.
-//
-// param aArray - the RArray containing a number of repositories.
-// param aRepUid - the rep UID to search for.
-// Return - if aRepUid is in the array, return its index in array,
-//          else return KErrNotFound.
-TInt FindRepUid(const RArray<TRepStatistics>& aArray, TUint32 aRepUid)
-	{
-	for (TInt i = 0; i < aArray.Count(); i++)
-		{
-		if (aArray[i].MatchUid(aRepUid))
-			return i;
-		}
-	return KErrNotFound;
-	}
-
-// Function GetFuncCodeName
-// Map CentRep function code to string.
-//
-// param aFunc - the function code to map to string.
-// Return - textual representation of the function code.
-_LIT(KEInitialise, "Open");
-_LIT(KECreateInt, "ECreateInt");
-_LIT(KECreateReal, "ECreateReal");
-_LIT(KECreateString, "ECreateString");
-_LIT(KEDelete, "EDelete");
-_LIT(KEGetInt, "EGetInt");
-_LIT(KESetInt, "ESetInt");
-_LIT(KEGetReal, "EGetReal");
-_LIT(KESetReal, "ESetReal");
-_LIT(KEGetString, "EGetString");
-_LIT(KESetString, "ESetString");
-_LIT(KEFind, "EFind");
-_LIT(KEFindEqInt, "EFindEqInt");
-_LIT(KEFindEqReal, "EFindEqReal");
-_LIT(KEFindEqString, "EFindEqString");
-_LIT(KEFindNeqInt, "EFindNeqInt");
-_LIT(KEFindNeqReal, "EFindNeqReal");
-_LIT(KEFindNeqString, "EFindNeqString");
-_LIT(KEGetFindResult, "EGetFindResult");
-_LIT(KENotifyRequestCheck, "ENotifyRequestCheck");
-_LIT(KENotifyRequest, "ENotifyRequest");
-_LIT(KENotifyCancel, "ENotifyCancel");
-_LIT(KENotifyCancelAll, "ENotifyCancelAll");
-_LIT(KEGroupNotifyRequest, "EGroupNotifyRequest");
-_LIT(KEGroupNotifyCancel, "EGroupNotifyCancel");
-_LIT(KEReset, "EReset");
-_LIT(KEResetAll, "EResetAll");
-_LIT(KETransactionStart, "ETransactionStart");
-_LIT(KETransactionCommit, "ETransactionCommit");
-_LIT(KETransactionCancel, "ETransactionCancel");
-_LIT(KEMove, "EMove");
-_LIT(KETransactionState, "ETransactionState");
-_LIT(KETransactionFail, "ETransactionFail");
-_LIT(KEDeleteRange, "EDeleteRange");
-_LIT(KEGetSetParameters, "EGetSetParameters");
-_LIT(KEClose, "EClose");
-_LIT(KEEvict, "Evict");
-_LIT(KUnknownFunction, "UnknownCode");
-
-const TDesC* GetFuncCodeName(TUint aFunc)
-	{
-	switch (aFunc)
-		{
-		case EInitialise: return(&KEInitialise);
-		case ECreateInt: return(&KECreateInt);
-		case ECreateReal: return(&KECreateReal);
-		case ECreateString: return(&KECreateString);
-		case EDelete: return(&KEDelete);
-		case EGetInt: return(&KEGetInt);
-		case ESetInt: return(&KESetInt);
-		case EGetReal: return(&KEGetReal);
-		case ESetReal: return(&KESetReal);
-		case EGetString: return(&KEGetString);
-		case ESetString: return(&KESetString);
-		case EFind: return(&KEFind);
-		case EFindEqInt: return(&KEFindEqInt);
-		case EFindEqReal: return(&KEFindEqReal);
-		case EFindEqString: return(&KEFindEqString);
-		case EFindNeqInt: return(&KEFindNeqInt);
-		case EFindNeqReal: return(&KEFindNeqReal);
-		case EFindNeqString: return(&KEFindNeqString);
-		case EGetFindResult: return(&KEGetFindResult);
-		case ENotifyRequestCheck: return(&KENotifyRequestCheck);
-		case ENotifyRequest: return(&KENotifyRequest);
-		case ENotifyCancel: return(&KENotifyCancel);
-		case ENotifyCancelAll: return(&KENotifyCancelAll);
-		case EGroupNotifyRequest: return(&KEGroupNotifyRequest);
-		case EGroupNotifyCancel: return(&KEGroupNotifyCancel);
-		case EReset: return(&KEReset);
-		case EResetAll: return(&KEResetAll);
-		case ETransactionStart: return(&KETransactionStart);
-		case ETransactionCommit: return(&KETransactionCommit);
-		case ETransactionCancel: return(&KETransactionCancel);
-		case EMove: return(&KEMove);
-		case ETransactionState: return(&KETransactionState);
-		case ETransactionFail: return(&KETransactionFail);
-		case EDeleteRange: return(&KEDeleteRange);
-		case EGetSetParameters: return (&KEGetSetParameters);
-		case EClose: return(&KEClose);
-		case EEvict: return (&KEEvict);
-		}
-		return &KUnknownFunction;
-	}
-#endif //__CENTREP_SERVER_PERFTEST__
-
-//--------------------
-// class CPerfTestStep
-//--------------------
-
-// doTestStepL
-// Implement the pure virtual function.
-// This test fetches the performance data collected by
-// CentRep server, sums the CPU time spent in servicing
-// each type of request and time spent in opening each
-// repository, and prints out the total.
-TVerdict CPerfTestStep::doTestStepL()
-	{
-#ifdef __CENTREP_SERVER_PERFTEST__
-
-	TBuf<KMaxFileName> sharedString; 
-
-	TPtrC resultSection;
-	TInt testMode;
-	TInt bRet;
-	// get test mode from ini file
-	bRet = GetIntFromConfig(ConfigSection(), KIniTestMode, testMode);
-	TESTL(bRet==1);
-
-	_LIT(KBlankLine, "\n");
-	Logger().WriteFormat(KBlankLine);	 	
-	
-	if (testMode == ETiming)
-		{
-		bRet = GetStringFromConfig(ConfigSection(), KResultsSection, resultSection);
-		TESTL(bRet==1);
-		}
-	
-	if (testMode == EBoot)
-		{
-		_LIT(KDoTestStepDisclaimer1, "For this test boot-up is considered to be finished when CommsDat repository is loaded 9 times.");
-		Logger().WriteFormat(KDoTestStepDisclaimer1);
-		_LIT(KDoTestStepDisclaimer2, "This is when the watcher thread is used to make re-attempts to connect to the network.");
-		Logger().WriteFormat(KDoTestStepDisclaimer2);
-		}
-	
-	// Setup IPC args to retreive performance data from server.
-	TUint bufSize = KCentRepPerfTestArraySize * sizeof(TUint32);
-	TAny* buf = User::AllocL(bufSize);
-	TPtr8 bufDesc(static_cast<TUint8*>(buf), bufSize);
-
-	TUint numValidEntries;
-	TPckg<TUint> pckg(numValidEntries);
-
-	TInt ret = SetGetParameters(TIpcArgs(EGetPerfResults, &bufDesc, &pckg));
-	if (ret != KErrNone)
-		{
-		_LIT(KSetGetParamFailFmt, "Send msg err %d");
-		ERR_PRINTF2(KSetGetParamFailFmt, ret);
-		User::Free(buf);
-		return EFail;
-		}
-
-	if (testMode == EBoot)
-		{
-		_LIT(KNumValidEntriesFmt, "Num Valid entries = %d");
-		Logger().WriteFormat(KNumValidEntriesFmt, numValidEntries);
-		}
-
-	RArray<TUint32> perfData(sizeof(TUint32),static_cast<TUint32*>(buf),KCentRepPerfTestArraySize);
-	CleanupClosePushL(perfData);
-
-	// Need to find the tick frequency before using ConvertTickToSecAndMilli.
-	HAL::Get(HALData::EFastCounterFrequency, iTickFreq);
-
-	TUint sec;
-	TUint milliSec;
-
-	const TUint KNumIpcs = EEvict + 1; 
-	TIpcStatistics ipcStats[KNumIpcs];
-	RArray<TRepStatistics> repStats;
-	CleanupClosePushL(repStats);
-    TUint32 totalElapsedTicks = 0;
-	const TDesC* eventName;
-
-	// Process the data
-
-	// Performance data has 3 parts. First event ID and CPU tick
-	// to service the request. 2nd & 3rd, if event is open/close/evict
-	// the time of the event and repository UID.
-	TInt i;
-	for (i=0; i<numValidEntries && i<KCentRepPerfTestArraySize;)
-		{
-		TUint eventId;
-		TUint32 ticksToServiceIpc;
-		TUint32 repositoryUid;
-
-		// This entry is elapsed ticks to service the request
-		DecodeEventAndData(perfData[i++], eventId, ticksToServiceIpc);
-		totalElapsedTicks += ticksToServiceIpc;
-		ipcStats[eventId].AddData(ticksToServiceIpc);
-
-		TBool repOpenCloseEvict = eventId == EInitialise || eventId == EClose || eventId == EEvict;
-
-		if (repOpenCloseEvict)
-			{
-			TESTL(i < numValidEntries);
-			TUint32 eventTime = perfData[i++];
-
-			TESTL(i < numValidEntries);
-			repositoryUid = perfData[i++];
-
-			// Only rep open is stored in repStats array.
-			// Close and evict go into the ipcStats.
-			if (eventId == EInitialise)
-				{
-				TInt idx = FindRepUid(repStats, repositoryUid);
-				if (idx == KErrNotFound)
-					{
-					repStats.Append(TRepStatistics(repositoryUid, ticksToServiceIpc));
-					}
-				else
-					{
-					repStats[idx].AddData(ticksToServiceIpc);
-					}
-				} // if eventId == EInitialise
-
-			if (testMode == EBoot)
-				{
-				// Display the time that this event occur.
-				eventName = GetFuncCodeName(eventId);
-				ConvertTickToSecAndMilli(eventTime, sec, milliSec);
-				_LIT(KRepOpenCloseFmt, "REP %X %S at %d.%03d");
-				Logger().WriteFormat(KRepOpenCloseFmt, repositoryUid, eventName, sec, milliSec);
-				}
-			} // if repOpenCloseEvict
-		} // for i
-
-
-	// Display the IPC statistics
-	Logger().WriteFormat(KBlankLine);
-	Logger().WriteFormat(KBlankLine);
-	_LIT(KIpcStatsFmt, "IPC Statistics:");
-	Logger().WriteFormat(KIpcStatsFmt);
-
-	TInt numIpcMsgs = 0;
-	TInt numLogItems = 0;
-	TBuf<50> keyName;
-	_LIT(KIndividualIpcStat, "%S used %d times, sum of CPU time = %d ms");
-	for (i = 0; i < KNumIpcs; i++)
-		{
-		if (ipcStats[i].iUseCount == 0)
-			{
-			continue;
-			}
-
-		numIpcMsgs += ipcStats[i].iUseCount;
-		eventName = GetFuncCodeName(i);
-		ConvertTickToSecAndMilli(ipcStats[i].iSumElapsedTicks, sec, milliSec);
-		if (sec > 0)
-			{
-			milliSec += sec * 1000;
-			}
-		Logger().WriteFormat(KIndividualIpcStat, eventName, ipcStats[i].iUseCount, milliSec);
-		if (testMode == ETiming)
-			{
-			sharedString.AppendFormat(_L(" %S %d %d"), eventName, ipcStats[i].iUseCount, milliSec);
-			numLogItems++;
-			}
-		}
-	if (testMode == ETiming)
-		{
-		TBuf<2> numofItems;
-		numofItems.Num(numLogItems);
-		sharedString.Insert(0, numofItems);
-		WriteSharedDataL(resultSection, sharedString, ESetText);
-		}
-
-	// Display Repository statistics
-	Logger().WriteFormat(KBlankLine);
-	Logger().WriteFormat(KBlankLine);
-	_LIT(KRepStatsFmt, "Repository Statistics:");
-	Logger().WriteFormat(KRepStatsFmt);
-
-	if (testMode == ETiming)
-		{
-		numLogItems = 0;
-		sharedString.Copy(_L(" "));
-		}
-	_LIT(KIndividualRepStat, "%X used %d times, sum of load time %d ms");
-	for (i = 0; i < repStats.Count(); i++)
-		{
-		ConvertTickToSecAndMilli(repStats[i].iSumLoadTicks, sec, milliSec);
-		if (sec > 0)
-			{
-			milliSec += sec * 1000;
-			}
-		Logger().WriteFormat(KIndividualRepStat, repStats[i].iRepUid,
-			repStats[i].iUseCount, milliSec);
-		if (testMode == ETiming)
-			{
-			sharedString.AppendFormat(_L(" %08X %d %d"), repStats[i].iRepUid, repStats[i].iUseCount, milliSec);
-			numLogItems++;
-			}
-		}
-		
-	if (testMode == ETiming)
-		{
-		TBuf<2> numofItems;
-		numofItems.Num(numLogItems);
-		sharedString.Insert(1, numofItems);
-		WriteSharedDataL(resultSection, sharedString, EAppendText);
-		
-		Logger().WriteFormat(KBlankLine);
-		}
-
-	if (testMode == EBoot)
-		{
-		// show total CPU used by CentralRepository server.
-		ConvertTickToSecAndMilli(totalElapsedTicks, sec, milliSec);
-		if (sec > 0)
-			{
-			milliSec += sec * 1000;
-			}
-
-		Logger().WriteFormat(KBlankLine);
-		Logger().WriteFormat(KBlankLine);
-		_LIT(KTotalCpuFmt, "Total CPU time used by CentRepSrv: %d ms");
-		Logger().WriteFormat(KTotalCpuFmt, milliSec);
-
-		_LIT(KNoteAboutTotal, "The above does not include kernel processing time and client idle time for the %d IPC messages.\n");
-		Logger().WriteFormat(KNoteAboutTotal, numIpcMsgs);
-		}
-
-	// Stop performance test data recording in the server
-	TInt r = SetGetParameters(TIpcArgs(EStopPerfTests));
-	TEST(r==KErrNone);
-		
-	CleanupStack::PopAndDestroy(); // repStats
-	CleanupStack::PopAndDestroy(); // perfData
-	return EPass;
-#else
-	_LIT(KWarnTestMacroOff, "Performance test macro __CENTREP_SERVER_PERFTEST__ is disabled. Test not run.");
-	WARN_PRINTF1(KWarnTestMacroOff);
-	return EPass;
-#endif
-	}
-
-// ConvertTickToSecAndMilli
-// Convert FastCounter ticks to seconds and milli-seconds.
-//
-// param aTick - ticks from User::FastCounter
-// param aSec - return number of seconds in aTick
-// param aMilliSec - return number of ms left behind after number of
-//                   seconds is subtracted from aTick.
-void CPerfTestStep::ConvertTickToSecAndMilli(TUint32 aTick, TUint& aSec, TUint& aMilliSec)
-	{
-	aSec = aTick / iTickFreq;
-	aMilliSec = ((aTick - aSec * iTickFreq) * 1000 + (iTickFreq >> 1)) / iTickFreq;
-	}
-
-//------------------------
-// class TRepStatistics
-//------------------------
-
-// AddData
-// Increment number of times this rep is open, sum of CPU used
-// to load it, and check cache miss.
-void TRepStatistics::AddData(TUint32 aElapsedTicks)
-	{
-	iSumLoadTicks += aElapsedTicks;
-	iUseCount++;
-	if (aElapsedTicks >= KTicks2LoadFromCache)
-		{
-		iCacheMisses++;
-		}
-	}
-
-//---------------------
-// class TIpcStatistics
-//---------------------
-
-// AddData
-// Increment number of times the IPC msg is received by server.
-// Sum time to service this type of request.
-void TIpcStatistics::AddData(TUint32 aElapsedTicks)
-	{
-	iUseCount++;
-	iSumElapsedTicks += aElapsedTicks;
-	}
--- a/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestUtilities.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-// Copyright (c) 2006-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "TE_PerfTestUtilities.h"
-#include "srvdefs.h"
-#include <hal.h>
-#include <hal_data.h>
-
-TReal FastCountToMillisecondsInReal(TInt aFastCount)
-	{
-	TInt freqInHz;
-	HAL::Get(HAL::EFastCounterFrequency, freqInHz);
-	TReal freqInkHz = (TReal)freqInHz / 1000;
-	return (TReal)aFastCount / freqInkHz;
-	}
-
-TReal FastCountToMicrosecondsInReal(TInt aFastCount)
-	{
-	TInt freqInHz;
-	HAL::Get(HAL::EFastCounterFrequency, freqInHz);
-	TReal freqInkHz = (TReal)freqInHz / 1000000LL;
-	return (TReal)aFastCount / freqInkHz;
-	}
-
-TUint64 FastCountToMillisecondsInInt(TInt aFastCount)
-	{
-	TInt freqInHz;
-	HAL::Get(HAL::EFastCounterFrequency, freqInHz);
-	return (aFastCount*1000LL)/freqInHz;
-	}
-
-TUint64 FastCountToMicrosecondsInInt(TInt aFastCount)
-	{
-	TInt freqInHz;
-	HAL::Get(HAL::EFastCounterFrequency, freqInHz);
-	return (aFastCount*1000000LL)/freqInHz;
-	}
-
-TInt FreeRamSize()
-	{
-	TInt freeRamSize = 0;
-	
-	HAL::Get(HALData::EMemoryRAMFree, freeRamSize);
-	
-	return freeRamSize;
-	}
-
--- a/persistentstorage/dbms/group/BLD.INF	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/dbms/group/BLD.INF	Thu Sep 02 22:18:45 2010 +0300
@@ -25,9 +25,9 @@
 
 PRJ_EXPORTS
 
-../inc/D32DBMS.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(d32dbms.h)
-../inc/D32DBMSCONSTANTS.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(d32dbmsconstants.h)
-../inc/D32DBMS.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(d32dbms.inl)
+../inc/D32DBMS.H OS_LAYER_PUBLIC_EXPORT_PATH(d32dbms.h)
+../inc/D32DBMSCONSTANTS.H OS_LAYER_PUBLIC_EXPORT_PATH(d32dbmsconstants.h)
+../inc/D32DBMS.INL OS_LAYER_PUBLIC_EXPORT_PATH(d32dbms.inl)
 
 dbms.iby	/epoc32/rom/include/dbms.iby
 
--- a/persistentstorage/dbms/pcdbms/group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/dbms/pcdbms/group/bld.inf	Thu Sep 02 22:18:45 2010 +0300
@@ -15,9 +15,9 @@
 
 PRJ_EXPORTS
 
-../inc/D32DBMS.H 	SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(x86tool/d32dbms.h)
-../inc/D32DBMSCONSTANTS.H 	SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/d32dbmsconstants.h)
-../inc/D32DBMS.INL 	SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/d32dbms.inl)
+../inc/D32DBMS.H 	OS_LAYER_PUBLIC_EXPORT_PATH(x86tool/d32dbms.h)
+../inc/D32DBMSCONSTANTS.H 	OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/d32dbmsconstants.h)
+../inc/D32DBMS.INL 	OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/d32dbms.inl)
 
 PRJ_PLATFORMS
 DEFAULT TOOLS2
--- a/persistentstorage/dbms/tdbms/t_dbbug.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/dbms/tdbms/t_dbbug.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -345,6 +345,7 @@
 	static const TDesC& Name();
 private:
 	static void WaitForServerExit();
+	static void KillDbmsServer();
 	static TInt Thread(TAny*);
 	};
 
@@ -354,6 +355,41 @@
 	return KName;
 	}
 
+void Defect_COMBBAR_463J5D::KillDbmsServer()
+    {
+    _LIT(KDbmsServer,"edbsrv.exe");
+     TFullName name;
+    //RDebug::Print(_L("Find and kill \"%S\" process.\n"), &aProcessName);
+    TBuf<64> pattern(KDbmsServer);
+    TInt length = pattern.Length();
+    pattern += _L("*");
+    TFindProcess procFinder(pattern);
+
+    while (procFinder.Next(name) == KErrNone)
+        {
+        if (name.Length() > length)
+            {//If found name is a string containing aProcessName string.
+            TChar c(name[length]);
+            if (c.IsAlphaDigit() ||
+                c == TChar('_') ||
+                c == TChar('-'))
+                {
+                // If the found name is other valid application name
+                // starting with aProcessName string.
+                //RDebug::Print(_L(":: Process name: \"%S\".\n"), &name);
+                continue;
+                }
+            }
+        RProcess proc;
+        if (proc.Open(name) == KErrNone)
+            {
+            proc.Kill(0);
+            //RDebug::Print(_L("\"%S\" process killed.\n"), &name);
+            }
+        proc.Close();
+        }
+    }
+
 void Defect_COMBBAR_463J5D::WaitForServerExit()
 	{
 	_LIT(KDbmsServer,"*!DBMS server");
@@ -392,8 +428,8 @@
 void Defect_COMBBAR_463J5D::TestL()
 	{
 	test.Next(_L(" @SYMTestCaseID:SYSLIB-DBMS-CT-0584 "));
-	Print(_S("Wait for the server to exit"));
-	WaitForServerExit();
+	Print(_S("Kill the server if it has started"));
+	KillDbmsServer();
 //
 	Print(_S("Create the launching threads"));
 	RThread t1,t2;
--- a/persistentstorage/dbms/tdbms/t_dbbug.mmp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/dbms/tdbms/t_dbbug.mmp	Thu Sep 02 22:18:45 2010 +0300
@@ -15,7 +15,7 @@
 
 target 		t_dbbug.exe
 targettype 	exe
-
+capability	All -Tcb
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 userinclude ../inc
 
--- a/persistentstorage/dbms/tdbms/t_dbperf2.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/dbms/tdbms/t_dbperf2.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-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"
@@ -1292,16 +1292,19 @@
 	{
 	_LIT(KSpace, " ");
 	TheTest.Printf(_L("%*.*S%S\r\n"), aOffset, aOffset, &KSpace, &aPath);
-	TFindFile findFile(TheFs);
+	TFindFile* findFile = new TFindFile(TheFs);//TFindFile has TParse data member. 
+											   //Since this function is called recoursively, on some platforms
+											   //the test might crash - "stack overflow" problem.
+	TEST(findFile != NULL);
 	CDir* fileNameCol = NULL;
 	TBuf<8> fileNameMask;
 	fileNameMask.Copy(_L("*.*"));
-	TInt err = findFile.FindWildByDir(fileNameMask, aPath, fileNameCol);
+	TInt err = findFile->FindWildByDir(fileNameMask, aPath, fileNameCol);
 	if(err == KErrNone)
 		{
 		do
 			{
-			const TDesC& file = findFile.File();//"file" variable contains the drive and the path. the file name in "file" is invalid in this case.
+			const TDesC& file = findFile->File();//"file" variable contains the drive and the path. the file name in "file" is invalid in this case.
 			(void)TheParse.Set(file, NULL, NULL);
 			TPtrC driveName = TheParse.Drive();
 			if(aPath.FindF(driveName) >= 0)
@@ -1316,23 +1319,26 @@
                         }
                     else
                         {
-                        TBuf<100> path;
-                        path.Copy(aPath);
-                        path.Append(entry.iName);
-                        path.Append(_L("\\"));
-                        PrintDiskUsage(path, aOffset + 4);
+						TFileName* path = new TFileName;//allocated in heap to prevent "stack overflow" prolem
+						TEST(path != NULL);
+						path->Copy(aPath);
+						path->Append(entry.iName);
+						path->Append(_L("\\"));
+                        PrintDiskUsage(*path, aOffset + 4);
+                        delete path;
                         }
                     }
 				} // if(aPath.FindF(driveName) >= 0)
 			
 			delete fileNameCol;
 			fileNameCol = NULL;
-			} while((err = findFile.FindWild(fileNameCol)) == KErrNone);//Get the next set of files
+			} while((err = findFile->FindWild(fileNameCol)) == KErrNone);//Get the next set of files
 		}
 	else
 		{
 		TheTest.Printf(_L("  FindWildByDir() failed with err=%d\r\n"), err);
 		}
+	delete findFile;
 	}
 
 void DoTestL()
@@ -1399,7 +1405,7 @@
 	DeleteFile(TheTestFileName);
 	TEST2(err, KErrNone);
 
-	TheTest.Printf(_L("====================================================\r\n"));
+	TheTest.Printf(_L("====================== Disk usage ==================\r\n"));
 	PrintDiskUsage(_L("c:\\"));
 	TheTest.Printf(_L("====================================================\r\n"));
 	
--- a/persistentstorage/dbms/tdbms/t_dbsrv.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/dbms/tdbms/t_dbsrv.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -1257,6 +1257,39 @@
 	test(r==KErrNone);
 	}
 
+LOCAL_C void  KillDbmsServer()
+    {
+    _LIT(KDbmsServer,"edbsrv.exe");
+     TFullName name;
+    TBuf<64> pattern(KDbmsServer);
+    TInt length = pattern.Length();
+    pattern += _L("*");
+    TFindProcess procFinder(pattern);
+
+    while (procFinder.Next(name) == KErrNone)
+        {
+        if (name.Length() > length)
+            {//If found name is a string containing aProcessName string.
+            TChar c(name[length]);
+            if (c.IsAlphaDigit() ||
+                c == TChar('_') ||
+                c == TChar('-'))
+                {
+                // If the found name is other valid application name
+                // starting with aProcessName string.
+                //RDebug::Print(_L(":: Process name: \"%S\".\n"), &name);
+                continue;
+                }
+            }
+        RProcess proc;
+        if (proc.Open(name) == KErrNone)
+            {
+            proc.Kill(0);
+            //RDebug::Print(_L("\"%S\" process killed.\n"), &name);
+            }
+        proc.Close();
+        }
+    }
 void DoTests()
 	{
 	TVersionName n=RDbs::Version().Name();
@@ -1322,6 +1355,7 @@
 	setupTestDirectory();
 	DeleteTestFiles();
 	setupCleanup();
+	KillDbmsServer();
 	DoTests();
 	delete TheTrapCleanup;
 	DeleteTestFiles();
--- a/persistentstorage/dbms/tdbms/t_dbsrv.mmp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/dbms/tdbms/t_dbsrv.mmp	Thu Sep 02 22:18:45 2010 +0300
@@ -15,7 +15,7 @@
 
 target 		t_dbsrv.exe
 targettype exe
-
+capability	All -Tcb
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 userinclude ../inc
 
--- a/persistentstorage/dbms/tdbms/t_dbstress.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/dbms/tdbms/t_dbstress.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -467,7 +467,7 @@
 		for (TInt ii=0;;++ii)
 			{
 			TheTest.Printf(_L("Opening %d\r"),ii);
-			TRAPD(r,store=CFileStore::OpenL(TheFs,KTestDatabase,EFileRead|EFileWrite));
+			TRAPD(r,store=CFileStore::OpenL(TheFs,KTestDatabase,EFileRead|EFileWrite|EFileWriteDirectIO));
 			if (r==KErrNone)
 				break;
 			TEST2(r, KErrInUse);
@@ -515,7 +515,7 @@
 	{
 	TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-DBMS-CT-0636 Open store "));
 	CFileStore* store=NULL;
-	TRAPD(r,store=CFileStore::OpenL(TheFs,KTestDatabase,EFileRead|EFileWrite));
+	TRAPD(r,store=CFileStore::OpenL(TheFs,KTestDatabase,EFileRead|EFileWrite|EFileWriteDirectIO));
 	TEST2 (r,KErrNone);
 	TheTest.Next(_L("Verify"));
 	NewCount=-1;
--- a/persistentstorage/dbms/tdbms/t_dbthrd.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/dbms/tdbms/t_dbthrd.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -113,7 +113,7 @@
 	User::LeaveIfError(iFs.Connect());
 	User::LeaveIfError(iFs.SetSessionPath(KTestDir));
 	User::LeaveIfError(iLog.Replace(iFs,KLogFile,EFileWrite|EFileStreamText));
-	iStore=CFileStore::OpenL(iFs,KTestDatabase,EFileRead|EFileWrite);
+	iStore=CFileStore::OpenL(iFs,KTestDatabase,EFileRead|EFileWrite|EFileWriteDirectIO);
 	LogSize();
 	iData.OpenL(iStore,iStore->Root());
 	}
--- a/persistentstorage/sql/GROUP/BLD.INF	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/GROUP/BLD.INF	Thu Sep 02 22:18:45 2010 +0300
@@ -23,7 +23,7 @@
 
 PRJ_EXPORTS
 
-../INC/SqlDb.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(sqldb.h)
+../INC/SqlDb.h OS_LAYER_PUBLIC_EXPORT_PATH(sqldb.h)
 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
 #ifdef SYMBIAN_OLD_EXPORT_LOCATION
 ../INC/SqlResourceTester.h /epoc32/include/sqlresourcetester.h
--- a/persistentstorage/sql/GROUP/t_sqldbconfigfile.mmp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/GROUP/t_sqldbconfigfile.mmp	Thu Sep 02 22:18:45 2010 +0300
@@ -25,7 +25,8 @@
 USERINCLUDE 	../INC
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-SYSTEMINCLUDE	/epoc32/include/libc
+OS_LAYER_ESTLIB_SYSTEMINCLUDE
+
 USERINCLUDE		../OsLayer
 #ifdef SYMBIAN_USE_SQLITE_VERSION_3_6_4
 USERINCLUDE		../SQLite364
--- a/persistentstorage/sql/OsLayer/os_symbian.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/OsLayer/os_symbian.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -1604,6 +1604,14 @@
 	(void)parse.AddDir(KTempFileDir);//this call can't fail
     __FS_CALL(EFsOpFileCreateTemp, 0);
     TInt err = aDbFile.iFileBuf.Temp(osLayerData.iFs, parse.FullName(), parse.FileName(), EFileRead|EFileWrite|EDeleteOnClose);        
+    if(err == KErrPathNotFound)
+        {
+        err = osLayerData.iFs.MkDirAll(parse.DriveAndPath());
+        if(err == KErrNone)
+            {
+            err = aDbFile.iFileBuf.Temp(osLayerData.iFs, parse.FullName(), parse.FileName(), EFileRead|EFileWrite|EDeleteOnClose);
+            }
+        }
     if(err == KErrNone)
         {
         TInt recReadBufSize = -1;
--- a/persistentstorage/sql/SRC/Server/SqlBur.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlBur.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -649,13 +649,11 @@
 						(void)iInterface->Fs().Delete(bak);
 						TInt err=iInterface->Fs().Rename(db,bak);
 						SQL_TRACE_BUR(OstTraceExt4(TRACE_INTERNALS, CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL5, "0x%X;CSqlBackupClient::RestoreBaseDataSectionL;END;bak=%S;db=%S;err=%d", (TUint)this, __SQLPRNSTR(bak), __SQLPRNSTR(db), err));
-						if(err!=KErrNone && err!=KErrNotFound)
+						if(err == KErrNone || err == KErrNotFound)
 							{
-							__SQLLEAVE(err);
+							// now, rename the .rst as .db
+							err = iInterface->Fs().Rename(rst,db);
 							}
-						
-						// now, rename the .rst as .db
-						err = iInterface->Fs().Rename(rst,db);
 						if(err != KErrNone && err2 == KErrNone)
 							{
 							//The idea here is to not report the error immediatelly by calling LeaveIfError().
@@ -665,7 +663,7 @@
 							}
 						// if we got here, we have a backup of the original database in .db.bak
 						// and the new database in .db
-						}
+						}//end of for(...)
 					__SQLLEAVE_IF_ERROR(err2);
 					
 					// clean up dir
--- a/persistentstorage/sql/SRC/Server/SqlSrvResourceProfiler.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvResourceProfiler.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -76,10 +76,10 @@
 static TBool TheSqlSrvProfilerTraceToFile = EFalse;
 
 //"Prepared" and "Executed" SQL statement counters
-static TInt TheSqlSrvProfilerPreparedCnt8;
-static TInt TheSqlSrvProfilerPreparedCnt16;
-static TInt TheSqlSrvProfilerExecutedCnt8;
-static TInt TheSqlSrvProfilerExecutedCnt16;
+static TInt TheSqlSrvProfilerPreparedCnt8 = 0;
+static TInt TheSqlSrvProfilerPreparedCnt16 = 0;
+static TInt TheSqlSrvProfilerExecutedCnt8 = 0;
+static TInt TheSqlSrvProfilerExecutedCnt16 = 0;
 
 ///////////////////////////////// IPC counters ///////////////////////////////////////
 
--- a/persistentstorage/sql/SRC/Server/SqlSrvStatement.inl	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvStatement.inl	Thu Sep 02 22:18:45 2010 +0300
@@ -87,7 +87,8 @@
 	__ASSERT_DEBUG(iBufType == HSqlSrvStmtParamBuf::EBufSimpleBind, __SQLPANIC(ESqlPanicInternalError));
 	iBuf->ResizeL(aData.Length());
 	iBuf->Write(0, aData);
-	return iBuf->Ptr(0);
+	//If the size is 0, then return KNullDesC8, where an empty string is hold, not a null one ("" instead of NULL)
+	return iBuf->Size() == 0 ? KNullDesC8() : iBuf->Ptr(0);
 	}
 
 /**
@@ -100,7 +101,8 @@
 inline const TPtrC8 HSqlSrvStmtParamBuf::Data() const
 	{
 	__ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj));
-	return iBuf->Ptr(0);
+	//If the size is 0, then return KNullDesC8, where an empty string is hold, not a null one ("" instead of NULL)
+	return iBuf->Size() == 0 ? KNullDesC8() : iBuf->Ptr(0);
 	}
 
 /**
--- a/persistentstorage/sql/TEST/t_sqldbconfigfile.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqldbconfigfile.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -85,8 +85,10 @@
 _LIT8(KCfgDb1ConfigFileV14CCommentStmt, "CREATE INDEX v14Idx ON table1(i3) /* this is a C comment */;");
 
 //KLongDbName1 is "long" enough to allow "-journal" to be added at the end.
-_LIT(KLongDbName1,  "c:[1111C1C1]a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a1234.db");
-_LIT(KLongCfgName1, "c:\\private\\10281e17\\cfg[1111C1C1]a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a1234.db.01");
+//Also, on simulators/emulators the file names have a prefix with length of about 30 characters
+//(something like \epoc\winscw\c\....)
+_LIT(KLongDbName1,  "c:[1111C1C1]a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a.db");
+_LIT(KLongCfgName1, "c:\\private\\10281e17\\cfg[1111C1C1]a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a.db.01");
 
 _LIT(KSqlSrvPrivatePath, "\\private\\10281e17\\");
 _LIT(KResetCollationDllSql, "UPDATE symbian_settings SET CollationDllName='hjagafsff'");
--- a/persistentstorage/sql/TEST/t_sqldefect2.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqldefect2.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -27,7 +27,7 @@
 _LIT(KTestDir, "c:\\test\\");
 _LIT(KTestDatabase1, "c:\\test\\t_sqldefect2.db");
 _LIT(KTestDatabaseJournal1, "c:\\test\\t_sqldefect2.db-journal");
-
+_LIT(KServerTempDir, "c:\\private\\10281e17\\temp\\");
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
@@ -304,7 +304,6 @@
 void DeleteTempFile()
     {   
     _LIT(KSqlSrvName, "sqlsrv.exe");
-    _LIT(KServerTempDir, "c:\\private\\10281e17\\temp\\");
     _LIT(KTempFile1, "TMP00052.$$$");
     _LIT(KTempFile2, "TMP00044.$$$");
     
@@ -381,6 +380,129 @@
     TEST2(err, KErrNone);
 	}
 
+/**
+@SYMTestCaseID          PDS-SQL-CT-4213
+@SYMTestCaseDesc        Tests the ability of the SQL server to store empty strings and retrieve them as 
+						text column values, not NULLs.
+						Change: ou1cimx1#504388. 
+@SYMTestPriority        High
+@SYMTestActions         The test creates a database and a table and stores there empty strings.
+						Then the test retrieves the stored column values and verifies that the column type is
+						"text", not "null".
+@SYMTestExpectedResults Test must not fail
+*/
+void EmptyTextColumnTest()
+	{
+	_LIT8(KEncUtf16, "encoding=\"UTF-16\"");
+	_LIT8(KEncUtf8, "encoding=\"UTF-8\"");
+	TPtrC8 enc[] = {KEncUtf16(), KEncUtf8()};
+	for(TInt i=0;i<(sizeof(enc)/sizeof(enc[0]));++i)
+		{
+		(void)RSqlDatabase::Delete(KTestDatabase1);
+		TInt err = TheDb1.Create(KTestDatabase1, &enc[i]);
+		TEST2(err, KErrNone);
+		//Insert records with empty text column values using RSqlDatabase::Exec()
+	    err = TheDb1.Exec(_L("CREATE TABLE A(ID INTEGER, T TEXT)"));
+	    TEST(err >= 0);
+	    err = TheDb1.Exec(_L("INSERT INTO A VALUES(1, '')"));
+	    TEST2(err, 1);
+	    err = TheDb1.Exec(_L8("INSERT INTO A VALUES(2, '')"));
+	    TEST2(err, 1);
+		//Insert a record with empty text column value using RSqlParamWriteStream
+	    RSqlStatement stmt;
+	    err = stmt.Prepare(TheDb1, _L("INSERT INTO A(ID, T) VALUES(:P1, :P2)"));
+	    TEST2(err, KErrNone);
+		err = stmt.BindInt(0, 3);
+	    TEST2(err, KErrNone);
+	    RSqlParamWriteStream strm;
+	    err = strm.BindText(stmt, 1);
+	    TEST2(err, KErrNone);
+	    TRAP(err, strm.WriteL(KNullDesC));
+	    TEST2(err, KErrNone);
+	    strm.Close();
+	    err = stmt.Exec();
+	    TEST2(err, 1);
+	    stmt.Close();
+		//Insert records with empty text column values using RSqlStatement::Bind()
+	    err = stmt.Prepare(TheDb1, _L("INSERT INTO A(ID, T) VALUES(:P1, :P2)"));
+	    TEST2(err, KErrNone);
+		err = stmt.BindInt(0, 4);
+	    TEST2(err, KErrNone);
+		err = stmt.BindText(1, KNullDesC);
+	    TEST2(err, KErrNone);
+	    err = stmt.Exec();
+	    TEST2(err, 1);
+	    //
+	    err = stmt.Reset();
+	    TEST2(err, KErrNone);
+		err = stmt.BindInt(0, 5);
+	    TEST2(err, KErrNone);
+	    _LIT(KEmptyStr, "");
+		err = stmt.BindText(1, KEmptyStr);
+	    TEST2(err, KErrNone);
+	    err = stmt.Exec();
+	    TEST2(err, 1);
+	    stmt.Close();
+	    //Read the empty text column values
+	    err = stmt.Prepare(TheDb1, _L("SELECT T FROM A"));
+	    TEST2(err, KErrNone);
+	    TInt cnt = 0;
+	    while((err = stmt.Next()) == KSqlAtRow)
+	    	{
+			++cnt;
+			TPtrC val;
+			err = stmt.ColumnText(0, val);
+			TEST2(err, KErrNone);
+			TEST2(val.Length(), 0);
+			TSqlColumnType type = stmt.ColumnType(0);
+			TEST2(type, ESqlText);
+	    	}
+	    stmt.Close();
+	    TEST2(err, KSqlAtEnd);
+	    TEST2(cnt, 5);
+	    //
+	    TheDb1.Close();
+	    err = RSqlDatabase::Delete(KTestDatabase1);
+	    TEST2(err, KErrNone);
+		}
+	}
+
+/**
+@SYMTestCaseID          PDS-SQL-CT-4214
+@SYMTestCaseDesc        Test for the change "After *#7370# Java apps are not preinstalled again" 
+@SYMTestPriority        High
+@SYMTestActions         The test makes sure there are no issues if the temp folder is removed after the server 
+                        has already started. The test performs the following actions - 
+                        1. Delete the 'temp' directory.
+                        2. Create a transaction which creates temp files.
+                        3. Check 'temp' folder exists at the end
+@SYMTestExpectedResults Test must not fail
+*/
+void DeleteTempFolder()
+    {
+    //1. Delete 'temp' folder
+    TInt err = TheFs.RmDir(KServerTempDir);
+    TEST2(err, KErrNone);
+	
+    //2. Create a transaction which creates temp files.
+    (void)RSqlDatabase::Delete(KTestDatabase1);
+    err = TheDb1.Create(KTestDatabase1);
+    TEST2(err, KErrNone);
+    
+    err = TheDb1.Exec(_L("CREATE TABLE t1(x UNIQUE); INSERT INTO t1 VALUES(1)"));
+    TEST(err >= 0);
+    err = TheDb1.Exec(_L("BEGIN; UPDATE t1 SET x = 2; UPDATE t1 SET x = 3; COMMIT"));
+    TEST(err >= 0);
+    
+    TheDb1.Close();
+    err = RSqlDatabase::Delete(KTestDatabase1);
+    TEST2(err, KErrNone);
+    
+    //3. Check 'temp' folder exists
+    err = TheFs.MkDir(KServerTempDir);
+    TEST2(err, KErrAlreadyExists);
+    }	
+	
 void DoTestsL()
 	{
 	TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-4154 DEF143062: SQL, \"CREATE INDEX\" sql crashes SQL server"));
@@ -392,11 +514,17 @@
     TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-4156 DEF143150: SQL, strftime() returns incorrect result"));
     DEF143150();
     
-    TheTest.Next(_L(" @SYMTestCaseDesc Temp files created during sql operations are not deleted after rebooting the phone - 1"));
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4210 Temp files created during sql operations are not deleted after rebooting the phone - 1"));
     DeleteTempFile();
     
-    TheTest.Next(_L(" @SYMTestCaseDesc Temp files created during sql operations are not deleted after rebooting the phone - 2"));
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4211 Temp files created during sql operations are not deleted after rebooting the phone - 2"));
     TempFileTest();
+    
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4213 No support to store an empty string in symbian's sqlite."));
+    EmptyTextColumnTest();
+	
+	TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4214 After *#7370# Java apps are not preinstalled again"));
+    DeleteTempFolder();
 	}
 
 TInt E32Main()
--- a/persistentstorage/sql/TEST/t_sqlood.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlood.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -63,7 +63,10 @@
 
 #endif
 
-const TInt KTestRecordsCount = 350;
+_LIT8(KDatabasePageSizeConfig, "page_size=1024");
+
+const TInt KMaxTestRecordsCount = 350;
+TInt TestRecordsCount = 0;
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
@@ -202,24 +205,78 @@
 	RDebug::Print(_L("CreateLargeFile: free space after = %ld\r\n"), diskSpace);
 	}
 
+
+// Number of bytes in the default journal header size.
+const TInt KJournalHeaderSize = 0x200;
+
+// Number of bytes added to each database page in the journal.
+const TInt KJournalPageOverhead = 8; 
+
+// The default amount of reserved space provided by the ReserveDriveSpace API
+const TInt KReserveDriveSpaceAmount = 64*1024;
+
 //Creates and fills with some records a test database
 void CreateAndFillTestDatabase(RSqlDatabase& aDb)
 	{
-	TInt err = aDb.Create(KTestDatabase);
+	TInt err = aDb.Create(KTestDatabase, &KDatabasePageSizeConfig);
 	TEST2(err, KErrNone);
 	err = aDb.Exec(_L("CREATE TABLE A(Id INTEGER, Data TEXT)"));
 	TEST(err >= 0);
-	err = aDb.Exec(_L("BEGIN TRANSACTION"));
-	TEST(err >= 0);
-	for(TInt i=0;i<KTestRecordsCount;++i)
+
+	//
+	// Find the page size of the database on this media
+	//
+	TBuf<200> sql;
+	sql.Copy(_L("PRAGMA page_size"));
+	TSqlScalarFullSelectQuery q(aDb);
+	TInt pageSize = 0;
+	TRAP(err, pageSize = q.SelectIntL(sql););
+	//RDebug::Print(_L("Error %d Page Size %d"),err,pageSize);
+	TEST2(err, KErrNone);
+	TEST(pageSize > 0);
+	//RDebug::Print(_L("Page Size %d"),pageSize);
+	
+	//
+	// Find the sector size of this media
+	//
+	TDriveInfo driveInfo;
+	err = TheFs.Drive(driveInfo, KTestDrive);
+	TEST2(err, KErrNone);
+	TVolumeIOParamInfo volumeInfo;
+	err = TheFs.VolumeIOParam(KTestDrive, volumeInfo);
+	TEST2(err, KErrNone);
+	TInt sectorSize = volumeInfo.iBlockSize;
+	//RDebug::Print(_L("Sector Size %d"),sectorSize);	
+
+	TInt journalHeaderSize = Max(sectorSize, KJournalHeaderSize);
+	//RDebug::Print(_L("Journal Header Size %d"),journalHeaderSize);
+
+	//
+	// Keep adding to database until it is a size such that all the data can still be deleted within the reserved disk space size. 
+	// Do this piece-wise not in a transaction.
+	//
+	TInt i;
+	for(i=0;i<KMaxTestRecordsCount;++i)
 		{
-		TBuf<200> sql;
 		sql.Format(_L("INSERT INTO A(Id, Data) VALUES(%d, 'A0123456789B0123456789C0123456789D0123456789E0123456789F0123456789G0123456789H0123456789')"), i + 1);
 		err = aDb.Exec(sql);
 		TEST2(err, 1);
+
+		TInt size = aDb.Size();
+		TInt numberOfPages = size/pageSize;
+		TInt predictedJournalSize = journalHeaderSize + numberOfPages * (pageSize + KJournalPageOverhead);
+		//RDebug::Print(_L("Size %d, Pages %d, predictedJournalSize %d"),size, numberOfPages, predictedJournalSize);
+		
+		// Will another page take us over the limit ?
+		if ((predictedJournalSize + (pageSize + KJournalPageOverhead)) >= (KReserveDriveSpaceAmount))
+			{
+			break;
+			}
 		}
-	err = aDb.Exec(_L("COMMIT TRANSACTION"));
-	TEST(err >= 0);
+	TestRecordsCount = i + 1;
+	
+	//RDebug::Print(_L("TestRecordsCount %d"),TestRecordsCount);
+	
 	}
 
 //Tries to delete test database records
@@ -227,7 +284,7 @@
 	{
 	TInt err = aDb.Exec(_L("BEGIN TRANSACTION"));
 	TEST(err >= 0);
-	for(TInt i=0;i<KTestRecordsCount;++i)
+	for(TInt i=0;i<TestRecordsCount;++i)
 		{
 		TBuf<100> sql;
 		sql.Format(_L("DELETE FROM A WHERE Id = %d"), i + 1);
@@ -250,7 +307,7 @@
 void SimpleCallsTest()
 	{
 	RSqlDatabase db, db2;
-	TInt err = db.Create(KTestDatabase);
+	TInt err = db.Create(KTestDatabase, &KDatabasePageSizeConfig);
 	TEST2(err, KErrNone);
 
 	err = db2.Open(KTestDatabase);
--- a/persistentstorage/sql/TEST/t_sqloslayer.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqloslayer.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -53,8 +53,10 @@
 TInt TheSqlSrvProfilerFileSetSize = 0;
 #endif
 
+#ifdef _DEBUG    
 //SQLite panic category.
 _LIT(KSqlitePanicCategory, "Sqlite");
+#endif
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
--- a/persistentstorage/sql/TEST/t_sqlperformance4.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlperformance4.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -9,6 +9,7 @@
 // Nokia Corporation - initial contribution.
 //
 // Contributors:
+// NTT DOCOMO, INC - Fix for Bug 3170 "SQL library test T_SQLPERFORMANCE4 fails with USER 84 panic"
 //
 // Description:
 //
@@ -300,7 +301,12 @@
 			{
 			break;//No more SQL statements
 			}
-		TPtrC8 sqlStmt8(sql.Ptr(), eolPos - 1);//"eolPos - 1" - to cut off the '\r' character
+		TInt stmtLength = eolPos;
+		while (stmtLength > 0 && (sql[stmtLength-1] == '\r'))
+			{
+			--stmtLength; //Reduce length to remove carriage return characters from the end of the statement string
+			}
+		TPtrC8 sqlStmt8(sql.Ptr(), stmtLength);
 		TPtrC8 ptr = sql.Mid(eolPos + 1);//"eolPos + 1" - first character after '\n'
 		sql.Set(const_cast <TUint8*> (ptr.Ptr()), ptr.Length(), ptr.Length());
 		++recordCount;
--- a/persistentstorage/sql/TEST/testexecute/SQLite/config/Robustness.ini.DEVBOARD	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/TEST/testexecute/SQLite/config/Robustness.ini.DEVBOARD	Thu Sep 02 22:18:45 2010 +0300
@@ -14,9 +14,9 @@
 // Add a small amount of data and check it.
 NewBlock3=AddBlock10-1
 NewBlock4=CheckBlock10-1
-// Fill the disk to within 100K of full. First fill to within 150k so we have
-// an easy way of quickly getting 50K of disk back - by deleting 'fillfile'.
-NewBlock5=FillDisk150K
+// Fill the disk to within 100K of full. First fill to within 160k so we have
+// an easy way of quickly getting 60K of disk back - by deleting 'fillfile'.
+NewBlock5=FillDisk160K
 NewBlock6=FillDisk100K
 
 NoOperation7=
@@ -25,7 +25,7 @@
 NewBlock8=FillDisk1
 Close9=
 
-// This will return things to 50K of disk free (because we filled to 150K,
+// This will return things to 60K of disk free (because we filled to 160K,
 // then to 100K with this file).
 Delete10=E:\fillfile.txt
 
@@ -124,11 +124,11 @@
 DiskFree=4194304
 EndBlock1=
 
-// Fill the disk to within 150K of full.
-[FillDisk150K]
+// Fill the disk to within 160K of full.
+[FillDisk160K]
 Function0=NearFillDisk
 FillFile=E:\fillfile2.txt
-DiskFree=153600
+DiskFree=168960
 EndBlock1=
 
 // Fill the disk to within 100K of full.
@@ -298,7 +298,7 @@
 Exec7=Create Table TheAttached.Sometable(Someint int, Somereal real, Sometext text);
 
 // Fill the disk to within 100K of full (with a file..)
-NewBlock8=FillDisk150K
+NewBlock8=FillDisk160K
 NewBlock9=FillDisk100K
 
 // Fill up the drive with the attached database, first with big records,
@@ -330,9 +330,9 @@
 ExpectedError22=KErrInUse
 
 // Beyond this point we can't expect anything to work (necessarily) because
-// there isn't any disk space left. So grab free off 50K to make sure
+// there isn't any disk space left. So grab free off 60K to make sure
 // (the fill to within 100K of full file which was created after filling
-// to within 150K of full).
+// to within 160K of full).
 Delete23=E:\fillfile.txt
 NoOperation24=
 NoOperation25=
--- a/persistentstorage/sql/TEST/testexecute/SQLite/scripts/Robustness.script	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/TEST/testexecute/SQLite/scripts/Robustness.script	Thu Sep 02 22:18:45 2010 +0300
@@ -31,6 +31,8 @@
 RUN_UTILS DeleteFile E:\fillfile.txt
 RUN_UTILS DeleteFile E:\fillfile2.txt
 RUN_UTILS DeleteFile E:\fillfile4M.txt
+RUN_UTILS DeleteFile T:\fillDisk*.txt
+RUN_UTILS DeleteFile E:\fillDisk*.txt
 
 
 START_TESTCASE SYSLIB-SQL-CIT-3348
@@ -161,3 +163,5 @@
 RUN_UTILS DeleteFile E:\fillfile2.txt
 RUN_UTILS DeleteFile T:\fillfile4M.txt
 RUN_UTILS DeleteFile E:\fillfile4M.txt
+RUN_UTILS DeleteFile T:\fillDisk*.txt
+RUN_UTILS DeleteFile E:\fillDisk*.txt
--- a/persistentstorage/sql/TEST/testexecute/SQLite/src/cdtest.h	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sql/TEST/testexecute/SQLite/src/cdtest.h	Thu Sep 02 22:18:45 2010 +0300
@@ -39,6 +39,9 @@
     void FilesDifferBySize(const TDesC &, const TInt );
     void SecurityPolicyCheck(const TDesC &, const TInt );
     void CollationTest(const TDesC &, const TInt );
+
+private:
+    void PrepareLargeDisk(const TDesC&, const TDriveUnit atdu, TInt64 &atowrite);
     };
 
 #endif // CDTEST_H__
--- a/persistentstorage/sqlite3api/GROUP/BLD.INF	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/GROUP/BLD.INF	Thu Sep 02 22:18:45 2010 +0300
@@ -21,7 +21,7 @@
 
 PRJ_EXPORTS
 
-../SQLite/sqlite3.h	SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/sqlite3.h)
+../SQLite/sqlite3.h	OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/sqlite3.h)
 ../GROUP/sqlite3.iby	/epoc32/rom/include/sqlite3.iby
 ../GROUP/SQLite3_stub.SIS	/epoc32/data/z/system/install/sqlite3_stub.sis
 
@@ -441,6 +441,7 @@
 ../TEST/TclScript/where5.test			z:/private/10285a82/where5.test
 ../TEST/TclScript/where6.test			z:/private/10285a82/where6.test
 ../TEST/TclScript/zeroblob.test			z:/private/10285a82/zeroblob.test
+../TEST/t_sqliteapi.txt				z:/private/212C3129/t_sqliteapi.txt
 
 PRJ_TESTMMPFILES
 
@@ -448,6 +449,7 @@
 //tcl.dll is a test library used by the TCL tests
 ../TEST/TCL/group/tcl84.mmp support
 ../GROUP/tclsqlite3.mmp manual
+../GROUP/t_sqlitetclstarter.mmp manual
 #endif
 ../GROUP/t_sqliteapi.mmp
 ../GROUP/t_sqlitewsd.mmp
--- a/persistentstorage/sqlite3api/GROUP/sqlite3tests.iby	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/GROUP/sqlite3tests.iby	Thu Sep 02 22:18:45 2010 +0300
@@ -430,6 +430,7 @@
 data=ZPRIVATE\10285a82\where5.test			\private\10285a82\where5.test
 data=ZPRIVATE\10285a82\where6.test			\private\10285a82\where6.test
 data=ZPRIVATE\10285a82\zeroblob.test			\private\10285a82\zeroblob.test
+data=ZPRIVATE\212C3129\t_sqliteapi.txt		\private\212C3129\t_sqliteapi.txt
 
 //The next line to be uncommented if the testing is performed locally. Otherwise tests will fail - 
 //the following file is missing and needed by the timezone server.
@@ -441,6 +442,7 @@
 file=ABI_DIR\BUILD_DIR\t_sqliteperf.exe		\test\t_sqliteperf.exe
 file=ABI_DIR\BUILD_DIR\t_sqliteperf2.exe	\test\t_sqliteperf2.exe
 file=ABI_DIR\BUILD_DIR\tclsqlite3.exe		\test\tclsqlite3.exe
+file=ABI_DIR\BUILD_DIR\t_sqlitetclstarter.exe	\test\t_sqlitetclstarter.exe
 file=ABI_DIR\BUILD_DIR\t_sqlitedef.exe		\test\t_sqlitedef.exe
 file=ABI_DIR\BUILD_DIR\t_sqlitedb64.exe		\test\t_sqlitedb64.exe
 
--- a/persistentstorage/sqlite3api/GROUP/t_sqliteapi.mmp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/GROUP/t_sqliteapi.mmp	Thu Sep 02 22:18:45 2010 +0300
@@ -1,4 +1,4 @@
-// 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 "Eclipse Public License v1.0"
@@ -32,5 +32,6 @@
 LIBRARY			efsrv.lib
 
 VENDORID 0x70000001
+UID		  0 0x212C3129
 
 SMPSAFE
--- a/persistentstorage/sqlite3api/GROUP/t_sqlitedef.mmp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/GROUP/t_sqlitedef.mmp	Thu Sep 02 22:18:45 2010 +0300
@@ -25,6 +25,7 @@
 
 SOURCEPATH		../TEST
 SOURCE t_sqlitedef.cpp
+SOURCE sqliteTestUtl.cpp
 
 LIBRARY euser.lib
 LIBRARY sqlite3.lib 
--- a/persistentstorage/sqlite3api/GROUP/t_sqliteperf.mmp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/GROUP/t_sqliteperf.mmp	Thu Sep 02 22:18:45 2010 +0300
@@ -23,6 +23,7 @@
 SOURCEPATH		../TEST
 SOURCE			t_sqliteperfc.c
 SOURCE			t_sqliteperf.cpp
+SOURCE			sqliteTestUtl.cpp
 
 STATICLIBRARY   libcrt0.lib
 LIBRARY         libc.lib
--- a/persistentstorage/sqlite3api/GROUP/t_sqliteperf2.mmp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/GROUP/t_sqliteperf2.mmp	Thu Sep 02 22:18:45 2010 +0300
@@ -22,6 +22,7 @@
 
 SOURCEPATH		../TEST
 SOURCE			t_sqliteperf2.cpp
+SOURCE			sqliteTestUtl.cpp
 
 STATICLIBRARY   libcrt0.lib
 LIBRARY         libc.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sqlite3api/GROUP/t_sqlitetclstarter.mmp	Thu Sep 02 22:18:45 2010 +0300
@@ -0,0 +1,33 @@
+// 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"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+TARGET			t_sqlitetclstarter.exe
+TARGETTYPE		EXE
+CAPABILITY		All -Tcb
+
+USERINCLUDE 	.
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+SOURCEPATH		../TEST
+SOURCE			t_sqlitetclstarter.cpp
+
+LIBRARY			euser.lib 
+LIBRARY			efsrv.lib
+LIBRARY			bafl.lib
+
+UID				0 0x1111CCCC
+VENDORID		0x70000001
+
+SMPSAFE
\ No newline at end of file
--- a/persistentstorage/sqlite3api/GROUP/t_sqlitewsd.mmp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/GROUP/t_sqlitewsd.mmp	Thu Sep 02 22:18:45 2010 +0300
@@ -23,6 +23,7 @@
 SOURCEPATH		../TEST
 SOURCE			t_sqlitewsd.cpp
 SOURCE			t_sqlitewsdinsert.cpp
+SOURCE			sqliteTestUtl.cpp
 
 LIBRARY         libc.lib
 LIBRARY			libpthread.lib
--- a/persistentstorage/sqlite3api/TEST/sqliteTestUtl.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/TEST/sqliteTestUtl.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -21,40 +21,65 @@
 static TBuf8<500> TheBuf8;
 static TBuf16<500> TheBuf16;
 
-static RTest TheTest(_L("t_sqliteapi test"));
+static RTest* TheTest;
 
-extern "C" void TestTitle(void)
+extern "C" void TestOpen(const char* title)
 	{
-	TheTest.Title();
+	TPtrC8 p((const unsigned char*)title);
+	TheBuf16.Copy(p);
+	TheTest = new RTest(TheBuf16);
+	}
+
+extern "C" void TestTitle()
+	{
+	TheTest->Title();
 	}
 
 extern "C" void TestStart(const char* title)
 	{
 	TPtrC8 p((const unsigned char*)title);
 	TheBuf16.Copy(p);
-	TheTest.Start(TheBuf16);
+	TheTest->Start(TheBuf16);
 	}
 
 extern "C" void TestNext(const char* title)
 	{
 	TPtrC8 p((const unsigned char*)title);
 	TheBuf16.Copy(p);
-	TheTest.Next(TheBuf16);
+	TheTest->Next(TheBuf16);
 	}
 
 extern "C" void TestClose(void)
 	{
-	TheTest.Close();	
+	TheTest->Close();
+	delete TheTest;	
 	}
 
 extern "C" void TestEnd(void)
 	{
-	TheTest.End();	
+	TheTest->End();	
 	}
 
 extern "C" void TestAbort(int aLine)
 	{
-	TheTest(0, aLine);	
+	TheTest->operator()(0, aLine);	
+	}
+
+extern "C" void TestTestLine(int aResult, int aLine)
+	{
+	TheTest->operator()(aResult, aLine);
+	}
+
+extern "C" void TestTest(int aResult)
+	{
+	TheTest->operator()(aResult);
+	}
+
+extern "C" void TestPrintf(const char* title)
+	{
+	TPtrC8 p((const unsigned char*)title);
+	TheBuf16.Copy(p);
+	TheTest->Printf(TheBuf16);
 	}
 
 extern "C" void TestHeapMark(void)
@@ -115,9 +140,9 @@
 	{
 	RFs TheFs;
 	TInt err = TheFs.Connect();
-	TheTest(err == KErrNone);
+	TheTest->operator()(err == KErrNone);
 	err = TheFs.CreatePrivatePath(EDriveC);
 	TheFs.Close();
-	TheTest(err == KErrNone || err == KErrAlreadyExists);
+	TheTest->operator()(err == KErrNone || err == KErrAlreadyExists);
 	}
 	
--- a/persistentstorage/sqlite3api/TEST/sqliteTestUtl.h	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/TEST/sqliteTestUtl.h	Thu Sep 02 22:18:45 2010 +0300
@@ -24,12 +24,16 @@
 extern "C" {
 #endif
 
+void TestOpen(const char* title);
 void TestTitle(void);
 void TestStart(const char* title);
 void TestNext(const char* title);
 void TestClose(void);
 void TestEnd(void);
 void TestAbort(TInt aLine);
+void TestTestLine(int aResult, int aLine);
+void TestTest(int aResult);
+void TestPrintf(const char* title);
 
 void TestHeapMark(void);
 void TestHeapMarkEnd(void);
--- a/persistentstorage/sqlite3api/TEST/t_sqliteapi.c	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/TEST/t_sqliteapi.c	Thu Sep 02 22:18:45 2010 +0300
@@ -942,6 +942,8 @@
 			}
 		}
 	
+	srand((unsigned)&ThreadFunc);
+	
 	PrintS("Thread \"%s\" - begin\r\n", (char*)pname);
 	err = sqlite3_open(TheTestDbName, &db);
 	TEST2(err, SQLITE_OK);
@@ -949,6 +951,10 @@
 	
 	while(records < KRecordsCount)
 		{
+        if((records % 10) == 0)
+            {
+            PrintSI("Thread \"%s\", %d records.\r\n", (char*)pname, records);
+            }
 		err = sqlite3_exec(db, "BEGIN", 0, 0, &errmsg);
 		if(err == SQLITE_OK)
 			{
@@ -966,7 +972,7 @@
 		if(err == SQLITE_OK)
 			{
 			TheInsertRecCnt[threadIdx]	+= KCommitRecordsCount;
-			records += 2;
+			records += KCommitRecordsCount;
 			}
 		else if(err == SQLITE_BUSY)
 			{
@@ -974,11 +980,15 @@
 			(void)sqlite3_exec(db, "ROLLBACK", 0, 0, 0);
 			if(errmsg)
 				{
-				PrintSI("Err msg: %s. Err: %d.\r\n", errmsg, err);
+                char fmt[100];
+                strcpy(fmt, "Thread \"");
+                strcat(fmt, (char*)pname);
+                strcat(fmt, "\". Err msg: %s. Err: %d.\r\n");
+				PrintSI(fmt, errmsg, err);
 				sqlite3_free(errmsg);
 				errmsg = 0;
 				}
-			usleep(100);
+			usleep((rand() % 3000) + 500);
 			}
 		}
 
@@ -1347,6 +1357,7 @@
 	UNUSED_ARG(argc);
 	UNUSED_ARG(argv);
 
+	TestOpen("t_sqliteapi test");
 	TestTitle();
 
 	TestHeapMark();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sqlite3api/TEST/t_sqliteapi.txt	Thu Sep 02 22:18:45 2010 +0300
@@ -0,0 +1,3 @@
+This file is not used by any of the SQLite tests.
+The only purpose of this file is: to create a private branch
+on Z: drive for t_sqliteapi test and copy the file there.
--- a/persistentstorage/sqlite3api/TEST/t_sqlitedef.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/TEST/t_sqlitedef.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -20,10 +20,10 @@
 #include <e32math.h>
 #include <sqlite3.h>
 
-#include "e32des16.h"
+#include "sqliteTestUtl.h"
 
+const char* const KTestName = "t_sqlitedef";
 
-static RTest TheTest(_L("t_sqlitedef"));
 static RFs	TheFs;
 
 static sqlite3* TheDb = NULL;
@@ -46,15 +46,15 @@
 static void CreateTestEnv()
     {
 	TInt err = TheFs.Connect();
-	TheTest(err == KErrNone);
+	TestTestLine(err == KErrNone, __LINE__);
 	
 	err = TheFs.ShareAuto();
-	TheTest(err == KErrNone);
+	TestTestLine(err == KErrNone,__LINE__);
 
     TFileName testDir;
     testDir.Copy(TPtrC8((const TUint8*)KTestDir));
 	err = TheFs.MkDir(testDir);
-	TheTest(err == KErrNone || err == KErrAlreadyExists);
+	TestTestLine(err == KErrNone || err == KErrAlreadyExists, __LINE__);
 	
 	TFileName fname;
 	fname.Copy(TPtrC8((const TUint8*)KTestDb));
@@ -110,7 +110,7 @@
 		{
 		PrintErrMsg();
 		DestroyTestEnv();
-		TheTest(EFalse, aLine);
+		TestTestLine(EFalse, aLine);
 		}
 	}
 static void Check(TInt aValue, TInt aExpected, TInt aLine)
@@ -120,7 +120,7 @@
 		PrintErrMsg();
 		DestroyTestEnv();
 		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
-		TheTest(EFalse, aLine);
+		TestTestLine(EFalse, aLine);
 		}
 	}
 #define TEST(arg) ::Check((arg), __LINE__)
@@ -420,8 +420,18 @@
     DeleteFile(KTestDb);
     
     dtstr1.Format(_L("%04d-%02d-%02d,%02d:%02d:%02d"), dt.Year(), dt.Month() + 1, dt.Day() + 1, dt.Hour(), dt.Minute(), dt.Second());
-    TheTest.Printf(_L("Universal date&time=\"%S\"\n"), &dtstr1);
-    TheTest.Printf(_L("SQLite    date&time=\"%S\"\n"), &dtstr2);
+
+    // For the C-Style printout
+    _LIT8(KUniversalTimeText,"Universal date&time=");
+    _LIT8(KSQLiteTimeText,   "SQLite    date&time=");
+    TBuf8<96> dtstr1print;
+    TBuf8<96> dtstr2print;
+    dtstr1print.Copy(dtstr1);
+    dtstr2print.Copy(dtstr2);
+    dtstr1print.Insert(0,KUniversalTimeText);
+    dtstr2print.Insert(0,KSQLiteTimeText);
+    TestPrintf((const char*)(dtstr1print.PtrZ()));
+    TestPrintf((const char*)(dtstr2print.PtrZ()));
     
     //Comapare and fail if dates are not equal (+- 1 second)
     TLex lex;
@@ -465,19 +475,19 @@
 
 void DoTest()
 	{
-	TheTest.Start(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4029: SQLite file handle test"));
+	TestStart("@SYMTestCaseID:PDS-SQLITE3-UT-4029: SQLite file handle test");
 	FileHandleTest();
 	
-	TheTest.Next(_L("@SYMTestCaseID:PDS-SQLITE3-CT-4028: DEF121506 test"));
+	TestNext("@SYMTestCaseID:PDS-SQLITE3-CT-4028: DEF121506 test");
 	DEF121506();
 
-	TheTest.Next(_L("@SYMTestCaseID:PDS-SQLITE3-CT-4046: DEF140020 test"));
+	TestNext("@SYMTestCaseID:PDS-SQLITE3-CT-4046: DEF140020 test");
 	DEF140020();
 
-    TheTest.Next(_L("@SYMTestCaseID:PDS-SQLITE3-CT-4047: SQLITE, \"CREATE INDEX\" sql crashes the SQLite library"));
+    TestNext("@SYMTestCaseID:PDS-SQLITE3-CT-4047: SQLITE, \"CREATE INDEX\" sql crashes the SQLite library");
     DEF143066();
 
-    TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-4048 DEF143151: SQLite, strftime() returns incorrect result"));
+    TestNext(" @SYMTestCaseID:SYSLIB-SQL-CT-4048 DEF143151: SQLite, strftime() returns incorrect result");
     DEF143151();
 	}
 
@@ -485,7 +495,8 @@
 
 TInt E32Main()
 	{
-	TheTest.Title();
+	TestOpen(KTestName);
+	TestTitle();
 	CTrapCleanup* tc = CTrapCleanup::New();
 
 	__UHEAP_MARK;
@@ -496,8 +507,8 @@
 	
 	__UHEAP_MARKEND;
 
-	TheTest.End();	
-	TheTest.Close();
+	TestEnd();	
+	TestClose();
 	delete tc;
 	User::Heap().Check();
 	return KErrNone;
--- a/persistentstorage/sqlite3api/TEST/t_sqliteperf.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/TEST/t_sqliteperf.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -18,11 +18,13 @@
 #include <e32math.h>
 #include <hal.h>
 #include <sqldb.h>
+#include "sqliteTestUtl.h"
 #include "t_sqliteperf.h"
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
-static RTest TheTest(_L("t_sqliteperf test"));
+const char* const KTestName = "t_sqliteperf test";
+
 _LIT(KTestDir, "c:\\test\\");
 _LIT(KTestDbName,   "c:\\test\\t_sqliteperf.db");
 _LIT8(KTestDbName8, "c:\\test\\t_sqliteperf.db\x0");
@@ -65,37 +67,11 @@
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
-extern "C" void TestAbort(TInt aLine)
-	{
-	TheTest(0, aLine);
-	}
-
 extern "C" const char* TestDbName(void)
 	{
 	return (const char*)KTestDbName8().Ptr();
 	}
 
-extern "C" void PrintS(const char* aFmt, const char* aMsg)
-	{
-	TheSqlBuf.Format(TPtrC8((const TUint8*)aFmt), aMsg);
-	ThePrintBuf.Copy(TheSqlBuf);
-	TheTest.Printf(ThePrintBuf);
-	}
-
-extern "C" void PrintI(const char* aFmt, int a1)
-	{
-	TheSqlBuf.Format(TPtrC8((const TUint8*)aFmt), a1);
-	ThePrintBuf.Copy(TheSqlBuf);
-	TheTest.Printf(ThePrintBuf);
-	}
-
-extern "C" void PrintIII(const char* aFmt, int a1, int a2, int a3)
-	{
-	TheSqlBuf.Format(TPtrC8((const TUint8*)aFmt), a1, a2, a3);
-	ThePrintBuf.Copy(TheSqlBuf);
-	TheTest.Printf(ThePrintBuf);
-	}
-
 static void DeleteTestFiles()
 	{
 	TheDb.Close();
@@ -109,7 +85,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
-		TheTest(EFalse, aLine);
+		TestTestLine(EFalse, aLine);
 		}
 	}
 static void Check(TInt aValue, TInt aExpected, TInt aLine)
@@ -118,7 +94,7 @@
 		{
 		DeleteTestFiles();
 		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
-		TheTest(EFalse, aLine);
+		TestTestLine(EFalse, aLine);
 		}
 	}
 #define TEST(arg) ::Check((arg), __LINE__)
@@ -175,7 +151,9 @@
 static void GetFastCounterFrequency()
 	{
 	TEST2(HAL::Get(HAL::EFastCounterFrequency, TheCounterFreq), KErrNone);
-	TheTest.Printf(_L("Counter frequency=%d\r\n"), TheCounterFreq);
+	TBuf8<32> printString;
+	printString.Format(_L8("Counter frequency=%d\r\n"), TheCounterFreq);
+	TestPrintf((const char*)printString.PtrZ());
 	}
 
 extern "C" unsigned int FastCounterValue(void)
@@ -193,62 +171,71 @@
 
 static void PrintPerfTestResults()
 	{
+	TBuf8<256> printString;
 	TInt r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode]          [EPerfTestMultiInsert]);
 	TInt r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode]    [EPerfTestMultiInsert]);
 	TInt r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestMultiInsert]);
 	TInt r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1);
 	TInt r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1);
-	TheTest.Printf(_L("###                 SQL            SQLITE-SQL     SQLITE-DEFAULT\r\n"));
-	TheTest.Printf(_L("###Mutli Insert:  %8dus     %8dus     %8dus   %8d%%   %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	TestPrintf("###                 SQL            SQLITE-SQL     SQLITE-DEFAULT\r\n");
+	printString.Format(_L8("###Multi Insert:  %8dus     %8dus     %8dus   %8d%%%%   %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	TestPrintf((const char*)printString.PtrZ());
 
 	r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode]          [EPerfTestMultiUpdate]);
 	r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode]    [EPerfTestMultiUpdate]);
 	r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestMultiUpdate]);
 	r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1);
 	r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1);
-	TheTest.Printf(_L("###Mutli Update:  %8dus     %8dus     %8dus   %8d%%   %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	printString.Format(_L8("###Multi Update:  %8dus     %8dus     %8dus   %8d%%%%   %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	TestPrintf((const char*)printString.PtrZ());
 
 	r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode]          [EPerfTestMultiDelete]);
 	r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode]    [EPerfTestMultiDelete]);
 	r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestMultiDelete]);
 	r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1);
 	r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1);
-	TheTest.Printf(_L("###Mutli Delete:  %8dus     %8dus     %8dus   %8d%%   %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	printString.Format(_L8("###Multi Delete:  %8dus     %8dus     %8dus   %8d%%%%   %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	TestPrintf((const char*)printString.PtrZ());
 
 	r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode]          [EPerfTestMultiSelect]);
 	r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode]    [EPerfTestMultiSelect]);
 	r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestMultiSelect]);
 	r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1);
 	r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1);
-	TheTest.Printf(_L("###Mutli Select:  %8dus     %8dus     %8dus   %8d%%   %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	printString.Format(_L8("###Multi Select:  %8dus     %8dus     %8dus   %8d%%%%   %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	TestPrintf((const char*)printString.PtrZ());
 
 	r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode]          [EPerfTestSingleInsert]);
 	r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode]    [EPerfTestSingleInsert]);
 	r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestSingleInsert]);
 	r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1);
 	r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1);
-	TheTest.Printf(_L("##Single Insert:  %8dus     %8dus     %8dus   %8d%%   %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	printString.Format(_L8("##Single Insert:  %8dus     %8dus     %8dus   %8d%%%%   %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	TestPrintf((const char*)printString.PtrZ());
 
 	r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode]          [EPerfTestSingleUpdate]);
 	r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode]    [EPerfTestSingleUpdate]);
 	r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestSingleUpdate]);
 	r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1);
 	r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1);
-	TheTest.Printf(_L("##Single Update:  %8dus     %8dus     %8dus   %8d%%   %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	printString.Format(_L8("##Single Update:  %8dus     %8dus     %8dus   %8d%%%%   %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	TestPrintf((const char*)printString.PtrZ());
 
 	r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode]          [EPerfTestSingleDelete]);
 	r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode]    [EPerfTestSingleDelete]);
 	r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestSingleDelete]);
 	r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1);
 	r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1);
-	TheTest.Printf(_L("##Single Delete:  %8dus     %8dus     %8dus   %8d%%   %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	printString.Format(_L8("##Single Delete:  %8dus     %8dus     %8dus   %8d%%%%   %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	TestPrintf((const char*)printString.PtrZ());
 
 	r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode]          [EPerfTestSingleSelect]);
 	r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode]    [EPerfTestSingleSelect]);
 	r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestSingleSelect]);
 	r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1);
 	r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1);
-	TheTest.Printf(_L("##Single Select:  %8dus     %8dus     %8dus   %8d%%   %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	printString.Format(_L8("##Single Select:  %8dus     %8dus     %8dus   %8d%%%%   %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5);
+	TestPrintf((const char*)printString.PtrZ());
 	}
 
 ///////////////////////////////////////////////////////////////////////////////////////
@@ -300,7 +287,7 @@
 */
 static void SqlServerMultiInsertTest(const char aInsertSql[], TInt aInsertRecCnt)
 	{
-	TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4010 "));
+	TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4010 ");
 	(void)KillProcess(KSqlSrvName);
 
 	TInt err = TheDb.Open(KTestDbName);
@@ -357,7 +344,7 @@
 */
 static void SqlServerMultiUpdateTest(const char aUpdateSql[], TInt aUpdateRecIds[], TInt aUpdateRecCnt)
 	{
-    TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4011 "));
+    TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4011 ");
 	(void)KillProcess(KSqlSrvName);
 
 	TInt err = TheDb.Open(KTestDbName);
@@ -385,7 +372,7 @@
 */
 static void SqlServerMultiDeleteTest(const char aDeleteSql[], TInt aDeleteRecIds[], TInt aDeleteRecCnt)
 	{
-	TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4012 "));
+	TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4012 ");
 	(void)KillProcess(KSqlSrvName);
 
 	TInt err = TheDb.Open(KTestDbName);
@@ -413,7 +400,7 @@
 */
 static void SqlServerMultiSelectTest(const char aSelectSql[], TInt aSelectRecIds[], TInt aSelectRecCnt)
 	{
-	TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4013 "));
+	TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4013 ");
 	(void)KillProcess(KSqlSrvName);
 
 	TInt err = TheDb.Open(KTestDbName);
@@ -462,7 +449,7 @@
 */
 static void SqlServerSingleInsertTest(const char aSingleInsertSql[], TInt aInsertRecId)
 	{
-	TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4014 "));
+	TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4014 ");
 	(void)KillProcess(KSqlSrvName);
 
 	TInt err = TheDb.Open(KTestDbName);
@@ -489,7 +476,7 @@
 */
 static void SqlServerSingleUpdateTest(const char aSingleUpdateSql[], TInt aUpdateRecId)
 	{
-	TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4015 "));
+	TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4015 ");
 	(void)KillProcess(KSqlSrvName);
 
 	TInt err = TheDb.Open(KTestDbName);
@@ -517,7 +504,7 @@
 */
 static void SqlServerSingleDeleteTest(const char aSingleDeleteSql[], TInt aDeleteRecId)
 	{
-	TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4016 "));
+	TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4016 ");
 	(void)KillProcess(KSqlSrvName);
 
 	TInt err = TheDb.Open(KTestDbName);
@@ -545,7 +532,7 @@
 */
 static void SqlServerSingleSelectTest(const char aSingleSelectSql[], TInt aSelectRecId)
 	{
-	TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4017 "));
+	TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4017 ");
 	(void)KillProcess(KSqlSrvName);
 
 	TInt err = TheDb.Open(KTestDbName);
@@ -589,37 +576,38 @@
 
 static void DoSqlServerTests()
 	{
-	TheTest.Next(_L("SQL: Create the test database"));
+	TestNext("SQL: Create the test database");
 	CreateTestDatabase();
 
-	TBuf<100> msgbuf;
+	TBuf8<100> msgbuf;
 
-	msgbuf.Format(_L("SQL: insert %d records in a single transaction"), KInsertRecCnt);
-	TheTest.Next(msgbuf);
+	msgbuf.Format(_L8("SQL: insert %d records in a single transaction"), KInsertRecCnt);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqlServerMultiInsertTest(KMultiInsertSql, KInsertRecCnt);
 
-	msgbuf.Format(_L("SQL: update %d records in a single transaction"), KUpdateRecCnt);
-	TheTest.Next(msgbuf);
+	msgbuf.Format(_L8("SQL: update %d records in a single transaction"), KUpdateRecCnt);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqlServerMultiUpdateTest(KMultiUpdateSql, TheUpdateRecIds, KUpdateRecCnt);
 
-	msgbuf.Format(_L("SQL: delete %d records in a single transaction"), KDeleteRecCnt);
-	TheTest.Next(msgbuf);
+	msgbuf.Format(_L8("SQL: delete %d records in a single transaction"), KDeleteRecCnt);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqlServerMultiDeleteTest(KMultiDeleteSql, TheDeleteRecIds, KDeleteRecCnt);
 
-	msgbuf.Format(_L("SQL: select %d records"), KSelectRecCnt);
-	TheTest.Next(msgbuf);
+	msgbuf.Format(_L8("SQL: select %d records"), KSelectRecCnt);
+	msgbuf.Copy(msgbuf);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqlServerMultiSelectTest(KMultiSelectSql, TheSelectRecIds, KSelectRecCnt);
 
-	TheTest.Next(_L("SQL: insert a single record"));
+	TestNext("SQL: insert a single record");
 	SqlServerSingleInsertTest(KSingleInsertSql, TheInsertRecId);
 
-	TheTest.Next(_L("SQL: update a single record"));
+	TestNext("SQL: update a single record");
 	SqlServerSingleUpdateTest(KSingleUpdateSql, TheUpdateRecId);
 
-	TheTest.Next(_L("SQL: delete a single record"));
+	TestNext("SQL: delete a single record");
 	SqlServerSingleDeleteTest(KSingleDeleteSql, TheDeleteRecId);
 
-	TheTest.Next(_L("SQL: select a single record"));
+	TestNext("SQL: select a single record");
 	SqlServerSingleSelectTest(KSingleSelectSql, TheSelectRecId);
 
 	(void)RSqlDatabase::Delete(KTestDbName);
@@ -631,51 +619,51 @@
 
 	SqliteInitialize(aPerfTestMode);
 
-	TheTest.Next( _L("SQLite: Create the test database"));
+	TestNext("SQLite: Create the test database");
 	CreateTestDatabase();
 
-	TBuf<200> msgbuf;
-	_LIT(KSqliteConfigSql, "\"SQL\"");
-	_LIT(KSqliteConfigDefault, "\"Default\"");
+	TBuf8<200> msgbuf;
+	_LIT8(KSqliteConfigSql, "\"SQL\"");
+	_LIT8(KSqliteConfigDefault, "\"Default\"");
 
-	msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4018: SQLite, configuration: %S: insert %d records in a single transaction"),
+	msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4018: SQLite, configuration: %S: insert %d records in a single transaction"),
 							aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault, KInsertRecCnt);
-	TheTest.Next(msgbuf);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteMultiInsertTest(aPerfTestMode, KMultiInsertSql, KInsertRecCnt);
 
-	msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4019: SQLite, configuration: %S: update %d records in a single transaction"),
+	msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4019: SQLite, configuration: %S: update %d records in a single transaction"),
 							aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault, KUpdateRecCnt);
-	TheTest.Next(msgbuf);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteMultiUpdateTest(aPerfTestMode, KMultiUpdateSql, TheUpdateRecIds, KUpdateRecCnt);
 
-	msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4020: SQLite, configuration: %S: delete %d records in a single transaction"),
+	msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4020: SQLite, configuration: %S: delete %d records in a single transaction"),
 							aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault, KDeleteRecCnt);
-	TheTest.Next(msgbuf);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteMultiDeleteTest(aPerfTestMode, KMultiDeleteSql, TheDeleteRecIds, KDeleteRecCnt);
 
-	msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4021: SQLite, configuration: %S: select %d records"),
+	msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4021: SQLite, configuration: %S: select %d records"),
 							aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault, KSelectRecCnt);
-	TheTest.Next(msgbuf);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteMultiSelectTest(aPerfTestMode, KMultiSelectSql, TheSelectRecIds, KSelectRecCnt);
 
-	msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4022: SQLite, configuration: %S: insert a single record"),
+	msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4022: SQLite, configuration: %S: insert a single record"),
 							aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault);
-	TheTest.Next(msgbuf);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteSingleInsertTest(aPerfTestMode, KSingleInsertSql, TheInsertRecId);
 
-	msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4023: SQLite, configuration: %S: update a single record"),
+	msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4023: SQLite, configuration: %S: update a single record"),
 							aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault);
-	TheTest.Next(msgbuf);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteSingleUpdateTest(aPerfTestMode, KSingleUpdateSql, TheUpdateRecId);
 
-	msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4024: SQLite, configuration: %S: delete a single record"),
+	msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4024: SQLite, configuration: %S: delete a single record"),
 							aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault);
-	TheTest.Next(msgbuf);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteSingleDeleteTest(aPerfTestMode, KSingleDeleteSql, TheDeleteRecId);
 
-	msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4025: SQLite, configuration: %S: select a single record"),
+	msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4025: SQLite, configuration: %S: select a single record"),
 							aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault);
-	TheTest.Next(msgbuf);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteSingleSelectTest(aPerfTestMode, KSingleSelectSql, TheSelectRecId);
 
 	(void)RSqlDatabase::Delete(KTestDbName);
@@ -819,13 +807,13 @@
 
 static void DoTests()
 	{
-	TheTest.Start(_L("Get fast counter frequency"));
+	TestStart("Get fast counter frequency");
 	GetFastCounterFrequency();
 
-	TheTest.Next( _L("Generate test record ids"));
+	TestNext("Generate test record ids");
 	GenerateTestRecIds();
 
-	TheTest.Next( _L("Verify generated test record ids"));
+	TestNext("Verify generated test record ids");
 	VerifyGeneratedRecIds();
 
 	DoSqlServerTests();
@@ -840,7 +828,8 @@
 
 TInt E32Main()
 	{
-	TheTest.Title();
+	TestOpen(KTestName);
+	TestTitle();
 
 	CTrapCleanup* tc = CTrapCleanup::New();
 
@@ -853,8 +842,8 @@
 
 	__UHEAP_MARKEND;
 
-	TheTest.End();
-	TheTest.Close();
+	TestEnd();
+	TestClose();
 
 	delete tc;
 
--- a/persistentstorage/sqlite3api/TEST/t_sqliteperf2.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/TEST/t_sqliteperf2.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -20,6 +20,7 @@
 #include <sqlite3.h>
 #include <string.h>
 #include <stdio.h>
+#include "sqliteTestUtl.h"
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
@@ -40,7 +41,7 @@
 //The performance test case results are stored in the ThePerfTestResult array.
 static TUint32 ThePerfTestResult[EPerfTestTypeCnt];
 
-static RTest TheTest(_L("t_sqliteperf2 test"));
+const char* const KTestName = "t_sqliteperf2 test";
 
 _LIT(KTestDir,              "c:\\test\\");
 _LIT(KTestDbName,           "c:\\test\\t_sqliteperf2.db");
@@ -173,9 +174,8 @@
 	if(TheDb)
 		{
 		const char* msg = sqlite3_errmsg(TheDb);
-		TBuf<200> buf;
-		buf.Copy(TPtrC8((const TUint8*)msg));
-		TheTest.Printf(_L("*** SQLite error message: \"%S\"\r\n"), &buf);
+		TestPrintf("*** SQLite error message:");
+		TestPrintf(msg);
 		}
 	}
 
@@ -186,7 +186,7 @@
 		{
 		DeleteTestFiles();
 		PrintSqliteErrMsg();
-		TheTest(EFalse, aLine);
+		TestTestLine(EFalse, aLine);
 		}
 	}
 static void Check(TInt aValue, TInt aExpected, TInt aLine)
@@ -196,7 +196,7 @@
 		DeleteTestFiles();
 		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		PrintSqliteErrMsg();
-		TheTest(EFalse, aLine);
+		TestTestLine(EFalse, aLine);
 		}
 	}
 #define TEST(arg) ::Check((arg), __LINE__)
@@ -218,7 +218,9 @@
 static void GetFastCounterFrequency()
 	{
 	TEST2(HAL::Get(HAL::EFastCounterFrequency, TheCounterFreq), KErrNone);
-	TheTest.Printf(_L("Counter frequency=%d\r\n"), TheCounterFreq);
+	TBuf8<32> printString;
+	printString.Format(_L8("Counter frequency=%d\r\n"), TheCounterFreq);
+	TestPrintf((const char*)printString.PtrZ());
 	}
 
 TUint32 FastCounterValue(void)
@@ -238,30 +240,40 @@
 
 static void PrintPerfTestResults()
 	{
+	TBuf8<256> printString;
+
 	TInt r = FcDiff2Us(ThePerfTestResult[EPerfTestMultiInsert]);
-	TheTest.Printf(_L("###Mutli Insert:  %8dus\r\n"), r);
+	printString.Format(_L8("###Mutli Insert:  %8dus\r\n"), r);
+	TestPrintf((const char*)printString.PtrZ());
 
 	r = FcDiff2Us(ThePerfTestResult[EPerfTestMultiUpdate]);
-	TheTest.Printf(_L("###Mutli Update:  %8dus\r\n"), r);
+	printString.Format(_L8("###Mutli Update:  %8dus\r\n"), r);
+	TestPrintf((const char*)printString.PtrZ());
 
 	r = FcDiff2Us(ThePerfTestResult[EPerfTestMultiSelect]);
-	TheTest.Printf(_L("###Mutli Select:  %8dus\r\n"), r);
+	printString.Format(_L8("###Mutli Select:  %8dus\r\n"), r);
+	TestPrintf((const char*)printString.PtrZ());
 
 	r = FcDiff2Us(ThePerfTestResult[EPerfTestMultiDelete]);
-	TheTest.Printf(_L("###Mutli Delete:  %8dus\r\n"), r);
+	printString.Format(_L8("###Mutli Delete:  %8dus\r\n"), r);
+	TestPrintf((const char*)printString.PtrZ());
 
 
 	r = FcDiff2Us(ThePerfTestResult[EPerfTestSingleInsert]);
-	TheTest.Printf(_L("##Single Insert:  %8dus\r\n"), r);
+	printString.Format(_L8("##Single Insert:  %8dus\r\n"), r);
+	TestPrintf((const char*)printString.PtrZ());
 
 	r = FcDiff2Us(ThePerfTestResult[EPerfTestSingleUpdate]);
-	TheTest.Printf(_L("##Single Update:  %8dus\r\n"), r);
+	printString.Format(_L8("##Single Update:  %8dus\r\n"), r);
+	TestPrintf((const char*)printString.PtrZ());
 
 	r = FcDiff2Us(ThePerfTestResult[EPerfTestSingleSelect]);
-	TheTest.Printf(_L("##Single Select:  %8dus\r\n"), r);
+	printString.Format(_L8("##Single Select:  %8dus\r\n"), r);
+	TestPrintf((const char*)printString.PtrZ());
 
 	r = FcDiff2Us(ThePerfTestResult[EPerfTestSingleDelete]);
-	TheTest.Printf(_L("##Single Delete:  %8dus\r\n"), r);
+	printString.Format(_L8("##Single Delete:  %8dus\r\n"), r);
+	TestPrintf((const char*)printString.PtrZ());
 	}
 
 ///////////////////////////////////////////////////////////////////////////////////////
@@ -277,9 +289,8 @@
 	(void)TheFs.Delete(KTestDbName);
 
 	const char* ver = sqlite3_libversion();
-	TBuf<20> buf;
-	buf.Copy(TPtrC8((const TUint8*)ver));
-	TheTest.Printf(_L("*** SQLite library version: \"%S\"\r\n"), &buf);
+	TestPrintf("*** SQLite library version:");
+	TestPrintf(ver);
 
 	TInt err = sqlite3_open(KTestDbName8, &TheDb);
 	TEST2(err, SQLITE_OK);
@@ -643,44 +654,44 @@
 
 static void DoTests()
 	{
-	TheTest.Start(_L("Get fast counter frequency"));
+	TestStart("Get fast counter frequency");
 	GetFastCounterFrequency();
 
-	TheTest.Next( _L("SQLite: Create the test database"));
+	TestNext("SQLite: Create the test database");
 	CreateTestDatabase();
 
-	TBuf<100> msgbuf;
+	TBuf8<100> msgbuf;
 
-	msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4030: Insert %d records in a single transaction"), KInsertRecCnt);
-	TheTest.Next(msgbuf);
+	msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4030: Insert %d records in a single transaction"), KInsertRecCnt);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteMultiInsertTest();
 
-	msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4031: Update %d records in a single transaction"), KUpdateRecCnt);
-	TheTest.Next(msgbuf);
+	msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4031: Update %d records in a single transaction"), KUpdateRecCnt);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteMultiUpdateTest();
 
-	msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4032: Select %d records"), KSelectRecCnt);
-	TheTest.Next(msgbuf);
+	msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4032: Select %d records"), KSelectRecCnt);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteMultiSelectTest();
 
-	msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4033: Delete %d records in a single transaction"), KDeleteRecCnt);
-	TheTest.Next(msgbuf);
+	msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4033: Delete %d records in a single transaction"), KDeleteRecCnt);
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteMultiDeleteTest();
 
-	msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4034: Insert a single record"));
-	TheTest.Next(msgbuf);
+	msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4034: Insert a single record"));
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteSingleInsertTest();
 
-	msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4035: Update a single record"));
-	TheTest.Next(msgbuf);
+	msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4035: Update a single record"));
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteSingleUpdateTest();
 
-	msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4036: Select a single record"));
-	TheTest.Next(msgbuf);
+	msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4036: Select a single record"));
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteSingleSelectTest();
 
-	msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4037: Delete a single record"));
-	TheTest.Next(msgbuf);
+	msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4037: Delete a single record"));
+	TestNext((const char*)msgbuf.PtrZ());
 	SqliteSingleDeleteTest();
 
 	(void)TheFs.Delete(KTestDbName);
@@ -690,14 +701,15 @@
 
 TInt E32Main()
 	{
-	TheTest.Title();
+	TestOpen(KTestName);
+	TestTitle();
 
 	CTrapCleanup* tc = CTrapCleanup::New();
 
 	__UHEAP_MARK;
 
 	TInt err = TheFs.Connect();
-	TheTest(err == KErrNone);
+	TestTest(err == KErrNone);
 
 	CreateTestDir();
 	DeleteTestFiles();
@@ -707,8 +719,8 @@
 	__UHEAP_MARKEND;
 
 	TheFs.Close();
-	TheTest.End();
-	TheTest.Close();
+	TestEnd();
+	TestClose();
 
 	delete tc;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sqlite3api/TEST/t_sqlitetclstarter.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -0,0 +1,166 @@
+// 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 "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include <e32test.h>
+#include <e32uid.h>
+#include <f32file.h>
+#include <bautils.h>
+
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+RTest TheTest(_L("t_sqlitetclstarter"));
+
+_LIT(KTclExecutableName,"tclsqlite3.exe");
+_LIT(KTclScriptName,"all.test");
+
+_LIT(KStdioConfigFilePath,	"C:\\system\\data\\");
+_LIT(KStdioConfigFile,	"C:\\system\\data\\config.ini");
+
+_LIT(KLogsFilePath, "C:\\logs\\testexecute\\");
+
+RFs theFs;
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+//
+// Creates the appropriate stdio ini file to redirect stdio output to a file 
+//
+
+void CreateIniFileForStdoutRedirection(void)
+	{
+	TInt err(KErrNone);
+
+	// check path exists otherwise create
+	if (!BaflUtils::FolderExists(theFs, KStdioConfigFilePath))
+		{
+		err = theFs.MkDirAll(KStdioConfigFilePath);
+		TheTest(err == KErrNone, __LINE__);
+		}
+
+	
+	// create file
+	RFile file;
+	err = file.Create(theFs, KStdioConfigFile, EFileRead | EFileWrite);	
+	TheTest(err == KErrNone, __LINE__);
+
+	TheTest(KErrNone == file.Write(_L8("[STDIO]\r\n")), __LINE__);
+	TheTest(KErrNone == file.Write(_L8("STDIN = MEDIA1\r\n")), __LINE__);
+	TheTest(KErrNone == file.Write(_L8("STDOUT = MEDIA2\r\n")), __LINE__);
+	TheTest(KErrNone == file.Write(_L8("[MEDIA1]\r\n")), __LINE__);
+	TheTest(KErrNone == file.Write(_L8("type = console\r\n")), __LINE__);
+	TheTest(KErrNone == file.Write(_L8("width = -1\r\n")), __LINE__);
+	TheTest(KErrNone == file.Write(_L8("height = -1\r\n")), __LINE__);
+	TheTest(KErrNone == file.Write(_L8("[MEDIA2]\r\n")), __LINE__);
+	TheTest(KErrNone == file.Write(_L8("type = file\r\n")), __LINE__);
+	TheTest(KErrNone == file.Write(_L8("path = C:\\logs\\testexecute\\t_sqlitetclstarter.htm\r\n")), __LINE__);
+	TheTest(KErrNone == file.Flush(),__LINE__);
+
+	file.Close();
+
+	}
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+//
+// Deletes the stdio ini file
+//
+
+void DeleteIniFileForStdoutRedirection(void)
+	{
+	TInt err = theFs.Delete(KStdioConfigFile);
+	TheTest(err == KErrNone || err==KErrNotFound || err==KErrPathNotFound, __LINE__);
+	}
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+//
+// Ensure the directory for the Logs file exists
+//
+
+void EnsureLogsDirectoryExists(void)
+	{
+	TInt err(KErrNone);
+
+	// check path exists otherwise create
+	if (!BaflUtils::FolderExists(theFs, KLogsFilePath))
+		{
+		err = theFs.MkDirAll(KLogsFilePath);
+		TheTest(err == KErrNone, __LINE__);
+		}
+	}
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+//
+// Start the tcl process with a script
+//
+
+void StartTclProcess(void)
+	{
+	RProcess process;
+	TInt err = process.Create(KTclExecutableName,KTclScriptName);
+	TheTest(err==KErrNone, __LINE__);
+	
+	TRequestStatus processStatus;
+	process.Logon(processStatus);
+
+	process.Resume();
+
+	TheTest.Printf(_L("Wait for TCL tests to finish\r\n"));
+
+	User::WaitForRequest(processStatus);
+
+	TheTest.Printf(_L("TCL tests finished %d\r\n"),processStatus.Int());
+
+	TheTest(processStatus.Int() == KErrNone, __LINE__);
+	}
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+TInt E32Main()
+	{
+	TheTest.Title();
+	TheTest.Start(_L("TCL tests"));
+
+	CTrapCleanup* tc = CTrapCleanup::New();
+	
+	__UHEAP_MARK;
+	
+	TInt err = theFs.Connect();
+	TheTest(err == KErrNone, __LINE__);
+
+	DeleteIniFileForStdoutRedirection();
+
+	CreateIniFileForStdoutRedirection();
+
+	EnsureLogsDirectoryExists();
+
+	StartTclProcess();
+
+	DeleteIniFileForStdoutRedirection();
+
+	theFs.Close();
+
+	__UHEAP_MARKEND;
+	
+	TheTest.End();
+	TheTest.Close();
+	
+	delete tc;
+	
+	User::Heap().Check();
+	return KErrNone;
+	}
--- a/persistentstorage/sqlite3api/TEST/t_sqlitewsd.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/sqlite3api/TEST/t_sqlitewsd.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -19,13 +19,14 @@
 #include <e32math.h>
 #include <sqlite3.h>
 #include "t_sqlitewsd.h"
+#include "sqliteTestUtl.h"
 
 #include <spawn.h>
 #include <sys/wait.h>
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
-static RTest	TheTest(_L("t_sqlitewsd test"));
+const char* const KTestName = "t_sqlitewsd";
 static RFs		TheFs;
 
 static pid_t	TheKSqliteWsdProc2Pid = 0;
@@ -62,7 +63,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
-		TheTest(EFalse, aLine);
+		TestTestLine(EFalse, aLine);
 		}
 	}
 	
@@ -79,7 +80,7 @@
 			RDebug::Print(_L("*** SQLITE error msg: \"%S\".\r\n"), &msgBuf);
 			}
 		DestroyTestEnv();
-		TheTest(EFalse, aLine);
+		TestTestLine(EFalse, aLine);
 		}
 	}
 
@@ -182,14 +183,14 @@
 */
 static void DoWsdTests()
 	{
-	TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4026 Create the test database "));
+	TestStart(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4026 Create the test database ");
 	CreateDb();
-	TheTest.Next(_L("Run the second process: t_sqlitewsd2"));
+	TestNext("Run the second process: t_sqlitewsd2");
 	RunSqliteWsd2();
-	TheTest.Next(_L("Insert the records"));
+	TestNext("Insert the records");
 	DoInserts(KWsdProc1Id, KWsdProc1RecId1, KWsdProc1RecId2);
 	DestroySqliteWsd2();
-	TheTest.Next(_L("Verify the inserted records"));
+	TestNext("Verify the inserted records");
 	DoVerify();
 	}
 
@@ -197,7 +198,8 @@
 
 TInt E32Main()
 	{
-	TheTest.Title();
+	TestOpen(KTestName);
+	TestTitle();
 	
 	CTrapCleanup* tc = CTrapCleanup::New();
 	
@@ -209,8 +211,8 @@
 	
 	__UHEAP_MARKEND;
 	
-	TheTest.End();
-	TheTest.Close();
+	TestEnd();
+	TestClose();
 	
 	delete tc;
 	
--- a/persistentstorage/store/INC/S32FILE.INL	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/store/INC/S32FILE.INL	Thu Sep 02 22:18:45 2010 +0300
@@ -296,7 +296,13 @@
 	{
 //  When the file server write caching is enabled, the order of file write operations is not guaranteed. This could cause data inconsistency in some circumstances,
 //  for example, when the power is lost in the middle of a database transaction. Therefore, the file write caching is disabled for this file to maintain integrity.
-	return STATIC_CAST(CPermanentFileStore*,CFileStore::OpenL(aFs,aName,aFileMode|EFileWriteDirectIO,KPermanentFileStoreFactoryFunction));
+	
+    if ((aFileMode&EFileWrite) != 0)
+        {
+        aFileMode |= EFileWriteDirectIO;
+        aFileMode &= (~EFileWriteBuffered);
+        }
+    return STATIC_CAST(CPermanentFileStore*,CFileStore::OpenL(aFs,aName,aFileMode,KPermanentFileStoreFactoryFunction));
 	}
 inline CPermanentFileStore* CPermanentFileStore::OpenLC(RFs& aFs,const TDesC& aName,TUint aFileMode)
 /** Opens a file containing a permanent file store, constructs a permanent file 
@@ -311,7 +317,13 @@
 	{
 //  When the file server write caching is enabled, the order of file write operations is not guaranteed. This could cause data inconsistency in some circumstances,
 //  for example, when the power is lost in the middle of a database transaction. Therefore, the file write caching is disabled for this file to maintain integrity.
-	return STATIC_CAST(CPermanentFileStore*,CFileStore::OpenLC(aFs,aName,aFileMode|EFileWriteDirectIO,KPermanentFileStoreFactoryFunction));
+	
+    if ((aFileMode&EFileWrite) != 0)
+        {
+        aFileMode |= EFileWriteDirectIO;
+        aFileMode &= (~EFileWriteBuffered);
+        }
+    return STATIC_CAST(CPermanentFileStore*,CFileStore::OpenLC(aFs,aName,aFileMode,KPermanentFileStoreFactoryFunction));
 	}
 inline CPermanentFileStore* CPermanentFileStore::CreateL(RFs& aFs,const TDesC& aName,TUint aFileMode)
 /** Creates a new file and constructs a new permanent file store object to be associated 
@@ -327,7 +339,13 @@
 	{
 //  When the file server write caching is enabled, the order of file write operations is not guaranteed. This could cause data inconsistency in some circumstances,
 //  for example, when the power is lost in the middle of a database transaction. Therefore, the file write caching is disabled for this file to maintain integrity.
-	return STATIC_CAST(CPermanentFileStore*,CFileStore::CreateL(aFs,aName,aFileMode|EFileWriteDirectIO,&DoNewL));
+	
+    if ((aFileMode&EFileWrite) != 0)
+        {
+        aFileMode |= EFileWriteDirectIO;
+        aFileMode &= (~EFileWriteBuffered);
+        }
+    return STATIC_CAST(CPermanentFileStore*,CFileStore::CreateL(aFs,aName,aFileMode,&DoNewL));
 	}
 inline CPermanentFileStore* CPermanentFileStore::CreateLC(RFs& aFs,const TDesC& aName,TUint aFileMode)
 /** Creates a new file and constructs a new permanent file store object to be associated 
@@ -343,7 +361,13 @@
 	{
 //  When the file server write caching is enabled, the order of file write operations is not guaranteed. This could cause data inconsistency in some circumstances,
 //  for example, when the power is lost in the middle of a database transaction. Therefore, the file write caching is disabled for this file to maintain integrity.
-	return STATIC_CAST(CPermanentFileStore*,CFileStore::CreateLC(aFs,aName,aFileMode|EFileWriteDirectIO,&DoNewL));
+	
+    if ((aFileMode&EFileWrite) != 0)
+        {
+        aFileMode |= EFileWriteDirectIO;
+        aFileMode &= (~EFileWriteBuffered);
+        }
+    return STATIC_CAST(CPermanentFileStore*,CFileStore::CreateLC(aFs,aName,aFileMode,&DoNewL));
 	}
 inline CPermanentFileStore* CPermanentFileStore::ReplaceL(RFs& aFs,const TDesC& aName,TUint aFileMode)
 /** Creates a file, constructs a permanent file store object to be associated with 
@@ -360,7 +384,13 @@
 	{
 //  When the file server write caching is enabled, the order of file write operations is not guaranteed. This could cause data inconsistency in some circumstances,
 //  for example, when the power is lost in the middle of a database transaction. Therefore, the file write caching is disabled for this file to maintain integrity.
-	return STATIC_CAST(CPermanentFileStore*,CFileStore::ReplaceL(aFs,aName,aFileMode|EFileWriteDirectIO,&DoNewL));
+	
+    if ((aFileMode&EFileWrite) != 0)
+        {
+        aFileMode |= EFileWriteDirectIO;
+        aFileMode &= (~EFileWriteBuffered);
+        }
+    return STATIC_CAST(CPermanentFileStore*,CFileStore::ReplaceL(aFs,aName,aFileMode,&DoNewL));
 	}
 inline CPermanentFileStore* CPermanentFileStore::ReplaceLC(RFs& aFs,const TDesC& aName,TUint aFileMode)
 /** Creates a file, constructs a permanent file store object to be associated with 
@@ -377,7 +407,13 @@
 	{
 //  When the file server write caching is enabled, the order of file write operations is not guaranteed. This could cause data inconsistency in some circumstances,
 //  for example, when the power is lost in the middle of a database transaction. Therefore, the file write caching is disabled for this file to maintain integrity.
-	return STATIC_CAST(CPermanentFileStore*,CFileStore::ReplaceLC(aFs,aName,aFileMode|EFileWriteDirectIO,&DoNewL));
+    
+    if ((aFileMode&EFileWrite) != 0)
+        {
+        aFileMode |= EFileWriteDirectIO;
+        aFileMode &= (~EFileWriteBuffered);
+        }
+    return STATIC_CAST(CPermanentFileStore*,CFileStore::ReplaceLC(aFs,aName,aFileMode,&DoNewL));
 	}
 inline CPermanentFileStore* CPermanentFileStore::TempL(RFs& aFs,const TDesC& aPath,TFileName& aName,TUint aFileMode)
 /** Creates a temporary file and constructs a permanent file store object to be 
@@ -399,7 +435,13 @@
 	{
 //  When the file server write caching is enabled, the order of file write operations is not guaranteed. This could cause data inconsistency in some circumstances,
 //  for example, when the power is lost in the middle of a database transaction. Therefore, the file write caching is disabled for this file to maintain integrity.
-	return STATIC_CAST(CPermanentFileStore*,CFileStore::TempL(aFs,aPath,aName,aFileMode|EFileWriteDirectIO,&DoNewL));
+	
+    if ((aFileMode&EFileWrite) != 0)
+        {
+        aFileMode |= EFileWriteDirectIO;
+        aFileMode &= (~EFileWriteBuffered);
+        }
+    return STATIC_CAST(CPermanentFileStore*,CFileStore::TempL(aFs,aPath,aName,aFileMode,&DoNewL));
 	}
 inline CPermanentFileStore* CPermanentFileStore::TempLC(RFs& aFs,const TDesC& aPath,TFileName& aName,TUint aFileMode)
 /** Creates a temporary file, constructs a permanent file store object to be associated 
@@ -421,7 +463,13 @@
 	{
 //  When the file server write caching is enabled, the order of file write operations is not guaranteed. This could cause data inconsistency in some circumstances,
 //  for example, when the power is lost in the middle of a database transaction. Therefore, the file write caching is disabled for this file to maintain integrity.
-	return STATIC_CAST(CPermanentFileStore*,CFileStore::TempLC(aFs,aPath,aName,aFileMode|EFileWriteDirectIO,&DoNewL));
+	
+    if ((aFileMode&EFileWrite) != 0)
+        {
+        aFileMode |= EFileWriteDirectIO;
+        aFileMode &= (~EFileWriteBuffered);
+        }
+    return STATIC_CAST(CPermanentFileStore*,CFileStore::TempLC(aFs,aPath,aName,aFileMode,&DoNewL));
 	}
 inline CPermanentFileStore* CPermanentFileStore::FromL(RFile& aFile)
 /** Constructs a permanent file store object from an already opened file. It is strongly recommended to set EFileWriteDirectIO
--- a/persistentstorage/store/TFILE/t_storfperm.cpp	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/store/TFILE/t_storfperm.cpp	Thu Sep 02 22:18:45 2010 +0300
@@ -477,6 +477,27 @@
 	(void)TheFs.Delete(msvTestPath);
 	}
 
+/**
+@SYMTestCaseID          PDS-STORE-UT-4059
+@SYMTestCaseDesc        Tests for defect No ou1cimx1#422232
+                        The installed help topics are not organized to Application help topics.
+@SYMTestPriority        High
+@SYMTestActions         Tests that the EFileWriteDirectIO is appended only when necessary, also
+                        test that any EFileWriteBuffered is unset (no error occurs when this is
+                        passed in)
+@SYMTestExpectedResults Test must not fail
+@SYMDEF                 ou1cimx1#422232
+*/
+LOCAL_C void testOpenL()
+    {    
+    _LIT(KFileName,"C:\\t_storfperm.dat");
+    
+    test.Next(_L(" @SYMTestCaseID:PDS-STORE-UT-4059 "));
+    CPermanentFileStore* testStore = CPermanentFileStore::ReplaceL(TheFs, KFileName, EFileWrite|EFileWriteBuffered);
+    delete testStore;
+    
+    (void)TheFs.Delete(KFileName);
+    }
 
 //
 // Prepare the test directory.
@@ -566,7 +587,9 @@
 	test(r==KErrNone);
 	TRAP(r,testDef039456L());
 	test(r==KErrNone);
-
+	TRAP(r,testOpenL());
+	test(r==KErrNone);
+	
 	//deletion of data files must be before call to .End() - DEF047652
 	TDriveUnit drive(static_cast<TUint>(RFs::GetSystemDrive()));	
 	TParse parse;
--- a/persistentstorage/store/group/BLD.INF	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/store/group/BLD.INF	Thu Sep 02 22:18:45 2010 +0300
@@ -26,36 +26,36 @@
 
 PRJ_EXPORTS
 
-../INC/S32BTREE.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32btree.h)
-../INC/S32BTREE.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32btree.inl)
-../INC/S32BUF.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32buf.h)
-../INC/S32BUF.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32buf.inl)
-../INC/S32CONT.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32cont.h)
-../INC/S32CONT.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32cont.inl)
-../INC/S32CRYPT.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(s32crypt.h)
-../INC/S32CRYPT.INL SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(s32crypt.inl)
-../INC/S32FILE.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32file.h)
-../INC/S32FILE.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32file.inl)
+../INC/S32BTREE.H OS_LAYER_PUBLIC_EXPORT_PATH(s32btree.h)
+../INC/S32BTREE.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32btree.inl)
+../INC/S32BUF.H OS_LAYER_PUBLIC_EXPORT_PATH(s32buf.h)
+../INC/S32BUF.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32buf.inl)
+../INC/S32CONT.H OS_LAYER_PUBLIC_EXPORT_PATH(s32cont.h)
+../INC/S32CONT.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32cont.inl)
+../INC/S32CRYPT.H OS_LAYER_PLATFORM_EXPORT_PATH(s32crypt.h)
+../INC/S32CRYPT.INL OS_LAYER_PLATFORM_EXPORT_PATH(s32crypt.inl)
+../INC/S32FILE.H OS_LAYER_PUBLIC_EXPORT_PATH(s32file.h)
+../INC/S32FILE.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32file.inl)
 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
 #ifdef SYMBIAN_OLD_EXPORT_LOCATION
 ../INC/S32FILEBUFSIZE.H /epoc32/include/s32filebufsize.h
 #endif
 #endif
-../INC/S32MEM.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32mem.h)
-../INC/S32MEM.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32mem.inl)
-../INC/S32PAGE.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32page.h)
-../INC/S32PAGE.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32page.inl)
-../INC/S32SHARE.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32share.h)
-../INC/S32SHARE.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32share.inl)
-../INC/S32STD.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32std.h)
-../INC/S32STD.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32std.inl)
-../INC/S32STOR.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32stor.h)
-../INC/S32STOR.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32stor.inl)
-../INC/S32STRM.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32strm.h)
-../INC/S32STRM.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32strm.inl)
-../INC/S32UCMP.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32ucmp.h)
-../INC/S32FileIter.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(s32fileiter.h)
-../INC/S32FileIter.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(s32fileiter.inl)
+../INC/S32MEM.H OS_LAYER_PUBLIC_EXPORT_PATH(s32mem.h)
+../INC/S32MEM.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32mem.inl)
+../INC/S32PAGE.H OS_LAYER_PUBLIC_EXPORT_PATH(s32page.h)
+../INC/S32PAGE.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32page.inl)
+../INC/S32SHARE.H OS_LAYER_PUBLIC_EXPORT_PATH(s32share.h)
+../INC/S32SHARE.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32share.inl)
+../INC/S32STD.H OS_LAYER_PUBLIC_EXPORT_PATH(s32std.h)
+../INC/S32STD.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32std.inl)
+../INC/S32STOR.H OS_LAYER_PUBLIC_EXPORT_PATH(s32stor.h)
+../INC/S32STOR.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32stor.inl)
+../INC/S32STRM.H OS_LAYER_PUBLIC_EXPORT_PATH(s32strm.h)
+../INC/S32STRM.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32strm.inl)
+../INC/S32UCMP.H OS_LAYER_PUBLIC_EXPORT_PATH(s32ucmp.h)
+../INC/S32FileIter.h OS_LAYER_PLATFORM_EXPORT_PATH(s32fileiter.h)
+../INC/S32FileIter.inl OS_LAYER_PLATFORM_EXPORT_PATH(s32fileiter.inl)
 
 ../ROM/Store.iby	/epoc32/rom/include/store.iby
 
--- a/persistentstorage/store/pcstore/group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ b/persistentstorage/store/pcstore/group/bld.inf	Thu Sep 02 22:18:45 2010 +0300
@@ -21,16 +21,16 @@
 TOOLS2
 
 PRJ_EXPORTS
-../inc/descriptors.h            SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/descriptors.h)
-../inc/directfilestore.h        SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/directfilestore.h)
-../inc/storewritestream.h       SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/storewritestream.h)
-../inc/storereadstream.h        SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/storereadstream.h)
-../inc/storeexception.h         SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/storeexception.h)
-../inc/pcstoredef.h             SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/pcstoredef.h)
-../inc/streamid.h               SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/streamid.h)
-../inc/uid.h                    SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/uid.h)
-../inc/pcstore.h                SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/pcstore.h)
-../inc/checkeduid.h             SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/checkeduid.h)
+../inc/descriptors.h            OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/descriptors.h)
+../inc/directfilestore.h        OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/directfilestore.h)
+../inc/storewritestream.h       OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/storewritestream.h)
+../inc/storereadstream.h        OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/storereadstream.h)
+../inc/storeexception.h         OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/storeexception.h)
+../inc/pcstoredef.h             OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/pcstoredef.h)
+../inc/streamid.h               OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/streamid.h)
+../inc/uid.h                    OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/uid.h)
+../inc/pcstore.h                OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/pcstore.h)
+../inc/checkeduid.h             OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/checkeduid.h)
 
 PRJ_MMPFILES
 #ifdef TOOLS2
--- a/traceservices/commsdebugutility/group/BLD.INF	Wed Aug 18 11:30:17 2010 +0300
+++ b/traceservices/commsdebugutility/group/BLD.INF	Thu Sep 02 22:18:45 2010 +0300
@@ -16,12 +16,12 @@
 
 PRJ_EXPORTS
 
-commsdebugutility.mmh    SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(comms-infras/commsdebugutility.mmh)
+commsdebugutility.mmh    OS_LAYER_PUBLIC_EXPORT_PATH(comms-infras/commsdebugutility.mmh)
 
 ../tools/splitlog.bat	/epoc32/tools/splitlog.bat
 ../tools/extractlog.pl	/epoc32/tools/extractlog.pl
 
-../INC/commsdebugutility.h	SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(comms-infras/commsdebugutility.h)
+../INC/commsdebugutility.h	OS_LAYER_PUBLIC_EXPORT_PATH(comms-infras/commsdebugutility.h)
 
 ../group/commsdebugutility.iby	    /epoc32/rom/include/commsdebugutility.iby
 ../group/commslog.iby				/epoc32/rom/include/commslog.iby
--- a/traceservices/commsdebugutility/group/commsdebugutility.iby	Wed Aug 18 11:30:17 2010 +0300
+++ b/traceservices/commsdebugutility/group/commsdebugutility.iby	Thu Sep 02 22:18:45 2010 +0300
@@ -27,7 +27,7 @@
 file=ABI_DIR\DEBUG_DIR\comsdbgsvr.exe			System\bin\comsdbgsvr.exe
  #if (!USE_FLOGGER_STUB)
  file=ABI_DIR\DEBUG_DIR\comsdbgsvr.dll			System\bin\comsdbgsvr.dll
- data=EPOCROOT##Epoc32\data\z\resource\commsdbg.ini	resource\commsdbg.ini
+ data=EPOCROOT##epoc32\data\z\resource\commsdbg.ini	resource\commsdbg.ini
  #else
  file=ABI_DIR\DEBUG_DIR\comsdbgstub.dll			System\bin\comsdbgsvr.dll
  #endif
--- a/traceservices/commsdebugutility/group/te_commsdebugutility.iby	Wed Aug 18 11:30:17 2010 +0300
+++ b/traceservices/commsdebugutility/group/te_commsdebugutility.iby	Thu Sep 02 22:18:45 2010 +0300
@@ -25,14 +25,14 @@
 file=ABI_DIR\DEBUG_DIR\tlog4.dll				System\bin\tlog4.dll
 
 
-data=EPOCROOT##epoc32\data\z\TestData\Scripts\te_comsdbg.script      testdata\scripts\te_comsdbg.script
-data=EPOCROOT##epoc32\data\z\TestData\Scripts\te_comsdbg_urel.script testdata\scripts\te_comsdbg_urel.script
+data=EPOCROOT##epoc32\data\z\testdata\scripts\te_comsdbg.script      testdata\scripts\te_comsdbg.script
+data=EPOCROOT##epoc32\data\z\testdata\scripts\te_comsdbg_urel.script testdata\scripts\te_comsdbg_urel.script
 
-data=EPOCROOT##epoc32\data\z\TestData\Scripts\te_comsdbg_performance.script	testdata\scripts\te_comsdbg_performance.script
+data=EPOCROOT##epoc32\data\z\testdata\scripts\te_comsdbg_performance.script	testdata\scripts\te_comsdbg_performance.script
 
 
-data=EPOCROOT##epoc32\data\z\TestData\Scripts\te_comsdbg_file.ini      testdata\scripts\te_comsdbg_file.ini
-data=EPOCROOT##epoc32\data\z\TestData\Scripts\te_comsdbg_serial1.ini      testdata\scripts\te_comsdbg_serial1.ini
-data=EPOCROOT##epoc32\data\z\TestData\Scripts\te_comsdbg_serial2.ini      testdata\scripts\te_comsdbg_serial2.ini
+data=EPOCROOT##epoc32\data\z\testdata\scripts\te_comsdbg_file.ini      testdata\scripts\te_comsdbg_file.ini
+data=EPOCROOT##epoc32\data\z\testdata\scripts\te_comsdbg_serial1.ini      testdata\scripts\te_comsdbg_serial1.ini
+data=EPOCROOT##epoc32\data\z\testdata\scripts\te_comsdbg_serial2.ini      testdata\scripts\te_comsdbg_serial2.ini
 
 #endif //__TE_COMMSDEBUGUTILITY_IBY__
--- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/bld.inf	Thu Sep 02 22:18:45 2010 +0300
@@ -17,6 +17,8 @@
 te_uloggermclsuite.iby   				        /epoc32/rom/include/te_uloggermclsuite.iby
 
 ../scripts/te_uloggermclsuite.script			z:/testdata/scripts/te_uloggermclsuite.script
+//Test script for platform that doesn't support serial port
+../scripts/te_uloggermclsuite_noserial.script	z:/testdata/scripts/te_uloggermclsuite_noserial.script
 ../scripts/te_uloggermclperfsuite.script		z:/testdata/scripts/te_uloggermclperfsuite.script
 ../scripts/te_uloggersysstart.script   			z:/testdata/scripts/te_uloggersysstart.script
 ../scripts/te_uloggerconfigfile.script   		z:/testdata/scripts/te_uloggerconfigfile.script
--- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/te_uloggermclsuite.iby	Wed Aug 18 11:30:17 2010 +0300
+++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/te_uloggermclsuite.iby	Thu Sep 02 22:18:45 2010 +0300
@@ -20,6 +20,7 @@
 
 file=ABI_DIR\BUILD_DIR\te_uloggermclsuite.exe               sys\bin\te_uloggermclsuite.exe
 data=DATAZ_\TestData\scripts\te_uloggermclsuite.script      TestData\Scripts\te_uloggermclsuite.script
+data=DATAZ_\TestData\scripts\te_uloggermclsuite_noserial.script      TestData\Scripts\te_uloggermclsuite_noserial.script
 data=DATAZ_\TestData\scripts\te_uloggermclperfsuite.script  TestData\Scripts\te_uloggermclperfsuite.script
 data=DATAZ_\TestData\scripts\te_uloggersysstart.script      TestData\Scripts\te_uloggersysstart.script
 data=DATAZ_\TestData\scripts\te_uloggerconfigfile.script    TestData\Scripts\te_uloggerconfigfile.script
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggermclsuite_noserial.script	Thu Sep 02 22:18:45 2010 +0300
@@ -0,0 +1,170 @@
+// Copyright (c) 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"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: This script doesn't have serial test for platform that doesn't support serial port
+//
+
+
+//! @file
+//! @SYMTestSuiteName               	utfv1-api-uloggerv1-integration-test-suite.script
+//! @SYMScriptTestEnvironment       	TEF
+
+
+
+LOAD_SUITE te_uloggermclsuite
+
+
+PRINT API_Functionality_Tests
+
+START_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerAPIPrim-0001
+//! @SYMTestCaseID		DT-DEBUG-TRACE-UTFv1-ULoggerAPIPrim-0001
+//! @SYMTestCaseDesc     Run test for classification filter settings in ULoggerv1 server
+//! @SYMTestPriority     Critical
+//! @SYMTestActions    Run a combination of single and multiple Primary filter set() methods and check the contents of the get() methods on server return the filters as expected
+//! @SYMTestExpectedResults     Verify that the returned gettings match those expected from settings (test step returns a test pass if so)
+//! @SYMTestType         CT
+//! @SYMTestStatus   Implemented
+//! @SYMPREQ                 PREQ1635
+//! @SYMREQ                    
+RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPIPrimTestStep 
+END_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerAPIPrim-0001
+
+
+START_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerAPISecond-0001
+//! @SYMTestCaseID		DT-DEBUG-TRACE-UTFv1-ULoggerAPISecond-0001
+//! @SYMTestCaseDesc     Run test for ModuleUid filter settings in ULoggerv1 server
+//! @SYMTestPriority     Critical
+//! @SYMTestActions    Run a combination of single and multiple Secondary filter set() methods and check the contents of the get() methods on server return the filters as expected
+//! @SYMTestExpectedResults     Verify that the returned gettings match those expected from settings (test step returns a test pass if so)
+//! @SYMTestType         CT
+//! @SYMTestStatus   Implemented
+//! @SYMPREQ                 PREQ1635
+//! @SYMREQ                   
+RUN_TEST_STEP 20000 te_uloggermclsuite ULoggerAPISecondTestStep 
+END_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerAPISecond-0001
+
+
+START_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerAPILogging-0001
+//! @SYMTestCaseID		DT-DEBUG-TRACE-UTFv1-ULoggerAPILogging-0001
+//! @SYMTestCaseDesc     Run test for logging in ULoggerv1 server for trace compiled in on user side
+//! @SYMTestPriority     Critical
+//! @SYMTestActions    Run a combination of single and multiple filter and filtering set() methods instrument user-side trace points accordingly for positive, begative and multiple setting tests
+//! @SYMTestExpectedResults     Verify that the returned trace data and the output trace log files match the setttings in the ulogger accordingly
+//! @SYMTestType         CT
+//! @SYMTestStatus   Implemented
+//! @SYMPREQ                 PREQ1635
+//! @SYMREQ 			
+RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPILoggingTestStep 
+END_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerAPILogging-0001
+
+
+START_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerBufferSizing-0001
+//! @SYMTestCaseID		DT-DEBUG-TRACE-UTFv1-ULoggerBufferSizing-0001
+//! @SYMTestCaseDesc     Run test for buffersizing settings in ULoggerv1 server for trace compiled in
+//! @SYMTestPriority     Critical
+//! @SYMTestActions    Run a combination of buffer resizing methods and run over various stress testing trace instrumentations. check the contents of the output file is as expected
+//! @SYMTestExpectedResults     Verify that output file contains #traces as expected
+//! @SYMTestType         CT
+//! @SYMTestStatus   Implemented
+//! @SYMPREQ                 PREQ1635
+//! @SYMREQ   
+RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerBufferSizingStep
+END_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerBufferSizing-0001
+
+
+START_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerBufferMode-0001
+//! @SYMTestCaseID		DT-DEBUG-TRACE-UTFv1-ULoggerBufferMode-0001
+//! @SYMTestCaseDesc     Run test for buffer mode settings in ULoggerv1 server for trace compiled in
+//! @SYMTestPriority     Critical
+//! @SYMTestActions    Run a combination of buffer mode change methods and run over various stress testing trace instrumentations. check the contents of the output file is as expected
+//! @SYMTestExpectedResults     Verify that output file contains a trace pattern as expected from buffer mode type
+//! @SYMTestType         CT
+//! @SYMTestStatus   Implemented
+//! @SYMPREQ                 PREQ1635
+//! @SYMREQ 
+RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerBufferModeStep
+END_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerBufferMode-0001
+
+
+START_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerAPIKernel-0001
+//! @SYMTestCaseID		DT-DEBUG-TRACE-UTFv1-ULoggerAPIKernel-0001
+//! @SYMTestCaseDesc     Run test for logging in ULoggerv1 server for trace points compiled in on kernel side
+//! @SYMTestPriority     Critical
+//! @SYMTestActions    Run a combination of single and multiple filter and filtering set() methods instrument kernel-side trace points accordingly for positive, begative and multiple setting tests
+//! @SYMTestExpectedResults     Verify that the returned trace data and the output trace log files match the setttings in the ulogger accordingly
+//! @SYMTestType         CT
+//! @SYMTestStatus   Implemented
+//! @SYMPREQ                 PREQ1635
+//! @SYMREQ 
+RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPIKernelTestStep 
+END_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerAPIKernel-0001
+
+
+START_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerAPIPrintf-0001
+//! @SYMTestCaseID		DT-DEBUG-TRACE-UTFv1-ULoggerAPIPrintf-0001
+//! @SYMTestCaseDesc     Run test for logging in ULoggerv1 server for trace printf-style points compiled in on user side
+//! @SYMTestPriority     Critical
+//! @SYMTestActions    Run a combination of single and multiple filter and filtering set() methods instrument user-side trace printf-style points accordingly for positive, begative and multiple setting tests
+//! @SYMTestExpectedResults     Verify that the returned trace data and the output trace log files match the setttings in the ulogger accordingly
+//! @SYMTestType         CT
+//! @SYMTestStatus   Implemented
+//! @SYMPREQ                 PREQ1635
+//! @SYMREQ 
+RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPIPrintfTestStep 
+END_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerAPIPrintf-0001
+
+
+START_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerAPIKernelPrintf-0001
+//! @SYMTestCaseID		DT-DEBUG-TRACE-UTFv1-ULoggerAPIKernelPrintf-0001
+//! @SYMTestCaseDesc     Run test for logging in ULoggerv1 server for trace printf-style points compiled in on kernel side
+//! @SYMTestPriority     Critical
+//! @SYMTestActions    Run a combination of single and multiple filter and filtering set() methods instrument kernel-side trace printf-style points accordingly for positive, begative and multiple setting tests
+//! @SYMTestExpectedResults     Verify that the returned trace data and the output trace log files match the setttings in the ulogger accordingly
+//! @SYMTestType         CT
+//! @SYMTestStatus   Implemented
+//! @SYMPREQ                 PREQ1635
+//! @SYMREQ 
+RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPIKernelPrintfTestStep 
+END_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerAPIKernelPrintf-0001
+
+PRINT Plugin_Tests
+
+
+START_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerFilePlugin-0001
+//! @SYMTestCaseID		DT-DEBUG-TRACE-UTFv1-ULoggerFilePlugin-0001
+//! @SYMTestCaseDesc     Run test for logging to the file plugin for trace compiled in
+//! @SYMTestPriority     Critical
+//! @SYMTestActions    Run a combination of plguin configuration methods for the file plugin and log over trace instrumentaion
+//! @SYMTestExpectedResults     Verify that the trace data is output as expected to the file plugin
+//! @SYMTestType         CT
+//! @SYMTestStatus   Implemented
+//! @SYMPREQ                 PREQ1635
+//! @SYMREQ 
+RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerFilePluginStep 
+END_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerFilePlugin-0001
+
+
+START_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerFilePluginStepErr-0001
+//! @SYMTestCaseID		DT-DEBUG-TRACE-UTFv1-ULoggerFilePluginStepErr-0001
+//! @SYMTestCaseDesc     Run test for error returns from plugin methods for trace compiled in
+//! @SYMTestPriority     Critical
+//! @SYMTestActions    Run a combination of plguin configuration methods for the file plugin and test on the return errors
+//! @SYMTestExpectedResults     Verify that the errors returned are as expected
+//! @SYMTestType         CT
+//! @SYMTestStatus   Implemented
+//! @SYMPREQ                 PREQ1635
+//! @SYMREQ 
+RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerFilePluginStepErr 
+END_TESTCASE			DT-DEBUG-TRACE-UTFv1-ULoggerFilePluginStepErr-0001
+
+
+PRINT Complete_te_ULogger_Tests
--- a/traceservices/tracefw/ulogger/unit_test/group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ b/traceservices/tracefw/ulogger/unit_test/group/bld.inf	Thu Sep 02 22:18:45 2010 +0300
@@ -47,6 +47,8 @@
 //to run automated script files at once
 te_automatedsuite.iby               /epoc32/rom/include/te_automatedsuite.iby
 ../scripts/te_automatedsuite.script z:/testdata/scripts/te_automatedsuite.script
+//Test script for platform that doesn't support serial port
+../scripts/te_automatedsuite_noserial.script z:/testdata/scripts/te_automatedsuite_noserial.script
 
 //te_createconfig
 te_createconfig.iby                 /epoc32/rom/include/te_createconfig.iby
--- a/traceservices/tracefw/ulogger/unit_test/group/te_automatedsuite.iby	Wed Aug 18 11:30:17 2010 +0300
+++ b/traceservices/tracefw/ulogger/unit_test/group/te_automatedsuite.iby	Thu Sep 02 22:18:45 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -29,4 +29,5 @@
 #include <te_createconfig.iby>
 
 data=EPOCROOT##epoc32\release\winscw\udeb\z\testdata\scripts\te_automatedsuite.script testData\scripts\te_automatedsuite.script
+data=EPOCROOT##epoc32\release\winscw\udeb\z\testdata\scripts\te_automatedsuite_noserial.script testData\scripts\te_automatedsuite_noserial.script
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/traceservices/tracefw/ulogger/unit_test/scripts/te_automatedsuite_noserial.script	Thu Sep 02 22:18:45 2010 +0300
@@ -0,0 +1,33 @@
+// Copyright (c) 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"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// This script doesn't have serial test for platform that doesn't support serial port
+//
+
+PRINT ****RUNNING ALL ULOGGER UNIT TESTS****
+PRINT
+PRINT CLIENT API UNIT TESTS
+RUN_SCRIPT z:\testdata\scripts\te_client.script
+PRINT SERVER UNIT TESTS
+RUN_SCRIPT z:\testdata\scripts\te_server.script
+PRINT SYSTEM CONFIG TESTS
+RUN_SCRIPT z:\testdata\scripts\te_sysconfig.script
+PRINT FILE PLUG-IN TESTS
+RUN_SCRIPT z:\testdata\scripts\te_file.script
+PRINT **completed all ULogger Unit Tests** 
+PRINT SERIAL PLUG-IN TESTS
+RUN_SCRIPT z:\testdata\scripts\te_outfrwk.script
+PRINT SYSTEM STARTER TESTS
+RUN_SCRIPT z:\testdata\scripts\te_sysstart.script
+PRINT
+PRINT ****COMPLETED ALL ULOGGER UNIT TESTS EXCEPT FOR CLT****
\ No newline at end of file
--- a/traceservices/tracefw/utf_trace_api/group/bld.inf	Wed Aug 18 11:30:17 2010 +0300
+++ b/traceservices/tracefw/utf_trace_api/group/bld.inf	Thu Sep 02 22:18:45 2010 +0300
@@ -17,5 +17,5 @@
 DEFAULT
 
 PRJ_EXPORTS
-../inc/e32utrace.h   		SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(e32utrace.h)
+../inc/e32utrace.h   		OS_LAYER_PLATFORM_EXPORT_PATH(e32utrace.h)