201041_01 default
authorhgs
Tue, 19 Oct 2010 16:26:13 +0100
changeset 55 44f437012c90
parent 51 7d4490026038
201041_01
build.config.xml
featuremgmt/featuremgr/src/clientdll/featmgr.cpp
featuremgmt/featuremgr/src/clientdll/featmgrclient.cpp
featuremgmt/featuremgr/src/clientdll/featmgrresourcetester.cpp
featuremgmt/featuremgr/src/clientdll/featmgrtlsdata.cpp
featuremgmt/featuremgr/src/serverexe/featmgrsession.cpp
featuremgmt/featuremgr/test/rtest/src/t_fmgroom.cpp
loggingservices/eventlogger/LogCli/src/LOGCLI.CPP
loggingservices/eventlogger/LogCli/src/LOGDLL.CPP
loggingservices/eventlogger/LogCli/src/LOGFILT.CPP
loggingservices/eventlogger/LogCli/src/LogClientChangeObserver.cpp
loggingservices/eventlogger/LogServ/src/LOGADD.CPP
loggingservices/eventlogger/LogServ/src/LOGGET.CPP
loggingservices/eventlogger/LogServ/src/LogServDatabaseChangeTracker.cpp
loggingservices/eventlogger/LogServ/src/LogServPanic.cpp
loggingservices/eventlogger/LogServ/src/LogServRecentCondition.cpp
loggingservices/eventlogger/LogServ/src/LogServRecentList.cpp
loggingservices/eventlogger/LogServ/src/LogServView.cpp
loggingservices/eventlogger/LogWrap/src/LOGBASE.CPP
loggingservices/eventlogger/LogWrap/src/LOGDLL.CPP
loggingservices/eventlogger/LogWrap/src/LOGEVENT.CPP
loggingservices/eventlogger/LogWrap/src/LOGWRAP.CPP
loggingservices/eventlogger/Rom/logengtest.iby
loggingservices/eventlogger/test/src/t_logbadclient.cpp
loggingservices/eventlogger/test/src/t_logcntmatch.cpp
loggingservices/eventlogger/test/src/t_logfilter.cpp
loggingservices/eventlogger/test/src/t_logservercrash.cpp
loggingservices/eventlogger/test/src/t_logview1.cpp
loggingservices/eventlogger/test/src/t_logview2.cpp
loggingservices/eventlogger/test/src/t_logwrap.cpp
loggingservices/eventlogger/test/t_logfilter.mmp
loggingservices/eventlogger/test/t_logview1.mmp
loggingservices/eventlogger/test/t_logview2.mmp
loggingservices/eventlogger/test/t_logwrap.mmp
persistentstorage/centralrepository/cenrepsrv/backup.cpp
persistentstorage/centralrepository/cenrepsrv/install.cpp
persistentstorage/centralrepository/cenrepsrv/obsrvr_noc.cpp
persistentstorage/centralrepository/cenrepsrv/shrepos.cpp
persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.cpp
persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.h
persistentstorage/centralrepository/cenrepsrv/srvres.cpp
persistentstorage/centralrepository/cenrepsrv/srvres.h
persistentstorage/centralrepository/common/inc/heaprepos.h
persistentstorage/centralrepository/common/inc/inifile.h
persistentstorage/centralrepository/common/inc/panic.h
persistentstorage/centralrepository/common/inc/setting.h
persistentstorage/centralrepository/common/inc/srvdefs.h
persistentstorage/centralrepository/common/src/cregen.cpp
persistentstorage/centralrepository/common/src/heaprepos.cpp
persistentstorage/centralrepository/common/src/inifile.cpp
persistentstorage/centralrepository/convtool/group/centrepconv.mmp
persistentstorage/centralrepository/group/CentralRepositoryTests.bat
persistentstorage/centralrepository/group/CentralRepositoryTests.iby
persistentstorage/centralrepository/group/T_CenRepTrans.mmp
persistentstorage/centralrepository/group/bld.inf
persistentstorage/centralrepository/group/cenrepsrv.mmp
persistentstorage/centralrepository/group/centreptestdata.iby
persistentstorage/centralrepository/group/t_cenrep.mmp
persistentstorage/centralrepository/group/t_cenrep_back_rest.mmp
persistentstorage/centralrepository/group/t_cenrep_back_rest_defect.mmp
persistentstorage/centralrepository/group/t_cenrep_back_rest_delete.mmp
persistentstorage/centralrepository/group/t_cenrep_cache.mmp
persistentstorage/centralrepository/group/t_cenrep_defects.mmp
persistentstorage/centralrepository/group/t_cenrep_fotaUT.mmp
persistentstorage/centralrepository/group/t_cenrep_perf.mmp
persistentstorage/centralrepository/group/t_cenrep_pma_array.mmp
persistentstorage/centralrepository/group/t_cenrep_pma_bur.mmp
persistentstorage/centralrepository/group/t_cenrep_pma_fota.mmp
persistentstorage/centralrepository/group/t_cenrep_pma_multirofs.mmp
persistentstorage/centralrepository/group/t_cenrep_pma_oom.mmp
persistentstorage/centralrepository/group/t_cenrep_pma_rfs.mmp
persistentstorage/centralrepository/group/t_oomcenrepsrv.mmp
persistentstorage/centralrepository/test/11111113.txi
persistentstorage/centralrepository/test/11111113.txt
persistentstorage/centralrepository/test/multirofs/group/t_cenrep_preq2112u.mmp
persistentstorage/centralrepository/test/multirofs/src/t_cenrep_preq2112u.cpp
persistentstorage/centralrepository/test/pma/pma_api_test/f1000111.txt
persistentstorage/centralrepository/test/pma/pma_api_test/f1000112.cre
persistentstorage/centralrepository/test/pma/pma_api_test/f1000113.pma
persistentstorage/centralrepository/test/pma/pma_api_test/f1000114.pma
persistentstorage/centralrepository/test/pma/pma_api_test/f1000115.crp
persistentstorage/centralrepository/test/pma/pma_api_test/f1000116.txp
persistentstorage/centralrepository/test/pma/pma_api_test/f1000117.txi
persistentstorage/centralrepository/test/pma/pma_api_test/f1000118.cri
persistentstorage/centralrepository/test/pma/pma_array_test/f1000001.pma
persistentstorage/centralrepository/test/pma/pma_array_test/f1000001.txt
persistentstorage/centralrepository/test/pma/pma_array_test/f1000002.pma
persistentstorage/centralrepository/test/pma/pma_array_test/f1000002.txt
persistentstorage/centralrepository/test/pma/pma_array_test/f1000003.pma
persistentstorage/centralrepository/test/pma/pma_array_test/f1000003.txt
persistentstorage/centralrepository/test/pma/pma_array_test/f1000004.pma
persistentstorage/centralrepository/test/pma/pma_array_test/f1000004.txt
persistentstorage/centralrepository/test/pma/pma_array_test/f1000005.txt
persistentstorage/centralrepository/test/pma/pma_array_test/f1000006.txp
persistentstorage/centralrepository/test/pma/pma_bur_test/f1000200.crp
persistentstorage/centralrepository/test/pma/pma_bur_test/f1000200.pma
persistentstorage/centralrepository/test/pma/pma_bur_test/f1000200.txt
persistentstorage/centralrepository/test/pma/pma_bur_test/f1000201.txt
persistentstorage/centralrepository/test/pma/pma_bur_test/f1000202.pma
persistentstorage/centralrepository/test/pma/pma_bur_test/f1000203.crp
persistentstorage/centralrepository/test/pma/pma_bur_test/f1000204.txi
persistentstorage/centralrepository/test/pma/pma_bur_test/f1000205.cri
persistentstorage/centralrepository/test/pma/pma_fota_test/f1000601.pma
persistentstorage/centralrepository/test/pma/pma_fota_test/f1000601.txi
persistentstorage/centralrepository/test/pma/pma_fota_test/f1000601.txt
persistentstorage/centralrepository/test/pma/pma_fota_test/f1000602.pma
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000900.cre{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000900.cre{03-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000900.txt
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000900.txt{02-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000901.txt
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000901.txt{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000902.cre
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000902.cre{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000903.cre{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000903.txt
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000904.cre
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000904.txt{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000905.txt
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000905.txt{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000906.txt
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000906.txt{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000907.cre
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000907.cre{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000908.cre
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000908.cre{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000909.cre
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000909.txt{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090a.cre
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090a.txt{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090b.cre{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090b.txt
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090c.cre{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090c.txt
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090d.cre{01-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090d.cre{03-00}
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090d.txt
persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090d.txt{02-00}
persistentstorage/centralrepository/test/pma/pma_oom_test/f1000700.cri
persistentstorage/centralrepository/test/pma/pma_oom_test/f1000701.txi
persistentstorage/centralrepository/test/pma/pma_oom_test/f1000701.txt
persistentstorage/centralrepository/test/pma/pma_oom_test/f1000702.txt
persistentstorage/centralrepository/test/pma/pma_perf_test/f1000301.txt
persistentstorage/centralrepository/test/pma/pma_perf_test/f1000310.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f1000311.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f1000312.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f1000313.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f1000314.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f1000315.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f1000316.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f1000317.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f1000318.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f1000319.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f100031a.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f100031b.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f100031c.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f100031d.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f100031e.pma
persistentstorage/centralrepository/test/pma/pma_perf_test/f100031f.pma
persistentstorage/centralrepository/test/pma/pma_rfs_test/f1000501.txt
persistentstorage/centralrepository/test/pma/pma_rfs_test/f1000502.pma
persistentstorage/centralrepository/test/pma/pma_rfs_test/f1000502.txi
persistentstorage/centralrepository/test/pma/pma_rfs_test/f1000503.txi
persistentstorage/centralrepository/test/pma/pma_rfs_test/f1000503.txt
persistentstorage/centralrepository/test/pma/pma_rfs_test/f1000504.txt
persistentstorage/centralrepository/test/pma/readme.txt
persistentstorage/centralrepository/test/t_cenrep.cpp
persistentstorage/centralrepository/test/t_cenrep_back_rest.cpp
persistentstorage/centralrepository/test/t_cenrep_back_rest_delete.cpp
persistentstorage/centralrepository/test/t_cenrep_defects.cpp
persistentstorage/centralrepository/test/t_cenrep_fotaUT.cpp
persistentstorage/centralrepository/test/t_cenrep_helper.cpp
persistentstorage/centralrepository/test/t_cenrep_helper.h
persistentstorage/centralrepository/test/t_cenrep_perf.cpp
persistentstorage/centralrepository/test/t_cenrep_pma_array.cpp
persistentstorage/centralrepository/test/t_cenrep_pma_bur.cpp
persistentstorage/centralrepository/test/t_cenrep_pma_fota.cpp
persistentstorage/centralrepository/test/t_cenrep_pma_multirofs.cpp
persistentstorage/centralrepository/test/t_cenrep_pma_oom.cpp
persistentstorage/centralrepository/test/t_cenrep_pma_rfs.cpp
persistentstorage/centralrepository/test/t_cenrep_rfs.cpp
persistentstorage/centralrepository/test/t_oomcenrepsrv.cpp
persistentstorage/centralrepository/test/testexecute/BUR/config/PMA_BUR.ini
persistentstorage/centralrepository/test/testexecute/BUR/group/Te_centrep_BURsuite.mmp
persistentstorage/centralrepository/test/testexecute/BUR/group/bld.inf
persistentstorage/centralrepository/test/testexecute/BUR/group/te_centrep_BURsuite.iby
persistentstorage/centralrepository/test/testexecute/BUR/scripts/te_centrep_BURSuite.script
persistentstorage/centralrepository/test/testexecute/BUR/scripts/te_centrep_bursuite_pma.script
persistentstorage/centralrepository/test/testexecute/BUR/src/Te_centrep_BURSuiteServer.cpp
persistentstorage/centralrepository/test/testexecute/BUR/src/Te_centrep_BURSuiteStepBase.h
persistentstorage/centralrepository/test/testexecute/BUR/src/comparePMAStep.cpp
persistentstorage/centralrepository/test/testexecute/BUR/src/comparePMAStep.h
persistentstorage/centralrepository/test/testexecute/BUR/src/initailiseStep.cpp
persistentstorage/centralrepository/test/testexecute/BUR/src/initailiseStep.h
persistentstorage/centralrepository/test/testexecute/BUR/src/initialiseDefStep.h
persistentstorage/centralrepository/test/testexecute/BUR/src/initialisePMAStep.cpp
persistentstorage/centralrepository/test/testexecute/BUR/src/initialisePMAStep.h
persistentstorage/centralrepository/test/testexecute/BUR/src/initialiseStep.cpp
persistentstorage/centralrepository/test/testexecute/BUR/src/initialiseStep.h
persistentstorage/centralrepository/test/testexecute/BUR/src/modifyPMAStep.cpp
persistentstorage/centralrepository/test/testexecute/BUR/src/modifyPMAStep.h
persistentstorage/centralrepository/test/testexecute/SWI/config/SWI-PMA-PU.ini
persistentstorage/centralrepository/test/testexecute/SWI/config/SWI-PMA-SP.ini
persistentstorage/centralrepository/test/testexecute/SWI/data/centrepswiteststub.pkg
persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/centrepswiteststub.sis
persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/centrepswiteststub.sis
persistentstorage/centralrepository/test/testexecute/SWI/group/bld.inf
persistentstorage/centralrepository/test/testexecute/SWI/group/te_centrep_SWIsuite.iby
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP401.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP402.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP403.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP404.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP405.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP406.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP407.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP411.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP412.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP413.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP414.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP415.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP416.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP417.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP421.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP422.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP423.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP431.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP432.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP433.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS401.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS402.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS403.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS404.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS405.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS406.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS407.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS411.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS412.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS413.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS414.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS415.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS416.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS417.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS421.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS422.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS423.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS431.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS432.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS433.pkg
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/dosis.bat
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000402.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000403.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000404.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000405.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000406.pma
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000406.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000407.crp
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000407.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000412.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000413.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000414.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000415.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000416.pma
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000416.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000417.crp
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000417.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000421.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000422.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000423.pma
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000423.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000431.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000432.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000433.pma
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000433.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP401.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP401s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP402.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP402s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP403.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP403s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP404.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP404s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP405.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP405s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP406.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP406s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP407.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP407s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP411.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP411s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP412.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP412s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP413.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP413s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP414.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP414s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP415.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP415s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP416.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP416s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP417.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP417s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP421.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP421s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP422.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP422s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP423.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP423s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP431.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP431s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP432.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP432s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP433.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP433s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS401.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS401s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS402.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS402s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS403.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS403s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS404.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS404s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS405.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS405s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS406.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS406s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS407.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS407s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS411.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS411s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS412.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS412s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS413.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS413s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS414.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS414s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS415.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS415s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS416.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS416s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS417.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS417s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS421.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS421s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS422.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS422s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS423.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS423s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS431.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS431s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS432.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS432s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS433.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS433s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000401.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000402.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000403.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000404.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000405.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000406.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000407.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000411.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000412.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000413.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000414.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000415.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000416.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000417.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000421.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000422.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000423.txt
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000431.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000432.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000433.cre
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP401.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP401s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP402.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP402s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP403.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP403s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP404.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP404s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP405.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP405s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP406.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP406s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP407.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP407s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP411.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP411s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP412.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP412s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP413.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP413s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP414.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP414s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP415.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP415s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP416.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP416s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP417.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP417s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP421.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP421s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP422.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP422s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP423.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP423s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP431.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP431s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP432.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP432s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP433.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP433s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS401.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS401s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS402.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS402s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS403.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS403s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS404.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS404s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS405.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS405s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS406.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS406s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS407.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS407s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS411.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS411s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS412.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS412s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS413.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS413s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS414.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS414s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS415.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS415s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS416.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS416s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS417.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS417s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS421.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS421s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS422.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS422s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS423.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS423s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS431.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS431s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS432.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS432s.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS433.sis
persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS433s.sis
persistentstorage/centralrepository/test/testexecute/SWI/scripts/te_centrep_swisuite_pma.script
persistentstorage/centralrepository/test/testexecute/SWI/scripts/te_centrep_swisuite_pma_pu.script
persistentstorage/centralrepository/test/testexecute/SWI/scripts/te_centrep_swisuite_pma_sp.script
persistentstorage/centralrepository/test/testexecute/convtool/group/TE_CentRepConvTool.mmp
persistentstorage/dbms/bmake/EDBMS.MMP
persistentstorage/dbms/bmake/Edbspconv.mmp
persistentstorage/dbms/security/SC_PassAllPolicy.cpp
persistentstorage/dbms/security/SC_Policy.h
persistentstorage/dbms/security/SC_Policy.inl
persistentstorage/dbms/security/SC_PolicySpace.cpp
persistentstorage/dbms/security/SC_TextOut.cpp
persistentstorage/dbms/tdbms/t_dbalter.cpp
persistentstorage/dbms/tdbms/t_dbapi.cpp
persistentstorage/dbms/tdbms/t_dbbackupsid.cpp
persistentstorage/dbms/tdbms/t_dbbench.cpp
persistentstorage/dbms/tdbms/t_dbbench.mmp
persistentstorage/dbms/tdbms/t_dbbig.cpp
persistentstorage/dbms/tdbms/t_dbbug.cpp
persistentstorage/dbms/tdbms/t_dbcmdlineutil.cpp
persistentstorage/dbms/tdbms/t_dbcmdlineutil.h
persistentstorage/dbms/tdbms/t_dbcomp.cpp
persistentstorage/dbms/tdbms/t_dbdefect.cpp
persistentstorage/dbms/tdbms/t_dbenvcreate.cpp
persistentstorage/dbms/tdbms/t_dbenvdestroy.cpp
persistentstorage/dbms/tdbms/t_dbfail.cpp
persistentstorage/dbms/tdbms/t_dbfail2.cpp
persistentstorage/dbms/tdbms/t_dbindex.cpp
persistentstorage/dbms/tdbms/t_dblimit.cpp
persistentstorage/dbms/tdbms/t_dblongcol.cpp
persistentstorage/dbms/tdbms/t_dbood.cpp
persistentstorage/dbms/tdbms/t_dbpanic.cpp
persistentstorage/dbms/tdbms/t_dbperf1.cpp
persistentstorage/dbms/tdbms/t_dbperf1.mmp
persistentstorage/dbms/tdbms/t_dbperf2.cpp
persistentstorage/dbms/tdbms/t_dbperf3.cpp
persistentstorage/dbms/tdbms/t_dbplatsec1.cpp
persistentstorage/dbms/tdbms/t_dbplatsecutl.cpp
persistentstorage/dbms/tdbms/t_dbscript.cpp
persistentstorage/dbms/tdbms/t_dbsql.cpp
persistentstorage/dbms/tdbms/t_dbsrv.cpp
persistentstorage/dbms/tdbms/t_dbstrcmp.cpp
persistentstorage/dbms/tdbms/t_dbstress.cpp
persistentstorage/dbms/tdbms/t_dbthrd.cpp
persistentstorage/dbms/tdbms/t_dbtrans.cpp
persistentstorage/dbms/tdbms/t_dbwindow.cpp
persistentstorage/dbms/udbms/UD_CACHE.CPP
persistentstorage/dbms/udbms/UD_CURS.CPP
persistentstorage/dbms/udbms/UD_DBS.CPP
persistentstorage/dbms/ustor/US_DBS.CPP
persistentstorage/dbms/ustor/US_FILE.CPP
persistentstorage/dbms/utable/UT_DBS.CPP
persistentstorage/sql/GROUP/t_sqlcorrupt.mmp
persistentstorage/sql/GROUP/t_sqlperformance2.mmp
persistentstorage/sql/SRC/Client/SqlResourceProfiler.cpp
persistentstorage/sql/SRC/Client/SqlResourceTest.cpp
persistentstorage/sql/SRC/Server/SqlBur.cpp
persistentstorage/sql/SRC/Server/SqlSrvConfig.cpp
persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.cpp
persistentstorage/sql/SRC/Server/SqlSrvMain.cpp
persistentstorage/sql/SRC/Server/SqlSrvSession.cpp
persistentstorage/sql/SRC/Server/SqlSrvStatement.cpp
persistentstorage/sql/SRC/Server/SqlSrvStatementUtil.cpp
persistentstorage/sql/TEST/t_sqlapi.cpp
persistentstorage/sql/TEST/t_sqlapi2.cpp
persistentstorage/sql/TEST/t_sqlattach.cpp
persistentstorage/sql/TEST/t_sqlattach2.cpp
persistentstorage/sql/TEST/t_sqlauthorizer.cpp
persistentstorage/sql/TEST/t_sqlbadclient.cpp
persistentstorage/sql/TEST/t_sqlblob.cpp
persistentstorage/sql/TEST/t_sqlbur.cpp
persistentstorage/sql/TEST/t_sqlbur2.cpp
persistentstorage/sql/TEST/t_sqlcmdlineutil.cpp
persistentstorage/sql/TEST/t_sqlcmdlineutil.h
persistentstorage/sql/TEST/t_sqlcollate.cpp
persistentstorage/sql/TEST/t_sqlcompact1.cpp
persistentstorage/sql/TEST/t_sqlcompact2.cpp
persistentstorage/sql/TEST/t_sqlcompact3.cpp
persistentstorage/sql/TEST/t_sqlcompact4.cpp
persistentstorage/sql/TEST/t_sqlconfig.cpp
persistentstorage/sql/TEST/t_sqlconfigfile.cpp
persistentstorage/sql/TEST/t_sqlcorrupt.cpp
persistentstorage/sql/TEST/t_sqldb64.cpp
persistentstorage/sql/TEST/t_sqldbconfigfile.cpp
persistentstorage/sql/TEST/t_sqldefect.cpp
persistentstorage/sql/TEST/t_sqldefect2.cpp
persistentstorage/sql/TEST/t_sqlenvcreate.cpp
persistentstorage/sql/TEST/t_sqlenvdestroy.cpp
persistentstorage/sql/TEST/t_sqlfilebuf64.cpp
persistentstorage/sql/TEST/t_sqlfilesrvcrash1.cpp
persistentstorage/sql/TEST/t_sqlfilesrvcrash2.cpp
persistentstorage/sql/TEST/t_sqlfserr.cpp
persistentstorage/sql/TEST/t_sqlgetfirststmt.cpp
persistentstorage/sql/TEST/t_sqlite.cpp
persistentstorage/sql/TEST/t_sqllang.cpp
persistentstorage/sql/TEST/t_sqlload.cpp
persistentstorage/sql/TEST/t_sqlmulti.cpp
persistentstorage/sql/TEST/t_sqlood.cpp
persistentstorage/sql/TEST/t_sqloom5.cpp
persistentstorage/sql/TEST/t_sqloom6.cpp
persistentstorage/sql/TEST/t_sqloomutil.cpp
persistentstorage/sql/TEST/t_sqloslayer.cpp
persistentstorage/sql/TEST/t_sqlpanic.cpp
persistentstorage/sql/TEST/t_sqlperformance.cpp
persistentstorage/sql/TEST/t_sqlperformance2.cpp
persistentstorage/sql/TEST/t_sqlperformance3.cpp
persistentstorage/sql/TEST/t_sqlperformance4.cpp
persistentstorage/sql/TEST/t_sqlperformance5.cpp
persistentstorage/sql/TEST/t_sqlprivcage.cpp
persistentstorage/sql/TEST/t_sqlscalarfullselect.cpp
persistentstorage/sql/TEST/t_sqlsecurity1.cpp
persistentstorage/sql/TEST/t_sqlsecurity2.cpp
persistentstorage/sql/TEST/t_sqlsecurity3.cpp
persistentstorage/sql/TEST/t_sqlsecurity4.cpp
persistentstorage/sql/TEST/t_sqlsecurity5.cpp
persistentstorage/sql/TEST/t_sqlsecurity6.cpp
persistentstorage/sql/TEST/t_sqlstartup.cpp
persistentstorage/sql/TEST/t_sqltrans.cpp
persistentstorage/sql/traces_SqlSrv/fixed_id.definitions
persistentstorage/sqlite3api/TEST/sqliteTestUtl.cpp
persistentstorage/sqlite3api/TEST/sqliteTestUtl.h
persistentstorage/sqlite3api/TEST/t_sqliteapi.c
persistentstorage/sqlite3api/TEST/t_sqlitedb64.cpp
persistentstorage/sqlite3api/TEST/t_sqlitedef.cpp
persistentstorage/sqlite3api/TEST/t_sqliteperf.cpp
persistentstorage/sqlite3api/TEST/t_sqliteperf2.cpp
persistentstorage/sqlite3api/TEST/t_sqlitewsd.cpp
persistentstorage/sqlite3api/TEST/t_sqlitewsd2.cpp
persistentstorage/store/TCONT/t_storset.cpp
persistentstorage/store/TCRYPT/t_storcrypt.cpp
persistentstorage/store/TFILE/t_storcorrupt.cpp
persistentstorage/store/TFILE/t_storfbuf.cpp
persistentstorage/store/TFILE/t_storfcomp.cpp
persistentstorage/store/TFILE/t_storfdir.cpp
persistentstorage/store/TFILE/t_storfperm.cpp
persistentstorage/store/TFILE/t_storfrecl.cpp
persistentstorage/store/TFILE/t_storfstrm.cpp
persistentstorage/store/TPAGE/t_storpage.cpp
persistentstorage/store/TSTOR/t_storbench.cpp
persistentstorage/store/TSTOR/t_stordelim.cpp
persistentstorage/store/TSTOR/t_stordict.cpp
persistentstorage/store/TSTOR/t_storembed.cpp
persistentstorage/store/TSTOR/t_storshape.cpp
persistentstorage/store/TSTOR/t_storstrm.cpp
persistentstorage/store/TSTOR/t_storverify.cpp
persistentstorage/store/TSTRM/t_storconv.cpp
persistentstorage/store/TSTRM/t_storswizzle.cpp
persistentstorage/store/UBTREE/UB_UTL.CPP
persistentstorage/store/UCONT/UC_UTL.CPP
persistentstorage/store/UCRYPT/UE_UTL.CPP
persistentstorage/store/UFILE/UF_DICT.CPP
persistentstorage/store/UFILE/UF_UTL.CPP
persistentstorage/store/ULIB/UL_UTL.CPP
persistentstorage/store/UMEM/UM_UTL.CPP
persistentstorage/store/UPAGE/UP_UTL.CPP
persistentstorage/store/USTOR/UT_STOR.CPP
persistentstorage/store/USTOR/UT_UTL.CPP
persistentstorage/store/USTRM/US_BUF.CPP
persistentstorage/store/USTRM/US_UCMP.CPP
persistentstorage/store/USTRM/US_UTL.CPP
--- a/build.config.xml	Mon Sep 27 11:59:56 2010 +0100
+++ b/build.config.xml	Tue Oct 19 16:26:13 2010 +0100
@@ -180,8 +180,8 @@
 				<unit
 					name="burtestserver"
 					unitID="sos.burtestserver.test"
-					bldFile="sf/os/buildtools/toolsandutils/burtestserver/Group"
-					mrp="sf/os/buildtools/toolsandutils/burtestserver/Group/testtools_burtestserver.mrp"
+					bldFile="sf/os/ostesttools/testfws/burtestserver/Group"
+					mrp="sf/os/ostesttools/testfws/burtestserver/Group/testtools_burtestserver.mrp"
 				/>
 			</module>
 		</layer>
--- a/featuremgmt/featuremgr/src/clientdll/featmgr.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/featuremgmt/featuremgr/src/clientdll/featmgr.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -40,7 +40,13 @@
 
     if ( !Dll::Tls() )
         {
-        Dll::SetTls( CFeatMgrTlsData::NewL() );
+    	CFeatMgrTlsData* fmgrData = CFeatMgrTlsData::NewL();
+    	TInt err = Dll::SetTls(fmgrData);
+    	if(err != KErrNone)
+    		{
+    		delete fmgrData;
+    		User::Leave(err);
+    		}
         }
 
 	// Increase the client count (self)
--- a/featuremgmt/featuremgr/src/clientdll/featmgrclient.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/featuremgmt/featuremgr/src/clientdll/featmgrclient.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -615,6 +615,7 @@
 #ifdef EXTENDED_FEATURE_MANAGER_TEST
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 /** 
 */
@@ -684,6 +685,7 @@
     return sizePckg();
     }
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 #endif
--- a/featuremgmt/featuremgr/src/clientdll/featmgrresourcetester.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/featuremgmt/featuremgr/src/clientdll/featmgrresourcetester.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -23,6 +23,8 @@
 extern CFeatMgrTlsData* TlsData();
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
+
 
 /** 
 */
@@ -69,4 +71,5 @@
 #endif    
     }
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
--- a/featuremgmt/featuremgr/src/clientdll/featmgrtlsdata.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/featuremgmt/featuremgr/src/clientdll/featmgrtlsdata.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -302,6 +302,7 @@
 #ifdef EXTENDED_FEATURE_MANAGER_TEST
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 /** 
 */
@@ -348,6 +349,7 @@
     return iFeatMgrClient.CountAllocCells();
     }
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 #endif
--- a/featuremgmt/featuremgr/src/serverexe/featmgrsession.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/featuremgmt/featuremgr/src/serverexe/featmgrsession.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -549,6 +549,7 @@
 #ifdef EXTENDED_FEATURE_MANAGER_TEST
     	    
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
     	    
         case EFeatMgrResourceMark:
             ResourceCountMarkStart();
@@ -601,6 +602,7 @@
     	    break;
     	    }
     	    
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
     	    
 #endif
--- a/featuremgmt/featuremgr/test/rtest/src/t_fmgroom.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/featuremgmt/featuremgr/test/rtest/src/t_fmgroom.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -21,6 +21,7 @@
 #include <featdiscovery.h>
 #include <featurenotifier.h>
 #include "../../../src/clientdll/featmgrresourcetester.h"
+#include "../src/inc/featmgrconfiguration.h"
 
 using namespace NFeature;
 
@@ -517,7 +518,29 @@
     TheTest.Printf(_L("\r\n===OOM test succeeded at heap failure rate of %d ===\r\n"), failingAllocationNo);
     }
 
-
+/**
+@SYMTestCaseID          PDS-EFM-CT-4112
+@SYMTestCaseDesc        FeatureManager::InitializeLibL() OOM test.
+@SYMTestPriority        High
+@SYMTestActions         
+@SYMTestExpectedResults Test must not fail
+*/
+void InitializeLibOomTest()
+	{
+    TInt err = KErrNoMemory;
+    TInt failingAllocationNo = 0;
+    TheTest.Printf(_L("Iteration:\r\n"));
+    while(err == KErrNoMemory)
+        {
+        TheTest.Printf(_L(" %d"), ++failingAllocationNo);
+        OomPreStep(failingAllocationNo, EFeatMgrOomClientTestMode);
+        TRAP(err, FeatureManager::InitializeLibL());
+        FeatureManager::UnInitializeLib();
+        OomPostStep(EFeatMgrOomClientTestMode);
+        }
+    TEST2(err, KErrNone);
+    TheTest.Printf(_L("\r\n===OOM test succeeded at heap failure rate of %d ===\r\n"), failingAllocationNo);
+	}
 
 void DoTestsL()
     {
@@ -585,6 +608,9 @@
     NotifierNotifyRequestsOomTest(EFeatMgrOomClientTestMode);
     TheTest.Next(_L("@SYMTestCaseID:PDS-EFM-CT-4093 CFeatureNotifier::NotifyRequest(<array>), valid feature, server side OOM test"));
     NotifierNotifyRequestsOomTest(EFeatMgrOomServerTestMode);
+
+    TheTest.Next(_L("@SYMTestCaseID:PDS-EFM-CT-4112 FeatureManager::InitializeLibL(), OOM test"));
+    InitializeLibOomTest();
     }
 
 TInt E32Main()
--- a/loggingservices/eventlogger/LogCli/src/LOGCLI.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogCli/src/LOGCLI.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -426,6 +426,7 @@
 #else //SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 /**
 Not supported. 
@@ -443,6 +444,7 @@
 	__ASSERT_ALWAYS(0, ::Panic(ELogDualSimNotSupported));
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 #endif//SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
@@ -568,9 +570,11 @@
 	}
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 EXPORT_C void CLogClient::CLogBase_Reserved1()
 	{
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
--- a/loggingservices/eventlogger/LogCli/src/LOGDLL.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogCli/src/LOGDLL.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -19,6 +19,7 @@
 
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 GLDEF_C void Panic(TLogCliPanic aPanic)
 	{
@@ -26,4 +27,5 @@
 	User::Panic(KLogPanicString, aPanic);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
--- a/loggingservices/eventlogger/LogCli/src/LOGFILT.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogCli/src/LOGFILT.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2003-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"
@@ -165,6 +165,7 @@
 #else//SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 /**
 Not supported. 
@@ -183,6 +184,7 @@
 	return 0;
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 #endif//SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
--- a/loggingservices/eventlogger/LogCli/src/LogClientChangeObserver.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogCli/src/LogClientChangeObserver.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -21,6 +21,7 @@
 /////////////////////////////////////////////////////////////////////////////////////////
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 EXPORT_C void MLogClientChangeObserver::MLogClientChangeObserver_Reserved1()
 	{
@@ -30,4 +31,5 @@
 	{
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
--- a/loggingservices/eventlogger/LogServ/src/LOGADD.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogServ/src/LOGADD.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -38,6 +38,7 @@
 #ifdef SYSLIBS_TEST
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 static void LogStore32IntL(RFs& aFs, const TDesC& aFilePath, TInt aVal)
 	{
@@ -75,6 +76,7 @@
 	CleanupStack::PopAndDestroy(&fs);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 #endif //SYSLIBS_TEST
--- a/loggingservices/eventlogger/LogServ/src/LOGGET.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogServ/src/LOGGET.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -114,6 +114,7 @@
 
 //CLogGetEvent::StartL() does all job
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 void CLogGetEvent::DoRunL()
 	{
@@ -122,4 +123,5 @@
 	LOGTEXT("CLogGetEvent::DoRunL() - end");
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
--- a/loggingservices/eventlogger/LogServ/src/LogServDatabaseChangeTracker.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogServ/src/LogServDatabaseChangeTracker.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -57,7 +57,7 @@
 	User::LeaveIfError(error);
 	//
 	Request();
-	//
+	// coverity[negative_returns]
 	iIdler = CIdle::NewL(CActive::EPriorityIdle);
 	}
 
--- a/loggingservices/eventlogger/LogServ/src/LogServPanic.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogServ/src/LogServPanic.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -33,12 +33,14 @@
 	}
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 void Panic(TLogServPanic aPanic)
 	{
 	User::Panic(KLogServ, aPanic);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 #ifdef LOGGING_ENABLED
--- a/loggingservices/eventlogger/LogServ/src/LogServRecentCondition.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogServ/src/LogServRecentCondition.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -105,6 +105,7 @@
 #ifdef SYSLIBS_TEST
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 //When SYSLIBS_TEST macro is defined, creates a test recent list condition.
 //Used from the unit tests to cover many of the production code branches, otherwise uncovered,
@@ -159,6 +160,7 @@
 		}
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 #endif//SYSLIBS_TEST
--- a/loggingservices/eventlogger/LogServ/src/LogServRecentList.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogServ/src/LogServRecentList.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -61,6 +61,7 @@
 #ifdef SYSLIBS_TEST
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 //Used by the unit tests when SYSLIBS_TEST macro is defined.
 //Creates a complex recent list with a lot of fields.
@@ -110,6 +111,7 @@
 #endif	
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 #endif//SYSLIBS_TEST
--- a/loggingservices/eventlogger/LogServ/src/LogServView.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogServ/src/LogServView.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -138,6 +138,7 @@
 /////////////////////////////////////////////////////////////////////////////////////////
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 /**
 Remove an entry from the view.
@@ -156,6 +157,7 @@
 	User::Leave(KErrNotSupported);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 /**
--- a/loggingservices/eventlogger/LogWrap/src/LOGBASE.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogWrap/src/LOGBASE.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -36,6 +36,7 @@
 	}
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 /** Adds an event to the log database. This is an asynchronous request.
 	
@@ -121,6 +122,7 @@
 	__ASSERT_DEBUG(ETrue, Panic(ELogNotImplemented));
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 EXPORT_C void CLogBase::LoadResourcesL(RFs& aFs)
@@ -141,9 +143,11 @@
 	}
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 EXPORT_C void CLogBase::CLogBase_Reserved1()
 	{
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
--- a/loggingservices/eventlogger/LogWrap/src/LOGDLL.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogWrap/src/LOGDLL.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -20,10 +20,12 @@
 _LIT(KLogPanicString, "LogWrap");
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 GLDEF_C void Panic(TLogPanic aPanic)
 	{
 	User::Panic(KLogPanicString, aPanic);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
--- a/loggingservices/eventlogger/LogWrap/src/LOGEVENT.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogWrap/src/LOGEVENT.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -296,6 +296,7 @@
 #else//SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 /**
 Not supported.
@@ -314,6 +315,7 @@
 	return 0;
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 #endif//SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
--- a/loggingservices/eventlogger/LogWrap/src/LOGWRAP.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/LogWrap/src/LOGWRAP.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -50,10 +50,12 @@
 	}
 #else
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 void CLogWrapper::ConstructL(RFs&, TInt aPriority)
 	{
 	iBase = new(ELeave)CLogBase(aPriority);
 	}
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 #endif
 
--- a/loggingservices/eventlogger/Rom/logengtest.iby	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/Rom/logengtest.iby	Tue Oct 19 16:26:13 2010 +0100
@@ -67,8 +67,4 @@
 data=DATAZ_\test\corruptdamagedlogdbu.dat       test\corruptdamagedlogdbu.dat
 data=DATAZ_\test\101f401d_test.txt              test\101f401d_test.txt
 
-//The next line to be uncommented if the testing is performed locally. Otherwise t_logview2 fails - 
-//the following file is missing and needed by the time zone server.
-//data=ZPRIVATE\10202BE9\1020383e.txt           private\10202be9\1020383e.txt
-
 #endif
--- a/loggingservices/eventlogger/test/src/t_logbadclient.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/test/src/t_logbadclient.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -24,7 +24,11 @@
 
 RTest TheTest(_L("t_logbadclient test"));
 
+#if defined __WINS__ || defined __WINSCW__
 const TInt KTestIterCount = 5000;
+#else
+const TInt KTestIterCount = 2500;
+#endif
 const TInt KMaxDesArgLen = 1000;
 enum TArgType 
 	{
@@ -72,6 +76,10 @@
 
 _LIT(KPanicCategory, "SrvTerm");
 _LIT(KPanicCategory2, "InvArg");
+_LIT(KPanicCategory3, "SessConn");
+_LIT(KPanicCategory4, "TcNull");
+_LIT(KPanicCategory5, "ThrDNull");
+
 const TInt KPanicCode = 1111;
 const TInt KPanicCode2 = 2222;
 
@@ -82,8 +90,10 @@
 
 void PrintIterationCount(TInt aIteration)
 	{
-	if((aIteration % 100) == 0)
+	static TInt lastIteration = 0;
+	if((aIteration - lastIteration) >= 100)
 		{
+		lastIteration = aIteration;
 		TTime time;
 		time.HomeTime();
 		TDateTime dt = time.DateTime();
@@ -107,15 +117,24 @@
 	__UHEAP_MARK;
 	
 	CTrapCleanup* tc = CTrapCleanup::New();
-	TTEST(tc != NULL);
+	if(!tc)
+		{
+		User::Panic(KPanicCategory4, KErrNoMemory);
+		}
 
 	TThreadData* p = static_cast <TThreadData*> (aData);
-	TTEST(p != NULL);
+	if(!p)
+		{
+		User::Panic(KPanicCategory5, KErrArgument);
+		}
 	TThreadData& data = *p;
 	
 	RLogSession sess;
 	TInt err = sess.Connect();
-	TTEST2(err, KErrNone);
+	if(err != KErrNone)
+		{
+		User::Panic(KPanicCategory3, err);
+		}
 
 	while(++data.iIteration <= KTestIterCount)
 		{
@@ -123,7 +142,6 @@
 		const TInt KFnCnt = sizeof(KLogIpcMsgCodes) / sizeof(KLogIpcMsgCodes[0]);
 		TInt fnIdx = Math::Rand(data.iSeed) % KFnCnt;
 		data.iFunction = KLogIpcMsgCodes[fnIdx];
-		PrintIterationCount(data.iIteration);
 		for(TInt argIdx=0;argIdx<KMaxMessageArguments;++argIdx)
 			{
 			//Initialize arguments
--- a/loggingservices/eventlogger/test/src/t_logcntmatch.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/test/src/t_logcntmatch.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -326,6 +326,7 @@
 
 void doTestsL()
 	{
+	TestUtils::Initialize(_L("t_logcntmatch"));
 	TheTest.Start(_L("This test can be run only when built with SYSLIBS_TEST macro defined!"));
 	}
 
--- a/loggingservices/eventlogger/test/src/t_logfilter.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/test/src/t_logfilter.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -221,7 +221,20 @@
 
 	filter1->Copy(*filter2);
 	TEST(TestUtils::FiltersEqual(*filter1, *filter2));
+	
+	TTime time;
+	time.HomeTime();
+	filter1->SetStartTime(time);
+	TTime time2 = filter1->StartTime();
+	TEST(time == time2);
 
+	User::After(5000);
+	
+	time.HomeTime();
+	filter1->SetEndTime(time);
+	time2 = filter1->EndTime();
+	TEST(time == time2);
+	
 	CleanupStack::PopAndDestroy(2); // filter1, filter2;
 	}
 
--- a/loggingservices/eventlogger/test/src/t_logservercrash.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/test/src/t_logservercrash.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -196,7 +196,18 @@
  */
 void doTestsL() 
 	{
+	//When SYSLIBS_TEST is defined, the test ECOM contact matching plug-in will be loaded, 
+//otherwise the real contact matching plug-in will be loaded.
+//Therefore, in armv5 urel build, no plug-in will be loaded.
+#ifdef __WINS__
+    TheMatchingIsEnabled = TestUtils::MatchingEnabledL();
+#else 
+    
+#ifdef SYSLIBS_TEST 
 	TheMatchingIsEnabled = TestUtils::MatchingEnabledL();
+#endif
+	
+#endif
 	
 	// test 0 adds an event
 	TestUtils::Initialize(_L("t_logservercrash"));
--- a/loggingservices/eventlogger/test/src/t_logview1.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/test/src/t_logview1.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -810,6 +810,8 @@
 	TEST2(view->CountL(), 0);
 	TBool res = view->SetRecentListL(KLogRecentIncomingCalls, active->iStatus);
 	TEST(res);
+	TLogRecentList rlist = view->RecentList();
+	TEST(rlist == KLogRecentIncomingCalls);
 
 	// Move forward
 	count = KTestEventNum;
@@ -5949,7 +5951,18 @@
 //
 void doTestsL()
 	{
-	TheMatchingIsEnabled = TestUtils::MatchingEnabledL();
+//When SYSLIBS_TEST is defined, the test ECOM contact matching plug-in will be loaded, 
+//otherwise the real contact matching plug-in will be loaded.
+//Therefore, in armv5 urel build, no plug-in will be loaded.
+#ifdef __WINS__
+    TheMatchingIsEnabled = TestUtils::MatchingEnabledL();
+#else 
+    
+#ifdef SYSLIBS_TEST 
+    TheMatchingIsEnabled = TestUtils::MatchingEnabledL();
+#endif
+    
+#endif
 	
 	TestUtils::Initialize(_L("t_logview1"));
 	TestUtils::DeleteDatabaseL();
--- a/loggingservices/eventlogger/test/src/t_logview2.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/test/src/t_logview2.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -4472,15 +4472,11 @@
 LOCAL_C void DEF087459L(CLogClient& aClient)
 	{
 	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-1807 "));
-	RTz tz;				
-	TInt err = tz.Connect();
-	TEST2(err, KErrNone);
-	CleanupClosePushL(tz);
-	TTime now, saveNow;
-	
+
 	// Get and print current home time and save it
+	TTime now;
 	now.HomeTime();
-	saveNow=now;
+	TTime saveNow(now);
 	
 	TBuf<0x80> testString;
 	now.FormatL(testString,(_L("%H:%T %1\\%2\\%3 %E")));
@@ -4493,10 +4489,10 @@
 	midnight.SetMinute(30);
 	midnight.SetSecond(0);
 	midnight.SetMicroSecond(0);
-	
-	TTime newTime=midnight;
-
-	err = tz.SetHomeTime(midnight);
+
+	TTime midnightTTime = midnight;
+
+	TInt err = User::SetHomeTime(midnightTTime);
 	TEST2(err, KErrNone);
 
 	// Get and print new home time
@@ -4508,13 +4504,13 @@
 	DEF066296L(aClient);
 	
 	// Restore and print hometime
-	err = tz.SetHomeTime(saveNow);
+	err = User::SetHomeTime(saveNow);
 	TEST2(err, KErrNone);
+
+	// Get and print new home time
 	now.HomeTime();
 	now.FormatL(testString,(_L("%H:%T %1\\%2\\%3 %E")));
 	TheTest.Printf(_L("Restored home time to - %S\n"), &testString);
-	
-	CleanupStack::PopAndDestroy(); //tz
 	}
 
 /**
--- a/loggingservices/eventlogger/test/src/t_logwrap.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/test/src/t_logwrap.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -327,7 +327,7 @@
 		delete wrapper;
 		}
 #else
-	RDebug::Print(_L("Test4INC047632L() can be executed only in debug mode. In release mode the LogEng server cannot be stopped.\n"));
+	TheTest.Printf(_L("Test4INC047632L() can be executed only in debug mode. In release mode the LogEng server cannot be stopped.\n"));
 #endif//_DEBUG
 	}
 /**
@@ -368,7 +368,7 @@
 	error = theLogServ.Connect();
  	TEST(error == KErrNone);
 #else
-	RDebug::Print(_L("Test4INC047632L() can be executed only in debug mode. In release mode the LogEng server cannot be stopped.\n"));
+	TheTest.Printf(_L("Test4INC047632L() can be executed only in debug mode. In release mode the LogEng server cannot be stopped.\n"));
 #endif//_DEBUG
 	}
 
--- a/loggingservices/eventlogger/test/t_logfilter.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/test/t_logfilter.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -18,6 +18,8 @@
 
 CAPABILITY	  WriteDeviceData ReadDeviceData WriteUserData ReadUserData
 
+//The code coverage drops without the next line because the inlined functions will be taken from the "systeminclude"
+USERINCLUDE 	../LogCli/inc
 USERINCLUDE   ../test/inc
 USERINCLUDE   ../Shared
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
--- a/loggingservices/eventlogger/test/t_logview1.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/test/t_logview1.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -18,6 +18,8 @@
 
 CAPABILITY	  WriteDeviceData ReadDeviceData WriteUserData ReadUserData
  
+//The code coverage drops without the next line because the inlined functions will be taken from the "systeminclude"
+USERINCLUDE 	../LogCli/inc
 USERINCLUDE   ../test/inc
 USERINCLUDE   ../Shared
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
--- a/loggingservices/eventlogger/test/t_logview2.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/test/t_logview2.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -18,6 +18,8 @@
 
 CAPABILITY	  WriteDeviceData ReadDeviceData WriteUserData ReadUserData
 
+//The code coverage drops without the next line because the inlined functions will be taken from the "systeminclude"
+USERINCLUDE 	../LogCli/inc
 USERINCLUDE   ../test/inc
 USERINCLUDE   ../Shared
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN
@@ -32,8 +34,7 @@
 LIBRARY       efsrv.lib 
 LIBRARY       logwrap.lib 
 LIBRARY       logcli.lib 
-LIBRARY       bafl.lib 
-LIBRARY       tzclient.lib
+LIBRARY       bafl.lib
 
 VENDORID 0x70000001
 
--- a/loggingservices/eventlogger/test/t_logwrap.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/loggingservices/eventlogger/test/t_logwrap.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -18,6 +18,8 @@
 
 CAPABILITY	  WriteDeviceData ReadDeviceData WriteUserData ReadUserData
 
+//The code coverage drops without the next line because the inlined functions will be taken from the "systeminclude"
+USERINCLUDE 	../LogWrap/inc
 USERINCLUDE   ../test/inc
 USERINCLUDE   ../Shared
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
--- a/persistentstorage/centralrepository/cenrepsrv/backup.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/cenrepsrv/backup.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -230,6 +230,9 @@
 			    	{
 				    for(TInt i = 0; i < iRestoredRepositoriesArray.Count(); i++)
 				    	{
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+				        __ASSERT_DEBUG(TServerResources::iPMADriveRepositories.FindInOrder( iRestoredRepositoriesArray[i]->Uid(), TLinearOrder<TUid>(TServerResources::CompareUids) ) == KErrNotFound, User::Invariant());
+#endif
 						iRepository->OpenL(iRestoredRepositoriesArray[i]->Uid(), *iNotifier, EFalse);
 						iRepository->RestoreNotify(*iRestoredRepositoriesArray[i]);
 						iRepository->Close();
@@ -481,17 +484,33 @@
 		iRepository->OpenL(repositoryUid, *iNotifier, EFalse);
 		iRepository->FailAllTransactions();
 		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)
-			{
-			// create an empty repository in install directory, and restore the data from backup file
-			iRepository->RestoreInstallRepositoryL(repositoryUid, *store, installedSettingsStreamId, *iRestoredRepositoriesArray[repIndex]);
-			// remove the .ini install file (if exists) because it will clash with the restored file
-			TServerResources::DeleteCentrepFileL(repositoryUid, EInstall, EIni);
-			}
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC		
+		// Under normal circumstances the repository should not be a 
+		//  protected keyspace, but we need to check that we are not trying
+		//  restore a protected keyspace, incase the backup file has been
+		//  tampered with.
+		if (iRepository->KeyspaceType() == ENonPMAKeyspace)
+		    {
+#endif
+            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)
+                {
+                // create an empty repository in install directory, and restore the data from backup file
+                iRepository->RestoreInstallRepositoryL(repositoryUid, *store, installedSettingsStreamId, *iRestoredRepositoriesArray[repIndex]);
+                // remove the .ini install file (if exists) because it will clash with the restored file
+                TServerResources::DeleteCentrepFileL(repositoryUid, EInstall, EIni);
+                }
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+		    }
+		else // If it is a protected keyspace then we just want to move onto the next repository. 
+		    {
+		    iRepository->Close();
+		    }
+#endif
 		}
 
 	CleanupStack::PopAndDestroy(restoreStreamIndex) ;
@@ -653,12 +672,18 @@
 			// Found one match, open the repository and externalise content.
 			TUid uid = TUid::Uid(lookupTableEntry.iRepUid);
 			TRAPD(err,iRepository->OpenL(uid, *iNotifier));
+
 			if (err == KErrNoMemory)
 				{
 				User::Leave(err) ;
 				}
 			else if (err == KErrNone)
 				{			
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+                // No protected keyspaces should be in iOwnerIdLookUpTable.
+                __ASSERT_DEBUG(iRepository->KeyspaceType() != EPMAKeyspace, User::Invariant());
+#endif
+
 				iRepository->FailAllTransactions();
 				// externalise repository contents
 				iRepository->StoreRepositoryContentsL(*store, settingStreamId, deletedSettingsStreamId);
--- a/persistentstorage/centralrepository/cenrepsrv/install.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/cenrepsrv/install.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1997-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"
@@ -485,7 +485,7 @@
 	installDirFilePath.Append(KInstallDirFile);
 	
 	TRAPD(err, ReadAndInternalizeInstallDirL(installDirFilePath)); // try to open installdir file and internalize its contents
-	if (err != KErrNone) 
+	if (err != KErrNone && err != KErrNotFound && err != KErrPathNotFound) 
 		{
 		TInt fileDeleteErr = TServerResources::iFs.Delete(installDirFilePath);
 		// If a debug build - record error
--- a/persistentstorage/centralrepository/cenrepsrv/obsrvr_noc.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/cenrepsrv/obsrvr_noc.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -239,11 +239,25 @@
 	if(r==KErrNone)
 		{			
 		r=ReadSettingsL(inifile, aRepository);		
-		if(r==KErrCorrupt)
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+        // PMA repositories are not allowed to be installed/updated via SWI.
+        // Any repository marked as protected in the install directory will be
+        // deleted, when opened.
+        if ( aLocation == EInstall  && (aRepository->iSimRep->KeyspaceType() == EPMAKeyspace) )
+            {
+            r = KErrNotSupported;
+            }
+
+        if(r == KErrCorrupt || r == KErrNotSupported)
+#else
+        if(r == KErrCorrupt)
+#endif
 			{
 			// File is corrupt, if it's not the ROM file, delete it
 			if(fileName && aLocation != ERom)
+			    {
 				User::LeaveIfError(TServerResources::iFs.Delete(*fileName));
+			    }
 			// Delete any repository settings that may have been read in
 			aRepository->GetSettings().Reset();
 			}
@@ -570,9 +584,19 @@
 					#endif								
 					}
 				}
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+			// Need to ensure both keyspaces are of the same type (either both protected or
+			//  both non-protected).
+            if ( aCoreRepository->iSimRep->KeyspaceType() != repos->KeyspaceType() )
+                {
+                User::Leave(KErrCorrupt);
+                }
+#endif
+			
 			//Now that the repository is initialized and at this stage the repository file has been
 			//checked whether they are corrupt	
 			repos->SettingsArray().SetIsDefault(ETrue);
+
 			MergeRepositoryL(aCoreRepository,repos);
 
 			CleanupStack::PopAndDestroy(repos);	//repos
@@ -589,10 +613,17 @@
 	err = aRepository->CreateRepositoryFromCreFileL(aLocation);
 	if(err==KErrNotFound)
 		{
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+		// Persists and Protected directories are internal and do not support .txt repository files.
+		if ( (aLocation!=EPersists) && (aLocation!=EPma) )
+#else
 		if (aLocation!=EPersists)
-			err = ReadIniFileL(aRepository,aLocation);
+#endif
+		    {
+		    err = ReadIniFileL(aRepository,aLocation);
+		    }
 		}
-	//for ROM might want to consider the possibility of multi rofs file
+	// For ROM need to consider the possibility of multi rofs file.
 #ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS		
 	if (aLocation==ERom && iMultiRofsUidList.Count()!=0)
 		{
@@ -641,6 +672,17 @@
 	    {
 	    case CIniFileIn::EAuto:
 	        {
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	        // If the repository is in the list of protected repositories, it must be in the protected directory.
+	        if ( TServerResources::iPMADriveRepositories.FindInOrder( aRepository->Uid(), TLinearOrder<TUid>(TServerResources::CompareUids) ) != KErrNotFound )
+                {
+	            // File must now exist on the protected drive.
+                err = CreateRepositoryL(aRepository, EPma);  
+                // We will either successfully load (err==None) the repository or there will be an
+                // error loading it, in which case we must return the error.
+                return err;
+                }
+#endif
 	        // Look in persists dir	 
 	        err=CreateRepositoryL(aRepository, EPersists);		
 	        				
@@ -813,16 +855,24 @@
 		// We pop the rep here because if later call of TServerResources::AddOwnerIdLookupMapping fails of OOM
 		// the call of RemoveOpenRepository() will delete the repository before leave.
 		CleanupStack::Pop(rep);
-		
-		// Add owner mapping to list - Will fail if an entry already exists
-		// with this Repository UID but this doesn't matter
-		TUid owner = rep->Owner() ;
-		TInt err = TServerResources::AddOwnerIdLookupMapping(aUid.iUid, owner.iUid);	
-		if (err == KErrNoMemory)
-			{
-			RemoveOpenRepository(rep);
-			User::Leave(err);
-			}
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC		
+		// We don't want to add protected Keyspaces to iOwnerIdLookUpTable, as this is used for BUR and
+		//  protected keyspaces are excluded from BUR.
+		if (rep->iSimRep->KeyspaceType() != EPMAKeyspace)
+		    {
+#endif
+            // Add owner mapping to list - Will fail if an entry already exists
+            // with this Repository UID but this doesn't matter
+            TUid owner = rep->Owner() ;
+            TInt err = TServerResources::AddOwnerIdLookupMapping(aUid.iUid, owner.iUid);	
+            if (err == KErrNoMemory)
+                {
+                RemoveOpenRepository(rep);
+                User::Leave(err);
+                }
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+		    }
+#endif
 		
 		//Find the location of the current transaction for this repository
 		const TInt offset (FindRepositoryInfo(aUid));
--- a/persistentstorage/centralrepository/cenrepsrv/shrepos.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/cenrepsrv/shrepos.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -127,7 +127,44 @@
 		{
 		// changes have been made: fail all other sessions' transactions so we can commit
 		FailAllTransactions(/*aExcludeTransactor=*/&aTransactor);
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+		if (iSimRep->KeyspaceType() == EPMAKeyspace)
+		    {
+		    // We add the repository UID to the PMA array before the commit because
+		    //  if the commit then fails, we can simply remove the UID from the array,
+		    //  before returning the error code. If we perform the commit first,
+		    //  then update the array, in the event the commit succeeds but the
+		    //  array updated fails, then we are left in an inconsistent state.
+            TInt err = TServerResources::iPMADriveRepositories.InsertInOrder( iSimRep->Uid(), TLinearOrder<TUid>(TServerResources::CompareUids) );
+		    if (err != KErrNone && err != KErrAlreadyExists)
+                {
+		        return err;
+                }
+		    error = CommitChanges(EPma); // This already calls ResetContent() in case of failure.
+		    
+		    if (error != KErrNone && err != KErrAlreadyExists)
+		        {
+		        // We only want to remove the UID from the array, if the failed commit
+		        //  means there is no repository in the protected area (i.e. this 
+		        //  commit is creating the repository there). If this commit is just
+		        //  updating an existing repository in the protected area then we want 
+		        //  to leave the UID in the array, in order to keep the array and
+		        //  protected area consistent.
+                TInt result = TServerResources::iPMADriveRepositories.FindInOrder( iSimRep->Uid(), TLinearOrder<TUid>(TServerResources::CompareUids) );
+                if (result != KErrNotFound)
+                    {
+                    TServerResources::iPMADriveRepositories.Remove( result );
+                    }
+		        }
+		    }
+		else
+			{
+			error = CommitChanges(EPersists); // This already calls ResetContent() in case of failure.
+			}
+#else
 		error = CommitChanges(); // this already calls ResetContent() in case of failure
+#endif
+
 		}
 	if (error == KErrNone)
 		{
@@ -185,6 +222,9 @@
 // if changes are made, all sessions' transactions are failed
 TInt CSharedRepository::DeleteAndPersist(TUint32 aId)
 	{
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+    __ASSERT_DEBUG(iSimRep->KeyspaceType() != EPMAKeyspace, User::Invariant());
+#endif
 	TServerSetting* s = iSimRep->SettingsArray().Find(aId);
 	if(!s)
 		return KErrNotFound;
@@ -711,12 +751,37 @@
 	{
 	// Get file path name from location
     HBufC* filePath(NULL);
-    TServerResources::CreateRepositoryFileNameLC(filePath,iSimRep->Uid(), aLocation,ECre);
+    TUid uidToOpen = iSimRep->Uid();
+    TServerResources::CreateRepositoryFileNameLC(filePath, uidToOpen, aLocation,ECre);
     // Trap errors from repository creation so we can delete corrupt repositories
 	TRAPD(error, iSimRep->CreateRepositoryFromCreFileL(TServerResources::iFs,*filePath));
-	if(error!=KErrNone && error!=KErrNotFound && error!=KErrNoMemory)
-		{
-		error=KErrCorrupt;
+
+    if(error!=KErrNone && error!=KErrNotFound && error!=KErrNoMemory)
+        {
+        error = KErrCorrupt;
+
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+        }
+	// Need to verify that if the reposistory is in the:
+    // 1) protected directory, it MUST contain the 'protected' keyword.
+	// 2) persists directory, it MUST NOT contain the 'protected' keyword.
+    // 3) install directory, it MUST NOT contain the 'protected' keyword. 
+	// 
+	// If the check fails, it means the keyspace is corrupted.
+	if (error == KErrNone)
+	    {
+	    TInt8 reposType = iSimRep->KeyspaceType();
+        if (  (aLocation == EPma      && reposType != EPMAKeyspace)
+            ||(aLocation == EPersists && reposType == EPMAKeyspace)
+            ||(aLocation == EInstall  && reposType == EPMAKeyspace))
+            {
+            error = KErrNotSupported;
+            }
+	    }
+
+    if(error==KErrCorrupt || error==KErrNotSupported)
+        {
+#endif
 		// store wasn't quite what we were expecting - can't return an error, can't leave
 		// so all we can do is close the file, tidy up as best we can, and return corrupt 
 		if (aLocation != ERom)
@@ -729,7 +794,19 @@
 				RDebug::Print(_L("CSharedRepository::CreateRepositoryFromCreFileL - Failed to delete file. Error = %d"), fileDeleteErr);
 				#endif
 				}
-
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+			else // Protected repository file successfully deleted, so remove it from the PMA array.
+			    {
+			    if (aLocation == EPma)
+			        {
+			        TInt result = TServerResources::iPMADriveRepositories.FindInOrder( uidToOpen, TLinearOrder<TUid>(TServerResources::CompareUids) );
+			        if (result != KErrNotFound)
+			            {
+			            TServerResources::iPMADriveRepositories.Remove( result );
+			            }
+			        }
+			    }
+#endif
 			}
 		}
 	else if( error==KErrNoMemory)
--- a/persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -53,6 +53,13 @@
         }
 	}
 
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+TInt8 CServerRepository::KeyspaceType()
+    {
+    return iRepository->iSimRep->KeyspaceType();
+    }
+#endif
+
 void CServerRepository::Close()
 	{
 	iRepository = NULL;
@@ -223,6 +230,14 @@
 
 TInt CServerRepository::ResetL(TUint32 aId)
 	{
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC 
+	// A protected repository should never be modified during a reset.   
+    if ( ( iRepository->iSimRep->KeyspaceType() ) == EPMAKeyspace )
+        {
+        return KErrNotSupported;
+        }
+#endif    
+   
 	// not yet supported in transactions
 	ASSERT(!IsInTransaction());
 
@@ -415,7 +430,7 @@
 					    User::LeaveNoMemory();
 					    }
 				      else
-					    {//Dont stop processing the rest of the persisted repositories becos one has a problem.
+					    {// Dont stop processing the rest of the persisted repositories because one has a problem.
 					     __CENTREP_TRACE1("CENTREP: CServerRepository::ProcessPersistsRepositoriesL - Error = %d", err);
 					    }
 				      }
@@ -433,6 +448,11 @@
 
 TInt CServerRepository::RFSRepositoryL()
 	{
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC 
+	// A protected repository should never be modified during RFS.
+    ASSERT( ( iRepository->iSimRep->KeyspaceType() ) != EPMAKeyspace );
+#endif
+    
 	// for each key in combined ROM/Install restore
 	TUid uid = iRepository->Uid();
 
@@ -535,6 +555,11 @@
 	
 TInt CServerRepository::HandleReflashofRepositoryL()
 	{
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+    // A protected repository should not reach this point, due to an earlier check. 
+    __ASSERT_DEBUG( ( iRepository->iSimRep->KeyspaceType() ) == ENonPMAKeyspace, User::Invariant() );
+#endif
+
 	// for each key in persists repository
 	TUid uid = iRepository->Uid();
 
@@ -589,6 +614,14 @@
 
 TInt CServerRepository::ResetAllL()
 	{
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC    
+	// A protected repository should never be modified during a reset.
+    if ( ( iRepository->iSimRep->KeyspaceType() ) == EPMAKeyspace )
+        {
+        return KErrNotSupported;
+        }
+#endif  
+
 	// not yet supported in transactions
 	ASSERT(!IsInTransaction());
 	// fail all sessions' transactions first
@@ -651,13 +684,36 @@
 void CServerRepository::HandleSWIUpdateL(TUid aUid, TTime aModified, CSessionNotifier &aNotifier)
 	{		
 	// A file create or update has just occurred in the SWI directory. 
-	// Need to check if this is a new install. 
+
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC    
+    // A protected repository should never be modified during SWI.
+	if ( TServerResources::iPMADriveRepositories.FindInOrder( aUid, TLinearOrder<TUid>(TServerResources::CompareUids) ) != KErrNotFound )
+	    {
+        TServerResources::DeleteCentrepFileL(aUid, EInstall, EIni);
+	    TServerResources::DeleteCentrepFileL(aUid, EInstall, ECre);
+        User::Leave(KErrNotSupported);
+	    }
+#endif
 	
+	// Need to check if this is an update to an existing repository.
 	if(TServerResources::PersistsFileExistsL(aUid) ||
 	   TServerResources::RomFileExistsL(aUid))
 		{	
-		// Create a rep using the ROM or persists file
+		// Create a repository using the ROM or persists file.
 		OpenL(aUid, aNotifier);
+		
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+        // Although unlikely, we need to check incase there is a protected
+		// repository in the ROM, but not in the protected area. 
+        if ( ( iRepository->iSimRep->KeyspaceType() ) == EPMAKeyspace )
+            {
+            Close();
+            TServerResources::DeleteCentrepFileL(aUid, EInstall, EIni);
+            TServerResources::DeleteCentrepFileL(aUid, EInstall, ECre);
+            User::Leave(KErrNotSupported);
+            }
+#endif
+		
 		if(iRepository->IsTransactionActive())			
 			{
 			// Fail transactions on any currently open session
@@ -666,6 +722,9 @@
 			
 		// Create install rep for merging
  		CSharedRepository *installRep = 0;
+ 		
+ 		// If the repository in the install directory is marked as 'protected',
+ 		//  it will be deleted and KErrNotSupported will be returned.
  		TRAPD( err, TServerResources::iObserver->LoadRepositoryLC(aUid, ETrue, installRep, CIniFileIn::EInstallOnly); CleanupStack::Pop(installRep) );
 	
 		if (err == KErrNone)
@@ -680,10 +739,16 @@
         Close();
         User::LeaveIfError(err);
 		}
-	else	// No ROM or persists
+	else	// No ROM or persists repository, installing a new repository.
 		{
-		// Create install rep for persisting
+		// Create install repository for persisting. If the repository in the
+	    // install directory is marked as 'protected', it will be deleted and
+	    // return KErrNotSupported. As protected repositories can installed 
+		// during software install.
 		OpenL(aUid, aNotifier);
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+		__ASSERT_DEBUG(iRepository->iSimRep->KeyspaceType() != EPMAKeyspace, User::Invariant());
+#endif
 		TRAPD(err, iRepository->CommitChangesL());
 	    Close();
 	    User::LeaveIfError(err);
@@ -693,7 +758,13 @@
 
 // Handle install directory file delete 
 void CServerRepository::HandleSWIDeleteL(TUid aUid, CSessionNotifier &aNotifier)
-	{			
+	{
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+    // Protected repository files can not be installed, so there should never be
+    // anything to uninstall. 
+    __ASSERT_DEBUG( (TServerResources::iPMADriveRepositories.FindInOrder( aUid, TLinearOrder<TUid>(TServerResources::CompareUids) ) == KErrNotFound), User::Invariant() );
+#endif
+
 	// A file delete has just occurred in the SWI directory. If there is no ROM file
 	// this is a complete uninstall, so delete persists file.Otherwise, do downgrade
 	// merge.
@@ -708,7 +779,7 @@
 			return;
 			}
 			
-		// Create a rep using the persists file
+		// Create a repository using the persists file.
 		OpenL(aUid, aNotifier);
 		if(iRepository->IsTransactionActive())			
 			{
@@ -716,13 +787,20 @@
 			iRepository->FailAllTransactions(NULL);
 			}
 		
-		// Create ROM rep for merging
+		// Create a ROM repository for merging.
 	 	CSharedRepository *romRep = 0;
 		TRAPD( err, TServerResources::iObserver->LoadRepositoryLC(aUid, ETrue, romRep, CIniFileIn::ERomOnly); CleanupStack::Pop(romRep) );
-
+		
 		if (err == KErrNone)
-		    {
-            // Perform merge
+		    {    
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+            // Need to check incase it is a protected repository.
+            if ( romRep->iSimRep->KeyspaceType() == EPMAKeyspace )
+                {
+                User::Leave(KErrNotSupported);
+                }
+#endif  
+            // Perform merge of the persists and ROM repositories.
             TRAP( err, iRepository->HandleDeleteMergeL(*romRep) );
 		    }
 		if (romRep!=NULL)
@@ -1008,10 +1086,18 @@
 void CServerRepository::BackupInstallRepositoryL(TUid aUid, CStreamStore& aStore, TStreamId& aSettingStreamId)
 	{
 	TServerResources::iObserver->LoadRepositoryLC(aUid, EFalse, iRepository, CIniFileIn::EInstallOnly);
-	iUid = aUid;
-	StoreRepositorySettingValuesL(aStore, aSettingStreamId);	
-	CleanupStack::PopAndDestroy(iRepository);
-	iRepository = NULL;
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	// Protected repositories should not be part of Backup and Restore.
+    if (iRepository->iSimRep->KeyspaceType() != EPMAKeyspace)
+        {
+#endif
+        iUid = aUid;
+        StoreRepositorySettingValuesL(aStore, aSettingStreamId);  
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+        }  
+#endif
+        CleanupStack::PopAndDestroy(iRepository);
+        iRepository = NULL;
 	}
 
 TInt CServerRepository::CheckAccessPolicyBeforeMoving(const TClientRequest& aMessage, const TServerSetting* aSourceSetting, 
--- a/persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.h	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.h	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -37,6 +37,9 @@
 	void OpenL(TUid aUid, MObserver& aObserver, TBool aFailIfNotFound = ETrue);
 	void HandleOpenMergeL();
 	void Close();
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	TInt8 KeyspaceType();
+#endif
 	void RestoreNotify(const CRestoredRepository& aRstRepos);
 	TInt RFSRepositoryL();
 #ifdef SYMBIAN_BAFL_SYSUTIL
--- a/persistentstorage/centralrepository/cenrepsrv/srvres.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/cenrepsrv/srvres.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -21,7 +21,9 @@
 #include <bafl/sysutil.h>
 #endif
 RFs TServerResources::iFs;
-
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+HBufC* TServerResources::iPmaDirectory;
+#endif
 HBufC* TServerResources::iRomDirectory;
 HBufC* TServerResources::iDataDirectory;
 HBufC* TServerResources::iInstallDirectory;
@@ -35,6 +37,9 @@
 TUint8 TServerResources::iPersistsVersion;
 
 RArray<TOwnerIdMapping> TServerResources::iOwnerIdLookUpTable;
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+RArray<TUid> TServerResources::iPMADriveRepositories;
+#endif
 
 CRepositoryCacheManager* TServerResources::iCacheManager;
 CObservable* TServerResources::iObserver;
@@ -196,6 +201,13 @@
 	        directory.Copy(iDataDirectory->Des());
 	        }
 	    	break;
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+        case EPma:
+            {
+            directory.Copy(iPmaDirectory->Des());               
+            }
+            break;
+#endif
 	    case EInstall:
 	        {
 	        directory.Copy(iInstallDirectory->Des());
@@ -253,10 +265,15 @@
 
 void TServerResources::InitialiseL()
 	{
-#ifndef SYMBIAN_CENTREP_SUPPORT_MULTIROFS
-	iPersistsVersion = KPersistFormatVersion;	// Version 0 of persists
-#else
-	iPersistsVersion = KPersistFormatSupportsIndMetaIndicator;
+    
+#ifndef SYMBIAN_INCLUDE_APP_CENTRIC
+    #ifndef SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+        iPersistsVersion = KPersistFormatVersion;	// Version 1 of persists
+    #else
+        iPersistsVersion = KPersistFormatSupportsIndMetaIndicator; // Version 2 of persists. 
+    #endif	
+#else	
+    iPersistsVersion = KPersistFormatSupportsPma; // Version 3 of persists.	
 #endif	
 	User::LeaveIfError(iFs.Connect());
 
@@ -264,11 +281,18 @@
 	_LIT(KDriveMask, "_:");
 	TDriveName systemDrive(KDriveMask);
 	systemDrive[0] = 'A' + static_cast<TInt>(RFs::GetSystemDrive());
-		
-	_LIT(KRomDrive, "z:");			// This may not always be z:
-	_LIT(KPersistsDir, "persists\\");
+
+	_LIT(KRomDrive, "z:");                 // This may not always be z:
+	_LIT(KPersistsDir, "persists\\");      // Location of persisted keyspaces.
 	_LIT(KBURDir, "bur\\");
 
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+#ifdef SYMBIAN_CENTREP_PMA_TEST
+    _LIT(KProtectedDir, "protected\\");    // Location of the PMA keyspaces, when SYMBIAN_CENTREP_PMA_TEST is defined.            
+#else
+    _LIT(KPmaDrive, "g:");                 // Protected Memory Area (PMA) drive. 
+#endif
+#endif
 	
 	// File extensions
 	
@@ -318,10 +342,10 @@
 		{
 		User::Leave(r);		
 		}
+
 	//
 	// Writeable-drive data directory
 	//
-
 	iDataDirectory = HBufC::NewL(systemDrive.Length()+pathLen+KPersistsDir().Length());
 	ptr.Set(iDataDirectory->Des());
 	ptr.Append(systemDrive);
@@ -332,8 +356,60 @@
 	if(r!=KErrNone && r!=KErrAlreadyExists)
 		User::Leave(r);
 
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
 	//
-	// Writeable-drive backup/restore directory
+    // Protected Memory Area (PMA) drive cenrep directory.
+	//
+#ifdef SYMBIAN_CENTREP_PMA_TEST
+	// Should ONLY be used during development. 
+	iPmaDirectory = HBufC::NewL(systemDrive.Length()+pathLen+KPersistsDir().Length()+KProtectedDir().Length());
+    ptr.Set(iPmaDirectory->Des());
+	ptr.Append(systemDrive);
+    ptr.Append(path);    
+    ptr.Append(KPersistsDir);	
+    ptr.Append(KProtectedDir);		
+#else
+	// Should be used for production devices.
+    iPmaDirectory = HBufC::NewL(KPmaDrive().Length()+pathLen);
+    ptr.Set(iPmaDirectory->Des()); 
+    ptr.Append(KPmaDrive);
+    ptr.Append(path);    
+#endif
+
+    r = iFs.MkDirAll(*iPmaDirectory);
+    if(r!=KErrNone && r!=KErrAlreadyExists)
+        {
+#ifdef SYMBIAN_CENTREP_PMA_TEST
+        User::Leave(r); 
+#else
+        // Must panic the server if the drive is not available.
+        Panic(EPmaDriveNotAvailable);
+#endif     
+        }
+
+    // Generate PMA drive array.
+    TFileName searchFileFormat;
+    searchFileFormat.Append(*(TServerResources::iPmaDirectory));
+    searchFileFormat.Append(_L("????????.cre"));
+    CDir* entryList=NULL;
+    User::LeaveIfError(TServerResources::iFs.GetDir(searchFileFormat,KEntryAttNormal,ESortByName,entryList));
+    CleanupStack::PushL(entryList);
+    iPMADriveRepositories.Reset();
+    TInt fileCount = entryList->Count();
+    TLex parser;
+    TUint32 uidNum;
+    for (TInt i=0; i<fileCount; i++)
+        {
+        parser.Assign((*entryList)[i].iName.Left(8));
+        User::LeaveIfError(parser.Val(uidNum,EHex));
+        iPMADriveRepositories.InsertInOrder( TUid::Uid(uidNum), TLinearOrder<TUid>(TServerResources::CompareUids) );
+        }
+    CleanupStack::PopAndDestroy(entryList);
+
+#endif // SYMBIAN_INCLUDE_APP_CENTRIC
+	
+	//
+	// Writeable-drive backup/restore directory.
 	//
 	iBURDirectory = HBufC::NewL(systemDrive.Length()+pathLen+KBURDir().Length());
 	ptr.Set(iBURDirectory->Des());
@@ -373,8 +449,8 @@
 	CleanupStack::Pop();
 	
 	iOwnerIdLookUpTable.Reset();
+	}
 
-	}
 
 void TServerResources::Close()
 	{
@@ -383,6 +459,9 @@
 	delete iInstallDirectory;
 	delete iDataDirectory;
 	delete iRomDirectory;
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	delete iPmaDirectory;
+#endif
 	delete iBURDirectory;
 	delete iIniExt;
 	delete iCreExt;
@@ -393,12 +472,18 @@
 	iInstallDirectory=NULL;
 	iDataDirectory=NULL;
 	iRomDirectory=NULL;
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	iPmaDirectory=NULL;
+#endif
 	iBURDirectory=NULL;	
 	iIniExt=NULL;	
 	iCreExt=NULL;	
 	iTrnsExt=NULL;	
 	
 	iOwnerIdLookUpTable.Close() ;
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	iPMADriveRepositories.Close();
+#endif
 	}
 	
 TInt TServerResources::GetUid(TEntry& aEntry, TUid& aUid)
@@ -420,6 +505,18 @@
 	return KErrNone;
 	}
 
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+TInt TServerResources::CompareUids (const TUid& aUid1, const TUid& aUid2) 
+	{
+	if (aUid1.iUid < aUid2.iUid)
+		return -1 ;
+	else if (aUid1.iUid > aUid2.iUid)
+		return 1 ;
+	else
+		return 0 ;
+	}
+#endif
+
 TInt TOwnerIdMapping::CompareUids (const TOwnerIdMapping& aOwnerIdMapping1, const TOwnerIdMapping& aOwnerIdMapping2) 
 	{
 	if (aOwnerIdMapping1.iRepUid < aOwnerIdMapping2.iRepUid)
--- a/persistentstorage/centralrepository/cenrepsrv/srvres.h	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/cenrepsrv/srvres.h	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -55,7 +55,9 @@
 										   TUid aUid,   
 										   TCentRepLocation aLocation,
                                            TCentRepFileType aFileType);                                           
-
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	static TInt CompareUids (const TUid& aUid1, const TUid& aUid2);
+#endif
 	static TBool CentrepFileExistsL(TUid aUid, TCentRepLocation aLocation, TCentRepFileType aType);
 	static TBool CentrepFileExistsL(TUid aUid, TCentRepLocation aLocation);
 	static TTime CentrepFileTimeStampL(TUid aUid, TCentRepLocation aLocation);
@@ -68,7 +70,9 @@
 	static void  DeleteCentrepFileL(TUid aUid, TCentRepLocation aLocation, TCentRepFileType aType);
 public:
 	static RFs iFs;
-	
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	static HBufC* iPmaDirectory;
+#endif
 	static HBufC* iRomDirectory;
 	static HBufC* iDataDirectory;
 	static HBufC* iInstallDirectory;
@@ -77,7 +81,9 @@
 	static HBufC* iCreExt;
 	static HBufC* iTrnsExt;
 	static TUint8 iPersistsVersion;
-
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	static RArray<TUid> iPMADriveRepositories;
+#endif	
 	static RArray<TOwnerIdMapping> iOwnerIdLookUpTable;
 
 	static CRepositoryCacheManager* iCacheManager;
--- a/persistentstorage/centralrepository/common/inc/heaprepos.h	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/common/inc/heaprepos.h	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -41,7 +41,9 @@
 	inline void SetUid(TUid aUid){iUid=aUid;};
 	inline TUid Owner() {return iOwner ;} ;
 	inline void SetOwner(TUid aOwner){iOwner=aOwner;};
-	
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC  
+	inline TInt8 KeyspaceType() const {return iKeyspaceType;};
+#endif
 	inline RSettingsArray& SettingsArray();
 	inline RArray<TUint32>& DeletedSettingsArray();
 	inline RPointerArray<TSettingsAccessPolicy>& SinglePolicyArray();
@@ -119,7 +121,10 @@
 	RSettingsArray iSettings;
 	TUid iUid;
 	TUid iOwner;
-		
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC	
+	TUint8 iKeyspaceType;  // Protected (PMA) repository or not. 1 = Protected. 0 = Non-protected.
+#endif
+
 	//security policy
 	TSettingsAccessPolicy iDefaultPolicy;	
 	RPointerArray<TSettingsAccessPolicy> iSinglePolicies;
--- a/persistentstorage/centralrepository/common/inc/inifile.h	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/common/inc/inifile.h	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -57,6 +57,9 @@
 							RRangePolicyArray& aRangePolicies);
 	TInt ReadRdPolicyL(TSecurityPolicy& aReadPolicy);
 	TInt ReadWrPolicyL(TSecurityPolicy& aWritePolicy);
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	TInt CheckKeyspaceTypeSectionL();
+#endif
 	TInt ReadOwnerSectionL(TUint32 &aOwnerUID) ;
 	TInt ReadTimeStampSectionL(TTime &aTimeStamp) ;
 	TInt ReadDefaultMetaSecSectionL(TUint32& aDefaultMeta,
@@ -130,6 +133,9 @@
     void CommitL();
 
 	void WriteHeaderL();
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	void WriteKeyspaceTypeL(TInt8 iKeyspaceType);
+#endif
 	void WriteOwnerSectionL(TUid aOwner);
 	void WriteTimeStampL(const TTime& aTime);
 	void WriteMetaDataL(TUint32 aDefaultMeta,
--- a/persistentstorage/centralrepository/common/inc/panic.h	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/common/inc/panic.h	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -21,19 +21,22 @@
 
 enum TPanic
 	{
-	ESessionNotInitialised,			// 0 PanicClient only.
-	ESessionAlreadyInitialised,		// 1 PanicClient only.
-	ERepositoryNotFound,			// 2 Not used.
-	EStartAlreadyInTransaction,		// 3 PanicClient only.
-	ECommitNotInTransaction,		// 4 PanicClient only.
-	EBadSubsessionHandle,			// 5 PanicClient only.
-	EBadMessageNumber,				// 6 PanicClient only.
-	ECacheIniFileCorrupted			// 7 Panic server only (debug only).
+	ESessionNotInitialised,        // 0 PanicClient only.
+	ESessionAlreadyInitialised,    // 1 PanicClient only.
+	ERepositoryNotFound,           // 2 Not used.
+	EStartAlreadyInTransaction,    // 3 PanicClient only.
+	ECommitNotInTransaction,       // 4 PanicClient only.
+	EBadSubsessionHandle,          // 5 PanicClient only.
+	EBadMessageNumber,             // 6 PanicClient only.
+	ECacheIniFileCorrupted         // 7 Panic server only (debug only).
 #ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS	
-	,EMultiRofsPanicOldCre,
-	EMultiRofsPanicGlobalOverride,
-	EMultiRofsPanicTypeOveride,
-	EMultiRofsPanicIllegalRofs
+	,EMultiRofsPanicOldCre,        // 8
+	EMultiRofsPanicGlobalOverride, // 9
+	EMultiRofsPanicTypeOveride,    // 10
+	EMultiRofsPanicIllegalRofs     // 11
+#endif
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	,EPmaDriveNotAvailable         // 12 Panic server only. PMA drive is not available.
 #endif
 	};
 
--- a/persistentstorage/centralrepository/common/inc/setting.h	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/common/inc/setting.h	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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,6 +32,9 @@
 	friend class RSettingsArray;
 #if defined(SYMBIAN_CENTREP_SUPPORT_MULTIROFS) && defined(CENTRAL_REPOSITORY_SERVER_TESTING)	
 	friend class CenrepSrvOOMTest;
+    #if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+	friend class CenrepSrvPmaMultiRofsTest;
+    #endif 
 #endif	
 public:
 	enum TType { EInt	  = 0x00000000, 
--- a/persistentstorage/centralrepository/common/inc/srvdefs.h	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/common/inc/srvdefs.h	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -45,6 +45,18 @@
 	const TInt KErrMultiRofsTypeOverride=			-30003;
 	const TInt KErrMultiRofsIllegalRofs=			-30004;
 #endif
+
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+    const TUint8 KPersistFormatSupportsPma = 3;
+
+    enum  TKeyspaceType
+        {
+        ENonPMAKeyspace,
+        EPMAKeyspace
+        };
+    
+#endif
+	
 namespace NCentralRepositoryResources
 {
     enum  TCentRepLocation
@@ -52,6 +64,9 @@
         EPersists,
         EInstall,
         ERom
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+        ,EPma
+#endif
         };
     
     enum  TCentRepFileType
--- a/persistentstorage/centralrepository/common/src/cregen.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/common/src/cregen.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -88,6 +88,12 @@
 	{
 	aStream << aPersistVersion;
 	aStream << aRep.iUid ;
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+    if (aPersistVersion>=KPersistFormatSupportsPma)
+        {	
+        aStream << aRep.iKeyspaceType;
+        }
+#endif
 	aStream << aRep.iOwner ;
 	
 	TUint32 count=aRep.iSinglePolicies.Count();
@@ -146,6 +152,16 @@
  		User::Leave(KErrCorrupt);
  		}
   
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+    if (version>=KPersistFormatSupportsPma)
+        {   
+        aStream >> aRep.iKeyspaceType;
+        }
+    else
+        {
+        aRep.iKeyspaceType = ENonPMAKeyspace;
+        }
+#endif
 	aStream >> aRep.iOwner ;
  
 	TUint32 count;
--- a/persistentstorage/centralrepository/common/src/heaprepos.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/common/src/heaprepos.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -161,7 +161,7 @@
 	return &iDefaultPolicy;
 	}
 
-// this function saves idividual meta as well
+// This function saves individual meta as well.
 TInt CHeapRepository::ReadSettingSavePolicyL(CIniFileIn& aFile,TServerSetting& aSetting, TSettingsAccessPolicy* &aPolicy, TBool& aSingleMetaFound)
 	{
 	TBool singleReadPolicyFound;
@@ -221,6 +221,9 @@
 	CIniFileOut* out = CIniFileOut::NewLC(aFs,aOutFileName);
 
 	out->WriteHeaderL();
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	out->WriteKeyspaceTypeL(iKeyspaceType);
+#endif
 	out->WriteOwnerSectionL(iOwner);
 	out->WriteTimeStampL(iTimeStamp);
 	out->WriteMetaDataL(iDefaultMeta, iRangeMeta);
@@ -322,6 +325,9 @@
 void CHeapRepository::ResetContent()
 	{
 	iSettings.Reset();
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC 
+    iKeyspaceType = 0;
+#endif
 	iOwner = KNullUid;
 	iTimeStamp = TTime(0);
 
@@ -376,8 +382,14 @@
 	static_cast<RPointerArray<TSettingsAccessPolicy>*>(aPtr)->ResetAndDestroy();
 	}
 
+
 TInt CHeapRepository::ReloadContentExceptSettingsL(CIniFileIn& aIniFile)
 	{
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+    // Check for the "protected" keyword.
+    iKeyspaceType = aIniFile.CheckKeyspaceTypeSectionL();
+#endif
+    
 	// Look for an "owner" section
 	TUint32 uidValue(KNullUid.iUid);
 	TInt err = aIniFile.ReadOwnerSectionL(uidValue);
--- a/persistentstorage/centralrepository/common/src/inifile.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/common/src/inifile.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -35,6 +35,12 @@
 static const TInt KVersionLen = 7;
 static const TUint KCurrentVersion = 1;
 
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+//Repository (ini) file - type string (PMA/Protected keyspace)
+_LIT(KKeyspaceProtectedTag, "protected");
+static const TInt KKeyspaceProtectedTagLen = 9;
+#endif
+
 //Repository (ini) file - supported types names
 _LIT(KTypeInt, "int");
 _LIT(KTypeReal, "real");
@@ -673,6 +679,42 @@
 	return KErrNone;
 }
 
+
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+/**
+Check for a Keyspace Type Tag from ini file to see if it is a
+protected repository/keyspace or not. 
+
+@internalTechnology
+@return 1 if found.
+        KErrNone if not found.
+*/
+TInt CIniFileIn::CheckKeyspaceTypeSectionL()
+    {
+    TBuf<KBufLen> buf;
+
+    SkipComments();
+    
+    // We will need this section later to write the out file...
+    iLex.Mark(iMainSectionMark);
+    
+    iLex.Mark();
+    iLex.SkipCharacters();
+    
+    if( iLex.TokenLength()==KKeyspaceProtectedTagLen && ( buf.CopyLC(iLex.MarkedToken()), buf.Compare(KKeyspaceProtectedTag) == 0 ) )
+        {
+        // "protected" keyword found.
+        iLex.Mark(iMainSectionMark);
+        return EPMAKeyspace; // 1
+        }
+
+    // "protected" keyword not found.
+    iLex.UnGetToMark();
+    return ENonPMAKeyspace;  // 0
+    }
+#endif
+
+
 /**
 Read Owner section from ini file and extract owner UID 
 
@@ -2071,7 +2113,25 @@
 	buf.Append(KCrNl);
 	WriteLineL(buf);
 	}
-	
+
+
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+/**
+Writes "protected" to a repository file if it is a protected/PMA repository.
+*/
+void CIniFileOut::WriteKeyspaceTypeL(TInt8 iKeyspaceType)
+    {
+    if (iKeyspaceType == EPMAKeyspace)
+        {
+        WriteLineL(KKeyspaceProtectedTag());
+        TBuf<5> buf;
+        buf.Append(KCrNl);
+        WriteLineL(buf);
+        }
+    }
+#endif
+
+
 /**
 Writes owner section to repository file.
 */
--- a/persistentstorage/centralrepository/convtool/group/centrepconv.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/convtool/group/centrepconv.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -21,6 +21,11 @@
 */
 MACRO CENTREP_CONV_TOOL
 
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
 TARGET			centrepconv.exe
 TARGETTYPE		EXE
 
--- a/persistentstorage/centralrepository/group/CentralRepositoryTests.bat	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/CentralRepositoryTests.bat	Tue Oct 19 16:26:13 2010 +0100
@@ -23,6 +23,12 @@
 t_cenrep_transactions.exe
 t_cenrep_defects.exe
 t_cenrep_meta.exe
+t_cenrep_pma_array.exe
+t_cenrep_pma_bur.exe
+t_cenrep_pma_fota.exe
+t_cenrep_pma_oom.exe
+t_cenrep_pma_rfs.exe
+t_cenrep_pma_multirofs.exe
 t_cenrep_rfs.exe
 t_cenrep_back_rest.exe
 t_cenrep_back_rest_delete.exe
--- a/persistentstorage/centralrepository/group/CentralRepositoryTests.iby	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/CentralRepositoryTests.iby	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -43,6 +43,19 @@
 file=ABI_DIR\BUILD_DIR\t_cenrep_back_rest.exe			test\t_cenrep_back_rest.exe
 file=ABI_DIR\BUILD_DIR\t_cenrep_back_rest_delete.exe	test\t_cenrep_back_rest_delete.exe
 
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+file=ABI_DIR\BUILD_DIR\t_cenrep_pma_array.exe			test\t_cenrep_pma_array.exe
+file=ABI_DIR\BUILD_DIR\t_cenrep_pma_bur.exe             test\t_cenrep_pma_bur.exe
+file=ABI_DIR\BUILD_DIR\t_cenrep_pma_fota.exe			test\t_cenrep_pma_fota.exe
+file=ABI_DIR\BUILD_DIR\t_cenrep_pma_oom.exe 		    test\t_cenrep_pma_oom.exe
+file=ABI_DIR\BUILD_DIR\t_cenrep_pma_rfs.exe			    test\t_cenrep_pma_rfs.exe
+
+#ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+file=ABI_DIR\BUILD_DIR\t_cenrep_pma_multirofs.exe		test\t_cenrep_pma_multirofs.exe
+#endif // SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+
+#endif //SYMBIAN_INCLUDE_APP_CENTRIC
+
 // centrep test data
 #include <centreptestdata.iby>
 
--- a/persistentstorage/centralrepository/group/T_CenRepTrans.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/T_CenRepTrans.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -13,6 +13,11 @@
 // Description:
 //
 
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
 // This is only defined for OOM testing of caching functionality. 
 MACRO CACHE_OOM_TESTABILITY
 
--- a/persistentstorage/centralrepository/group/bld.inf	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/bld.inf	Tue Oct 19 16:26:13 2010 +0100
@@ -121,6 +121,8 @@
 ../test/11111112.txu            z:/private/10202be9/11111112.txu
 ../test/11111110.cri            z:/private/10202be9/11111110.cri
 ../test/11111110.cru            z:/private/10202be9/11111110.cru
+../test/11111113.txi            z:/private/10202be9/11111113.txi
+../test/11111113.txt            z:/private/10202be9/11111113.txt
 ../test/10057145.txt            z:/private/10202be9/10057145.txt
 ../test/10057522.txt            z:/private/10202be9/10057522.txt
 ../test/10057470.txt            z:/private/10202be9/10057470.txt
@@ -1440,6 +1442,111 @@
 #endif // SYMBIAN_CENTREP_SUPPORT_MULTIROFS
 
 
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+//Repository files with .pma indicates that they are meant to be in the PMA drive (not in ROM)
+
+../test/pma/pma_array_test/f1000001.txt   z:/private/10202be9/f1000001.txt
+../test/pma/pma_array_test/f1000002.txt   z:/private/10202be9/f1000002.txt
+../test/pma/pma_array_test/f1000003.txt   z:/private/10202be9/f1000003.txt
+../test/pma/pma_array_test/f1000004.txt   z:/private/10202be9/f1000004.txt
+../test/pma/pma_array_test/f1000001.pma   z:/private/10202be9/f1000001.pma
+../test/pma/pma_array_test/f1000002.pma   z:/private/10202be9/f1000002.pma
+../test/pma/pma_array_test/f1000003.pma   z:/private/10202be9/f1000003.pma
+../test/pma/pma_array_test/f1000004.pma   z:/private/10202be9/f1000004.pma
+../test/pma/pma_array_test/f1000005.txt   z:/private/10202be9/f1000005.txt
+../test/pma/pma_array_test/f1000006.txp   z:/private/10202be9/f1000006.txp
+
+../test/pma/pma_api_test/f1000111.txt   z:/private/10202be9/f1000111.txt
+../test/pma/pma_api_test/f1000112.cre   z:/private/10202be9/f1000112.cre
+../test/pma/pma_api_test/f1000113.pma   z:/private/10202be9/f1000113.pma
+../test/pma/pma_api_test/f1000114.pma   z:/private/10202be9/f1000114.pma
+../test/pma/pma_api_test/f1000115.crp   z:/private/10202be9/f1000115.crp
+../test/pma/pma_api_test/f1000116.txp   z:/private/10202be9/f1000116.txp
+../test/pma/pma_api_test/f1000117.txi   z:/private/10202be9/f1000117.txi
+../test/pma/pma_api_test/f1000118.cri   z:/private/10202be9/f1000118.cri
+
+../test/pma/pma_bur_test/f1000200.txt   z:/private/10202be9/f1000200.txt
+../test/pma/pma_bur_test/f1000200.crp   z:/private/10202be9/f1000200.crp
+../test/pma/pma_bur_test/f1000200.pma   z:/private/10202be9/f1000200.pma
+../test/pma/pma_bur_test/f1000201.txt   z:/private/102081e4/f1000201.txt
+../test/pma/pma_bur_test/f1000202.pma   z:/private/10202be9/f1000202.pma
+../test/pma/pma_bur_test/f1000203.crp   z:/private/10202be9/f1000203.crp
+../test/pma/pma_bur_test/f1000204.txi   z:/private/10202be9/f1000204.txi
+../test/pma/pma_bur_test/f1000205.cri   z:/private/10202be9/f1000205.cri
+
+../test/pma/pma_perf_test/f1000301.txt   z:/private/10202be9/f1000301.txt
+../test/pma/pma_perf_test/f1000310.pma   z:/private/10202be9/f1000310.pma
+../test/pma/pma_perf_test/f1000311.pma   z:/private/10202be9/f1000311.pma
+../test/pma/pma_perf_test/f1000312.pma   z:/private/10202be9/f1000312.pma
+../test/pma/pma_perf_test/f1000313.pma   z:/private/10202be9/f1000313.pma
+../test/pma/pma_perf_test/f1000314.pma   z:/private/10202be9/f1000314.pma
+../test/pma/pma_perf_test/f1000315.pma   z:/private/10202be9/f1000315.pma
+../test/pma/pma_perf_test/f1000316.pma   z:/private/10202be9/f1000316.pma
+../test/pma/pma_perf_test/f1000317.pma   z:/private/10202be9/f1000317.pma
+../test/pma/pma_perf_test/f1000318.pma   z:/private/10202be9/f1000318.pma
+../test/pma/pma_perf_test/f1000319.pma   z:/private/10202be9/f1000319.pma
+../test/pma/pma_perf_test/f100031a.pma   z:/private/10202be9/f100031a.pma
+../test/pma/pma_perf_test/f100031b.pma   z:/private/10202be9/f100031b.pma
+../test/pma/pma_perf_test/f100031c.pma   z:/private/10202be9/f100031c.pma
+../test/pma/pma_perf_test/f100031d.pma   z:/private/10202be9/f100031d.pma
+../test/pma/pma_perf_test/f100031e.pma   z:/private/10202be9/f100031e.pma
+../test/pma/pma_perf_test/f100031f.pma   z:/private/10202be9/f100031f.pma
+
+../test/pma/pma_rfs_test/f1000501.txt   z:/private/10202be9/f1000501.txt
+../test/pma/pma_rfs_test/f1000502.txi   z:/private/10202be9/f1000502.txi
+../test/pma/pma_rfs_test/f1000502.pma   z:/private/10202be9/f1000502.pma
+../test/pma/pma_rfs_test/f1000503.txt   z:/private/10202be9/f1000503.txt
+../test/pma/pma_rfs_test/f1000503.txi   z:/private/10202be9/f1000503.txi
+../test/pma/pma_rfs_test/f1000504.txt   z:/private/10202be9/f1000504.txt
+
+../test/pma/pma_fota_test/f1000601.txt   z:/private/10202be9/f1000601.txt
+../test/pma/pma_fota_test/f1000601.txi   z:/private/10202be9/f1000601.txi
+../test/pma/pma_fota_test/f1000601.pma   z:/private/10202be9/f1000601.pma
+../test/pma/pma_fota_test/f1000602.pma   z:/private/10202be9/f1000602.pma
+
+../test/pma/pma_oom_test/f1000700.cri   z:/private/10202be9/f1000700.cri
+../test/pma/pma_oom_test/f1000701.txt   z:/private/10202be9/f1000701.txt
+../test/pma/pma_oom_test/f1000701.txi   z:/private/10202be9/f1000701.txi
+../test/pma/pma_oom_test/f1000702.txt   z:/private/10202be9/f1000702.txt
+
+#ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+../test/pma/pma_multirofs_test/f1000900.txt         z:/private/10202be9/f1000900.txt
+../test/pma/pma_multirofs_test/f1000900.cre{01-00}  z:/private/10202be9/f1000900.cre[01-00]
+../test/pma/pma_multirofs_test/f1000900.txt{02-00}  z:/private/10202be9/f1000900.txt[02-00]
+../test/pma/pma_multirofs_test/f1000900.cre{03-00}  z:/private/10202be9/f1000900.cre[03-00]
+../test/pma/pma_multirofs_test/f1000901.txt         z:/private/10202be9/f1000901.txt
+../test/pma/pma_multirofs_test/f1000901.txt{01-00}  z:/private/10202be9/f1000901.txt[01-00]
+../test/pma/pma_multirofs_test/f1000902.cre         z:/private/10202be9/f1000902.cre
+../test/pma/pma_multirofs_test/f1000902.cre{01-00}  z:/private/10202be9/f1000902.cre[01-00]
+../test/pma/pma_multirofs_test/f1000903.txt         z:/private/10202be9/f1000903.txt
+../test/pma/pma_multirofs_test/f1000903.cre{01-00}  z:/private/10202be9/f1000903.cre[01-00]
+../test/pma/pma_multirofs_test/f1000904.cre         z:/private/10202be9/f1000904.cre
+../test/pma/pma_multirofs_test/f1000904.txt{01-00}  z:/private/10202be9/f1000904.txt[01-00]
+../test/pma/pma_multirofs_test/f1000905.txt         z:/private/10202be9/f1000905.txt
+../test/pma/pma_multirofs_test/f1000905.txt{01-00}  z:/private/10202be9/f1000905.txt[01-00]
+../test/pma/pma_multirofs_test/f1000906.txt         z:/private/10202be9/f1000906.txt
+../test/pma/pma_multirofs_test/f1000906.txt{01-00}  z:/private/10202be9/f1000906.txt[01-00]
+../test/pma/pma_multirofs_test/f1000907.cre         z:/private/10202be9/f1000907.cre
+../test/pma/pma_multirofs_test/f1000907.cre{01-00}  z:/private/10202be9/f1000907.cre[01-00]
+../test/pma/pma_multirofs_test/f1000908.cre         z:/private/10202be9/f1000908.cre
+../test/pma/pma_multirofs_test/f1000908.cre{01-00}  z:/private/10202be9/f1000908.cre[01-00]
+../test/pma/pma_multirofs_test/f1000909.cre         z:/private/10202be9/f1000909.cre
+../test/pma/pma_multirofs_test/f1000909.txt{01-00}  z:/private/10202be9/f1000909.txt[01-00]
+../test/pma/pma_multirofs_test/f100090a.cre         z:/private/10202be9/f100090a.cre
+../test/pma/pma_multirofs_test/f100090a.txt{01-00}  z:/private/10202be9/f100090a.txt[01-00]
+../test/pma/pma_multirofs_test/f100090b.txt         z:/private/10202be9/f100090b.txt
+../test/pma/pma_multirofs_test/f100090b.cre{01-00}  z:/private/10202be9/f100090b.cre[01-00]
+../test/pma/pma_multirofs_test/f100090c.txt         z:/private/10202be9/f100090c.txt
+../test/pma/pma_multirofs_test/f100090c.cre{01-00}  z:/private/10202be9/f100090c.cre[01-00]
+../test/pma/pma_multirofs_test/f100090d.txt         z:/private/10202be9/f100090d.txt
+../test/pma/pma_multirofs_test/f100090d.cre{01-00}  z:/private/10202be9/f100090d.cre[01-00]
+../test/pma/pma_multirofs_test/f100090d.txt{02-00}  z:/private/10202be9/f100090d.txt[02-00]
+../test/pma/pma_multirofs_test/f100090d.cre{03-00}  z:/private/10202be9/f100090d.cre[03-00]
+#endif // SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+
+#endif // SYMBIAN_INCLUDE_APP_CENTRIC
+
+
 PRJ_TESTMMPFILES
 t_cenrep_helper.mmp               support
 t_cenrep_cache.mmp
@@ -1453,6 +1560,20 @@
 t_cenrep_meta.mmp
 t_cenrep_rfs.mmp
 t_cenrep_back_rest.mmp
+
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+t_cenrep_pma_array.mmp
+t_cenrep_pma_bur.mmp
+t_cenrep_pma_fota.mmp
+t_cenrep_pma_oom.mmp
+t_cenrep_pma_rfs.mmp
+
+#ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+t_cenrep_pma_multirofs.mmp
+#endif // SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+
+#endif // SYMBIAN_INCLUDE_APP_CENTRIC
+
 #ifdef CENTREP_MW_TESTS
     t_cenrep_back_rest_defect.mmp       manual
 #endif // CENTREP_MW_TESTS
--- a/persistentstorage/centralrepository/group/cenrepsrv.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/cenrepsrv.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -13,6 +13,10 @@
 // Description:
 //
 
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
 
 EPOCFIXEDPROCESS
 // Increase heap size to allow messaging tests to pass
--- a/persistentstorage/centralrepository/group/centreptestdata.iby	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/centreptestdata.iby	Tue Oct 19 16:26:13 2010 +0100
@@ -68,6 +68,8 @@
 data=DATAZ_\private\10202be9\11111112.txu PRIVATE\10202BE9\11111112.txu
 data=DATAZ_\private\10202be9\11111110.cri PRIVATE\10202BE9\11111110.cri
 data=DATAZ_\private\10202be9\11111110.cru PRIVATE\10202BE9\11111110.cru
+data=DATAZ_\private\10202be9\11111113.txi PRIVATE\10202BE9\11111113.txi
+data=DATAZ_\private\10202be9\11111113.txt PRIVATE\10202BE9\11111113.txt
 data=DATAZ_\private\10202be9\00056194.txt PRIVATE\10202BE9\00056194.txt
 data=DATAZ_\private\10202be9\10057145.txt PRIVATE\10202BE9\10057145.txt
 data=DATAZ_\private\10202be9\00057778.txt PRIVATE\10202BE9\00057778.txt
@@ -102,6 +104,107 @@
 data=DATAZ_\private\10202be9\babababa.cre PRIVATE\10202BE9\babababa.cre
 data=DATAZ_\PRIVATE\10202BE9\cccccc99.cre PRIVATE\10202BE9\cccccc99.cre
 
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+data=DATAZ_\PRIVATE\10202BE9\f1000001.txt PRIVATE\10202BE9\f1000001.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000002.txt PRIVATE\10202BE9\f1000002.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000003.txt PRIVATE\10202BE9\f1000003.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000004.txt PRIVATE\10202BE9\f1000004.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000001.pma PRIVATE\10202BE9\f1000001.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000002.pma PRIVATE\10202BE9\f1000002.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000003.pma PRIVATE\10202BE9\f1000003.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000004.pma PRIVATE\10202BE9\f1000004.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000005.txt PRIVATE\10202BE9\f1000005.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000006.txp PRIVATE\10202BE9\f1000006.txp
+
+data=DATAZ_\PRIVATE\10202BE9\f1000111.txt PRIVATE\10202BE9\f1000111.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000112.cre PRIVATE\10202BE9\f1000112.cre
+data=DATAZ_\PRIVATE\10202BE9\f1000113.pma PRIVATE\10202BE9\f1000113.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000114.pma PRIVATE\10202BE9\f1000114.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000115.crp PRIVATE\10202BE9\f1000115.crp
+data=DATAZ_\PRIVATE\10202BE9\f1000116.txp PRIVATE\10202BE9\f1000116.txp
+data=DATAZ_\PRIVATE\10202BE9\f1000117.txi PRIVATE\10202BE9\f1000117.txi
+data=DATAZ_\PRIVATE\10202BE9\f1000118.cri PRIVATE\10202BE9\f1000118.cri
+
+data=DATAZ_\PRIVATE\102081E4\f1000201.txt PRIVATE\102081E4\f1000201.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000202.pma PRIVATE\10202BE9\f1000202.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000203.crp PRIVATE\10202BE9\f1000203.crp
+data=DATAZ_\PRIVATE\10202BE9\f1000204.txi PRIVATE\10202BE9\f1000204.txi
+data=DATAZ_\PRIVATE\10202BE9\f1000205.cri PRIVATE\10202BE9\f1000205.cri
+
+data=DATAZ_\PRIVATE\10202BE9\f1000301.txt PRIVATE\10202BE9\f1000301.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000310.pma PRIVATE\10202BE9\f1000310.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000311.pma PRIVATE\10202BE9\f1000311.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000312.pma PRIVATE\10202BE9\f1000312.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000313.pma PRIVATE\10202BE9\f1000313.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000314.pma PRIVATE\10202BE9\f1000314.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000315.pma PRIVATE\10202BE9\f1000315.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000316.pma PRIVATE\10202BE9\f1000316.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000317.pma PRIVATE\10202BE9\f1000317.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000318.pma PRIVATE\10202BE9\f1000318.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000319.pma PRIVATE\10202BE9\f1000319.pma
+data=DATAZ_\PRIVATE\10202BE9\f100031a.pma PRIVATE\10202BE9\f100031a.pma
+data=DATAZ_\PRIVATE\10202BE9\f100031b.pma PRIVATE\10202BE9\f100031b.pma
+data=DATAZ_\PRIVATE\10202BE9\f100031c.pma PRIVATE\10202BE9\f100031c.pma
+data=DATAZ_\PRIVATE\10202BE9\f100031d.pma PRIVATE\10202BE9\f100031d.pma
+data=DATAZ_\PRIVATE\10202BE9\f100031e.pma PRIVATE\10202BE9\f100031e.pma
+data=DATAZ_\PRIVATE\10202BE9\f100031f.pma PRIVATE\10202BE9\f100031f.pma
+
+data=DATAZ_\PRIVATE\10202BE9\f1000501.txt PRIVATE\10202BE9\f1000501.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000502.txi PRIVATE\10202BE9\f1000502.txi
+data=DATAZ_\PRIVATE\10202BE9\f1000502.pma PRIVATE\10202BE9\f1000502.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000503.txt PRIVATE\10202BE9\f1000503.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000503.txi PRIVATE\10202BE9\f1000503.txi
+data=DATAZ_\PRIVATE\10202BE9\f1000504.txt PRIVATE\10202BE9\f1000504.txt
+
+data=DATAZ_\PRIVATE\10202BE9\f1000601.txt PRIVATE\10202BE9\f1000601.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000601.txi PRIVATE\10202BE9\f1000601.txi
+data=DATAZ_\PRIVATE\10202BE9\f1000601.pma PRIVATE\10202BE9\f1000601.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000602.pma PRIVATE\10202BE9\f1000602.pma
+
+data=DATAZ_\PRIVATE\10202BE9\f1000700.cri PRIVATE\10202BE9\f1000700.cri
+data=DATAZ_\PRIVATE\10202BE9\f1000701.txt PRIVATE\10202BE9\f1000701.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000701.txi PRIVATE\10202BE9\f1000701.txi
+data=DATAZ_\PRIVATE\10202BE9\f1000702.txt PRIVATE\10202BE9\f1000702.txt
+
+#ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+data=DATAZ_\PRIVATE\10202BE9\f1000900.txt         PRIVATE\10202BE9\f1000900.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000900.cre[01-00]  PRIVATE\10202BE9\f1000900.cre[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f1000900.txt[02-00]  PRIVATE\10202BE9\f1000900.txt[02-00]
+data=DATAZ_\PRIVATE\10202BE9\f1000900.cre[03-00]  PRIVATE\10202BE9\f1000900.cre[03-00]
+data=DATAZ_\PRIVATE\10202BE9\f1000901.txt         PRIVATE\10202BE9\f1000901.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000901.txt[01-00]  PRIVATE\10202BE9\f1000901.txt[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f1000902.cre         PRIVATE\10202BE9\f1000902.cre
+data=DATAZ_\PRIVATE\10202BE9\f1000902.cre[01-00]  PRIVATE\10202BE9\f1000902.cre[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f1000903.txt         PRIVATE\10202BE9\f1000903.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000903.cre[01-00]  PRIVATE\10202BE9\f1000903.cre[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f1000904.cre         PRIVATE\10202BE9\f1000904.cre
+data=DATAZ_\PRIVATE\10202BE9\f1000904.txt[01-00]  PRIVATE\10202BE9\f1000904.txt[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f1000905.txt         PRIVATE\10202BE9\f1000905.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000905.txt[01-00]  PRIVATE\10202BE9\f1000905.txt[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f1000906.txt         PRIVATE\10202BE9\f1000906.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000906.txt[01-00]  PRIVATE\10202BE9\f1000906.txt[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f1000907.cre         PRIVATE\10202BE9\f1000907.cre
+data=DATAZ_\PRIVATE\10202BE9\f1000907.cre[01-00]  PRIVATE\10202BE9\f1000907.cre[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f1000908.cre         PRIVATE\10202BE9\f1000908.cre
+data=DATAZ_\PRIVATE\10202BE9\f1000908.cre[01-00]  PRIVATE\10202BE9\f1000908.cre[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f1000909.cre         PRIVATE\10202BE9\f1000909.cre
+data=DATAZ_\PRIVATE\10202BE9\f1000909.txt[01-00]  PRIVATE\10202BE9\f1000909.txt[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f100090a.cre         PRIVATE\10202BE9\f100090a.cre
+data=DATAZ_\PRIVATE\10202BE9\f100090a.txt[01-00]  PRIVATE\10202BE9\f100090a.txt[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f100090b.txt         PRIVATE\10202BE9\f100090b.txt
+data=DATAZ_\PRIVATE\10202BE9\f100090b.cre[01-00]  PRIVATE\10202BE9\f100090b.cre[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f100090c.txt         PRIVATE\10202BE9\f100090c.txt
+data=DATAZ_\PRIVATE\10202BE9\f100090c.cre[01-00]  PRIVATE\10202BE9\f100090c.cre[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f100090d.txt         PRIVATE\10202BE9\f100090d.txt
+data=DATAZ_\PRIVATE\10202BE9\f100090d.cre[01-00]  PRIVATE\10202BE9\f100090d.cre[01-00]
+data=DATAZ_\PRIVATE\10202BE9\f100090d.txt[02-00]  PRIVATE\10202BE9\f100090d.txt[02-00]
+data=DATAZ_\PRIVATE\10202BE9\f100090d.cre[03-00]  PRIVATE\10202BE9\f100090d.cre[03-00]
+
+#endif // SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+
+#endif // SYMBIAN_INCLUDE_APP_CENTRIC
+
+
 #ifndef __CENTRALREPOSITORYTECHVIEWRTESTS_IBY__
 data=DATAZ_\PRIVATE\10202BE9\babababa.txt PRIVATE\10202BE9\babababa.txt
 #ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS
--- a/persistentstorage/centralrepository/group/t_cenrep.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/t_cenrep.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -13,7 +13,7 @@
 // Description:
 //
 
-CAPABILITY AllFiles ReadDeviceData WriteDeviceData
+CAPABILITY AllFiles ReadDeviceData WriteDeviceData PowerMgmt
 VENDORID 0x70000001
 
 SMPSAFE
--- a/persistentstorage/centralrepository/group/t_cenrep_back_rest.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/t_cenrep_back_rest.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -13,6 +13,11 @@
 // Description:
 //
 
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
 // This is only defined for OOM testing of caching functionality. 
 MACRO CACHE_OOM_TESTABILITY
 
--- a/persistentstorage/centralrepository/group/t_cenrep_back_rest_defect.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/t_cenrep_back_rest_defect.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -13,6 +13,11 @@
 // Description:
 //
 
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
 CAPABILITY AllFiles ReadDeviceData WriteDeviceData PowerMgmt
 VENDORID 0x70000001
 
--- a/persistentstorage/centralrepository/group/t_cenrep_back_rest_delete.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/t_cenrep_back_rest_delete.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -13,6 +13,11 @@
 // Description:
 //
 
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
 CAPABILITY AllFiles ReadDeviceData WriteDeviceData
 VENDORID 0x70000001
 
--- a/persistentstorage/centralrepository/group/t_cenrep_cache.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/t_cenrep_cache.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -13,6 +13,11 @@
 // Description:
 //
 
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
 // This is only defined for OOM testing of caching functionality. 
 MACRO CACHE_OOM_TESTABILITY
 
--- a/persistentstorage/centralrepository/group/t_cenrep_defects.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/t_cenrep_defects.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -13,6 +13,11 @@
 // Description:
 //
 
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
 CAPABILITY AllFiles ReadDeviceData WriteDeviceData PowerMgmt
 VENDORID 0x70000001
 
--- a/persistentstorage/centralrepository/group/t_cenrep_fotaUT.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/t_cenrep_fotaUT.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -13,6 +13,11 @@
 // Description:
 //
 
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
 // This is only defined for OOM testing of caching functionality. 
 MACRO CACHE_OOM_TESTABILITY
 
--- a/persistentstorage/centralrepository/group/t_cenrep_perf.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/t_cenrep_perf.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -16,6 +16,10 @@
 TARGET			t_cenrep_perf.exe
 TARGETTYPE		exe
 
+CAPABILITY      AllFiles PowerMgmt
+
+VENDORID        0x70000001
+
 USERINCLUDE 	.
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
@@ -28,9 +32,6 @@
 LIBRARY			bafl.lib 
 LIBRARY			hal.lib
 LIBRARY			estor.lib 
-
-CAPABILITY		AllFiles
-
-VENDORID		0x70000001
+LIBRARY         t_cenrep_helper.lib
 
 SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/group/t_cenrep_pma_array.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,77 @@
+// 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 macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
+// This is only defined for OOM testing of caching functionality.
+CAPABILITY AllFiles
+VENDORID 0x70000001
+
+SMPSAFE
+
+UID 0x101FB5A8 0x10202BE9
+
+TARGET      t_cenrep_pma_array.exe
+TARGETTYPE  exe
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+USERINCLUDE ../include
+USERINCLUDE ../cenrepsrv
+USERINCLUDE ../common/inc
+USERINCLUDE ../test
+
+SOURCEPATH  ../test
+SOURCE      t_cenrep_pma_array.cpp
+
+SOURCEPATH  ../common/src
+SOURCE      cregen.cpp
+SOURCE      datatype.cpp
+SOURCE      inifile.cpp
+SOURCE      heaprepos.cpp
+
+SOURCEPATH  ../cenrepsrv
+SOURCE      backup.cpp
+SOURCE      cachemgr.cpp
+SOURCE      clientrequest.cpp
+SOURCE      install.cpp
+SOURCE      obsrvr_noc.cpp
+SOURCE      srvres.cpp
+SOURCE      rstrepos.cpp
+SOURCE      sessmgr.cpp
+SOURCE      sessnotf.cpp
+SOURCE      shrepos.cpp
+SOURCE      srvrepos_noc.cpp
+SOURCE      srvsess.cpp
+SOURCE      srvsubsess.cpp
+
+SOURCEPATH  ../common/src
+SOURCE      panic.cpp 
+
+LIBRARY     euser.lib 
+LIBRARY     efsrv.lib 
+LIBRARY     charconv.lib
+LIBRARY     estor.lib
+LIBRARY     bafl.lib
+LIBRARY     bsulinifile.lib
+LIBRARY     estlib.lib
+LIBRARY     t_cenrep_helper.lib
+LIBRARY     abclient.lib
+#ifdef SYMBIAN_BAFL_SYSUTIL
+    LIBRARY sysutil.lib
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/group/t_cenrep_pma_bur.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,57 @@
+// 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 macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
+CAPABILITY AllFiles ReadDeviceData WriteDeviceData
+VENDORID 0x70000001
+
+SMPSAFE
+
+// Use this UID instead of standard cenrepserv.exe UID to avoid
+// clashes by using a different data cage
+UID 0 0x102081E4
+
+target t_cenrep_pma_bur.exe
+targettype exe
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+OS_LAYER_LIBC_SYSTEMINCLUDE 
+
+USERINCLUDE ../cenrepsrv ../common/inc
+
+SOURCEPATH ../test
+SOURCE t_cenrep_pma_bur.cpp testabclient.cpp
+SOURCEPATH ../cenrepsrv
+SOURCE backup.cpp sessnotf.cpp shrepos.cpp srvres.cpp
+SOURCE clientrequest.cpp cachemgr.cpp rstrepos.cpp
+SOURCE obsrvr_noc.cpp srvrepos_noc.cpp
+SOURCEPATH ../common/src
+SOURCE cregen.cpp datatype.cpp inifile.cpp panic.cpp heaprepos.cpp  
+
+LIBRARY euser.lib
+LIBRARY efsrv.lib
+LIBRARY charconv.lib
+LIBRARY estor.lib
+LIBRARY bafl.lib
+LIBRARY	bsulinifile.lib
+#ifdef SYMBIAN_BAFL_SYSUTIL
+LIBRARY sysutil.lib
+#endif
+LIBRARY estlib.lib
+LIBRARY t_cenrep_helper.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/group/t_cenrep_pma_fota.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,71 @@
+// 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 macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
+// This is only defined for OOM testing of caching functionality. 
+MACRO CACHE_OOM_TESTABILITY
+
+//This is only defined for this test to allow direct access to CServerRepository/CSharedRepository private members
+MACRO FOTA_UNIT_TESTING
+
+CAPABILITY ALL -Tcb
+VENDORID 0x70000001
+
+SMPSAFE
+
+#define __INCLUDE_CAPABILITY_NAMES__
+
+UID 0x101FB5A8 0x10202BE9
+
+TARGET		t_cenrep_pma_fota.exe
+TARGETTYPE	exe
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+OS_LAYER_LIBC_SYSTEMINCLUDE
+
+USERINCLUDE	../include
+USERINCLUDE	../cenrepsrv
+USERINCLUDE	../common/inc
+
+SOURCEPATH	../test
+SOURCE	t_cenrep_pma_fota.cpp
+
+SOURCEPATH	../cenrepsrv
+SOURCE 	cachemgr.cpp 
+SOURCE 	shrepos.cpp srvres.cpp
+SOURCE 	sessnotf.cpp
+SOURCE  clientrequest.cpp rstrepos.cpp
+SOURCE 	obsrvr_noc.cpp srvrepos_noc.cpp 
+
+SOURCEPATH ../common/src
+SOURCE 	cregen.cpp datatype.cpp inifile.cpp panic.cpp heaprepos.cpp 
+
+LIBRARY		euser.lib 
+LIBRARY		ecom.lib
+LIBRARY		efsrv.lib 
+LIBRARY		charconv.lib
+LIBRARY		estor.lib
+LIBRARY		bafl.lib
+LIBRARY		bsulinifile.lib
+LIBRARY		estlib.lib
+LIBRARY     t_cenrep_helper.lib
+#ifdef SYMBIAN_BAFL_SYSUTIL
+LIBRARY 	sysutil.lib
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/group/t_cenrep_pma_multirofs.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,59 @@
+// 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:
+//
+
+target 			t_cenrep_pma_multirofs.exe
+targettype 		exe
+
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
+// This is only defined for OOM testing of caching functionality. 
+MACRO CACHE_OOM_TESTABILITY
+
+CAPABILITY AllFiles ReadDeviceData WriteDeviceData
+
+SMPSAFE
+
+MACRO CENTRAL_REPOSITORY_SERVER_TESTING
+
+UID 0 0x10202BE9
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+OS_LAYER_LIBC_SYSTEMINCLUDE 
+userinclude		../include
+userinclude		../cenrepsrv
+userinclude		../common/inc
+
+SOURCEPATH	../test
+SOURCE		t_cenrep_pma_multirofs.cpp
+SOURCEPATH 	../common/src
+SOURCE 		cregen.cpp datatype.cpp inifile.cpp panic.cpp heaprepos.cpp 
+SOURCEPATH 	../cenrepsrv
+SOURCE 		backup.cpp cachemgr.cpp clientrequest.cpp install.cpp obsrvr_noc.cpp srvres.cpp
+SOURCE 		rstrepos.cpp sessmgr.cpp sessnotf.cpp shrepos.cpp srvrepos_noc.cpp srvsess.cpp srvsubsess.cpp
+
+#if defined(__CENTREP_SERVER_MEMTEST__) || defined(__CENTREP_SERVER_PERFTEST__)
+SOURCE srvperf.cpp
+#endif
+
+LIBRARY euser.lib efsrv.lib charconv.lib estor.lib bsulinifile.lib bafl.lib
+LIBRARY abclient.lib
+LIBRARY estlib.lib
+LIBRARY t_cenrep_helper.lib
+#ifdef SYMBIAN_BAFL_SYSUTIL
+LIBRARY sysutil.lib
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/group/t_cenrep_pma_oom.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,59 @@
+// 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:
+//
+
+target 			t_cenrep_pma_oom.exe
+targettype 		exe
+
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
+// This is only defined for OOM testing of caching functionality. 
+MACRO CACHE_OOM_TESTABILITY
+
+CAPABILITY AllFiles ReadDeviceData WriteDeviceData PowerMgmt
+
+SMPSAFE
+
+MACRO CENTRAL_REPOSITORY_SERVER_TESTING
+
+UID 0 0x10202BE9
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+OS_LAYER_LIBC_SYSTEMINCLUDE 
+userinclude		../include
+userinclude		../cenrepsrv
+userinclude		../common/inc
+
+SOURCEPATH	../test
+SOURCE		t_cenrep_pma_oom.cpp
+SOURCEPATH 	../common/src
+SOURCE 		cregen.cpp datatype.cpp inifile.cpp panic.cpp heaprepos.cpp 
+SOURCEPATH 	../cenrepsrv
+SOURCE 		backup.cpp cachemgr.cpp clientrequest.cpp install.cpp obsrvr_noc.cpp srvres.cpp
+SOURCE 		rstrepos.cpp sessmgr.cpp sessnotf.cpp shrepos.cpp srvrepos_noc.cpp srvsess.cpp srvsubsess.cpp
+
+#if defined(__CENTREP_SERVER_MEMTEST__) || defined(__CENTREP_SERVER_PERFTEST__)
+SOURCE srvperf.cpp
+#endif
+
+LIBRARY euser.lib efsrv.lib charconv.lib estor.lib bsulinifile.lib bafl.lib
+LIBRARY abclient.lib
+LIBRARY estlib.lib
+LIBRARY t_cenrep_helper.lib
+#ifdef SYMBIAN_BAFL_SYSUTIL
+LIBRARY sysutil.lib
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/group/t_cenrep_pma_rfs.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,29 @@
+// 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:
+//
+
+CAPABILITY AllFiles ReadDeviceData WriteDeviceData PowerMgmt
+VENDORID 0x70000001
+
+SMPSAFE
+
+target t_cenrep_pma_rfs.exe
+targettype exe
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+SOURCEPATH ../test
+SOURCE t_cenrep_pma_rfs.cpp
+
+LIBRARY euser.lib efsrv.lib centralrepository.lib t_cenrep_helper.lib
--- a/persistentstorage/centralrepository/group/t_oomcenrepsrv.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/group/t_oomcenrepsrv.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -13,6 +13,11 @@
 // Description:
 //
 
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
 target 			t_oomcenrepsrv.exe
 targettype 		exe
 
Binary file persistentstorage/centralrepository/test/11111113.txi has changed
Binary file persistentstorage/centralrepository/test/11111113.txt has changed
--- a/persistentstorage/centralrepository/test/multirofs/group/t_cenrep_preq2112u.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/multirofs/group/t_cenrep_preq2112u.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -13,6 +13,11 @@
 // Description:
 //
 
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
 CAPABILITY AllFiles ReadDeviceData WriteDeviceData PowerMgmt
 VENDORID 0x70000001
 
--- a/persistentstorage/centralrepository/test/multirofs/src/t_cenrep_preq2112u.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/multirofs/src/t_cenrep_preq2112u.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -27,6 +27,10 @@
 
 RTest TheTest(_L("Central Repository Defect Tests"));
 
+//Burst rate for __UHEAP_SETBURSTFAIL
+#ifdef _DEBUG
+const TInt KBurstRate = 20;
+#endif
 
 ///////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////////
@@ -270,14 +274,14 @@
 		RThread().HandleCount(startProcessHandleCount, startThreadHandleCount);
 
 		if (aOOMMode)
-			__UHEAP_SETFAIL(RHeap::EDeterministic, ++tryCount);
+			__UHEAP_SETBURSTFAIL(RAllocator::EBurstFailNext, ++tryCount, KBurstRate);
 
 		TRAP(err, TServerResources::iObserver->ProcessMultiRofsListL(*fileList));
 		if (err!=KErrNoMemory)
 			TEST(err==KErrNone);
 
 		if (aOOMMode)
-			__UHEAP_SETFAIL(RHeap::ENone, 0);
+			__UHEAP_RESET;
 
 		// check that no handles have leaked
 		TInt endProcessHandleCount;
Binary file persistentstorage/centralrepository/test/pma/pma_api_test/f1000111.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_api_test/f1000112.cre has changed
Binary file persistentstorage/centralrepository/test/pma/pma_api_test/f1000113.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_api_test/f1000114.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_api_test/f1000115.crp has changed
Binary file persistentstorage/centralrepository/test/pma/pma_api_test/f1000116.txp has changed
Binary file persistentstorage/centralrepository/test/pma/pma_api_test/f1000117.txi has changed
Binary file persistentstorage/centralrepository/test/pma/pma_api_test/f1000118.cri has changed
Binary file persistentstorage/centralrepository/test/pma/pma_array_test/f1000001.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_array_test/f1000001.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_array_test/f1000002.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_array_test/f1000002.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_array_test/f1000003.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_array_test/f1000003.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_array_test/f1000004.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_array_test/f1000004.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_array_test/f1000005.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_array_test/f1000006.txp has changed
Binary file persistentstorage/centralrepository/test/pma/pma_bur_test/f1000200.crp has changed
Binary file persistentstorage/centralrepository/test/pma/pma_bur_test/f1000200.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_bur_test/f1000200.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_bur_test/f1000201.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_bur_test/f1000202.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_bur_test/f1000203.crp has changed
Binary file persistentstorage/centralrepository/test/pma/pma_bur_test/f1000204.txi has changed
Binary file persistentstorage/centralrepository/test/pma/pma_bur_test/f1000205.cri has changed
Binary file persistentstorage/centralrepository/test/pma/pma_fota_test/f1000601.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_fota_test/f1000601.txi has changed
Binary file persistentstorage/centralrepository/test/pma/pma_fota_test/f1000601.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_fota_test/f1000602.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000900.cre{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000900.cre{03-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000900.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000900.txt{02-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000901.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000901.txt{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000902.cre has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000902.cre{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000903.cre{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000903.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000904.cre has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000904.txt{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000905.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000905.txt{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000906.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000906.txt{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000907.cre has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000907.cre{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000908.cre has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000908.cre{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000909.cre has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f1000909.txt{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090a.cre has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090a.txt{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090b.cre{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090b.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090c.cre{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090c.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090d.cre{01-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090d.cre{03-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090d.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_multirofs_test/f100090d.txt{02-00} has changed
Binary file persistentstorage/centralrepository/test/pma/pma_oom_test/f1000700.cri has changed
Binary file persistentstorage/centralrepository/test/pma/pma_oom_test/f1000701.txi has changed
Binary file persistentstorage/centralrepository/test/pma/pma_oom_test/f1000701.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_oom_test/f1000702.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f1000301.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f1000310.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f1000311.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f1000312.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f1000313.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f1000314.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f1000315.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f1000316.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f1000317.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f1000318.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f1000319.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f100031a.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f100031b.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f100031c.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f100031d.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f100031e.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_perf_test/f100031f.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_rfs_test/f1000501.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_rfs_test/f1000502.pma has changed
Binary file persistentstorage/centralrepository/test/pma/pma_rfs_test/f1000502.txi has changed
Binary file persistentstorage/centralrepository/test/pma/pma_rfs_test/f1000503.txi has changed
Binary file persistentstorage/centralrepository/test/pma/pma_rfs_test/f1000503.txt has changed
Binary file persistentstorage/centralrepository/test/pma/pma_rfs_test/f1000504.txt has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/pma/readme.txt	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,8 @@
+PMA test data file extension guideline:
+
+.pma = (renamed to .cre at destination) the test file will be copied to the PMA drive during the test
+.crp = (renamed to .cre at destination) the test file will be copied to the persists folder during the test
+.cri = (renamed to .cre at destination) the test file will be copied to the install folder during the test
+
+.txp = (renamed to .txt at destination) the test file will be copied to the PMA drive during the test
+.txi = (renamed to .txt at destination) the test file will be copied to the install folder during the test
\ No newline at end of file
--- a/persistentstorage/centralrepository/test/t_cenrep.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/t_cenrep.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -23,7 +23,9 @@
 
 using namespace NCentralRepositoryConstants;
 
-RTest TheTest(_L("Central Repository Tests"));
+RTest TheTest(_L("t_cenrep.exe"));
+
+_LIT( KCentralRepositoryServerName, "Centralrepositorysrv");
 
 TBool OomTesting;
 
@@ -31,10 +33,22 @@
 const TUid KUidCreTestRepository1 = { 0x22222221 };
 const TUid KUidTestRepository2 = { 0x00000002 };
 
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+const TUid KUidTxtPMATestRepos1   = { 0xf1000111 }; //ROM PMA txt repos
+const TUid KUidCrePMATestRepos1   = { 0xf1000112 }; //ROM PMA cre repos
+const TUid KUidCrePMAinPMADriveTestRepos1   = { 0xf1000113 }; //PMA drive cre repos
+const TUid KUidCorruptRepos1      = { 0xf1000114 }; //Non-PMA Repos in PMA drive
+const TUid KUidCorruptRepos2      = { 0xf1000115 }; //PMA Repos in persist folder
+const TUid KUidTxtInPMADriveRepos1 = { 0xf1000116 }; //TXT Repos in PMA drive
+const TUid KUidPmaTxtInInstallDir1 = { 0xf1000117 }; //TXT Repos in PMA drive
+const TUid KUidPmaCreInInstallDir1 = { 0xf1000118 }; //TXT Repos in PMA drive
+#endif
+
+
 const TUid KUidCorruptRepository = { 0x00000003 };
 const TUid KUidResetTestRepository = { 0x00000004 };
 
-const TUid KUidDriveCRepository = { 0x00000010 };
+const TUid KUidDriveZRepository = { 0x00000010 };
 
 const TUid KUidDriveCOnlyRepository = { 0x00000013 };
 
@@ -102,21 +116,24 @@
 
 ///////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////////
-//Test macroses and functions
+//Test macros and functions
 
 LOCAL_C void CheckL(TInt aValue, TInt aLine)
 	{
 	if(!aValue)
 		{
 		CleanupCDriveL();
+		User::LeaveIfError(KillProcess(KCentralRepositoryServerName));
 		TheTest(EFalse, aLine);
 		}
 	}
+
 LOCAL_C void CheckL(TInt aValue, TInt aExpected, TInt aLine)
 	{
 	if(aValue != aExpected)
 		{
 		CleanupCDriveL();
+		User::LeaveIfError(KillProcess(KCentralRepositoryServerName));
 		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
@@ -157,7 +174,7 @@
 //previous tests
 LOCAL_C void ResetTestRepositoryL()
 	{
-	CRepository* repository;
+    CRepository* repository(NULL);
 
 	User::LeaveIfNull(repository = CRepository::NewLC(KUidTestRepository1));
 	TInt r = repository->Reset();
@@ -170,8 +187,6 @@
 //back from the Z drive to the c drive
 LOCAL_C void RestoreTestFilesL()
 	{
-	//Delete all files from C:\\private\\10202BE9\\persists\\ dir
-	//and C:\\private\\10202BE9\\ dir
 	CleanupCDriveL();
 
 	RFs fs;
@@ -181,8 +196,9 @@
 	CFileMan* fm = CFileMan::NewL(fs);
 	CleanupStack::PushL(fm);
 
-//	_LIT(KPersistTargetPath, "c:\\private\\10202BE9\\persists\\*.txt");
-	_LIT(KPersistTargetPath, "z:\\private\\10202BE9\\*.txt");
+	// The target path's drive will be patched with the correct
+	// system drive in CopyTestFilesL
+	_LIT(KPersistTargetPath, "C:\\private\\10202BE9\\*.txt");
 	_LIT(KPersistSourcePath, "Z:\\private\\10202BE9\\*.txc");
 	_LIT(KInstallTargetPath, "C:\\private\\10202BE9\\*.txt");
 	_LIT(KInstallSourcePath, "Z:\\private\\10202BE9\\*.txi");
@@ -190,6 +206,23 @@
 	//copy test files from Z: to C:
 	CopyTestFilesL(*fm,KPersistSourcePath, KPersistTargetPath);
 	CopyTestFilesL(*fm,KInstallSourcePath, KInstallTargetPath);
+	
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+	//Copy cre files to PMA protected folder for testing
+	_LIT(KPMASourcePath, "Z:\\private\\10202BE9\\*.pma");
+	_LIT(KPMATargetPath, "C:\\private\\10202BE9\\persists\\protected\\*.cre");
+    CopyTestFilesL(*fm,KPMASourcePath, KPMATargetPath);
+    
+    //Copy PMA protected cre file to persist folder for testing
+    _LIT(KPMACreSourcePath, "Z:\\private\\10202BE9\\f1000115.crp");
+    _LIT(KPMACreTargetPath, "C:\\private\\10202BE9\\persists\\*.cre");
+    CopyTestFilesL(*fm,KPMACreSourcePath, KPMACreTargetPath);
+    
+    //Copy PMA protected txt file to persist folder for testing
+    _LIT(KPMATxtSourcePath, "Z:\\private\\10202BE9\\f1000116.txp");
+    _LIT(KPMATxtTargetPath, "C:\\private\\10202BE9\\persists\\protected\\*.txt");
+    CopyTestFilesL(*fm,KPMATxtSourcePath, KPMATxtTargetPath);
+#endif
 
 	CleanupStack::PopAndDestroy(2);
 
@@ -206,7 +239,6 @@
 */
 LOCAL_C void OpenRepositoryL()
 	{
-	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1297 "));
 	CRepository* repositoryA;
 	CRepository* repositoryB;
 
@@ -263,10 +295,17 @@
 @SYMTestExpectedResults Test must not fail
 @SYMREQ					REQ0000
 */
+/**
+@SYMTestCaseID			PDS-CENTRALREPOSITORY-CT-4114
+@SYMTestCaseDesc		Tests for CRepository's Integer,Real,String's Get and Set functions on PMA keyspace
+@SYMTestPriority		High
+@SYMTestActions			Tests for CRepository::Get(),CRepository::Set() functions
+@SYMTestExpectedResults Test should get the correct value of a setting and set operation must not fail.
+@SYMREQ					REQ42876
+*/
 LOCAL_C void GetSetL(const TUid& aUid)
 	{
-	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1298 "));
-	CRepository* repository;
+    CRepository* repository(NULL);
 	User::LeaveIfNull(repository = CRepository::NewLC(aUid));
 
 	_LIT8(KString12_InitialValue, "string");
@@ -592,8 +631,7 @@
 */
 LOCAL_C void FindL()
 	{
-	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1299 "));
-	CRepository* repository;
+	CRepository* repository(NULL);
 	User::LeaveIfNull(repository = CRepository::NewLC(KUidTestRepository1));
 
 	RArray<TUint32> foundIds;
@@ -911,11 +949,21 @@
 @SYMTestExpectedResults Test must not fail
 @SYMREQ					REQ0000
 */
-LOCAL_C void NotifyL()
+/**
+@SYMTestCaseID			PDS-CENTRALREPOSITORY-CT-4115
+@SYMTestCaseDesc		Tests for CRepository's notification functionality test on PMA keyspaces
+@SYMTestPriority		High
+@SYMTestActions			Tests for CRepository::NotifyRequest() functions
+@SYMTestExpectedResults Notification request of a setting should behave as expected. 
+                        i.e. non-existent setting should return KErrNotFound
+                             Duplicate notification should not be created
+                             Other request should return KErrNone.
+@SYMREQ					REQ42876
+*/
+LOCAL_C void NotifyL(TUid aReposUid)
 	{
-	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1300 "));
-	CRepository* repository;
-	User::LeaveIfNull(repository = CRepository::NewLC(KUidTestRepository1));
+	CRepository* repository(NULL);
+	User::LeaveIfNull(repository = CRepository::NewLC(aReposUid));
 
 	TInt r = KErrNone;
 	TInt intval;
@@ -951,7 +999,7 @@
 	TEST(intStatus==KRequestPending);
 	TEST(realStatus==KRequestPending);
 	TEST(stringStatus==KRequestPending);
-	TEST(thisThread.RequestCount()==0);
+	TEST2(thisThread.RequestCount(),0);
 
 	// First change to setting should cause notification
 	r = repository->Set(KInt1, 0);
@@ -968,7 +1016,7 @@
 	TEST(intStatus==7777);
 	TEST(realStatus==KRequestPending);
 	TEST(stringStatus==KRequestPending);
-	TEST(thisThread.RequestCount()==0);
+	TEST2(thisThread.RequestCount(),0);
 
 
 	// Setting to the same value should not cause a notification
@@ -980,7 +1028,7 @@
 	TEST(intStatus==7777);
 	TEST(realStatus==KRequestPending);
 	TEST(stringStatus==KRequestPending);
-	TEST(thisThread.RequestCount()==0);
+	TEST2(thisThread.RequestCount(),0);
 
 	r = repository->Set(KReal1, 0.0);
 	TEST2(r, KErrNone);
@@ -1140,8 +1188,7 @@
 */
 LOCAL_C void CancelNotificationsL()
 	{
-	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-3400 "));
-	CRepository* repository;
+	CRepository* repository(NULL);
 	User::LeaveIfNull(repository = CRepository::NewLC(KUidTestRepository1));
 
 	TInt r = KErrNone;
@@ -1275,10 +1322,20 @@
 @SYMTestExpectedResults Test must not fail
 @SYMREQ					REQ0000
 */
+/**
+@SYMTestCaseID			PDS-CENTRALREPOSITORY-CT-4116
+@SYMTestCaseDesc		Tests for CRepository's Create and Delete functionality test on PMA keyspaces
+@SYMTestPriority		High
+@SYMTestActions			Test for CRepository::Create(),CRepository::Delete() functions
+@SYMTestExpectedResults Create and Delete of settings should behave as expected. 
+                        i.e. Create should not fail unless setting already exists
+                             Non-existent setting should return KErrNotFound.
+                             Mask deletion should delete only expected settings.
+@SYMREQ					REQ42876
+*/
 LOCAL_C void CreateDeleteL(const TUid& aUid)
 	{
-	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1301 "));
-	CRepository* repository;
+	CRepository* repository(NULL);
 	User::LeaveIfNull(repository = CRepository::NewLC(aUid));
 
 	TInt x;
@@ -1636,7 +1693,6 @@
 */
 LOCAL_C void MultiClientL()
 	{
-	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1302 "));
 	CRepository* repository1;
 	User::LeaveIfNull(repository1 = CRepository::NewLC(KUidTestRepository1));
 	CRepository* repository2;
@@ -1687,7 +1743,6 @@
 */
 LOCAL_C void ResetL()
 	{
-	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1303 "));
 	CRepository* repositoryA;
 	User::LeaveIfNull(repositoryA = CRepository::NewLC(KUidTestRepository1));
 
@@ -2001,6 +2056,167 @@
 	CleanupStack::PopAndDestroy(repositoryA);
 	}
 
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+/**
+@SYMTestCaseID          PDS-CENTRALREPOSITORY-CT-4117
+@SYMTestCaseDesc        Tests for resetting the new changes on CRepository (PMA repository)
+@SYMTestPriority        High
+@SYMTestActions         Tests for CRepository::Reset() function on a PMA repository
+                        Tests for reset on a single setting that exists in the original ROM-based settings.
+                        Tests for reset for a single setting that does not exist in the original ROM-based settings.
+                        Tests for repository-wide reset for a repository that exists on ROM.
+@SYMTestExpectedResults Test must not fail
+@SYMREQ                 REQ42876
+*/
+LOCAL_C void ResetPMAL(TUid aReposUid)
+    {
+    CRepository* repository(NULL);
+    User::LeaveIfNull(repository = CRepository::NewLC(aReposUid));
+
+    //
+    // Test reset on a single setting that exists in the
+    // original ROM-based settings (we'll use KInt1)
+    //
+
+    // Ensure KInt1 is set to a different value to its initial value
+    TInt r = repository->Set(KInt1, KInt1_InitialValue+10);
+    TEST2(r, KErrNone);
+
+    r = repository->Reset(KInt1);
+    TEST2(r, KErrNotSupported);
+
+    // Check KInt1 now still has the new value
+    TInt x;
+    r = repository->Get(KInt1, x);
+    TEST2(r, KErrNone);
+    TEST(x==KInt1_InitialValue+10);
+
+    //
+    // Test reset for a single setting that does not exist
+    // in the original ROM-based settings.
+    // Test repository-wide reset for a repository
+    // that exists on ROM.
+    //
+    const TInt KIntValue = 1234;
+    r = repository->Create(KNewInt, KIntValue);
+    TEST2(r, KErrNone);
+
+    //Reset a setting should fail as it is supported on PMA repositories
+    r = repository->Reset(KNewInt);
+    TEST2(r, KErrNotSupported);
+    
+    //Reset whole repository should fail as it is supported on PMA repositories
+    r = repository->Reset();
+    TEST2(r, KErrNotSupported);
+
+    //Check that KNewInt is still there
+    r = repository->Get(KNewInt, x);
+    TEST2(r, KErrNone);
+    TEST(x==KIntValue);
+
+    CleanupStack::PopAndDestroy(repository);
+    }
+
+/**
+@SYMTestCaseID          PDS-CENTRALREPOSITORY-CT-4118
+@SYMTestCaseDesc        Tests for CentRep's repository type check during opening. 
+@SYMTestPriority        High
+@SYMTestActions         Tests for opening a PMA repository that is stored in persist folder
+                        Tests for opening a non-PMA repository that is stored in PMA drive
+@SYMTestExpectedResults Must return with KErrNotSupported in both cases
+@SYMREQ                 REQ42876
+*/
+LOCAL_C void CorruptPMAL(TUid aReposUid, TInt aExpectedResult)
+    {
+    CRepository* repository(NULL);
+    TRAPD(err, repository = CRepository::NewL(aReposUid));
+    TEST2(err, aExpectedResult);
+    TEST(repository == NULL);
+    
+    // We should only test for KErrNotFound if aExpectedResult is not the same. 
+    // No point to test again for KErrNotFound.
+    if (aExpectedResult != KErrNotFound) 
+        {
+        //The corrupted repository should be deleted, so it should get KErrNotFound
+        TRAP(err, repository = CRepository::NewL(aReposUid));
+        TEST2(err, KErrNotFound);
+        TEST(repository == NULL);
+        }
+
+    }
+
+/**
+@SYMTestCaseID          PDS-CENTRALREPOSITORY-CT-4119
+@SYMTestCaseDesc        Tests for opening PMA txt repos in PMA drive. 
+@SYMTestPriority        High
+@SYMTestActions         Tests for opening PMA txt repos that is stored in PMA drive
+@SYMTestExpectedResults Must return with KErrNotFound
+@SYMREQ                 REQ42876
+*/
+LOCAL_C void OpenTxtInPMAL(TUid aReposUid)
+    {
+    CRepository* repository(NULL);
+    TRAPD(err, repository = CRepository::NewL(aReposUid));
+    
+    TEST2(err, KErrNotFound);
+    TEST(repository == NULL);
+    }
+
+/**
+@SYMTestCaseID          PDS-CENTRALREPOSITORY-CT-4175
+@SYMTestCaseDesc        Tests for opening PMA txt and cre repos in install directory. 
+@SYMTestPriority        High
+@SYMTestActions         Open PMA txt and cre repos in install directory
+@SYMTestExpectedResults Both cases must return with KErrNotSupported and 
+                        the PMA files must be deleted from the install directory
+@SYMREQ                 REQ42876
+*/
+LOCAL_C void OpenPmaRepInInstallDirL()
+    {
+    RFs fs;
+    TEntry entry;
+    CRepository* repository(NULL);
+   
+    TInt err = fs.Connect();
+    TEST2(err, KErrNone);
+    
+    CFileMan* fm = CFileMan::NewL(fs);
+    CleanupStack::PushL(fm);
+    
+    // Copying the test repository files here to the install directory, because 
+    //  if they are copied before the Central Repository server has started, when
+    //  the server starts they will be deleted, as PMA repositories are not
+    //  allowed in the install directory.
+    _LIT(KPMATxtInstallSourcePath, "Z:\\private\\10202BE9\\f1000117.txi");
+    _LIT(KPMATxtInstallTargetPath, "C:\\private\\10202BE9\\f1000117.txt");
+    CopyTestFilesL(*fm,KPMATxtInstallSourcePath, KPMATxtInstallTargetPath);
+    
+    _LIT(KPMACreInstallSourcePath, "Z:\\private\\10202BE9\\f1000118.cri");
+    _LIT(KPMACreInstallTargetPath, "C:\\private\\10202BE9\\f1000118.cre");
+    CopyTestFilesL(*fm,KPMACreInstallSourcePath, KPMACreInstallTargetPath);
+
+    CleanupStack::PopAndDestroy(fm);
+    
+
+    
+    TRAP(err, repository = CRepository::NewL(KUidPmaTxtInInstallDir1));
+    TEST2(err, KErrNotSupported);
+    TEST(repository == NULL);
+    
+    //The PMA txt file in the install directory should be deleted after the open attempt
+    err = fs.Entry(KPMATxtInstallTargetPath,entry);
+    TEST2(err, KErrNotFound);
+        
+    TRAP(err, repository = CRepository::NewL(KUidPmaCreInInstallDir1));
+    TEST2(err, KErrNotSupported);
+    TEST(repository == NULL);
+    
+    //The PMA cre file in the install directory should be deleted after the open attempt
+    err = fs.Entry(KPMACreInstallTargetPath,entry);
+    TEST2(err, KErrNotFound);
+    }
+#endif
+
 /**
 @SYMTestCaseID			SYSLIB-CENTRALREPOSITORY-CT-1304
 @SYMTestCaseDesc		Tests for initialising file searching
@@ -2011,20 +2227,30 @@
 */
 LOCAL_C void IniFileSearching()
 	{
-	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1304 "));
+    RFs fs;
+    User::LeaveIfError(fs.Connect());
+    
+    //The purpose of this test case is to prove that ROM version of the 
+    // keyspace will be used before the install version.
+    // So we want to delete the persisted version here, otherwise it will 
+    // be picked up before the ROM version.
+    _LIT(KReposFileName,"c:\\private\\10202be9\\persists\\00000010.cre");
+    TInt r = fs.Delete(KReposFileName);
+    if (r != KErrNone && r != KErrNotFound && r != KErrPathNotFound)
+        {
+        User::Leave(r);
+        }
+    
 	const TInt KSettingKey = 1;
 
 	_LIT(KDriveZ, "drive z");
 
 	const TInt KBufLen = 7; // = Max of 3 above string lengths
-
-	//
-	// File on drive C should take precedence
-	//
-	CRepository* repository = CRepository::NewL(KUidDriveCRepository);
+	
+	CRepository* repository = CRepository::NewL(KUidDriveZRepository);
 
 	TBuf<KBufLen> str;
-	TInt r = repository->Get(KSettingKey, str);
+	r = repository->Get(KSettingKey, str);
 	TEST2(r, KErrNone);
 	TEST(str==KDriveZ); 
 
@@ -2041,7 +2267,6 @@
 */
 LOCAL_C void RepositoryOnDriveC()
 	{
-	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1305 "));
 	const TInt KSettingKey = KNonExisitentSetting;
 	const TInt KInitialValue = 10;
 
@@ -2098,7 +2323,6 @@
 */
 LOCAL_C void NotifyOnlyL()
 	{
-	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1656 "));
 	CRepository* repository1;
 	User::LeaveIfNull(repository1 = CRepository::NewLC(KUidTestRepository1));
 
@@ -2215,6 +2439,7 @@
 	TEST2(r, KErrNone);
 	User::WaitForAnyRequest();
 	TEST(status1==KInt1);
+	User::WaitForAnyRequest();
 	TEST(status3==KInt1);
 	
 	r = repository1->NotifyRequest(KInt1, status1);
@@ -2228,6 +2453,7 @@
 	TEST2(r, KErrNone);
 	User::WaitForAnyRequest();
 	TEST(status1==KInt1);
+	User::WaitForAnyRequest();
 	TEST(status3==KInt1);
 
 	CleanupStack::PopAndDestroy(3);
@@ -2260,8 +2486,6 @@
 */
 LOCAL_C void RangeDeleteMetaL()
     {
-    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4113 "));
-
     TUint32 partialKey   = 0x0000004;
     TUint32 mask         = 0xFFFFFFF;
     TUint32 meta = 0;
@@ -2270,7 +2494,7 @@
     TUint32 expectedKeyCount = 1;
     TUint32 error;
 
-    CRepository* repository;
+    CRepository* repository(NULL);
     User::LeaveIfNull(repository = CRepository::NewL(KUidTestRepository3)); // 00000103.txt
     
     repository->StartTransaction(CRepository::EReadWriteTransaction);
@@ -2298,7 +2522,6 @@
     delete repository;
     }
 
-
 /**
 @SYMTestCaseID			SYSLIB-CENTRALREPOSITORY-CT-0494
 @SYMTestCaseDesc		Tests the various functions on CentralRepository
@@ -2314,49 +2537,93 @@
 	TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-0494 Open/Close repository "));
 	OpenRepositoryL();
 
-	TheTest.Next(_L("Get/Set .ini"));
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1298 Get/Set .ini"));
 	GetSetL(KUidTestRepository1);
 
-	TheTest.Next(_L("Get/Set .cre"));
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1298 Get/Set .cre"));
 	GetSetL(KUidCreTestRepository1);
-
-	TheTest.Next(_L("Find"));
+	
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1299 Find"));
 	FindL();
-
-	TheTest.Next(_L("Notify"));
-	NotifyL();
-
-	TheTest.Next(_L("Create/Delete .ini"));
+	
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1300 Notify"));
+	NotifyL(KUidTestRepository1);
+	
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1301 Create/Delete .ini"));
 	CreateDeleteL(KUidTestRepository1);
 
-	TheTest.Next(_L("Create/Delete .cre"));
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1301 Create/Delete .cre"));
 	CreateDeleteL(KUidCreTestRepository1);
-
-	TheTest.Next(_L("Initialisation file searching"));
+	
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1304 Initialisation file searching"));
 	IniFileSearching();
-
-	TheTest.Next(_L("Repository on Drive C only"));
+	
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1305 Repository on Drive C only"));
 	RepositoryOnDriveC();
 
-	TheTest.Next(_L("Multiple clients"));
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1302 Multiple clients"));
 	MultiClientL();
 
-	TheTest.Next(_L("Restore factory settings"));
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1303 Restore factory settings"));
 	ResetL();
-
+	
 	TheTest.Next(_L("Restore factory settings from binary based rep"));
 	ResetCreL();
-
-	TheTest.Next(_L("Negative testing for the notification cancelling"));
+	
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-3400 Negative testing for the notification cancelling"));
 	CancelNotificationsL();
 
-	TheTest.Next(_L("Notify-only client optimizations"));
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1656 Notify-only client optimizations"));
 	NotifyOnlyL();
 	
-	TheTest.Next(_L("Meta data after a Range Delete in transaction"));
+	TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4113 Meta data after a Range Delete in transaction"));
     RangeDeleteMetaL();
     
-	TheTest.End();
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+    // The following tests are done on PMA based repositories
+    
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4114 Get/Set PMA .txt in ROM"));
+    GetSetL(KUidTxtPMATestRepos1);
+    
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4114 Get/Set PMA .cre in ROM"));
+    GetSetL(KUidCrePMATestRepos1);
+    
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4114 Get/Set PMA .cre in PMA drive"));
+    GetSetL(KUidCrePMAinPMADriveTestRepos1);
+    
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4115 Notify PMA"));
+    NotifyL(KUidTxtPMATestRepos1);
+        
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4116 Create/Delete PMA .txt in ROM"));
+    CreateDeleteL(KUidTxtPMATestRepos1);
+                
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4116 Create/Delete PMA .cre in ROM"));
+    CreateDeleteL(KUidCrePMATestRepos1);
+    
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4116 Create/Delete PMA .cre in PMA drive"));
+    CreateDeleteL(KUidCrePMAinPMADriveTestRepos1);
+    
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4117 Restore factory settings on PMA repository"));
+    ResetPMAL(KUidTxtPMATestRepos1);
+                
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4117 Restore factory settings on binary based PMA repository"));
+    ResetPMAL(KUidCrePMATestRepos1);
+    
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4118 Opening a non-PMA repos that is in PMA drive"));
+    CorruptPMAL(KUidCorruptRepos1, KErrNotSupported);
+    
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4118 Opening a PMA repos that is in persist folder"));
+    CorruptPMAL(KUidCorruptRepos2, KErrNotFound);
+    
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4119 Opening a txt repos that is in PMA drive"));
+    OpenTxtInPMAL(KUidTxtInPMADriveRepos1);
+    
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4175 Opening PMA repositories that only exists in the install directory"));
+    OpenPmaRepInInstallDirL();
+
+#endif // SYMBIAN_INCLUDE_APP_CENTRIC
+
+    TheTest.End();
 	}
 
 /**
@@ -2407,15 +2674,15 @@
 
 LOCAL_C void OomTestsL()
 	{
-	TheTest.Start(_L("Open/Close repository"));
+	TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1297 Open/Close repository"));
 	OomTest(OpenRepositoryL);
 
-	TheTest.Next(_L("GetSet for KUidTestRepository1"));
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1298 GetSet for KUidTestRepository1"));
 	GetSetL(KUidTestRepository1);
-	TheTest.Next(_L("GetSet for KUidCreTestRepository1"));
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1298 GetSet for KUidCreTestRepository1"));
 	GetSetL(KUidCreTestRepository1);
 
-	TheTest.Next(_L("Find"));
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-1299 Find"));
 	OomTest(FindL);
 
 	TheTest.End();
@@ -2425,47 +2692,47 @@
 //It shows that there is approx. 20% (LUBBOCK) performance boost when using simple "Set"
 //operations. It may be even better when using "Commit" functionality.
 static void PerformanceTestL()
-	{
-	CRepository* repository = CRepository::NewL(KUidDriveCOnlyRepository);
-	CleanupStack::PushL(repository);
-	//Test settings IDs
-	const TUint KIntId = 101;
-	const TUint KRealId = 102;
-	const TUint KDes16Id = 103;
-	const TUint KDes8Id = 104;
-	//Create test settings
-	TInt err = repository->Create(KIntId, 1);
-	TEST2(err, KErrNone);
-	err = repository->Create(KRealId, 1.1);
-	TEST2(err, KErrNone);
-	err = repository->Create(KDes16Id, _L16("DES16"));
-	TEST2(err, KErrNone);
-	err = repository->Create(KDes8Id, _L8("DES8"));
-	TEST2(err, KErrNone);
-	//Performance test
-	TBuf16<32> buf16;
-	TBuf8<32> buf8;
-	TUint timeStart = User::TickCount();
-	for(TInt i=0;i<500;++i)
-		{
-		buf16.Zero();
-		buf16.AppendNum(i);
-		buf8.Zero();
-		buf8.AppendNum(i);
-
-		TInt err = repository->Set(KIntId, i);
-		TEST2(err, KErrNone);
-		err = repository->Set(KRealId, (TReal)i);
-		TEST2(err, KErrNone);
-		err = repository->Set(KDes16Id, buf16);
-		TEST2(err, KErrNone);
-		err = repository->Set(KDes8Id, buf8);
-		TEST2(err, KErrNone);
-		}
-	TUint timeEnd = User::TickCount();
-	CleanupStack::PopAndDestroy(repository);
-	TheTest.Printf(_L("\nPerformanceTestL - %d ticks\n"), timeEnd-timeStart);
-	}
+    {
+    CRepository* repository = CRepository::NewL(KUidDriveCOnlyRepository);
+    CleanupStack::PushL(repository);
+    //Test settings IDs
+    const TUint KIntId = 101;
+    const TUint KRealId = 102;
+    const TUint KDes16Id = 103;
+    const TUint KDes8Id = 104;
+    //Create test settings
+    TInt err = repository->Create(KIntId, 1);
+    TEST2(err, KErrNone);
+    err = repository->Create(KRealId, 1.1);
+    TEST2(err, KErrNone);
+    err = repository->Create(KDes16Id, _L16("DES16"));
+    TEST2(err, KErrNone);
+    err = repository->Create(KDes8Id, _L8("DES8"));
+    TEST2(err, KErrNone);
+    //Performance test
+    TBuf16<32> buf16;
+    TBuf8<32> buf8;
+    TUint timeStart = User::TickCount();
+    for(TInt i=0;i<500;++i)
+        {
+        buf16.Zero();
+        buf16.AppendNum(i);
+        buf8.Zero();
+        buf8.AppendNum(i);
+
+        TInt err = repository->Set(KIntId, i);
+        TEST2(err, KErrNone);
+        err = repository->Set(KRealId, (TReal)i);
+        TEST2(err, KErrNone);
+        err = repository->Set(KDes16Id, buf16);
+        TEST2(err, KErrNone);
+        err = repository->Set(KDes8Id, buf8);
+        TEST2(err, KErrNone);
+        }
+    TUint timeEnd = User::TickCount();
+    CleanupStack::PopAndDestroy(repository);
+    TheTest.Printf(_L("\nPerformanceTestL - %d ticks\n"), timeEnd-timeStart);
+    }
 
 /**
 @SYMTestCaseID			SYSLIB-CENTRALREPOSITORY-CT-0497
@@ -2477,10 +2744,11 @@
 */
 LOCAL_C void MainL()
 	{
-	TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-0497 Functional tests "));
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-0497 Functional tests "));
+    
 	OomTesting = EFalse;
-	// Existance of caching functionality invalidates some tests and
-	// makes them fail. So cleanup cace.
+	// Existence of caching functionality invalidates some tests and
+	// makes them fail. So cleanup cache.
 	RestoreTestFilesL();
 	FuncTestsL();
 
@@ -2497,23 +2765,31 @@
 	TheTest.Next(_L("Clean out C: files"));
 	CleanupCDriveL();
 
-	TheTest.End();
-	TheTest.Close();
 	}
 
 TInt E32Main()
 	{
-	__UHEAP_MARK;
-	CTrapCleanup* cleanup = CTrapCleanup::New();
-	if(!cleanup)
-		return KErrNoMemory;
-
-	TRAPD(err, MainL());
-	if (err != KErrNone)
-		User::Panic(_L("Testing failed: "), err);
-
-	delete cleanup;
-	__UHEAP_MARKEND;
-
-	return 0;
+    TheTest.Title ();
+    TheTest.Start(_L("PMA Central Repository API Test"));
+    
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    TheTest(cleanup != NULL);
+    
+    __UHEAP_MARK;
+    
+    KillProcess(KCentralRepositoryServerName);
+    TRAPD(err, MainL());
+    KillProcess(KCentralRepositoryServerName);
+    
+    TEST2(err, KErrNone);
+    
+    __UHEAP_MARKEND;
+    
+    TheTest.End ();
+    TheTest.Close ();
+    
+    delete cleanup;
+        
+    User::Heap().Check();
+    return KErrNone;
 	}
--- a/persistentstorage/centralrepository/test/t_cenrep_back_rest.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/t_cenrep_back_rest.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -89,7 +89,6 @@
 	TInt r = KErrNone;
 
 	r = fm->Delete( KOldInstallFiles );
-#ifndef __WINSCW__
 	if (r == KErrAccessDenied)
 		{
 		// we are not able to delete the files on ARM if their attributes are not set correctly.
@@ -98,12 +97,10 @@
 		User::LeaveIfError(r);
 		r = fm->Delete( KOldInstallFiles );
 		}
-#endif
 	if ( r != KErrNone && r != KErrNotFound && r != KErrPathNotFound )
 		User::Leave(r);
 	
 	r = fm->Delete( KOldPersistFiles );
-#ifndef __WINSCW__
 	if (r == KErrAccessDenied)
 		{
 		// we are not able to delete the files on ARM if their attributes are not set correctly.
@@ -112,7 +109,6 @@
 		User::LeaveIfError(r);
 		r = fm->Delete( KOldPersistFiles );
 		}
-#endif
 	if ( r != KErrNone && r != KErrNotFound && r != KErrPathNotFound )
 		User::Leave(r);
 
--- a/persistentstorage/centralrepository/test/t_cenrep_back_rest_delete.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/t_cenrep_back_rest_delete.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -75,9 +75,25 @@
 	CleanupStack::PushL( fm );
 
 	TInt r = fm->Delete( KOldInstallFiles );
+	if (r == KErrAccessDenied)
+	        {
+	        // we are not able to delete the files on ARM if their attributes are not set correctly.
+	        // Only set attributes when got KErrAccessDenied because it's time consuming in OOM test.
+	        r = fm->Attribs( KOldInstallFiles, KEntryAttArchive, KEntryAttReadOnly, TTime( 0 ), CFileMan::ERecurse );
+	        User::LeaveIfError(r);
+	        r = fm->Delete( KOldInstallFiles );
+	        }
 	if ( r != KErrNone && r != KErrNotFound && r != KErrPathNotFound )
 		User::Leave(r);
 	r = fm->Delete( KOldPersistFiles );
+	if (r == KErrAccessDenied)
+	        {
+	        // we are not able to delete the files on ARM if their attributes are not set correctly.
+	        // Only set attributes when got KErrAccessDenied because it's time consuming in OOM test.
+	        r = fm->Attribs( KOldPersistFiles, KEntryAttArchive, KEntryAttReadOnly, TTime( 0 ), CFileMan::ERecurse );
+	        User::LeaveIfError(r);
+	        r = fm->Delete( KOldPersistFiles );
+	        }
 	if ( r != KErrNone && r != KErrNotFound && r != KErrPathNotFound )
 		User::Leave(r);
 
--- a/persistentstorage/centralrepository/test/t_cenrep_defects.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/t_cenrep_defects.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -36,6 +36,11 @@
 
 _LIT( KCentralRepositoryServerName, "Centralrepositorysrv");
 
+//Burst rate for __UHEAP_SETBURSTFAIL
+#ifdef _DEBUG
+const TInt KBurstRate = 20;
+#endif
+
 const TUid KUidDEF060843LRepository1    = { 0x00000001 };
 const TUid KUidRep1						= { 0x00000100 };
 const TUid KUidDEF053500LTestRepository = { 0x00000102 };
@@ -2457,7 +2462,7 @@
 			
 			if(aOOMMode)
 				{
-				__UHEAP_SETFAIL(RHeap::EFailNext, ++count);
+				__UHEAP_SETBURSTFAIL(RAllocator::EBurstFailNext, ++count, KBurstRate);
 				}
 			
 			error = persist.MergeArray(change, deleted, KMergerTypes[i]);
@@ -2465,7 +2470,7 @@
 			if (aOOMMode)
 				{
 				TEST(KErrNone == error || KErrNoMemory == error);
-				__UHEAP_SETFAIL(RHeap::ENone, 0);
+				__UHEAP_RESET;
 				}
 			else 
 				{
--- a/persistentstorage/centralrepository/test/t_cenrep_fotaUT.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/t_cenrep_fotaUT.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -894,7 +894,7 @@
 
 	
 	//--------------------------Validate the merging--------------------------------------
-	notifier-new (ELeave)CSessionNotifier;
+	notifier = new (ELeave)CSessionNotifier;
 	CleanupStack::PushL(notifier);
     repository = new(ELeave) CServerRepository();
     CleanupStack::PushL(repository);
--- a/persistentstorage/centralrepository/test/t_cenrep_helper.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/t_cenrep_helper.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -121,37 +121,58 @@
 	TPtr file(file_buf->Des());
 	file.Copy(KCPersistsFiles);
 	PatchDrive(file);
-	TInt r = fm->Delete(file);
-
-	if (r != KErrNone &&
-		r != KErrNotFound &&
-		r != KErrPathNotFound)
+	TInt r = fm->Attribs(file, 0, KEntryAttReadOnly, TTime(0), 0);
+    if (r != KErrNone && r != KErrNotFound && r != KErrPathNotFound)
+        {
+        User::Leave(r);
+        }
+	r = fm->Delete(file);
+	if (r != KErrNone && r != KErrNotFound && r != KErrPathNotFound)
 		{
 		User::Leave(r);
 		}
-		
-	if(aRemoveRomCache)
+	
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+	file.Copy(KPMAFiles);
+    PatchDrive(file);
+    r = fm->Attribs(file, 0, KEntryAttReadOnly, TTime(0), 0);
+    if (r != KErrNone && r != KErrNotFound && r != KErrPathNotFound)
+        {
+        User::Leave(r);
+        }
+    r = fm->Delete(file);
+    if (r != KErrNone && r != KErrNotFound && r != KErrPathNotFound)
+        {
+        User::Leave(r);
+        }
+#endif		
+
+    if(aRemoveRomCache)
 		{
 		//Delete cached rom version file
 		file.Copy(KCRomVersionFiles);
 		PatchDrive(file);
-		fm->Attribs(file, 0, KEntryAttReadOnly, TTime(0), 0);
+		r = fm->Attribs(file, 0, KEntryAttReadOnly, TTime(0), 0);
+	    if (r != KErrNone && r != KErrNotFound && r != KErrPathNotFound)
+	        {
+	        User::Leave(r);
+	        }
 		r = fm->Delete(file);
-		if (r != KErrNone &&
-			r != KErrNotFound &&
-			r != KErrPathNotFound &&
-			r != KErrPermissionDenied)
+		if (r != KErrNone && r != KErrNotFound && r != KErrPathNotFound && r != KErrPermissionDenied)
 			{
 			User::Leave(r);
 			}
 		
 		// Delete all install files
 		file.Copy(KCInstallFiles);
-		PatchDrive(file);	
+		PatchDrive(file);
+		r = fm->Attribs(file, 0, KEntryAttReadOnly, TTime(0), 0);
+	    if (r != KErrNone && r != KErrNotFound && r != KErrPathNotFound)
+	        {
+	        User::Leave(r);
+	        }
 		r = fm->Delete(file);
-		if (r != KErrNone &&
-			r != KErrNotFound &&
-			r != KErrPathNotFound)
+		if (r != KErrNone && r != KErrNotFound && r != KErrPathNotFound)
 			{
 			User::Leave(r);
 			}
@@ -253,12 +274,12 @@
 	PatchDrive(dest);
 
 	//copy test files
-	User::LeaveIfError(aFm.Copy(src, dest,CFileMan::ERecurse));
+	User::LeaveIfError(aFm.Copy(src, dest,CFileMan::ERecurse|CFileMan::EOverWrite));
 	aFm.Attribs(dest,
 					KEntryAttArchive,
 					KEntryAttReadOnly,
 					TTime(0),
-					CFileMan::ERecurse);		
+					CFileMan::ERecurse|CFileMan::EOverWrite);		
 	}
 
 //This function prints out the recorded time in milliseconds of aTime.
--- a/persistentstorage/centralrepository/test/t_cenrep_helper.h	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/t_cenrep_helper.h	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -31,6 +31,10 @@
 _LIT(KCRomVersionDir,				"c:\\private\\10202BE9\\romversion\\");
 _LIT(KCRomVersionFiles,			"c:\\private\\10202BE9\\romversion\\*.*");
 
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+_LIT(KPMAFiles,           "c:\\private\\10202BE9\\persists\\protected\\*.*");
+#endif
+
 const TInt KGeneralDelay = 2*1000*1000;
 
 _LIT(KTxtFileExt, ".txt");
--- a/persistentstorage/centralrepository/test/t_cenrep_perf.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/t_cenrep_perf.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -18,11 +18,18 @@
 #include <f32file.h>
 #include <bautils.h>
 #include <hal.h>
+#include "t_cenrep_helper.h"
 
-RTest 				TheTest(_L("t_cenrep_perf test"));
+RTest 				TheTest(_L("t_cenrep_perf.exe"));
+
+_LIT( KCentralRepositoryServerName, "Centralrepositorysrv");
+
 CRepository*		TheRepository = NULL;
 const TUid 			KTestCenRepUid = {0xCCCCCC03};
-_LIT(KFileName, "c:\\private\\10202be9\\persists\\cccccc03.cre");
+
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+const TUid          KPMATestCenRepUid = {0xF1000301};
+#endif
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
@@ -63,29 +70,14 @@
 const TUint32 KFindMask = 0x0FFF0000ul;
 const TInt KFindKeyCount = 15;
 
-
 ///////////////////////////////////////////////////////////////////////////////////////
-
-TInt DeleteCreFile()
-	{
-	RFs fs;
-	fs.Connect();
-	TInt err = fs.Delete(KFileName);
-	fs.Close();
-
-	// it's fine if the file or path wasn't found as there's nothing to 
-	// delete so return KErrNone
-	return (err == KErrNotFound || err == KErrPathNotFound) ? KErrNone : err;
-	}
-
-///////////////////////////////////////////////////////////////////////////////////////
-
-void DestroyTestEnv()
+void DestroyTestEnvL()
 	{
 	delete TheRepository;
+	TheRepository = NULL;
 
 	// delete the CRE file to clear out any changes made during the test
-	DeleteCreFile(); 
+	CleanupCDriveL(); 
 	}
 
 ///////////////////////////////////////////////////////////////////////////////////////
@@ -95,7 +87,11 @@
 	{
 	if(!aValue)
 		{
-		DestroyTestEnv();
+		TRAPD(err, DestroyTestEnvL());
+        if (err != KErrNone)
+            {
+            RDebug::Print( _L( "*** DestroyTestEnvL also failed with error %d expecting KErrNone\r\n"), err );
+            }
 		RDebug::Print(_L("*** Test failure. Boolean expression evaluates to false.\r\n"));
 		TheTest(EFalse, aLine);
 		}
@@ -104,8 +100,12 @@
 	{
 	if(aValue != aExpected)
 		{
-		DestroyTestEnv();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+	    RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TRAPD(err, DestroyTestEnvL());
+        if (err != KErrNone)
+            {
+            RDebug::Print( _L( "*** DestroyTestEnvL also failed with error %d expecting KErrNone\r\n"), err );
+            }
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -115,12 +115,28 @@
 ///////////////////////////////////////////////////////////////////////////////////////
 
 // leaves if it can't successfully delete the cre file if it exists
-void CreateTestEnvL()
+void CreateTestEnvL(const TUid& aRepUid)
 	{
 	// delete the CRE file to clear out any changes leftover from previous test runs
-	User::LeaveIfError(DeleteCreFile());
-	
-	TRAPD(err, TheRepository = CRepository::NewL(KTestCenRepUid));
+	CleanupCDriveL();
+
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)	
+	RFs fs;
+    User::LeaveIfError(fs.Connect());
+    CleanupClosePushL(fs);
+
+    CFileMan* fm = CFileMan::NewL(fs);
+    CleanupStack::PushL(fm);
+    
+    _LIT(KPMASourcePath, "z:\\private\\10202BE9\\f100031*.pma");
+    _LIT(KPMATargetPath, "c:\\private\\10202BE9\\persists\\protected\\f100031*.cre");
+    
+    //Copying test PMA files to PMA drive to simulate there is 16 PMA keyspaces to see if performance degrades 
+    CopyTestFilesL(*fm,KPMASourcePath, KPMATargetPath);
+    CleanupStack::PopAndDestroy(2); //fs and fm
+#endif	
+
+	TRAPD(err, TheRepository = CRepository::NewL(aRepUid));
 	TEST2(err, KErrNone);
 	}
 
@@ -442,13 +458,12 @@
 
 
 /**
- * Common code for performing the Set() and Reset() tests for all datatypes
+ * Common code for performing the Set() tests for all datatypes
  * 
  * @param aValType enum indicating which data type to test
  * 	(EIntVal, ERealVal, EBinaryVal or EStringVal -- any other value will fail with KErrArgument).
- * @param aTestType enum defining whether Set() or Reset() should be timed
  */
-void DoSetResetTest(TValType aValType, TTestType aTestType)
+void DoSetTest(TValType aValType)
 	{
 	TInt err(KErrNone);
 	TInt result(EFalse);
@@ -462,9 +477,9 @@
 	TUint32 end(0);
 
 	// Set the new value
-	start = aTestType == ESetTest ? User::FastCounter() : start;
+	start = User::FastCounter();
 	err = SetNewVal(aValType);
-	end = aTestType == ESetTest ? User::FastCounter() : end;
+	end = User::FastCounter();
 	TEST2(err, KErrNone);
 
 	// Test we get the new value to check it's worked
@@ -472,20 +487,58 @@
 	TEST2(err, KErrNone);
 	TEST(result);
 
-	// Restore the old value
-	start = aTestType == EResetTest ? User::FastCounter() : start;
-	err = ResetSetting(aValType);
-	end = aTestType == EResetTest ? User::FastCounter() : end;
-	TEST2(err, KErrNone);
-	
-	// Check reset's worked
-	err = GetOldVal(aValType, result);
-	TEST2(err, KErrNone);
-	TEST(result);
 	
 	PrintStats(start, end);
 	}
 
+/**
+ * Common code for performing the Reset() tests
+ * 
+ * @param aValType enum indicating which data type to test
+ * 	(EIntVal, ERealVal, EBinaryVal or EStringVal -- any other value will fail with KErrArgument).
+ * @param aExpectedResult indicating the expected return value of Reset
+ * 	(Any valid Symbian OS error codes) 
+ */
+void DoResetTest(TValType aValType, TInt aExpectedResult)
+    {
+    TInt err(KErrNone);
+    TInt result(EFalse);
+    TUint32 start(0);
+    TUint32 end(0);
+
+    // Set the new value
+    err = SetNewVal(aValType);
+    TEST2(err, KErrNone);
+
+    // Test we get the new value to check it's worked
+    err = GetNewVal(aValType, ESetTest, result);
+    TEST2(err, KErrNone);
+    TEST(result);
+
+    // Restore the old value
+    start = User::FastCounter();
+    err = ResetSetting(aValType);
+    end = User::FastCounter();
+    TEST2(err, aExpectedResult);
+    
+    // Check reset's worked
+    if (aExpectedResult == KErrNone)
+        {
+        err = GetOldVal(aValType, result);
+        TEST2(err, KErrNone);
+        TEST(result);
+        }
+    // If aExpectedResult is not KErrNone, Reset should have failed
+    //  The value should be still be the modified value (not reverted back to old value)
+    else 
+        {
+        err = GetNewVal(aValType, ESetTest, result);
+        TEST2(err, KErrNone);
+        TEST(result);
+        }
+    
+    PrintStats(start, end);
+    }
 
 /**
  * Common code for performing all the Create() tests
@@ -717,7 +770,7 @@
 */
 void SetIntTest()
 	{
-	DoSetResetTest(EIntVal, ESetTest);
+	DoSetTest(EIntVal);
 	}
 
 
@@ -733,7 +786,7 @@
 */
 void SetRealTest()
 	{
-	DoSetResetTest(ERealVal, ESetTest);
+	DoSetTest(ERealVal);
 	}
 
 	
@@ -749,7 +802,7 @@
 */
 void SetBinaryTest()
 	{
-	DoSetResetTest(EBinaryVal, ESetTest);
+	DoSetTest(EBinaryVal);
 	}
 
 
@@ -765,7 +818,7 @@
 */
 void SetStringTest()
 	{
-	DoSetResetTest(EStringVal, ESetTest);
+	DoSetTest(EStringVal);
 	}
 
 
@@ -1160,7 +1213,7 @@
 */
 void ResetTest()
 	{
-	DoSetResetTest(EIntVal, EResetTest);
+	DoResetTest(EIntVal, KErrNone);
 	}
 
 
@@ -1195,13 +1248,50 @@
 	PrintStats(start, end);
 	}
 
+
+/**
+@SYMTestCaseID          PDS-CENTRALREPOSITORY-CT-4129
+@SYMTestCaseDesc        CRepository::Reset(TUint32 aKey) - performance test
+                        The test measures the time needed for resetting a single PMA integer setting.
+@SYMTestPriority        High
+@SYMTestActions         CRepository::Reset(TUint32 aKey)
+@SYMTestExpectedResults Test must not fail
+@SYMPREQ                PREQ2505
+@SYMREQ                 REQ13142
+*/
+void PMAResetTest()
+    {
+    DoResetTest(EIntVal, KErrNotSupported);
+    }
+
+
+/**
+@SYMTestCaseID          PDS-CENTRALREPOSITORY-CT-4130
+@SYMTestCaseDesc        CRepository::Reset() - performance test
+                        The test measures the time needed for resetting the whole PMA keyspace.
+@SYMTestPriority        High
+@SYMTestActions         CRepository::Reset()
+@SYMTestExpectedResults Test must not fail
+@SYMPREQ                PREQ2505
+@SYMREQ                 REQ13142
+*/
+void PMAResetAllTest()
+    {
+    // Reset the whole keyspace
+    TInt start = User::FastCounter();
+    TInt err = TheRepository->Reset();
+    TInt end = User::FastCounter();
+    TEST2(err, KErrNotSupported);
+    PrintStats(start, end);
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////
 
 // MAIN
 
 void DoTestsL()
 	{
-	TheTest.Start(_L("@SYMTestCaseID:PDS-CENTRALREPOSITORY-UT-4047 Get Int test"));
+	TheTest.Next(_L("@SYMTestCaseID:PDS-CENTRALREPOSITORY-UT-4047 Get Int test"));
 	GetIntTest();
 
 	TheTest.Next(_L("@SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4087 Get Real test"));
@@ -1281,38 +1371,70 @@
 
 	TheTest.Next(_L("@SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4110 Delete test"));
 	DeleteRangeTestL();
+	
+	}
 
-	TheTest.Next(_L("@SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4111 Reset Single test"));
-	ResetTest();
+void DoResetTests()
+    {
+
+    TheTest.Next(_L("@SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4111 Reset Single test"));
+    ResetTest();
+
+    TheTest.Next(_L("@SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4112 Reset All test"));
+    ResetAllTest();
+    }
+
+void DoPMAResetTests()
+    {
+
+    TheTest.Next(_L("@SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4129 Reset Single test"));
+    PMAResetTest();
 
-	TheTest.Next(_L("@SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4112 Reset All test"));
-	ResetAllTest();
-	}
+    TheTest.Next(_L("@SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4130 Reset All test"));
+    PMAResetAllTest();
+    }
+
+LOCAL_C void MainL()
+    {
+    //Non-PMA test
+	CreateTestEnvL(KTestCenRepUid);
+
+	DoTestsL();
+	DoResetTests();
+	
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+    DestroyTestEnvL();
+	CreateTestEnvL(KPMATestCenRepUid);
+    DoTestsL();
+    DoPMAResetTests();
+#endif
+    DestroyTestEnvL();
+    }
 
 
 TInt E32Main()
 	{
-	TheTest.Title();
-	
-	CTrapCleanup* tc = CTrapCleanup::New();
-	TheTest(tc != NULL);
-	
-	__UHEAP_MARK;
-	
-	TRAPD(err, CreateTestEnvL());
-	TEST2(err, KErrNone);
-
-	TRAP(err, DoTestsL());
-	DestroyTestEnv();
-	TEST2(err, KErrNone);
-	
-	__UHEAP_MARKEND;
-	
-	TheTest.End();
-	TheTest.Close();
-	
-	delete tc;
-	
-	User::Heap().Check();
-	return KErrNone;
+    TheTest.Title ();
+    TheTest.Start(_L("Centrep Performance Test"));
+    
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    TheTest(cleanup != NULL);
+    
+    __UHEAP_MARK;
+    
+    KillProcess(KCentralRepositoryServerName);
+    TRAPD(err, MainL());
+    KillProcess(KCentralRepositoryServerName);
+    TEST2(err, KErrNone);
+    
+    
+    __UHEAP_MARKEND;
+    
+    TheTest.End ();
+    TheTest.Close ();
+    
+    delete cleanup;
+        
+    User::Heap().Check();
+    return KErrNone;
 	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/t_cenrep_pma_array.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,303 @@
+// 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:
+//
+
+#include <e32test.h>
+#include <f32file.h>
+#include <badesca.h>
+
+#include "srvrepos_noc.h"
+#include "srvres.h"
+#include "t_cenrep_helper.h"
+
+RTest TheTest(_L("t_cenrep_pma_array.exe"));
+
+_LIT(KPMAKeyspace1Src, "z:\\private\\10202be9\\f1000001.pma");
+_LIT(KPMAKeyspace2Src, "z:\\private\\10202be9\\f1000002.pma");
+_LIT(KPMAKeyspace3Src, "z:\\private\\10202be9\\f1000003.pma");
+_LIT(KPMAKeyspace4Src, "z:\\private\\10202be9\\f1000004.pma"); //Non-PMA keyspace in PMA drive
+_LIT(KPMAKeyspace5Src, "z:\\private\\10202be9\\f1000006.txp");
+
+_LIT(KPMAKeyspace1Dst, "c:\\private\\10202be9\\persists\\protected\\f1000001.cre");
+_LIT(KPMAKeyspace2Dst, "c:\\private\\10202be9\\persists\\protected\\f1000002.cre");
+_LIT(KPMAKeyspace3Dst, "c:\\private\\10202be9\\persists\\protected\\f1000003.cre");
+_LIT(KPMAKeyspace4Dst, "c:\\private\\10202be9\\persists\\protected\\f1000004.cre");
+_LIT(KPMAKeyspace5Dst, "c:\\private\\10202be9\\persists\\protected\\f1000006.txt");
+
+
+const TUid KPMATestUid = {0xf1000005};
+const TUid KNonPMATestUid = {0xf1000004};
+
+///////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////
+//Test macros and functions
+
+LOCAL_C void Check( TInt aValue, TInt aExpected, TInt aLine )
+    {
+    if ( aValue != aExpected )
+        {
+        RDebug::Print( _L( "*** Expected error: %d, got: %d\r\n"), aExpected, aValue );
+        TRAPD(err, CleanupCDriveL());
+        if (err != KErrNone)
+            {
+            RDebug::Print( _L( "*** CleanupCDriveL also failed with error %d expecting KErrNone\r\n"), err );
+            }
+        TheTest( EFalse, aLine );
+        }
+    }
+
+#define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
+
+///////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////
+static void CloseTServerResources(TAny*)
+    {
+    TServerResources::Close();
+    }
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+class CenrepPMAArrayTest :public CBase
+{
+public:
+    void SetL(TUint32 aKey, TInt aValue);
+    void GetL(TUint32 aKey, TInt& aValue);
+    CenrepPMAArrayTest();
+    ~CenrepPMAArrayTest();
+    static CenrepPMAArrayTest* NewL(TUid aReposUid);
+private:
+    void ConstructL(TUid aReposUid);
+public:
+    CServerRepository* iServerRepo;
+    CSessionNotifier* iSessionNotif;
+};
+
+
+CenrepPMAArrayTest::CenrepPMAArrayTest(){}
+
+CenrepPMAArrayTest::~CenrepPMAArrayTest()
+    {
+    if (iServerRepo)
+        {
+        if (iSessionNotif)
+            {
+            iServerRepo->Close();
+            }
+        delete iServerRepo;
+        }
+    if (iSessionNotif)
+        delete iSessionNotif;
+    }
+
+CenrepPMAArrayTest* CenrepPMAArrayTest::NewL(TUid aReposUid)
+    {
+    CenrepPMAArrayTest* self=new (ELeave)CenrepPMAArrayTest;
+    CleanupStack::PushL(self);
+    self->ConstructL(aReposUid);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+void CenrepPMAArrayTest::ConstructL(TUid aReposUid)
+    {
+    iServerRepo=new (ELeave)CServerRepository();
+    iSessionNotif=new (ELeave) CSessionNotifier();
+
+    iServerRepo->OpenL(aReposUid,*iSessionNotif);
+    }
+
+void CenrepPMAArrayTest::SetL(TUint32 aKey, TInt aValue)
+    {
+    iServerRepo->StartTransaction(EConcurrentReadWriteTransaction);
+    iServerRepo->CleanupCancelTransactionPushL();
+    iServerRepo->TransactionSetL(aKey, aValue);
+    CleanupStack::Pop();
+    TUint32 keyInfo;
+    User::LeaveIfError(iServerRepo->CommitTransaction(keyInfo));
+    }
+
+void CenrepPMAArrayTest::GetL(TUint32 aKey, TInt& aValue)
+    {
+    User::LeaveIfError(iServerRepo->Get(aKey, aValue));
+    }
+
+/**
+@SYMTestCaseID          PDS-CENTRALREPOSITORY-CT-4120
+@SYMTestCaseDesc        PMA repositories array test on pre-loaded PMA drive 
+@SYMTestPriority        High
+@SYMTestActions         - Cleanup PMA drive and copy 5 test repositories to the 
+                          PMA drive. 1 of them is .txt and should be ignored on 
+                          initialisation and another 1 is a non-PMA keyspace 
+                          which is counted as a not supported keyspace if found in the 
+                          PMA drive.
+                        - Initialise server resource
+                        - Check the preloaded repositories count in the array
+                        - Modify a PMA repository that only exist in ROM (not persisted yet), 
+                          check the count should increase by 1 after successful modification
+                        - Modify the same PMA repository array again, the count 
+                          should not be increased again
+@SYMTestExpectedResults - On initialise count should be 4 (including the Non-PMA keyspace in PMA drive)
+                        - On modification of  a PMA repository that only exist in ROM (not persisted yet),
+                          the array should be 5 after successful modification
+                        - On the 2nd modification of the same repository, the 
+                          array should still be 5
+@SYMREQ                 REQ42876
+*/
+LOCAL_C void ArrayPreLoadedAndSetTestL()
+    {
+    TheTest.Next( _L( " @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4120 PMA Repositories Array test on pre-loaded PMA drive" ) );
+    CleanupCDriveL();
+    
+    RFs rfs;
+    User::LeaveIfError(rfs.Connect());
+    CleanupClosePushL(rfs);
+    
+    CFileMan* fm = CFileMan::NewL( rfs );
+    CleanupStack::PushL( fm );
+    
+    //copying test files to PMA drive for the server startup simulation
+    CopyTestFilesL(*fm, KPMAKeyspace1Src, KPMAKeyspace1Dst);
+    CopyTestFilesL(*fm, KPMAKeyspace2Src, KPMAKeyspace2Dst);
+    CopyTestFilesL(*fm, KPMAKeyspace3Src, KPMAKeyspace3Dst);
+    CopyTestFilesL(*fm, KPMAKeyspace4Src, KPMAKeyspace4Dst); //Non-PMA keyspace
+    CopyTestFilesL(*fm, KPMAKeyspace5Src, KPMAKeyspace5Dst); //Txt keyspace
+    
+    CleanupStack::PopAndDestroy(2, &rfs);
+    
+    
+    TUint32 pmaIntKey = {0x01};
+    TInt currentVal = 0;
+    TInt pmaCount = 0;
+    
+    TServerResources::InitialiseL();
+    CleanupStack::PushL(TCleanupItem(CloseTServerResources, 0));
+    
+    pmaCount = TServerResources::iPMADriveRepositories.Count();
+    TEST2(pmaCount, 4); //Initial load, there should be 4 repositories in PMA array    
+    
+    CenrepPMAArrayTest* theTest=CenrepPMAArrayTest::NewL(KPMATestUid);
+    CleanupStack::PushL(theTest);
+    
+    // Part 1. Persist a repository
+    theTest->SetL(pmaIntKey, 25); //Setting a value will trigger persist on the ROM repository to PMA Drive
+    theTest->GetL(pmaIntKey, currentVal); //Double check that the value has indeed changed
+    TEST2(currentVal, 25);
+    pmaCount = TServerResources::iPMADriveRepositories.Count();
+    TEST2(pmaCount, 5); //The array count should be 5 now 
+    
+    // Part 2. Persist the same repository
+    theTest->SetL(pmaIntKey, 30); //Calling set on the same repository 
+    theTest->GetL(pmaIntKey, currentVal); //Double check that the value has indeed changed
+    TEST2(currentVal, 30);
+    pmaCount = TServerResources::iPMADriveRepositories.Count();
+    TEST2(pmaCount, 5); //The array count should stay the same
+    
+    CleanupStack::PopAndDestroy(theTest);
+    
+    TRAPD(err, theTest = CenrepPMAArrayTest::NewL(KNonPMATestUid)); 
+    TEST2(err, KErrNotSupported);
+    
+    pmaCount = TServerResources::iPMADriveRepositories.Count();
+    //The array count should be less by 1 to 4 because the non-PMA 
+    // keyspace should be deleted and removed from the array.
+    TEST2(pmaCount, 4);
+    
+    CleanupStack::Pop(); // CloseTServerResources
+    
+    TServerResources::Close();
+    
+    }
+
+/**
+@SYMTestCaseID          PDS-CENTRALREPOSITORY-CT-4121
+@SYMTestCaseDesc        PMA repositories array test on empty PMA drive 
+@SYMTestPriority        High
+@SYMTestActions         - Cleanup PMA drive
+                        - Initialise server resource
+                        - Check the preloaded repositories count in the array
+                        - Modify a ROM-only PMA repository, check the count should increase by 1
+                        - Modify the same PMA repository array again, the count should not be increased again.
+@SYMTestExpectedResults - On initialise count should be 0
+                        - On modification of a ROM-only PMA repository, the array should be 1
+@SYMREQ                 REQ42876
+*/
+LOCAL_C void ArraySetTestL()
+    {
+    TheTest.Next( _L( " @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4121 PMA Repositories Array test on empty PMA drive" ) );
+    CleanupCDriveL();
+    TServerResources::InitialiseL();
+    CleanupStack::PushL(TCleanupItem(CloseTServerResources, 0));
+    
+    TInt pmaCount = TServerResources::iPMADriveRepositories.Count();
+    TEST2(pmaCount, 0);
+    
+    CenrepPMAArrayTest* theTest=CenrepPMAArrayTest::NewL(KPMATestUid);
+    CleanupStack::PushL(theTest);
+    
+    TUint32 pmaIntKey = {0x01};
+    theTest->SetL(pmaIntKey, 40);
+
+    pmaCount = TServerResources::iPMADriveRepositories.Count();
+    
+    TEST2(pmaCount, 1);
+    
+    CleanupStack::PopAndDestroy(theTest);
+    CleanupStack::Pop(); // CloseTServerResources
+    
+    TServerResources::Close();
+    
+    }
+
+LOCAL_C void MainL()
+    {
+    CActiveScheduler* scheduler = new(ELeave)CActiveScheduler;
+    CActiveScheduler::Install(scheduler);
+    
+    CleanupStack::PushL(scheduler);
+
+    //Array was preloaded during startup
+    ArrayPreLoadedAndSetTestL();
+    
+    //Array was not preloaded during startup
+    ArraySetTestL();
+    
+    CleanupCDriveL();
+
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+
+TInt E32Main()
+    {
+    TheTest.Title ();
+    TheTest.Start( _L( "PMA Array Tests" ) );
+    
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    TheTest(cleanup != NULL);
+    
+    __UHEAP_MARK;
+        
+    TRAPD(err, MainL());
+    TEST2(err, KErrNone);
+    
+    __UHEAP_MARKEND;
+    
+    TheTest.End ();
+    TheTest.Close ();
+    
+    delete cleanup;
+        
+    User::Heap().Check();
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/t_cenrep_pma_bur.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,262 @@
+// 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:
+//
+
+#include <e32test.h>
+#include <f32file.h>
+#include <badesca.h>
+#include "srvrepos_noc.h"
+#include "srvres.h"
+#include "cachemgr.h"
+#include "backup.h"
+#include "t_cenrep_helper.h"
+
+RTest TheTest(_L("t_cenrep_pma_bur.exe"));
+
+enum FileSet
+	{
+	EOriginals,
+	EChanged,
+	ERemoved,
+	EDEF058823L
+	};
+
+CRepositoryBackupClient* backupClient;
+
+CActiveScheduler* globalAS;
+
+const TUid KUidPmaBackupTestRepository1 = { 0xf1000201 };
+const TUid KUidPmaBackupTestRepository2 = { 0xf1000202 };
+const TUid KUidPmaBackupTestRepository3 = { 0xf1000203 };
+const TUid KUidPmaBackupTestRepository4 = { 0xf1000204 };
+const TUid KUidPmaBackupTestRepository5 = { 0xf1000205 };
+
+///////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////
+//Test macros and functions
+
+LOCAL_C void DeleteFilesL()
+	{
+	_LIT( KOldInstallFiles, "c:\\private\\102081E4\\*.*" );
+	_LIT( KOldPersistFiles, "c:\\private\\102081E4\\persists\\*.*" );
+	_LIT( KOldPMAFiles,     "c:\\private\\102081E4\\persists\\protected\\*.*" );
+
+	RFs fs;
+	User::LeaveIfError(fs.Connect());
+	CleanupClosePushL(fs);
+	CFileMan* fm = CFileMan::NewL( fs );
+	CleanupStack::PushL( fm );
+	
+	TInt r = KErrNone;
+
+	r = fm->Attribs( KOldInstallFiles, KEntryAttArchive, KEntryAttReadOnly, TTime( 0 ), CFileMan::ERecurse );
+    if ( r != KErrNone && r != KErrNotFound && r != KErrPathNotFound )
+        User::Leave(r);
+	r = fm->Delete( KOldInstallFiles );
+	if ( r != KErrNone && r != KErrNotFound && r != KErrPathNotFound )
+		User::Leave(r);
+	
+	r = fm->Attribs( KOldPersistFiles, KEntryAttArchive, KEntryAttReadOnly, TTime( 0 ), CFileMan::ERecurse );
+	if ( r != KErrNone && r != KErrNotFound && r != KErrPathNotFound )
+	    User::Leave(r);
+	r = fm->Delete( KOldPersistFiles );
+	if ( r != KErrNone && r != KErrNotFound && r != KErrPathNotFound )
+	    User::Leave(r);
+    
+	r = fm->Attribs( KOldPMAFiles, KEntryAttArchive, KEntryAttReadOnly, TTime( 0 ), CFileMan::ERecurse );
+	if ( r != KErrNone && r != KErrNotFound && r != KErrPathNotFound )
+	        User::Leave(r);
+    r = fm->Delete( KOldPMAFiles );
+	if ( r != KErrNone && r != KErrNotFound && r != KErrPathNotFound )
+		User::Leave(r);
+
+	CleanupStack::PopAndDestroy( 2 ); //fs and fm
+	}
+
+LOCAL_C void Check( TInt aValue, TInt aLine )
+	{
+	if ( !aValue )
+		{
+		TRAPD(err, DeleteFilesL());
+        if (err != KErrNone)
+            {
+            RDebug::Print( _L( "*** DeleteFilesL also failed with error %d expecting KErrNone\r\n"), err );
+            }
+		TheTest( EFalse, aLine );
+		}
+	}
+
+LOCAL_C void Check( TInt aValue, TInt aExpected, TInt aLine )
+	{
+	if ( aValue != aExpected )
+		{
+		RDebug::Print( _L( "*** Expected error: %d, got: %d\r\n"), aExpected, aValue );
+		TRAPD(err, DeleteFilesL());
+        if (err != KErrNone)
+            {
+            RDebug::Print( _L( "*** DeleteFilesL also failed with error %d expecting KErrNone\r\n"), err );
+            }
+		TheTest( EFalse, aLine );
+		}
+	}
+
+#define TEST(arg) ::Check((arg), __LINE__)
+#define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
+
+///////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////
+
+static void CloseTServerResources(TAny*)
+    {
+    TServerResources::Close();
+    }
+
+LOCAL_C void InstallFileSetL()
+	{
+	//There shouldn't be PMA keyspace in PMA drive that doesn't have its ROM equivalent
+	_LIT(KPmaCreReposInPMADriveSrc,    "z:\\private\\10202BE9\\f1000202.pma");
+	_LIT(KPmaCreReposInPMADriveTgt,    "c:\\private\\102081E4\\persists\\protected\\f1000202.cre");
+	_LIT(KPmaCreReposInPersistDirSrc,  "z:\\private\\10202BE9\\f1000203.crp");
+	_LIT(KPmaCreReposInPersistDirTgt,  "c:\\private\\102081E4\\persists\\f1000203.cre");
+	_LIT(KPmaTxtReposInInstallDirSrc,  "z:\\private\\10202BE9\\f1000204.txi");
+	_LIT(KPmaTxtReposInInstallDirTgt,  "c:\\private\\102081E4\\f1000204.txt");
+	_LIT(KPmaCreReposInInstallDirSrc,  "z:\\private\\10202BE9\\f1000205.cri");
+	_LIT(KPmaCreReposInInstallDirTgt,  "c:\\private\\102081E4\\f1000205.cre");
+	
+	DeleteFilesL();
+	// When the contents of the repository directories change, the cached iOwnerIdLookUpTable becomes invalid
+    TServerResources::iOwnerIdLookUpTable.Reset();
+	    
+	RFs rfs;
+    User::LeaveIfError(rfs.Connect());
+    CleanupClosePushL(rfs);
+    
+    CFileMan* fm = CFileMan::NewL( rfs );
+    CleanupStack::PushL( fm );
+    
+    CopyTestFilesL(*fm, KPmaCreReposInPMADriveSrc, KPmaCreReposInPMADriveTgt);
+    CopyTestFilesL(*fm, KPmaCreReposInPersistDirSrc, KPmaCreReposInPersistDirTgt);
+    CopyTestFilesL(*fm, KPmaTxtReposInInstallDirSrc, KPmaTxtReposInInstallDirTgt);
+    CopyTestFilesL(*fm, KPmaCreReposInInstallDirSrc, KPmaCreReposInInstallDirTgt);
+    
+    
+    CleanupStack::PopAndDestroy(2, &rfs);
+	}
+
+LOCAL_C void CleanupActiveScheduler(TAny* aShc)
+	{
+	CActiveScheduler::Replace( globalAS );
+	delete aShc;
+	}
+
+LOCAL_C void BackupRepositoryL( )
+	{
+	backupClient->CompleteOwnerIdLookupTableL();
+	TEST2(TServerResources::FindOwnerIdLookupMapping(KUidPmaBackupTestRepository1.iUid), KErrNotFound);
+	TEST2(TServerResources::FindOwnerIdLookupMapping(KUidPmaBackupTestRepository2.iUid), KErrNotFound);
+	TEST2(TServerResources::FindOwnerIdLookupMapping(KUidPmaBackupTestRepository3.iUid), KErrNotFound);
+	TEST2(TServerResources::FindOwnerIdLookupMapping(KUidPmaBackupTestRepository4.iUid), KErrNotFound);
+	TEST2(TServerResources::FindOwnerIdLookupMapping(KUidPmaBackupTestRepository5.iUid), KErrNotFound);
+	}
+
+/**
+@SYMTestCaseID SYSLIB-CENTRALREPOSITORY-UT-4174
+@SYMTestCaseDesc Verify iOwnerIdLookupTable does not contain PMA keyspaces before backup.
+@SYMTestPriority High
+@SYMTestActions  Copy PMA keyspaces to PMA drive, persists and install directory.
+                 Call CompleteOwnerIdLookupTableL().
+                 Call FindOwnerIdLookupMapping to verify iOwnerIdLookTable does not contain PMA keyspaces.
+@SYMTestExpectedResults iOwnerIdLookTable list does not contain PMA keyspaces.
+@SYMREQ 42876
+*/
+LOCAL_C void OwnerIdLookupTableTestsL()
+	{
+    TheTest.Next( _L( " @SYMTestCaseID:PDS-CENTRALREPOSITORY-UT-4174 OwnerIdLookupTable test on PMA repository " ) );
+
+	// create and install the active scheduler we need
+	CActiveScheduler* s = new(ELeave) CActiveScheduler;
+	
+	TCleanupItem tc(CleanupActiveScheduler, s);
+	CleanupStack::PushL(tc);
+	
+	CActiveScheduler::Replace( s );
+
+	backupClient = CRepositoryBackupClient::NewLC( TServerResources::iFs );
+	TEST( backupClient != 0 );
+
+	// These tests don't test Backup&Restore functionality over Secure Backup Server so cache management
+	// is not possible. For that reason, cache is disabled manually.
+	TServerResources::iCacheManager->DisableCache();
+
+	// Install known files
+	InstallFileSetL();
+	BackupRepositoryL( );
+
+	DeleteFilesL();
+	CleanupStack::PopAndDestroy( backupClient );
+	// Cleanup the scheduler
+	CleanupStack::PopAndDestroy( s );
+	}
+
+LOCAL_C void DoTestsL()
+	{
+	TServerResources::InitialiseL();
+	
+	CleanupStack::PushL(TCleanupItem(CloseTServerResources, 0));
+	TheTest.Next( _L( "OwnerIdLookupTable tests" ) );
+    OwnerIdLookupTableTestsL();
+    
+    CleanupStack::Pop(1); //TServerResources
+	TServerResources::Close();
+	}
+
+
+LOCAL_C void MainL()
+	{
+	// create and install the active scheduler we need for the cache manager in TServerResources::InitialiseL
+	globalAS=new(ELeave) CActiveScheduler;
+	CleanupStack::PushL(globalAS);
+	CActiveScheduler::Install(globalAS);
+
+	DoTestsL();
+	DeleteFilesL();
+
+	CleanupStack::PopAndDestroy(globalAS);
+
+	}
+
+TInt E32Main()
+	{
+    TheTest.Title ();
+    TheTest.Start( _L( "PMA Backup and restore tests" ) );
+    
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    TheTest(cleanup != NULL);
+    
+    __UHEAP_MARK;
+        
+    TRAPD(err, MainL());
+    TEST2(err, KErrNone);
+    
+    __UHEAP_MARKEND;
+    
+    TheTest.End ();
+    TheTest.Close ();
+    
+    delete cleanup;
+        
+    User::Heap().Check();
+    return KErrNone;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/t_cenrep_pma_fota.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,276 @@
+// 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:
+//
+
+#include <e32test.h>
+#include <f32file.h>
+#include <badesca.h>
+
+#include "srvrepos_noc.h"
+#include "srvres.h"
+#include "cachemgr.h"
+#include "sessnotf.h"
+#include "t_cenrep_helper.h"
+
+RTest TheTest(_L("t_cenrep_pma_fota.exe"));
+_LIT(KCachedVersionFile,"C:\\private\\10202be9\\romversion\\romversion_info.txt");
+_LIT(KModifiedSwVersion, "z:\\private\\10202be9\\sw_modified.txt");
+_LIT(KPMADriveCre,"C:\\private\\10202be9\\persists\\protected\\f1000602.cre");
+
+const TUid KUidRepository = { 0xf1000601 };
+
+const TUint32 KModifiedIntKey = 1;
+const TUint32 KModifiedRealKey = 2;
+const TUint32 KModifiedStringKey = 3;
+const TUint32 KDeletedIntKey = 4;
+const TUint32 KNewIntKey = 5;
+
+const TInt KModifiedIntValue = 123;
+const TReal KModifiedRealValue = 20.23;
+_LIT(KModifiedStringValue, "modified string");
+
+///////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////
+//Test macros and functions
+LOCAL_C void Check(TInt aValue, TInt aLine)
+    {
+    if (!aValue)
+        {
+        TRAPD(err, CleanupCDriveL());
+        if (err != KErrNone)
+            {
+            RDebug::Print(_L( "*** CleanupCDriveL also failed with error %d expecting KErrNone\r\n"),err);
+            }
+        TheTest(EFalse, aLine);
+        }
+    }
+
+LOCAL_C void Check(TInt aValue, TInt aExpected, TInt aLine)
+    {
+    if (aValue != aExpected)
+        {
+        RDebug::Print(_L( "*** Expected error: %d, got: %d\r\n"), aExpected,aValue);
+        TRAPD(err, CleanupCDriveL());
+        if (err != KErrNone)
+            {
+            RDebug::Print(_L( "*** CleanupCDriveL also failed with error %d expecting KErrNone\r\n"),err);
+            }
+        TheTest(EFalse, aLine);
+        }
+    }
+
+#define TEST(arg) ::Check((arg), __LINE__)
+#define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
+
+LOCAL_C void CopyTestFilesL()
+    {
+    _LIT( KPMAInstallRepSource, "z:\\private\\10202BE9\\f10006*.txi" );
+    _LIT( KPMAInstallRepTarget, "c:\\private\\10202BE9\\*.txt" );
+    _LIT( KPMAModifiedRepSource, "z:\\private\\10202BE9\\f10006*.pma" );
+    _LIT( KPMAModifiedRepTarget, "c:\\private\\10202BE9\\persists\\protected\\*.cre" );
+
+    RFs rfs;
+    User::LeaveIfError(rfs.Connect());
+    CleanupClosePushL(rfs);
+    CFileMan* fm = CFileMan::NewL(rfs);
+    CleanupStack::PushL(fm);
+
+    CopyTestFilesL(*fm, KPMAInstallRepSource, KPMAInstallRepTarget);
+    CopyTestFilesL(*fm, KPMAModifiedRepSource, KPMAModifiedRepTarget);
+
+    CleanupStack::PopAndDestroy(2, &rfs);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////
+static void CloseTServerResources(TAny*)
+    {
+    TServerResources::Close();
+    }
+
+LOCAL_C void CleanUp()
+    {
+    // If cache manager is initialized and used before, we flush it
+    if (TServerResources::iCacheManager)
+        {
+        TServerResources::iCacheManager->FlushCache();
+        }
+    TServerResources::iObserver->CloseiOpenRepositories();
+    TServerResources::iObserver->Reset();
+    TServerResources::iOwnerIdLookUpTable.Reset();
+    User::After(KGeneralDelay);
+    }
+
+LOCAL_C void VerifyPMAUnchangedByFOTAL()
+    {
+    //Check the merge content for correctness.
+    CSessionNotifier* notifier = new (ELeave) CSessionNotifier;
+    CleanupStack::PushL(notifier);
+
+    CServerRepository* repository = new (ELeave) CServerRepository();
+    CleanupStack::PushL(repository);
+
+    repository->OpenL(KUidRepository, *notifier);
+
+    //Get the user added setting, it should still be there.
+    TInt intValue = 0;
+    TInt r = repository->Get(KNewIntKey, intValue);
+    TEST(r == KErrNone);
+    //Get the user deleted setting, it should still be missing.
+    r = repository->Get(KDeletedIntKey, intValue);
+    TEST(r == KErrNotFound);
+
+    //Get user modified settings. It should still contain the user modification
+    r = repository->Get(KModifiedIntKey, intValue);
+    TEST(r == KErrNone);
+    TEST(intValue == KModifiedIntValue);
+
+    TReal realValue = 0.0;
+    r = repository->Get(KModifiedRealKey, realValue);
+    TEST(r == KErrNone);
+    TEST(realValue == KModifiedRealValue);
+
+    TBuf8<50> stringValue;
+    r = repository->Get(KModifiedStringKey, stringValue);
+    TEST(r == KErrNone);
+    TPtr16 str16((TUint16*) stringValue.Ptr(), stringValue.Length() / 2,stringValue.Length() / 2);
+    TEST(str16.Compare(KModifiedStringValue) == 0);
+
+    repository->Close();
+    CleanupStack::PopAndDestroy(2);//repository, notifier
+    }
+
+/**
+ @SYMTestCaseID          PDS-CENTRALREPOSITORY-CT-4122
+ @SYMTestCaseDesc        FOTx update test on PMA keyspaces
+ @SYMTestPriority        High
+ @SYMTestActions         Copy a PMA cre file to PMA drive that contains different value from the ROM keyspace.
+ Call CheckROMReflashL to simulate a reboot of cenrep.
+ Check that all the setting in the PMA cre file is not modified at all to the ROM value.
+ @SYMTestExpectedResults After calling CheckROMReflashL setting values in the PMA drive's cre file should not changed
+ @SYMREQ                 REQ42876
+ */
+LOCAL_C void PMARepFOTxL()
+    {
+    TheTest.Next(_L( " @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4122 PMA FOTx update test" ));//Force a rom update for this repository.
+
+    TServerResources::InitialiseL();
+    CleanupStack::PushL(TCleanupItem(CloseTServerResources, 0));
+
+    CFileMan* fm = CFileMan::NewL(TServerResources::iFs);
+    CleanupStack::PushL(fm);
+
+    //Initial cleanup
+    //Copy of modified stored rom version info
+    User::LeaveIfError(fm->Copy(KModifiedSwVersion, KCachedVersionFile,CFileMan::EOverWrite));
+    User::LeaveIfError(fm->Attribs(KCachedVersionFile, 0, KEntryAttReadOnly,TTime(0)));
+    CleanupStack::PopAndDestroy();//fm
+    
+    User::After(KGeneralDelay);
+    // flush the cache manager contents.
+    CleanUp();
+
+    CServerRepository::CheckROMReflashL();
+
+    VerifyPMAUnchangedByFOTAL();
+    
+    CleanupStack::Pop(); // CloseTServerResources
+    
+    TServerResources::Close();
+    }
+
+/**
+ @SYMTestCaseID          PDS-CENTRALREPOSITORY-CT-4123
+ @SYMTestCaseDesc        FOTx test on PMA keyspaces with no basis in install directory or rom
+ @SYMTestPriority        High
+ @SYMTestActions         Copy a repository into the PMA drive that has no rom or SWI equivalent.
+ Call CheckROMReflashL to simulate a reboot of cenrep.
+ Verify that the persisted repository is NOT removed.
+ @SYMTestExpectedResults Persisted repository is not removed during rom update.
+ @SYMREQ                 REQ42876
+ */
+LOCAL_C void NoRomNoInstallPMARepFOTxL()
+    {
+    TheTest.Next(_L( " @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4123 PMA FOTx delete test" ));
+    
+    TServerResources::InitialiseL();
+    CleanupStack::PushL(TCleanupItem(CloseTServerResources, 0));
+    
+    CFileMan* fm = CFileMan::NewL(TServerResources::iFs);
+    CleanupStack::PushL(fm);
+
+    //Copy of modified stored rom version info
+    User::LeaveIfError(fm->Copy(KModifiedSwVersion, KCachedVersionFile,CFileMan::EOverWrite));
+    User::LeaveIfError(fm->Attribs(KCachedVersionFile, 0, KEntryAttReadOnly,TTime(0)));
+    User::After(KGeneralDelay);
+    CleanupStack::PopAndDestroy();//fm
+
+    CServerRepository::CheckROMReflashL();
+    TEntry entry;
+
+    TEST(TServerResources::iFs.Entry(KPMADriveCre, entry) == KErrNone);
+    
+    CleanupStack::Pop(); //CloseTServerResources
+    
+    TServerResources::Close();
+
+    }
+
+LOCAL_C void DoTestsL()
+    {
+    PMARepFOTxL();
+    NoRomNoInstallPMARepFOTxL();
+    }
+
+LOCAL_C void MainL()
+    {
+    CopyTestFilesL();
+
+    // create and install the active scheduler we need
+    CActiveScheduler* s = new (ELeave) CActiveScheduler;
+    CleanupStack::PushL(s);
+    CActiveScheduler::Install(s);
+
+    DoTestsL();
+
+    CleanupCDriveL();
+
+    // Cleanup the scheduler
+    CleanupStack::PopAndDestroy(s);
+    }
+
+TInt E32Main()
+    {
+    TheTest.Title ();
+    TheTest.Start(_L( "PMA Fota Unit Tests" ));
+    
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    TheTest(cleanup != NULL);
+    
+    __UHEAP_MARK;
+        
+    TRAPD(err, MainL());
+    TEST2(err, KErrNone);
+    
+    __UHEAP_MARKEND;
+    
+    TheTest.End ();
+    TheTest.Close ();
+    
+    delete cleanup;
+        
+    User::Heap().Check();
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/t_cenrep_pma_multirofs.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,372 @@
+// 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:
+// t_oomcenrep.cpp
+// 
+//
+
+#include "t_cenrep_helper.h"
+#include <e32test.h>
+#include <f32file.h>
+#include <utf.h>
+#include "srvsess.h"
+#include "sessmgr.h"
+#include "srvres.h"
+#include "srvreqs.h"
+#include "cachemgr.h"
+#include "clientrequest.h"
+#include "install.h"
+#include <bautils.h>
+
+LOCAL_D RTest                TheTest (_L ("t_cenrep_pma_multirofs.exe"));
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Test macros and functions
+LOCAL_C void Check(TInt aValue, TInt aExpected, TInt aLine, TBool aIsHexFormat=EFalse)
+    {
+    if(aValue != aExpected)
+        {
+        if(aIsHexFormat)
+            {
+            RDebug::Print(_L("*** Expected error: 0x%x, got: 0x%x\r\n"), aExpected, aValue);
+            }
+        else
+            {
+            RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+            }
+        TRAPD(err, CleanupCDriveL());
+        if (err != KErrNone)
+            {
+            RDebug::Print( _L( "*** CleanupCDriveL also failed with error %d expecting KErrNone\r\n"), err );
+            }
+        TheTest(EFalse, aLine);
+        }
+    }
+
+#define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
+#define TESTHEX2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__, ETrue)
+
+/////////////////////////////////////////////////////////////////////////////////////////
+static void CloseTServerResources(TAny*)
+    {
+    TServerResources::Close();
+    }
+
+/////////////////////////////////////////////////////////////////////////////////////////
+class CenrepSrvPmaMultiRofsTest :public CBase
+{
+public:
+    CenrepSrvPmaMultiRofsTest();
+    ~CenrepSrvPmaMultiRofsTest();
+    static CenrepSrvPmaMultiRofsTest* NewL(TUid aReposUid);
+    void DoHeapRepositoryContentCheckL();
+
+private:
+    void ConstructL(TUid aReposUid);
+public:
+    CServerRepository* iServerRepo;
+    CSessionNotifier* iSessionNotif;
+};
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+CenrepSrvPmaMultiRofsTest::CenrepSrvPmaMultiRofsTest(){}
+
+CenrepSrvPmaMultiRofsTest::~CenrepSrvPmaMultiRofsTest()
+    {
+    if (iServerRepo)
+        {
+        if (iSessionNotif)
+            {
+            iServerRepo->Close();
+            }
+        delete iServerRepo;
+        }
+    if (iSessionNotif)
+        delete iSessionNotif;
+
+    // Cache must be disabled here. Otherwise, if any idle repositories exists, they will
+    // still be open (have their pointers in the iOpenRepositories list) and the list will leak.
+    TServerResources::iCacheManager->DisableCache();
+    TServerResources::iObserver->CloseiOpenRepositories();
+    }
+
+CenrepSrvPmaMultiRofsTest* CenrepSrvPmaMultiRofsTest::NewL(TUid aReposUid)
+    {
+    CenrepSrvPmaMultiRofsTest* self=new (ELeave)CenrepSrvPmaMultiRofsTest;
+    CleanupStack::PushL(self);
+    self->ConstructL(aReposUid);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+void CenrepSrvPmaMultiRofsTest::ConstructL(TUid aReposUid)
+    {
+    iServerRepo=new (ELeave)CServerRepository();
+    iSessionNotif=new (ELeave) CSessionNotifier();
+
+    iServerRepo->OpenL(aReposUid,*iSessionNotif);
+    }
+
+//Deletes the CServerRepository object properly
+LOCAL_C void ReleaseRepository(TAny* aServerRepository)
+    {
+    CServerRepository* serverRepository = static_cast<CServerRepository*>(aServerRepository);
+
+    TServerResources::iCacheManager->DisableCache();
+    TServerResources::iObserver->CloseiOpenRepositories();
+    delete serverRepository;
+    TServerResources::iCacheManager->EnableCache();
+    }
+
+//Opening a repository and closing the repository
+LOCAL_C void OpenCloseL(TUid aReposUid)
+{
+    CServerRepository* serverRepo=new (ELeave)CServerRepository();
+    TCleanupItem cleanupItem(&ReleaseRepository, serverRepo);
+    CleanupStack::PushL(cleanupItem);
+
+    CSessionNotifier* sessNotif=new (ELeave)CSessionNotifier();
+    CleanupStack::PushL(sessNotif);
+
+    // test access to a valid repository
+    serverRepo->OpenL(aReposUid,*sessNotif);
+    serverRepo->Close();
+
+    CleanupStack::PopAndDestroy(sessNotif);
+    CleanupStack::PopAndDestroy(1);
+}
+
+// Type definition for pointer to function
+// Used for functions that can't use CenrepSrvPmaMultiRofsTest::ConstructL
+/**
+Wrapper function to call all test functions
+@param  testFuncL pointer to test function
+@param  aTestDesc test function name
+*/
+LOCAL_C void DoMultiRofsReposTestL( TUid aReposUid, const TDesC& aTestDesc, TInt aExpectedResult)
+    {
+    TheTest.Next(aTestDesc);
+
+    TInt err;
+    __UHEAP_MARK;
+
+    //Initializing the server resources
+    TServerResources::InitialiseL ();
+
+    TRAP(err, OpenCloseL(aReposUid));
+    TEST2(err, aExpectedResult);
+
+    //Freeing the server resources
+    TServerResources::Close();
+
+    __UHEAP_MARKEND;
+
+    }
+
+void CenrepSrvPmaMultiRofsTest::DoHeapRepositoryContentCheckL()
+    {
+    CServerRepository* srv=iServerRepo;
+    //check setting and its meta
+    TServerSetting* setting=NULL;
+
+    setting=srv->GetSetting(1);
+    TESTHEX2(setting->iKey,1);
+    TESTHEX2(setting->iMeta,0x80000010);
+    //points to global default policy here
+    TESTHEX2(setting->iAccessPolicy->LowKey(),KUnspecifiedKey);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),1);
+
+    setting=srv->GetSetting(2);
+    TESTHEX2(setting->iKey,2);
+    TESTHEX2(setting->iMeta,0xA0000010);
+    //points to global default policy here
+    TESTHEX2(setting->iAccessPolicy->LowKey(),KUnspecifiedKey);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),1);
+
+    setting=srv->GetSetting(3);
+    TESTHEX2(setting->iKey,3);
+    TESTHEX2(setting->iMeta,0x800000FF);
+    //points to global default policy here
+    TESTHEX2(setting->iAccessPolicy->LowKey(),KUnspecifiedKey);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),1);
+
+    setting=srv->GetSetting(4);
+    TESTHEX2(setting->iKey,4);
+    TESTHEX2(setting->iMeta,0x80000010);
+    TESTHEX2(setting->iAccessPolicy->LowKey(),4);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),0);
+
+    setting=srv->GetSetting(5);
+    TESTHEX2(setting->iKey,5);
+    TESTHEX2(setting->iMeta,0xC0000063);
+    //points to global default policy here
+    TESTHEX2(setting->iAccessPolicy->LowKey(),KUnspecifiedKey);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),1);
+
+    setting=srv->GetSetting(6);
+    TESTHEX2(setting->iKey,6);
+    TESTHEX2(setting->iMeta,0x90000010);
+    TESTHEX2(setting->iAccessPolicy->LowKey(),6);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),0);
+
+    setting=srv->GetSetting(7);
+    TESTHEX2(setting->iKey,7);
+    TESTHEX2(setting->iMeta,0x80000010);
+    TESTHEX2(setting->iAccessPolicy->LowKey(),7);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),0);
+
+    setting=srv->GetSetting(9);
+    TESTHEX2(setting->iKey,9);
+    TESTHEX2(setting->iMeta,0x80000010);
+    TESTHEX2(setting->iAccessPolicy->LowKey(),KUnspecifiedKey);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),1);
+
+    setting=srv->GetSetting(10);
+    TESTHEX2(setting->iKey,10);
+    TESTHEX2(setting->iMeta,0x80000010);
+    TESTHEX2(setting->iAccessPolicy->LowKey(),10);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),0);
+
+    setting=srv->GetSetting(300);
+    TESTHEX2(setting->iKey,300);
+    TESTHEX2(setting->iMeta,0x900003E7);
+    TESTHEX2(setting->iAccessPolicy->LowKey(),KUnspecifiedKey);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),1);
+    }
+
+LOCAL_C void DoAdditionalCheckingL(TUid aReposUid)
+    {
+    TServerResources::InitialiseL ();
+    CleanupStack::PushL(TCleanupItem(CloseTServerResources, 0));
+    
+    CenrepSrvPmaMultiRofsTest* test=CenrepSrvPmaMultiRofsTest::NewL(aReposUid);
+    CleanupStack::PushL(test);
+    test->DoHeapRepositoryContentCheckL();
+
+    CleanupStack::PopAndDestroy(); //test
+    CleanupStack::Pop(); //CloseTServerResources
+
+    TServerResources::Close();
+    }
+
+/**
+@SYMTestCaseID PDS-CENTRALREPOSITORY-UT-4124
+@SYMTestCaseDesc Server side loading of a multiple ROFS PMA repository files
+@SYMTestPriority High
+@SYMTestActions  - Create the server class CServerRepository and used it to load the multi ROFS PMA keyspace.
+                 - Test are repeated for the following keyspace combination such as TXT/TXT, CRE/TXT or TXT/CRE and CRE/CRE.
+                 - Test will also verify the resulting merged settings which includes checking
+                   individual metadata bits and security policy bits
+                 - Test will also be repeated for opening PMA keyspace with non-PMA keyspace in different ROFS layers. 
+                 
+@SYMTestExpectedResults - Server loading of the multi rofs keyspace should not fail if the type of the keyspace is the same
+                        - Server loading of the multi rofs keyspace should fail if the type of the keyspace is not the same
+@SYMREQ REQ42876
+*/
+LOCAL_C void DoPMAMultiRofsTestL()
+    {
+    TheTest.Next (_L (" @SYMTestCaseID:PDS-CENTRALREPOSITORY-UT-4124 Centrep Server PMA MultiROFS Test"));
+
+    const TUid KMultiRofsRepositoryUid0={0xF1000900};//TXT1(core) - CRE1(rofs1) - TXT1(rofs2) - CRE1(rofs3)
+    const TUid KMultiRofsRepositoryUid1={0xF1000901};//TXT1(core) - TXT1(rofs1)
+    const TUid KMultiRofsRepositoryUid2={0xF1000902};//CRE1(core) - CRE1(rofs1)
+    const TUid KMultiRofsRepositoryUid3={0xF1000903};//TXT1(core) - CRE1(rofs1)
+    const TUid KMultiRofsRepositoryUid4={0xF1000904};//CRE1(core) - TXT1(rofs1)
+    const TUid KMultiRofsRepositoryUid5={0xF1000905};//TXT1(core) - TXT0(rofs1)
+    const TUid KMultiRofsRepositoryUid6={0xF1000906};//TXT0(core) - TXT1(rofs1)
+    const TUid KMultiRofsRepositoryUid7={0xF1000907};//CRE1(core) - CRE0(rofs1)
+    const TUid KMultiRofsRepositoryUid8={0xF1000908};//CRE0(core) - CRE1(rofs1)
+    const TUid KMultiRofsRepositoryUid9={0xF1000909};//CRE1(core) - TXT0(rofs1)
+    const TUid KMultiRofsRepositoryUid10={0xF100090A};//CRE0(core) - TXT1(rofs1)
+    const TUid KMultiRofsRepositoryUid11={0xF100090B};//TXT1(core) - CRE0(rofs1)
+    const TUid KMultiRofsRepositoryUid12={0xF100090C};//TXT0(core) - CRE1(rofs1)
+    const TUid KMultiRofsRepositoryUid13={0xF100090D};//TXT1(core) - CRE1(rofs1) - TXT1(rofs2) - CRE0(rofs3)
+    // Note: TXT1 means the file is PMA repository with .txt format
+    //       TXT0 means the file is non-PMA repository with .txt format
+    //       CRE1 means the file is PMA repository with .cre format
+    //       CRE0 means the file is non-PMA repository with .cre format
+    
+    //First Testuid=KMultiRofsRepositoryUid
+    //Testing the OOM of multi rofs processing
+    // 0xF1000900 to 0xF1000904 expect KErrNone as they are all PMA keyspaces of the same UID across 
+    //   multiple ROFS layers.
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid0, _L("Open Close OOM Multi ROFS Test 0"),KErrNone);
+    DoAdditionalCheckingL(KMultiRofsRepositoryUid0);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid1, _L("Open Close OOM Multi ROFS Test 1"),KErrNone);
+    DoAdditionalCheckingL(KMultiRofsRepositoryUid1);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid2, _L("Open Close OOM Multi ROFS Test 2"),KErrNone);
+    DoAdditionalCheckingL(KMultiRofsRepositoryUid2);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid3, _L("Open Close OOM Multi ROFS Test 3"),KErrNone);
+    DoAdditionalCheckingL(KMultiRofsRepositoryUid3);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid4, _L("Open Close OOM Multi ROFS Test 4"),KErrNone);
+    DoAdditionalCheckingL(KMultiRofsRepositoryUid4);
+    
+    // 0xF1000905 to 0xF100090D expect KErrCorrupt as they have at least mixed one PMA keyspace and one 
+    //  Non-PMA keyspace of the same UID across multiple ROFS layers.
+    // No need for additional checking of merged value because it should be corrupt.
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid5, _L("Open Close OOM Multi ROFS Test 5"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid6, _L("Open Close OOM Multi ROFS Test 6"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid7, _L("Open Close OOM Multi ROFS Test 7"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid8, _L("Open Close OOM Multi ROFS Test 8"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid9, _L("Open Close OOM Multi ROFS Test 9"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid10, _L("Open Close OOM Multi ROFS Test 10"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid11, _L("Open Close OOM Multi ROFS Test 11"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid12, _L("Open Close OOM Multi ROFS Test 12"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid13, _L("Open Close OOM Multi ROFS Test 13"),KErrCorrupt);
+    }
+
+LOCAL_C void MainL()
+    {
+    CActiveScheduler* scheduler = new(ELeave)CActiveScheduler;
+    CActiveScheduler::Install(scheduler);
+
+    DoPMAMultiRofsTestL();
+    CleanupCDriveL();
+
+    delete scheduler;
+    }
+
+TInt E32Main ()
+    {
+    TheTest.Title ();
+    TheTest.Start(_L("PMA Multi ROFS CenrepServ Test"));
+    
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    TheTest(cleanup != NULL);
+    
+    __UHEAP_MARK;
+        
+    TRAPD(err, MainL());
+    TEST2(err, KErrNone);
+    
+    __UHEAP_MARKEND;
+    
+    TheTest.End ();
+    TheTest.Close ();
+    
+    delete cleanup;
+        
+    User::Heap().Check();
+    return KErrNone;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/t_cenrep_pma_oom.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,1335 @@
+// 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:
+//
+
+#include "t_cenrep_helper.h"
+#include <e32test.h>
+#include <f32file.h>
+#include <utf.h>
+#include "srvsess.h"
+#include "sessmgr.h"
+#include "srvres.h"
+#include "srvreqs.h"
+#include "cachemgr.h"
+#include "clientrequest.h"
+#include "install.h"
+#include <bautils.h>
+
+LOCAL_D RTest                   TheTest(_L("t_cenrep_pma_oom.exe"));
+
+_LIT( KCentralRepositoryServerName, "Centralrepositorysrv");
+
+_LIT(KInstallDirFile,           "c:\\private\\10202BE9\\persists\\installdir.bin");
+
+_LIT(KInstallPMATxtFileSrc,     "z:\\private\\10202BE9\\f1000701.txi");
+_LIT(KInstallPMATxtFileTgt,     "c:\\private\\10202BE9\\f1000701.txt");
+
+_LIT(KInstallPMACreFileSrc,     "z:\\private\\10202BE9\\f1000700.cri");
+_LIT(KInstallPMACreFileTgt,     "c:\\private\\10202BE9\\f1000700.cre");
+
+//Test repositories Uid
+const TUid KTestRepositoryUid={0xf1000701};
+
+static TUid KCurrentTestUid;
+
+//Burst rate for __UHEAP_SETBURSTFAIL
+#ifdef _DEBUG
+const TInt KBurstRate = 20;
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Test macros and functions
+LOCAL_C void Check(TInt aValue, TInt aLine)
+    {
+    if(!aValue)
+        {
+        TRAPD(err, CleanupCDriveL());
+        if (err != KErrNone)
+            {
+            RDebug::Print( _L( "*** CleanupCDriveL also failed with error %d expecting KErrNone\r\n"), err );
+            }
+        TheTest(EFalse, aLine);
+        }
+    }
+LOCAL_C void Check(TInt aValue, TInt aExpected, TInt aLine, TBool aIsHexFormat=EFalse)
+    {
+    if(aValue != aExpected)
+        {
+        if(aIsHexFormat)
+            {
+            RDebug::Print(_L("*** Expected error: 0x%x, got: 0x%x\r\n"), aExpected, aValue);
+            }
+        else
+            {
+            RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+            }
+        TRAPD(err, CleanupCDriveL());
+        if (err != KErrNone)
+            {
+            RDebug::Print( _L( "*** CleanupCDriveL also failed with error %d expecting KErrNone\r\n"), err );
+            }
+        TheTest(EFalse, aLine);
+        }
+    }
+#define TEST(arg) ::Check((arg), __LINE__)
+#define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
+#define TESTHEX2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__, ETrue)
+#define TESTKErrNone(aValue) ::Check(aValue,0,__LINE__);
+
+///////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////
+static void CloseTServerResources(TAny*)
+    {
+    TServerResources::Close();
+    }
+
+/////////////////////////////////////////////////////////////////////////////////////////
+class CenrepSrvOOMTest :public CBase
+{
+public:
+    void GetL();
+    void FindL();
+    void ResetL();
+    void NotifyL();
+    void SetL();
+    void CreateL();
+    void DeleteL();
+    void MoveL();
+
+    CenrepSrvOOMTest();
+    ~CenrepSrvOOMTest();
+    static CenrepSrvOOMTest* NewL();
+#ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+    void DoHeapRepositoryContentCheckL();
+#endif
+private:
+    void ConstructL();
+public:
+    CServerRepository* iServerRepo;
+    CSessionNotifier* iSessionNotif;
+};
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+class CenrepSwiOOMTest :public CBase
+{
+public:
+    void InstallTxtPmaL(TBool aIsSetup);
+    void InstallCrePmaL(TBool aIsSetup);
+    
+    CenrepSwiOOMTest();
+    ~CenrepSwiOOMTest();
+    static CenrepSwiOOMTest* NewL();
+private:
+    void ConstructL();
+    CCentRepSWIWatcher* iSwiWatcher;
+public:
+};
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+CenrepSrvOOMTest::CenrepSrvOOMTest(){}
+
+CenrepSrvOOMTest::~CenrepSrvOOMTest()
+    {
+    if(iServerRepo)
+        {
+        if(iSessionNotif)
+            {
+            iServerRepo->Close();
+            }
+        delete iServerRepo;
+        }
+    if(iSessionNotif)
+        {
+        delete iSessionNotif;
+        }
+
+    // Cache must be disabled here. Otherwise, if any idle repositories exists, they will
+    // still be open (have their pointers in the iOpenRepositories list) and the list will leak.
+    TServerResources::iCacheManager->DisableCache();
+    TServerResources::iObserver->CloseiOpenRepositories();
+    }
+
+CenrepSrvOOMTest* CenrepSrvOOMTest::NewL()
+    {
+    CenrepSrvOOMTest* self=new (ELeave)CenrepSrvOOMTest;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+void CenrepSrvOOMTest::ConstructL()
+    {
+    iServerRepo=new (ELeave)CServerRepository();
+    iSessionNotif=new (ELeave) CSessionNotifier();
+
+    iServerRepo->OpenL(KCurrentTestUid,*iSessionNotif);
+    }
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+CenrepSwiOOMTest::CenrepSwiOOMTest(){}
+
+CenrepSwiOOMTest::~CenrepSwiOOMTest()
+    {
+    delete iSwiWatcher;
+    }
+
+CenrepSwiOOMTest* CenrepSwiOOMTest::NewL()
+    {
+    CenrepSwiOOMTest* self=new (ELeave)CenrepSwiOOMTest;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+void CenrepSwiOOMTest::ConstructL()
+    {
+    iSwiWatcher = CCentRepSWIWatcher::NewL(TServerResources::iFs);
+    }
+
+//Getting various information and security policy from the repository
+//TInt                 CServerRepository::Get(TUint32 aId,T& aVal)
+//TServerSetting*     CServerRepository::GetSetting(TUint32 aId)
+void CenrepSrvOOMTest::GetL()
+    {
+    TInt err=KErrNone;
+    TInt keyInt=0;
+    TServerSetting* srvsetting;
+    //----------Getting the TInt(1-15)-----------------------------
+    for(TInt i=1;i<=15;i++)
+        {
+        err=iServerRepo->Get(i,keyInt);
+        //Remember the policy check is done at the session level
+        TESTKErrNone(err);
+        TEST2(i,keyInt);
+        srvsetting=iServerRepo->GetSetting(i);
+        TEST(srvsetting->Key()==static_cast<TUint32>(i));
+        }
+    //---------Getting the TReal(16-19)---------------------------
+    TReal keyValue;
+    err=iServerRepo->Get(16,keyValue);
+    TESTKErrNone(err);
+    TEST(keyValue==10.1010);
+    srvsetting=iServerRepo->GetSetting(16);
+    TESTHEX2(srvsetting->Key(),16);
+
+    err=iServerRepo->Get(19,keyValue);
+    TESTKErrNone(err);
+    TEST(keyValue==13.1313);
+
+    //----------Getting the String(20-23)-----------------------
+    TBuf8<50> keyString;
+    _LIT(KFourteen,"fourteen");
+    err=iServerRepo->Get(20,keyString);
+    TESTKErrNone(err);
+    //Even ascii(8 bytes) are stored as 16 bytes!!!
+    TPtr16 str16((TUint16*) keyString.Ptr(),keyString.Length()/2,keyString.Length()/2);
+    TEST(str16.Compare(KFourteen)==0);
+    srvsetting=iServerRepo->GetSetting(20);
+    TESTHEX2(srvsetting->Key(),20);
+
+    //---------Getting the String8(0x79)------------------------
+    TBuf8<50> keyString8;
+    _LIT8(KString8,"string8");
+    err=iServerRepo->Get(0x79,keyString8);
+    TESTKErrNone(err);
+    TEST(keyString8.Compare(KString8)==0);
+    srvsetting=iServerRepo->GetSetting(0x79);
+    TESTHEX2(srvsetting->Key(),0x79);
+
+    //---------Getting the binary(0x82)-------------------------
+    TBuf8<50> keyBinary;
+    _LIT8(KBinary8,"\x12\x34\xAB\xCD");
+    err=iServerRepo->Get(0x82,keyBinary);
+    TESTKErrNone(err);
+    //temporarily added to solve coverage problem in WINSCW
+    TEST(keyBinary.Compare(KBinary8)==0);
+    srvsetting=iServerRepo->GetSetting(0x82);
+    TESTHEX2(srvsetting->Key(),0x82);
+
+    //----------Getting individual policy-----------------------
+    //Current Exe has caps AllFiles+WriteDeviceData+ReadDeviceData
+    RThread currentThread;
+    TSecurityPolicy secPolicy;
+    //default policy
+    secPolicy=iServerRepo->GetDefaultReadAccessPolicy();
+    TEST(secPolicy.CheckPolicy(currentThread)==1);
+    secPolicy=iServerRepo->GetDefaultWriteAccessPolicy();
+    TEST(secPolicy.CheckPolicy(currentThread)==1);
+
+    //check settings policies
+    //0x2 int 2 1 cap_rd=CommDD cap_wr=WriteDeviceData
+    //0x19 int 25 0 //defined in range policies with cap_rd=NetworkServices
+    secPolicy=iServerRepo->GetReadAccessPolicy(2);
+    TEST(secPolicy.CheckPolicy(currentThread)==0);
+    secPolicy=iServerRepo->GetWriteAccessPolicy(2);
+    TEST(secPolicy.CheckPolicy(currentThread)==1);
+    secPolicy=iServerRepo->GetReadAccessPolicy(25);
+    TEST(secPolicy.CheckPolicy(currentThread)==0);
+
+    }
+
+// now that write operations must be done in transactions, setting up this helper
+// function to perform single Sets for the purpose of this test.
+template<class T>
+static TInt RepositorySingleSetL(CServerRepository& aRep, TUint32 aKey, const T& aValue)
+    {
+    aRep.StartTransaction(EConcurrentReadWriteTransaction);
+    aRep.CleanupCancelTransactionPushL();
+    aRep.TransactionSetL(aKey, aValue);
+    CleanupStack::Pop();
+    TUint32 keyInfo;
+    return User::LeaveIfError(aRep.CommitTransaction(keyInfo));
+    };
+
+//Setting OOM testing
+void CenrepSrvOOMTest::SetL()
+    {
+    TInt ret=KErrNone;
+    TInt intValue=0;
+    TReal realValue=0;
+
+    //---------------SetL-----------------------------------
+    //Setting an integer key
+    ret = RepositorySingleSetL(*iServerRepo, 0x60, 600);
+    TESTKErrNone(ret);
+    ret=iServerRepo->Get(0x60,intValue);
+    TESTHEX2(intValue, 600);
+
+    //Setting a real key
+    ret = RepositorySingleSetL(*iServerRepo, 0x66, 99.99);
+    TESTKErrNone(ret);
+    ret=iServerRepo->Get(0x66,realValue);
+    TEST(realValue==99.99);
+
+    //Setting a string key
+    //Even ascii(8 bytes) are stored as 16 bytes!!!
+    _LIT8(KString,"sixhundred");
+    TBuf8<50> stringChangeValue=KString();
+    ret = RepositorySingleSetL(*iServerRepo, 0x69, stringChangeValue);
+    TESTKErrNone(ret);
+
+    TBuf8<50> keyString;
+    ret=iServerRepo->Get(0x69,keyString);
+    TESTKErrNone(ret);
+    TEST(keyString.Compare(KString)==0);
+    }
+
+// now that write operations must be done in transactions, setting up this helper
+// function to perform single Creates for the purpose of this test.
+template<class T>
+static TInt RepositorySingleCreateL(CServerRepository& aRep, TUint32 aKey, const T& aValue, TUint32* aMeta)
+    {
+    aRep.StartTransaction(EConcurrentReadWriteTransaction);
+    aRep.CleanupCancelTransactionPushL();
+    aRep.TransactionCreateL(aKey, aValue, aMeta);
+    CleanupStack::Pop();
+    TUint32 keyInfo;
+    return User::LeaveIfError(aRep.CommitTransaction(keyInfo));
+    };
+
+void CenrepSrvOOMTest::CreateL()
+    {
+    TInt ret=KErrNone;
+    TInt intValue=0;
+    TReal realValue=0;
+
+    //--------------CreateL-----------------------------------
+    //Creating an integer key
+    TInt intRetValue;
+    intValue=9000;
+    RepositorySingleCreateL(*iServerRepo, 0x90, intValue, NULL);
+    TESTKErrNone(ret);
+    ret=iServerRepo->Get(0x90,intRetValue);
+    TESTKErrNone(ret);
+    TESTHEX2(intRetValue, intValue);
+
+    //Creating a real key
+    TReal realRetValue;
+    realValue=33.3333;
+    RepositorySingleCreateL(*iServerRepo, 0x92, realValue, NULL);
+    TESTKErrNone(ret);
+    ret=iServerRepo->Get(0x92,realRetValue);
+    TESTKErrNone(ret);
+    TEST(realValue==realRetValue);
+
+    //Creating a string key
+    _LIT8(KStringValue,"creatingkey");
+    TBuf8<50> stringCreateValue=KStringValue();
+    RepositorySingleCreateL(*iServerRepo, 0x93, stringCreateValue, NULL);
+    TESTKErrNone(ret);
+    }
+
+// now that write operations must be done in transactions, setting up this helper
+// function to perform single Creates for the purpose of this test.
+static TInt RepositorySingleDeleteL(CServerRepository& aRep, TUint32 aKey)
+    {
+    aRep.StartTransaction(EConcurrentReadWriteTransaction);
+    aRep.CleanupCancelTransactionPushL();
+    aRep.TransactionDeleteL(aKey);
+    CleanupStack::Pop();
+    TUint32 keyInfo;
+    return User::LeaveIfError(aRep.CommitTransaction(keyInfo));
+    };
+
+void CenrepSrvOOMTest::DeleteL()
+    {
+    TInt ret=KErrNone;
+    //--------------Delete-----------------------------------
+    //Find the settings 0x10A-0x10C to ensure it is still there
+    RSettingPointerArray matchingArray;
+    TUint32 partialId=0x100;
+    TUint32 idMask=0xFFFFFFF0;
+    ret=iServerRepo->FindSettings(partialId,idMask,matchingArray);
+    if(ret==KErrNoMemory)
+        {
+        matchingArray.Close();
+        User::LeaveNoMemory();
+        }
+
+    TESTKErrNone(ret);
+    TEST2(matchingArray.Count(),3);
+    matchingArray.Close();
+
+    //Deleting settings 0x10A to 0x10C
+    for(TInt i=0x10A;i<=0x10C;i++)
+        {
+        RepositorySingleDeleteL(*iServerRepo, i);
+        TESTKErrNone(ret);
+        }
+    //After deleting try to find the persistent settings again
+    ret=iServerRepo->FindSettings(partialId,idMask,matchingArray);
+    if(ret==KErrNoMemory)
+        {
+        matchingArray.Close();
+        User::LeaveNoMemory();
+        }
+    TESTKErrNone(ret);
+    TEST2(matchingArray.Count(),0);
+    matchingArray.Close();
+
+    //-------------DeleteRange---------------------------------
+    //Deleting settings 0x1 to 0xF
+    TClientRequest dummyrequest;
+    TUint32 errId=0;
+    partialId=0;
+    idMask=0xFFFFFFF0;
+    ret=iServerRepo->FindSettings(partialId,idMask,matchingArray);
+    if(ret==KErrNoMemory)
+        {
+        matchingArray.Close();
+        User::LeaveNoMemory();
+        }
+    TESTKErrNone(ret);
+    TEST2(matchingArray.Count(),15);
+    matchingArray.Close();
+
+    //Deleting settings using the DeleteRange
+    dummyrequest.SetParam(0,partialId);
+    dummyrequest.SetParam(1,idMask);
+    dummyrequest.SetPolicyCheck(ETrue);
+
+    // write operation must take place in a transaction
+    iServerRepo->StartTransaction(EConcurrentReadWriteTransaction);
+    iServerRepo->CleanupCancelTransactionPushL();
+    iServerRepo->TransactionDeleteRangeL(dummyrequest,errId);
+    CleanupStack::Pop();
+    TUint32 keyInfo;
+    User::LeaveIfError(iServerRepo->CommitTransaction(keyInfo));
+
+    //Now try to find the key being deleted
+    ret=iServerRepo->FindSettings(partialId,idMask,matchingArray);
+    if(ret==KErrNoMemory)
+        {
+        matchingArray.Close();
+        User::LeaveNoMemory();
+        }
+    TESTKErrNone(ret);
+    TEST2(matchingArray.Count(),0);
+    matchingArray.Close();
+    }
+
+//Setting existing key value then follow by commit
+void CenrepSrvOOMTest::MoveL()
+    {
+    RSettingPointerArray matchingArray;
+    TUint32 idMask=0xFFFFFFF0;
+
+    TClientRequest dummyrequest;
+    TUint32 errId=0;
+    TUint32 sourcePartialId=0x110;
+    TUint32 targetPartialId=0x120;
+    idMask=0xFFFFFFF0;
+
+    TKeyFilter srcKeyIdentifier = {sourcePartialId, idMask};
+    TPckg<TKeyFilter> pSrcIdentifier(srcKeyIdentifier);
+    TKeyFilter tgtKeyIdentifier = {targetPartialId, idMask};
+    TPckg<TKeyFilter> pTgtIdentifier(tgtKeyIdentifier);
+
+    //First check to ensure the target key before move does not exist
+    User::LeaveIfError(iServerRepo->FindSettings(targetPartialId,idMask,matchingArray));
+    TEST2(matchingArray.Count(),0);
+    matchingArray.Close();
+
+    //moving from 0x110(0x11B,0x11C,0x11E) to 0x120
+    dummyrequest.SetParam(0, &pSrcIdentifier);
+    dummyrequest.SetParam(1, &pTgtIdentifier);
+    dummyrequest.SetPolicyCheck(ETrue);
+
+    // write operation must take place in a transaction
+    User::LeaveIfError(iServerRepo->StartTransaction(EConcurrentReadWriteTransaction));
+    iServerRepo->CleanupCancelTransactionPushL();
+    User::LeaveIfError(iServerRepo->TransactionMoveL(dummyrequest,errId));
+    CleanupStack::Pop();
+    TUint32 keyInfo;
+    User::LeaveIfError(iServerRepo->CommitTransaction(keyInfo));
+
+    //Now try to find the key being moved
+    User::LeaveIfError(iServerRepo->FindSettings(targetPartialId,idMask,matchingArray));
+    TEST2(matchingArray.Count(),3);
+    matchingArray.Close();
+    }
+
+//Finding keys from the settings
+//TInt FindSettings(TUint32 aPartialId,TUint32 aIdMask,RSettingPointerArray& aMatches)
+//Guarantees the heap free in aMatches if this function fail
+void CenrepSrvOOMTest::FindL()
+    {
+    TInt ret=KErrNone;
+    RSettingPointerArray foundIdArray;
+    TUint32 partialId=0;
+    TUint32 idMask=0;
+    //-----------Finding settings array using partial id & mask------
+
+    //------------------Real type---------------------------------
+    //0x42,0x44,0x45,0x48
+    partialId=0x40;
+    idMask=0xFFFFFFF0;
+    User::LeaveIfError(iServerRepo->FindSettings(partialId,idMask,foundIdArray));
+    TESTKErrNone(ret);
+    TEST2(foundIdArray.Count(),4);
+    foundIdArray.Close();
+
+    //-----------------String type-------------------------------
+    //0x51,0x54,0x5B
+    partialId=0x50;
+    idMask=0xFFFFFFF0;
+    User::LeaveIfError(iServerRepo->FindSettings(partialId,idMask,foundIdArray));
+    TESTKErrNone(ret);
+    TEST2(foundIdArray.Count(),3);
+    foundIdArray.Close();
+
+    //--------------------Int type----------------------------------------------------
+    partialId=0x30;
+    idMask=0xFFFFFFF0;
+    //This should return only 0x30,0x34,0x35,0x39,0x3B( 5 items)
+    User::LeaveIfError(iServerRepo->FindSettings(partialId,idMask,foundIdArray));
+    TESTKErrNone(ret);
+    TEST2(foundIdArray.Count(),5);
+
+    //----------------Find comparison using EEqual & ENotEqual------------------------
+    TInt searchValue=100;
+    TClientRequest dummyrequest;
+    RArray<TUint32> idArray;
+    //Set the policycheck to always pass
+    dummyrequest.SetPolicyCheck(ETrue);
+    //Comparison using Equal
+    TRAP(ret,iServerRepo->FindCompareL(foundIdArray,searchValue,EEqual,idArray));
+    if(ret==KErrNoMemory)
+        {
+        //do not need to reset idArray as it is done inside the function itself when it returns not KErrNone
+        foundIdArray.Close();
+        User::LeaveNoMemory();
+        }
+    TEST2(idArray.Count(),2);
+    TEST((idArray[0]==0x30 && idArray[1]==0x34) || (idArray[0]==0x34 && idArray[1]==0x30));
+    idArray.Close();
+    //Comparison using ENotEqual
+    TRAP(ret,iServerRepo->FindCompareL(foundIdArray,searchValue,ENotEqual,idArray));
+    if(ret==KErrNoMemory)
+        {
+        //do not need to reset idArray as it is done inside the function itself when it returns not KErrNone
+        foundIdArray.Close();
+        User::LeaveNoMemory();
+        }
+    TEST2(idArray.Count(),3);
+    idArray.Close();
+    foundIdArray.Close();
+
+    }
+
+//Resetting settings
+void CenrepSrvOOMTest::ResetL()
+    {
+    TInt ret=KErrNone;
+    TInt retValue=0;
+    TReal realValue=0;
+
+    //-------------Single key reset----------------------------
+
+    ret = RepositorySingleSetL(*iServerRepo, 1, 500);
+    TESTKErrNone(ret);
+    ret=iServerRepo->Get(1,retValue);
+    TESTHEX2(retValue, 500);
+
+    //Resetting individual settings
+    ret=iServerRepo->ResetL(1);
+    TEST2(ret, KErrNotSupported);
+
+    //Check for value once being reset
+    ret=iServerRepo->Get(1,retValue);
+    TEST(retValue==500);
+
+    //------------All keys reset------------------------------
+    ret = RepositorySingleSetL(*iServerRepo, 17, 3.1343424);
+    TESTKErrNone(ret);
+
+    //Reset all settings from Rom
+    ret = iServerRepo->ResetAllL();
+    TEST2(ret, KErrNotSupported);
+
+    //Check for value once all being reset
+
+    ret=iServerRepo->Get(17,realValue);
+    TEST(realValue==3.1343424);
+    }
+
+void CenrepSrvOOMTest::NotifyL()
+    {
+    TInt err=KErrNone;
+
+    //addding individual requests
+    for(TInt i=0;i<10;i++)
+        {
+        TClientRequest dummyRequest;
+        User::LeaveIfError(iSessionNotif->AddRequest(i,dummyRequest));
+        }
+
+    //adding group requests
+    for(TInt i=0;i<10;i++)
+        {
+        TClientRequest dummyRequest;
+        TUint32 partialId=100*i;
+        TUint32 idMask=0xFFFFFFF0;
+        User::LeaveIfError(iSessionNotif->AddRequest(partialId,idMask,dummyRequest));
+        }
+
+    //cancelling individual requests
+    User::LeaveIfError(iSessionNotif->CancelRequest(5));
+    //Check to ensure that it has been deleted so calling cancel again will return KErrNotFound
+    err=iSessionNotif->CancelRequest(5);
+    TEST2(err,KErrNotFound);
+
+    //cancelling group requests
+    User::LeaveIfError(iSessionNotif->CancelRequest(500,0xFFFFFFF0));
+    err=iSessionNotif->CancelRequest(500,0xFFFFFF0);
+    TEST2(err,KErrNotFound);
+
+    //Finally cancel ALL requests
+    iSessionNotif->CancelAllRequests();
+
+    }
+
+//Deletes the CServerRepository object properly
+LOCAL_C void ReleaseRepository(TAny* aServerRepository)
+    {
+    CServerRepository* serverRepository = static_cast<CServerRepository*>(aServerRepository);
+
+    TServerResources::iCacheManager->DisableCache();
+    TServerResources::iObserver->CloseiOpenRepositories();
+    delete serverRepository;
+    TServerResources::iCacheManager->EnableCache();
+    }
+
+//Opening a repository and closing the repository
+LOCAL_C void OpenCloseL(TBool /*aOOMMode*/)
+{
+    CServerRepository* serverRepo=new (ELeave)CServerRepository();
+    TCleanupItem cleanupItem(&ReleaseRepository, serverRepo);
+    CleanupStack::PushL(cleanupItem);
+
+    CSessionNotifier* sessNotif=new (ELeave)CSessionNotifier();
+    CleanupStack::PushL(sessNotif);
+
+    //  test access to a valid repository
+    serverRepo->OpenL(KCurrentTestUid,*sessNotif);
+    serverRepo->Close();
+
+    CleanupStack::PopAndDestroy(sessNotif);
+    CleanupStack::PopAndDestroy(1);
+}
+
+LOCAL_C void DoMultiRofsReposTestL( TUid aReposUid, const TDesC& aTestDesc, TInt aExpectedResult)
+    {
+    
+    TheTest.Next(aTestDesc);
+
+    TInt err;
+    TInt tryCount = 0;
+    KCurrentTestUid = aReposUid;
+    do
+        {
+        __UHEAP_MARK;
+
+        //Initializing the server resources
+        TServerResources::InitialiseL();
+        CleanupStack::PushL(TCleanupItem(CloseTServerResources, 0));
+        
+        // find out the number of open handles
+        TInt startProcessHandleCount;
+        TInt startThreadHandleCount;
+        RThread().HandleCount(startProcessHandleCount, startThreadHandleCount);
+
+        __UHEAP_SETBURSTFAIL(RAllocator::EBurstFailNext, ++tryCount, KBurstRate);
+        
+        TRAP(err, OpenCloseL(ETrue));
+        if(err!=KErrNoMemory)
+            {
+            TEST2(err, aExpectedResult);
+            }
+        
+        __UHEAP_RESET;
+        
+        // check that no handles have leaked
+        TInt endProcessHandleCount;
+        TInt endThreadHandleCount;
+        RThread().HandleCount(endProcessHandleCount, endThreadHandleCount);
+        TEST2(startProcessHandleCount, endProcessHandleCount);
+        TEST2(startThreadHandleCount, endThreadHandleCount);
+
+        //Freeing the server resources
+        CleanupStack::Pop(); //CloseTServerResources
+        TServerResources::Close();
+
+        __UHEAP_MARKEND;
+        } while(err == KErrNoMemory);
+
+    TEST2(err, aExpectedResult);
+    TheTest.Printf(_L("- server succeeded at heap failure rate of %i\n"), tryCount);
+
+    }
+
+void CenrepSwiOOMTest::InstallTxtPmaL(TBool aIsSetup)
+    {
+    if(aIsSetup)
+        {
+        RFs fs;
+        User::LeaveIfError(fs.Connect());
+        CleanupClosePushL(fs);
+        CFileMan* fm = CFileMan::NewL(fs);
+        CleanupStack::PushL(fm);
+
+        // Copy a txt PMA keyspace into install dir & Reset read-only bit
+        //  This keyspace also exists in ROM as PMA keyspace
+        User::LeaveIfError(fm->Copy(KInstallPMATxtFileSrc, KInstallPMATxtFileTgt));
+        User::LeaveIfError(fm->Attribs(KInstallPMATxtFileTgt,0,KEntryAttReadOnly,TTime(0)));
+                
+        CleanupStack::PopAndDestroy(2); // fs and fm
+        }
+    else
+        {
+        iSwiWatcher->HandleSWIEventL(ESASwisInstall | ESASwisStatusSuccess);
+        }
+    }
+
+void CenrepSwiOOMTest::InstallCrePmaL(TBool aIsSetup)
+    {
+    if(aIsSetup)
+        {
+        RFs fs;
+        User::LeaveIfError(fs.Connect());
+        CleanupClosePushL(fs);
+        CFileMan* fm = CFileMan::NewL(fs);
+        CleanupStack::PushL(fm);
+
+        // Copy a cre PMA keyspace into install dir & Reset read-only bit
+        User::LeaveIfError(fm->Copy(KInstallPMACreFileSrc, KInstallPMACreFileTgt));
+        User::LeaveIfError(fm->Attribs(KInstallPMACreFileTgt,0,KEntryAttReadOnly,TTime(0)));
+
+        CleanupStack::PopAndDestroy(2); // fs and fm
+        }
+    else
+        {
+        iSwiWatcher->HandleSWIEventL(ESASwisInstall | ESASwisStatusSuccess);
+        }
+    }
+
+LOCAL_C void StartupInstallL(TBool aIsSetup)
+{
+    if(aIsSetup)
+        {
+        // Set up files for test
+        RFs fs;
+        User::LeaveIfError(fs.Connect());
+        CleanupClosePushL(fs);
+        CFileMan* fm = CFileMan::NewL(fs);
+        CleanupStack::PushL(fm);
+
+        // Clean out files
+        TInt err=fs.Delete(KInstallDirFile);
+        if((err!=KErrNone)&&(err!=KErrNotFound))
+            {
+            User::Leave(err);
+            }
+
+        // Cause directory listing with no files to be written
+        CCentRepSWIWatcher* swiWatcher = CCentRepSWIWatcher::NewL(TServerResources::iFs);
+        delete swiWatcher;
+
+        // Copy a txt PMA keyspace into install dir & Reset read-only bit
+        User::LeaveIfError(fm->Copy(KInstallPMATxtFileSrc, KInstallPMATxtFileTgt));
+        User::LeaveIfError(fm->Attribs(KInstallPMATxtFileTgt,0,KEntryAttReadOnly,TTime(0)));
+        
+        // Copy a cre PMA keyspace into install dir & Reset read-only bit
+        User::LeaveIfError(fm->Copy(KInstallPMACreFileSrc, KInstallPMACreFileTgt));
+        User::LeaveIfError(fm->Attribs(KInstallPMACreFileTgt,0,KEntryAttReadOnly,TTime(0)));
+        
+
+        CleanupStack::PopAndDestroy(2); // fs and fm
+        }
+    else
+        {
+        CCentRepSWIWatcher* swiWatcher = CCentRepSWIWatcher::NewL(TServerResources::iFs);
+        delete swiWatcher;
+        }
+}
+
+// Type definition for pointer to function
+// Used for functions that can't use CenrepSrvOOMTest::ConstructL
+typedef void (*FuncPtrL) (TBool);
+/**
+Wrapper function to call all OOM test functions
+@param        testFuncL pointer to OOM test function
+@param        aTestDesc test function name
+*/
+LOCAL_C void DoOOMNoServReposL( FuncPtrL atestFuncL, const TDesC& aTestDesc, TBool aOOMMode)
+    {
+    TheTest.Next(aTestDesc);
+
+    TInt err;
+    TInt tryCount = 0;
+    do
+        {
+        __UHEAP_MARK;
+
+        //Initializing the server resources
+        TServerResources::InitialiseL();
+        CleanupStack::PushL(TCleanupItem(CloseTServerResources, 0));
+        
+        // find out the number of open handles
+        TInt startProcessHandleCount;
+        TInt startThreadHandleCount;
+        RThread().HandleCount(startProcessHandleCount, startThreadHandleCount);
+
+        (*atestFuncL)(ETrue);
+
+        if(aOOMMode)
+            {
+            __UHEAP_SETBURSTFAIL(RAllocator::EBurstFailNext, ++tryCount, KBurstRate);
+            }
+
+        TRAP(err, (*atestFuncL)(EFalse));
+        if(err!=KErrNoMemory)
+            {
+            TESTKErrNone(err);
+            }
+
+        if(aOOMMode)
+            {
+            __UHEAP_RESET;
+            }
+
+        // check that no handles have leaked
+        TInt endProcessHandleCount;
+        TInt endThreadHandleCount;
+        RThread().HandleCount(endProcessHandleCount, endThreadHandleCount);
+        TEST2(startProcessHandleCount, endProcessHandleCount);
+        TEST2(startThreadHandleCount, endThreadHandleCount);
+
+        //Freeing the server resources
+        CleanupStack::Pop(); //CloseTServerResources
+        TServerResources::Close();
+
+        __UHEAP_MARKEND;
+        } while(err == KErrNoMemory);
+
+     TESTKErrNone(err);
+     if(aOOMMode)
+        {
+        TheTest.Printf(_L("- server succeeded at heap failure rate of %i\n"), tryCount);
+        }
+    }
+
+// Type definition for pointer to member function.
+// Used in calling the CRegistryDataTest member function for testing.
+typedef void (CenrepSrvOOMTest::*ClassFuncPtrL) (void);
+/**
+Wrapper function to call all OOM test functions
+@param        testFuncL pointer to OOM test function
+@param        aTestDesc test function name
+@param        aOOMMode to enable/disable the OOM environment
+*/
+LOCAL_C void DoOOMTestL(ClassFuncPtrL testFuncL, const TDesC& aTestDesc,TBool aOOMMode)
+    {
+    TheTest.Next(aTestDesc);
+
+    TInt err=KErrNone;
+    TInt tryCount = 0;
+    do
+        {
+        __UHEAP_MARK;
+        //Clear any files in the persist directory
+        CleanupCDriveL();
+                
+        //Initializing the server resources
+        TServerResources::InitialiseL();
+        CleanupStack::PushL(TCleanupItem(CloseTServerResources, 0));
+
+        CenrepSrvOOMTest* theTest=CenrepSrvOOMTest::NewL();
+        CleanupStack::PushL(theTest);
+
+        TInt startProcessHandleCount;
+        TInt startThreadHandleCount;
+        RThread().HandleCount(startProcessHandleCount, startThreadHandleCount);
+
+        if(aOOMMode)
+            {
+            __UHEAP_SETBURSTFAIL(RAllocator::EBurstFailNext, ++tryCount, KBurstRate);
+            }
+        TRAP(err, (theTest->*testFuncL)());
+
+        if(aOOMMode)
+            {
+            __UHEAP_RESET;
+            }
+
+        if(err!=KErrNoMemory)
+            {
+            TESTKErrNone(err);
+            }
+
+        CleanupStack::PopAndDestroy(theTest);
+
+        // check that no handles have leaked
+        TInt endProcessHandleCount;
+        TInt endThreadHandleCount;
+        RThread().HandleCount(endProcessHandleCount, endThreadHandleCount);
+
+        TEST2(startProcessHandleCount, endProcessHandleCount);
+        TEST2(startThreadHandleCount, endThreadHandleCount);
+
+        //Freeing the server resources
+        CleanupStack::Pop(); //CleanupTServerResources
+        TServerResources::Close();
+        __UHEAP_MARKEND;
+        } while(err == KErrNoMemory);
+
+     TESTKErrNone(err);
+     if(aOOMMode)
+         {
+         TheTest.Printf(_L("- server succeeded at heap failure rate of %i\n"), tryCount);
+         }
+    }
+
+// Type definition for pointer to member function.
+// Used in calling the CRegistryDataTest member function for testing.
+typedef void (CenrepSwiOOMTest::*ClassSwiFuncPtrL) (TBool);
+/**
+Wrapper function to call all OOM test functions
+@param        testFuncL pointer to OOM test function
+@param        aTestDesc test function name
+@param        aOOMMode to enable/disable the OOM environment
+*/
+LOCAL_C void DoOOMSwiTestL(ClassSwiFuncPtrL aTestFuncL, const TDesC& aTestDesc,TBool aOOMMode, TInt aExpectedError)
+    {
+    TheTest.Next(aTestDesc);
+
+    TInt err=KErrNone;
+    TInt tryCount = 0;
+    do
+        {
+        __UHEAP_MARK;
+        
+        CleanupCDriveL();
+        //Initializing the server resources
+        TServerResources::InitialiseL();
+        CleanupStack::PushL(TCleanupItem(CloseTServerResources, 0));
+        
+        TInt startProcessHandleCount;
+        TInt startThreadHandleCount;
+        RThread().HandleCount(startProcessHandleCount, startThreadHandleCount);
+
+        CenrepSwiOOMTest* theTest=CenrepSwiOOMTest::NewL();
+        CleanupStack::PushL(theTest);
+
+        // Set up test
+        (theTest->*aTestFuncL)(ETrue);
+
+        if(aOOMMode)
+            {
+            __UHEAP_SETBURSTFAIL(RAllocator::EBurstFailNext, ++tryCount, KBurstRate);
+            }
+        RDebug::Print(_L("tryCount = %d"),tryCount);
+        
+        TRAP(err, (theTest->*aTestFuncL)(EFalse));
+
+        if(aOOMMode)
+            {
+            __UHEAP_RESET;
+            }
+
+        if(err!=KErrNoMemory)
+            {
+            TEST2(err, aExpectedError);
+            }
+
+        CleanupStack::PopAndDestroy(theTest);
+
+        // check that no handles have leaked
+        TInt endProcessHandleCount;
+        TInt endThreadHandleCount;
+        RThread().HandleCount(endProcessHandleCount, endThreadHandleCount);
+
+        TEST2(startProcessHandleCount, endProcessHandleCount);
+        TEST2(startThreadHandleCount, endThreadHandleCount);
+
+        //Freeing the server resources
+        CleanupStack::Pop(); //CleanupTServerResources
+        TServerResources::Close();
+        __UHEAP_MARKEND;
+        } while(err == KErrNoMemory);
+
+    TEST2(err, aExpectedError);
+     if(aOOMMode)
+        {
+        TheTest.Printf(_L("- server succeeded at heap failure rate of %i\n"), tryCount);
+        }
+    }
+
+#ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+void CenrepSrvOOMTest::DoHeapRepositoryContentCheckL()
+    {
+    CServerRepository* srv=iServerRepo;
+    //check setting and its meta
+    TServerSetting* setting=NULL;
+
+    setting=srv->GetSetting(1);
+    TESTHEX2(setting->iKey,1);
+    TESTHEX2(setting->iMeta,0x80000010);
+    //points to global default policy here
+    TESTHEX2(setting->iAccessPolicy->LowKey(),KUnspecifiedKey);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),1);
+
+    setting=srv->GetSetting(2);
+    TESTHEX2(setting->iKey,2);
+    TESTHEX2(setting->iMeta,0xA0000010);
+    //points to global default policy here
+    TESTHEX2(setting->iAccessPolicy->LowKey(),KUnspecifiedKey);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),1);
+
+    setting=srv->GetSetting(3);
+    TESTHEX2(setting->iKey,3);
+    TESTHEX2(setting->iMeta,0x800000FF);
+    //points to global default policy here
+    TESTHEX2(setting->iAccessPolicy->LowKey(),KUnspecifiedKey);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),1);
+
+    setting=srv->GetSetting(4);
+    TESTHEX2(setting->iKey,4);
+    TESTHEX2(setting->iMeta,0x80000010);
+    TESTHEX2(setting->iAccessPolicy->LowKey(),4);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),0);
+
+    setting=srv->GetSetting(5);
+    TESTHEX2(setting->iKey,5);
+    TESTHEX2(setting->iMeta,0xC0000063);
+    //points to global default policy here
+    TESTHEX2(setting->iAccessPolicy->LowKey(),KUnspecifiedKey);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),1);
+
+    setting=srv->GetSetting(6);
+    TESTHEX2(setting->iKey,6);
+    TESTHEX2(setting->iMeta,0x90000010);
+    TESTHEX2(setting->iAccessPolicy->LowKey(),6);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),0);
+
+    setting=srv->GetSetting(7);
+    TESTHEX2(setting->iKey,7);
+    TESTHEX2(setting->iMeta,0x80000010);
+    TESTHEX2(setting->iAccessPolicy->LowKey(),7);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),0);
+
+    setting=srv->GetSetting(9);
+    TESTHEX2(setting->iKey,9);
+    TESTHEX2(setting->iMeta,0x80000010);
+    TESTHEX2(setting->iAccessPolicy->LowKey(),KUnspecifiedKey);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),1);
+
+    setting=srv->GetSetting(10);
+    TESTHEX2(setting->iKey,10);
+    TESTHEX2(setting->iMeta,0x80000010);
+    TESTHEX2(setting->iAccessPolicy->LowKey(),10);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),0);
+
+    setting=srv->GetSetting(300);
+    TESTHEX2(setting->iKey,300);
+    TESTHEX2(setting->iMeta,0x900003E7);
+    TESTHEX2(setting->iAccessPolicy->LowKey(),KUnspecifiedKey);
+    TESTHEX2(setting->iAccessPolicy->HighKey(),1);
+    TESTHEX2(setting->iAccessPolicy->KeyMask(),1);
+    }
+
+LOCAL_C void DoAdditionalCheckingL(TUid aReposUid)
+    {
+    TServerResources::InitialiseL();
+    CleanupStack::PushL(TCleanupItem(CloseTServerResources, 0));
+    
+    KCurrentTestUid = aReposUid;
+    CenrepSrvOOMTest* test=CenrepSrvOOMTest::NewL();
+    CleanupStack::PushL(test);
+    test->DoHeapRepositoryContentCheckL();
+
+    CleanupStack::PopAndDestroy();
+    CleanupStack::Pop(); //CloseTServerResources
+
+    TServerResources::Close();
+    }
+
+/**
+@SYMTestCaseID PDS-CENTRALREPOSITORY-UT-4126
+@SYMTestCaseDesc Verifying that CRE generated will have the latest CRE version which is currently 3
+@SYMTestPriority High
+@SYMTestActions  Validating that CRE files generated with post REQ42876 code will always contain at least version 3.
+                 The unit test will load a txt repository and then modify some settings so that it gets persisted
+                 in the persists directory. The test then read the cre files to verify that the version persisted
+                 is the latest which is 3.
+@SYMTestExpectedResults The correct file version is returned.
+@SYMREQ REQ42876
+*/
+LOCAL_C void DoPersistedVersionCheckingL()
+    {
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-UT-4126 Verifying CRE generated will always be version 3 "));
+    TServerResources::InitialiseL();
+    CleanupStack::PushL(TCleanupItem(CloseTServerResources, 0));
+
+    const TUid KTestUid={0xF1000702};
+    KCurrentTestUid=KTestUid;
+
+    CenrepSrvOOMTest* test=CenrepSrvOOMTest::NewL();
+    CleanupStack::PushL(test);
+
+    //persist immediately
+    test->iServerRepo->CommitChangesL(EPma);
+
+    //now check the version of the CRE file
+    CHeapRepository* heap=CHeapRepository::NewL(KTestUid);
+    CleanupStack::PushL(heap);
+    TUint8 creVersion;
+    heap->CreateRepositoryFromCreFileL(TServerResources::iFs,_L("c:\\private\\10202be9\\persists\\protected\\f1000702.cre"),creVersion);
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+    TEST2(creVersion,KPersistFormatSupportsPma);
+#else    
+    TEST2(creVersion,KPersistFormatSupportsIndMetaIndicator);
+#endif
+    CleanupStack::PopAndDestroy(2,test);
+    CleanupStack::Pop(); //CloseTServerResources
+    TServerResources::Close();
+    }
+
+/**
+@SYMTestCaseID PDS-CENTRALREPOSITORY-UT-4127
+@SYMTestCaseDesc Server side OOM loading of a multiple ROFS PMA repository files
+@SYMTestPriority High
+@SYMTestActions  - Create the server class CServerRepository and use it to load the multi ROFS PMA keyspace.
+                 - Test are repeated for the following keyspace combination such as TXT/TXT, CRE/TXT or TXT/CRE and CRE/CRE.
+                 - Test will also verify the resulting merged settings which includes checking
+                   individual metadata bits and security policy bits
+                 - Test will also be repeated for opening PMA keyspace with non-PMA keyspace in different ROFS layers.
+@SYMTestExpectedResults - Server loading of the multi rofs keyspace should not fail and leak memory under OOM condition.
+@SYMREQ REQ42876
+*/
+LOCAL_C void DoOOMMultiRofsTestL()
+    {
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-UT-4127 Centrep Server PMA MultiROFS OOM Test "));
+    
+    const TUid KMultiRofsRepositoryUid0={0xF1000900};
+    const TUid KMultiRofsRepositoryUid1={0xF1000901};
+    const TUid KMultiRofsRepositoryUid2={0xF1000902};
+    const TUid KMultiRofsRepositoryUid3={0xF1000903};
+    const TUid KMultiRofsRepositoryUid4={0xF1000904};
+    const TUid KMultiRofsRepositoryUid5={0xF1000905};//TXT1(core) - TXT0(rofs1)
+    const TUid KMultiRofsRepositoryUid6={0xF1000906};//TXT0(core) - TXT1(rofs1)
+    const TUid KMultiRofsRepositoryUid7={0xF1000907};//CRE1(core) - CRE0(rofs1)
+    const TUid KMultiRofsRepositoryUid8={0xF1000908};//CRE0(core) - CRE1(rofs1)
+    const TUid KMultiRofsRepositoryUid9={0xF1000909};//CRE1(core) - TXT0(rofs1)
+    const TUid KMultiRofsRepositoryUid10={0xF100090A};//CRE0(core) - TXT1(rofs1)
+    const TUid KMultiRofsRepositoryUid11={0xF100090B};//TXT1(core) - CRE0(rofs1)
+    const TUid KMultiRofsRepositoryUid12={0xF100090C};//TXT0(core) - CRE1(rofs1)
+    const TUid KMultiRofsRepositoryUid13={0xF100090D};//TXT1(core) - CRE1(rofs1) - TXT1(rofs2) - CRE0(rofs3)
+    // Note: TXT1 means the file is PMA repository with .txt format
+    //       TXT0 means the file is non-PMA repository with .txt format
+    //       CRE1 means the file is PMA repository with .cre format
+    //       CRE0 means the file is non-PMA repository with .cre format
+    
+    //Testing the OOM of multi rofs processing
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid0, _L("Open Close OOM Multi ROFS Test 0"),KErrNone);
+    DoAdditionalCheckingL(KMultiRofsRepositoryUid0);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid1, _L("Open Close OOM Multi ROFS Test 1"),KErrNone);
+    DoAdditionalCheckingL(KMultiRofsRepositoryUid1);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid2, _L("Open Close OOM Multi ROFS Test 2"),KErrNone);
+    DoAdditionalCheckingL(KMultiRofsRepositoryUid2);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid3, _L("Open Close OOM Multi ROFS Test 3"),KErrNone);
+    DoAdditionalCheckingL(KMultiRofsRepositoryUid3);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid4, _L("Open Close OOM Multi ROFS Test 4"),KErrNone);
+    DoAdditionalCheckingL(KMultiRofsRepositoryUid4);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid5, _L("Open Close OOM Multi ROFS Test 5"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid6, _L("Open Close OOM Multi ROFS Test 6"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid7, _L("Open Close OOM Multi ROFS Test 7"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid8, _L("Open Close OOM Multi ROFS Test 8"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid9, _L("Open Close OOM Multi ROFS Test 9"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid10, _L("Open Close OOM Multi ROFS Test 10"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid11, _L("Open Close OOM Multi ROFS Test 11"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid12, _L("Open Close OOM Multi ROFS Test 12"),KErrCorrupt);
+    DoMultiRofsReposTestL(KMultiRofsRepositoryUid13, _L("Open Close OOM Multi ROFS Test 13"),KErrCorrupt);
+    
+    }
+#endif
+
+/**
+@SYMTestCaseID PDS-CENTRALREPOSITORY-UT-4125
+@SYMTestCaseDesc Server side OOM test on Centrep functionalities
+@SYMTestPriority High
+@SYMTestActions  - Call Get, Set, Create, Delete, Move, Find, Notify, Reset on a repository.
+                 - Simulate SWI install and upgrade install on a repository.
+                 - Do the above steps on again under OOM condition.
+                 - Open and Close repository under OOM condition.
+                 - Verify the resulting merged settings which includes checking
+                   individual metadata bits and security policy bits
+@SYMTestExpectedResults - Server loading of the multi rofs keyspace should not fail and leak memory under OOM condition.
+@SYMREQ REQ42876
+*/
+LOCAL_C void DoOOMTestsL()
+    {
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-UT-4125 Starting CENREPSRV OOM Test "));
+    RFs fs;
+    User::LeaveIfError(fs.Connect());
+    CleanupClosePushL(fs);
+    CFileMan* fm = CFileMan::NewL(fs);
+    CleanupStack::PushL(fm);
+
+    //Clear any files in the persist directory
+    CleanupCDriveL();
+
+    //First Testuid=KTestRepositoryUid
+    KCurrentTestUid=KTestRepositoryUid;
+
+    DoOOMTestL(&CenrepSrvOOMTest::GetL,_L("Get Basic Test"),EFalse);
+    DoOOMTestL(&CenrepSrvOOMTest::FindL,_L("FindL Basic Test"),EFalse);
+    DoOOMTestL(&CenrepSrvOOMTest::NotifyL,_L("NotifyL Basic Test"),EFalse);
+    DoOOMTestL(&CenrepSrvOOMTest::ResetL,_L("ResetL Basic Test"),EFalse);
+    DoOOMTestL(&CenrepSrvOOMTest::SetL,_L("SetL Basic Test"),EFalse);
+    DoOOMTestL(&CenrepSrvOOMTest::CreateL,_L("CreateL Basic Test"),EFalse);
+    DoOOMTestL(&CenrepSrvOOMTest::DeleteL,_L("DeleteL Basic Test"),EFalse);
+    DoOOMTestL(&CenrepSrvOOMTest::MoveL,_L("MoveL Basic Test"),EFalse);
+
+    // Simulate response to SWI rom-upgrade and downgrade events
+    DoOOMSwiTestL(&CenrepSwiOOMTest::InstallTxtPmaL,_L("SwiUpgradeROMRev1L Basic Test"),EFalse, KErrNotSupported);
+
+    // Simulate response to SWI new rep install/uninstall event events
+    DoOOMSwiTestL(&CenrepSwiOOMTest::InstallCrePmaL,_L("SwiInstallL Basic Test"),EFalse, KErrNotSupported);
+    
+    // Simulate SWI events before server startup
+    DoOOMNoServReposL(&StartupInstallL, _L("Startup Upgrade Basic Test"), EFalse);
+
+    //OOM Test aOOMMode=ETrue
+    DoOOMNoServReposL(&OpenCloseL, _L("Open Close OOM Test"),ETrue);
+    
+    //Clear any files in the persist directory
+    CleanupCDriveL();
+    TInt r = KillProcess(KCentralRepositoryServerName);
+    TEST2(r,KErrNone);
+    
+    DoOOMTestL(&CenrepSrvOOMTest::GetL,_L("Get OOM Test"),ETrue);
+    DoOOMTestL(&CenrepSrvOOMTest::FindL,_L("FindL OOM Test"),ETrue);
+    DoOOMTestL(&CenrepSrvOOMTest::NotifyL,_L("NotifyL OOM Test"),ETrue);
+    DoOOMTestL(&CenrepSrvOOMTest::ResetL,_L("ResetL OOM Test"),ETrue);
+    DoOOMTestL(&CenrepSrvOOMTest::SetL,_L("SetL OOM Test"),ETrue);
+    DoOOMTestL(&CenrepSrvOOMTest::CreateL,_L("CreateL OOM Test"),ETrue);
+    DoOOMTestL(&CenrepSrvOOMTest::DeleteL,_L("DeleteL OOM Test"),ETrue);
+    DoOOMTestL(&CenrepSrvOOMTest::MoveL,_L("MoveL OOM Test"),ETrue);
+
+    //Clear any files in the persist directory
+    CleanupCDriveL();
+
+    DoOOMSwiTestL(&CenrepSwiOOMTest::InstallTxtPmaL,_L("SwiUpgradeROMRev1L OOM Test"),ETrue, KErrNotSupported);
+
+    DoOOMSwiTestL(&CenrepSwiOOMTest::InstallCrePmaL,_L("SwiInstallL OOM Test"),ETrue, KErrNotSupported);
+    
+    DoOOMNoServReposL(&StartupInstallL, _L("Startup Upgrade OOM Test"), ETrue);
+
+    DoPersistedVersionCheckingL();
+#ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS
+    DoOOMMultiRofsTestL();
+#endif
+    
+    CleanupCDriveL();
+
+    CleanupStack::PopAndDestroy(2);    // fs and fm
+    }
+
+LOCAL_C void MainL()
+    {
+    CActiveScheduler* scheduler = new(ELeave)CActiveScheduler;
+    CActiveScheduler::Install(scheduler);
+
+    DoOOMTestsL();
+    CleanupCDriveL();
+
+    delete scheduler;
+    }
+
+TInt E32Main()
+    {
+    TheTest.Title ();
+    TheTest.Start(_L("PMA OOM Cenrepserv Test"));
+    
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    TheTest(cleanup != NULL);
+    
+    __UHEAP_MARK;
+        
+    TRAPD(err, MainL());
+    TEST2(err, KErrNone);
+    
+    __UHEAP_MARKEND;
+    
+    TheTest.End ();
+    TheTest.Close ();
+    
+    delete cleanup;
+        
+    User::Heap().Check();
+    return KErrNone;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/t_cenrep_pma_rfs.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,351 @@
+// 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:
+//
+
+#include "t_cenrep_helper.h"
+#include <centralrepository.h>
+#include <e32test.h>  // RTest
+#include <e32debug.h> // RDebug::Printf
+#include <f32file.h>  // RFs
+
+#include "../cenrepsrv/srvparams.h" //KServerUid3
+
+_LIT(KSoftReset, "--SoftReset");
+
+RTest TheTest(_L("t_cenrep_pma_rfs.exe"));
+
+const TUid KUidPMARepROMOnly = { 0xf1000501 };
+const TUid KUidPMARepInstallOnly = { 0xf1000502 };
+const TUid KUidPMARepROMAndInstall = { 0xf1000503 };
+const TUid KUidNonPMARep = { 0xf1000504 };
+
+_LIT(KInstallOnlySource, "Z:\\private\\10202BE9\\f1000502.txi");
+_LIT(KInstallOnlyTarget, "C:\\private\\10202BE9\\f1000502.txt");
+            
+_LIT(KInstallOnlyPmaSource, "Z:\\private\\10202BE9\\f1000502.pma");
+_LIT(KInstallOnlyPmaTarget, "C:\\private\\10202BE9\\persists\\protected\\f1000502.cre");
+            
+_LIT(KRomAndInstallSource, "Z:\\private\\10202BE9\\f1000503.txi");
+_LIT(KRomAndInstallTarget, "C:\\private\\10202BE9\\f1000503.txt");
+
+typedef enum
+    {
+    EInstallOnly,
+    ERomAndInstall,
+    } TRepositoryFileState;
+
+const TUint32 KInt1 = 1;
+const TInt KInt1_UpdatedValue = 73;
+
+const TUint32 KNewInt = 1000;
+const TUint32 KNewInt2 = 0x0FFF; // outside range meta (in default meta)
+const TUint32 KNewInt3 = 0x1000; // inside range meta
+
+const TUint32 KReal1 = 2;
+
+const TUint32 KString1 = 5;
+_LIT(KString1_UpdatedValue, "another one");
+
+const TUint32 KIntNonPMA = 1;
+const TInt KIntNonPMA_InitialValue = 100;
+const TInt KIntNonPMA_UpdatedValue = 102;
+
+
+LOCAL_C void Check(TInt aValue, TInt aLine)
+    {
+    if(!aValue)
+        {
+        TRAPD(err, CleanupCDriveL());
+        if (err != KErrNone)
+            {
+            RDebug::Print( _L( "*** CleanupCDriveL also failed with error %d expecting KErrNone\r\n"), err );
+            }
+        TheTest(EFalse, aLine);
+        }
+    }
+LOCAL_C void Check(TInt aValue, TInt aExpected, TInt aLine)
+    {
+    if(aValue != aExpected)
+        {
+        RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+        TRAPD(err, CleanupCDriveL());
+        if (err != KErrNone)
+            {
+            RDebug::Print( _L( "*** CleanupCDriveL also failed with error %d expecting KErrNone\r\n"), err );
+            }
+        TheTest(EFalse, aLine);
+        }
+    }
+#define TEST(arg) ::Check((arg), __LINE__)
+#define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
+
+// This function kills the C32exe.exe process. This commsdat process will
+// interfere with the test if not killed. In a nutshell, some of the test cases 
+// will kill and then wait for 2 seconds and restart the centrep server 
+// with --SoftReset option. During that 2 seconds wait sometimes C32exe.exe 
+// will use centrep API, thus starting the server normally without --SoftReset.
+LOCAL_C void KillC32Exe()
+    {
+    _LIT( KC32ServerName, "c32exe");
+    KillProcess(KC32ServerName); // Don't need to check the return code, it always return KErrNone anyway.
+    User::After(KGeneralDelay);
+    }
+
+LOCAL_C void KillCentrepExe()
+    {
+    _LIT( KCentralRepositoryServerName, "Centralrepositorysrv");
+    KillProcess(KCentralRepositoryServerName); // Don't need to check the return code, it always return KErrNone anyway.
+    User::After(KGeneralDelay);
+    }
+
+//This function restores the state of the files required for this test
+//Existing files are deleted and then the required files are copied
+//back from the Z drive to the c drive
+LOCAL_C void RestoreRFSTestFilesL(TRepositoryFileState aState)
+    {
+    //Delete all files from C:\\private\\10202BE9\\persists\\ dir
+    //and C:\\private\\10202BE9\\ dir
+    CleanupCDriveL();
+    RFs fs;
+    User::LeaveIfError(fs.Connect());
+    CleanupClosePushL(fs);
+
+    CFileMan* fm = CFileMan::NewL(fs);
+    CleanupStack::PushL(fm);
+        
+    switch(aState)
+    {
+        case EInstallOnly:
+            CopyTestFilesL(*fm,KInstallOnlySource, KInstallOnlyTarget);
+            //Since we can't open and modify a PMA keyspace in install directory
+            // we have to copy a pre-persisted version to the PMA drive.
+            CopyTestFilesL(*fm,KInstallOnlyPmaSource, KInstallOnlyPmaTarget);
+            break;
+
+        case ERomAndInstall:
+            CopyTestFilesL(*fm,KRomAndInstallSource, KRomAndInstallTarget);
+            break;
+
+        default:
+            break;
+    }
+
+    CleanupStack::PopAndDestroy(2);
+
+    }
+
+//
+// Start the server process or thread
+//
+LOCAL_C TInt ReStartServerInSoftResetMode()
+    {
+    const TUidType serverUid(KNullUid, KNullUid, KServerUid3);
+
+    //
+    // EPOC and EKA2 is easy, we just create a new server process. Simultaneous
+    // launching of two such processes should be detected when the second one
+    // attempts to create the server object, failing with KErrAlreadyExists.
+    //
+    RProcess server;
+    TInt r=server.Create(KServerImg,
+                         KSoftReset,
+                         serverUid);
+
+    if (r != KErrNone)
+        {
+        return r;
+        }
+
+    TRequestStatus stat;
+    server.Rendezvous(stat);
+
+    if (stat != KRequestPending)
+        {
+        server.Kill(0);        // abort startup
+        }
+    else
+        {
+        server.Resume();    // logon OK - start the server
+        }
+
+    User::WaitForRequest(stat);        // wait for start or death
+    // we can't use the 'exit reason' if the server panicked as this
+    // is the panic 'reason' and may be '0' which cannot be distinguished
+    // from KErrNone
+    r = (server.ExitType() == EExitPanic) ? KErrGeneral : stat.Int();
+
+    server.Close();
+    return r;
+    }
+
+
+LOCAL_C void RestoreFactorySettingsTestL( TUid aRepUid )
+    {
+    TheTest.Next(_L(" RestoreFactorySettingsTestL "));
+    TInt r;
+    TInt i;
+    TBuf<20> str;
+    
+    //Kill centrep server to pick new test files
+    KillCentrepExe();
+
+    TheTest.Printf(_L("Open repository to ensure server is running"));
+    CRepository* repository = CRepository::NewLC(aRepUid);
+
+    TheTest.Printf(_L("Add a Setting"));
+    const TInt KIntValue = 1234;
+    r = repository->Create(KNewInt, KIntValue);
+    TEST2(r, KErrNone);
+    r = repository->Create(KNewInt2, KIntValue);
+    TEST2(r, KErrNone);
+    r = repository->Create(KNewInt3, KIntValue);
+    TEST2(r, KErrNone);
+
+    TheTest.Printf(_L("Delete a PMA Setting"));
+    r = repository->Delete(KReal1);
+    TEST2(r, KErrNone);
+
+    TheTest.Printf(_L("Modify PMA Setting"));
+    r = repository->Set(KInt1, KInt1_UpdatedValue);
+    TEST2(r, KErrNone);
+    r = repository->Set(KString1, KString1_UpdatedValue);
+    TEST2(r, KErrNone);
+
+    // Close repository
+    CleanupStack::PopAndDestroy(repository);
+    
+    // Open a Non-PMA rep to prove that the RFS actually did happened later
+    repository = CRepository::NewLC(KUidNonPMARep);
+    
+    TheTest.Printf(_L("Modify a Non-PMA and RFS-enabled setting"));
+    r = repository->Set(KIntNonPMA, KIntNonPMA_UpdatedValue);
+    TEST2(r, KErrNone);
+    CleanupStack::PopAndDestroy(repository);
+
+    TheTest.Printf(_L("Kill the server process"));
+    _LIT( KCentralRepositoryServerName, "Centralrepositorysrv");
+    r = KillProcess(KCentralRepositoryServerName);
+    TEST2(r,KErrNone);
+
+    User::After(KGeneralDelay);
+
+    TheTest.Printf(_L("Manually start central respository in softreset mode"));
+    ReStartServerInSoftResetMode();
+
+    TheTest.Printf(_L("Re-create the repository to ensure server is running"));
+    repository = CRepository::NewLC(aRepUid);
+
+    TheTest.Printf(_L("Get 'Added' value"));
+    r = repository->Get(KNewInt, i);
+    TEST2(r, KErrNone);
+    r = repository->Get(KNewInt2, i);
+    TEST2(r, KErrNone);
+    r = repository->Get(KNewInt3, i);
+    TEST2(r, KErrNone);
+
+    TReal real;
+    TheTest.Printf(_L("Get 'Deleted' value"));
+    r = repository->Get(KReal1, real);
+    TEST2(r, KErrNotFound);
+
+    TheTest.Printf(_L("Get 'Modified' value"));
+    r = repository->Get(KInt1, i);
+    TEST2(r, KErrNone);
+    TEST(i == KInt1_UpdatedValue);
+
+    r = repository->Get(KString1, str);
+    TEST2(r, KErrNone);
+    TEST(str == KString1_UpdatedValue);
+
+    // Close repository
+    CleanupStack::PopAndDestroy(repository);
+    
+    repository = CRepository::NewLC(KUidNonPMARep);
+    TheTest.Printf(_L("Check the Non-PMA and RFS-enabled setting"));
+    //If RFS did happen, this value should now be reverted back to the initial ROM value
+    r = repository->Get(KIntNonPMA, i);
+    TEST2(r, KErrNone);
+    TEST(i == KIntNonPMA_InitialValue);
+    CleanupStack::PopAndDestroy(repository);
+    }
+
+/**
+@SYMTestCaseID          PDS-CENTRALREPOSITORY-CT-4128
+@SYMTestCaseDesc        Restore Factory Setting test on PMA keyspaces
+@SYMTestPriority        High
+@SYMTestActions         - Add a PMA setting.
+                        - Delete a PMA setting.
+                        - Modify a PMA Setting.
+                        - Modify a Non-PMA and RFS-enabled setting.
+                        - Kill and manually restart central respository server with --SoftReset option.
+                        - Check the aftermath of the RFS.
+@SYMTestExpectedResults - Added PMA setting should still be there.
+                        - Delete PMA setting should still be missing.
+                        - Modified PMA setting should have the modified value.
+                        - Modified Non-PMA setting should have its value reverted. 
+@SYMREQ                 REQ42876
+*/
+LOCAL_C void MainL()
+    {
+    TheTest.Next(_L(" @SYMTestCaseID:PDS-CENTRALREPOSITORY-CT-4128 RFS Test on PMA keyspaces"));
+    RFs fs;
+    TEntry entry;
+    TInt err = fs.Connect();
+    TEST2(err, KErrNone);
+    CleanupClosePushL(fs);
+    
+    CleanupCDriveL();
+    KillC32Exe(); //Need to kill C32Exe as it is interfering with the test.
+    KillCentrepExe();
+    
+    RestoreFactorySettingsTestL(KUidPMARepROMOnly);
+    
+    RestoreRFSTestFilesL(EInstallOnly);
+    RestoreFactorySettingsTestL(KUidPMARepInstallOnly);
+    err = fs.Entry(KInstallOnlyTarget,entry);//The PMA file in install dir should have been deleted during RFS
+    TEST2(err, KErrNotFound);
+    
+    RestoreRFSTestFilesL(ERomAndInstall);
+    RestoreFactorySettingsTestL(KUidPMARepROMAndInstall);
+    err = fs.Entry(KRomAndInstallTarget,entry);//The PMA file in install dir should have been deleted during RFS
+    TEST2(err, KErrNotFound);
+    
+    CleanupCDriveL();
+    
+    CleanupStack::PopAndDestroy(); //fs
+    }
+
+TInt E32Main()
+    {
+    TheTest.Title ();
+    TheTest.Start(_L("PMA Restore Factory Settings tests "));
+    
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    TheTest(cleanup != NULL);
+    
+    __UHEAP_MARK;
+        
+    TRAPD(err, MainL());
+    TEST2(err, KErrNone);
+    
+    __UHEAP_MARKEND;
+    
+    TheTest.End ();
+    TheTest.Close ();
+    
+    delete cleanup;
+        
+    User::Heap().Check();
+    return KErrNone;
+    }
--- a/persistentstorage/centralrepository/test/t_cenrep_rfs.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/t_cenrep_rfs.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -85,6 +85,13 @@
     User::After(KGeneralDelay);
     }
 
+LOCAL_C void KillCentrepExe()
+    {
+    _LIT( KCentralRepositoryServerName, "Centralrepositorysrv");
+    KillProcess(KCentralRepositoryServerName); // Don't need to check the return code, it always return KErrNone anyway.
+    User::After(KGeneralDelay);
+    }
+
 //This function restores the state of the files required for this test
 //Existing files are deleted and then the required files are copied
 //back from the Z drive to the c drive
@@ -182,7 +189,7 @@
 
 LOCAL_C void RestoreFactorySettingsTestL()
 	{
-	TheTest.Start(_L("ResetAllRepositoriesTestL"));
+	TheTest.Start(_L("RestoreFactorySettingsTestL"));
 	TInt r;
 	TInt i;
 	TBuf<20> str;
@@ -249,7 +256,6 @@
 	}
 
 
-
 /**
 @SYMTestCaseID 	 SYSLIB-CENTRALREPOSITORY-CT-3341
 @SYMTestCaseDesc Restore factory Settings from Rom file.
@@ -634,6 +640,7 @@
 	TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-0497-0001 Restore Factory Settings tests "));
 	CleanupCDriveL();
 	KillC32Exe(); //Need to kill C32Exe as it is interfering with the test.
+	KillCentrepExe();
 	RestoreFactorySettingsTestL();
 	PDEF105203();
 	RFSRomOnlyL();
--- a/persistentstorage/centralrepository/test/t_oomcenrepsrv.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/t_oomcenrepsrv.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -11,7 +11,6 @@
 // Contributors:
 //
 // Description:
-// t_oomcenrep.cpp
 // 
 //
 
@@ -29,7 +28,7 @@
 #include <bautils.h>
 
 LOCAL_D RFs					TheFs;
-LOCAL_D RTest				TheTest (_L ("t_oomcenrep.exe"));
+LOCAL_D RTest				TheTest (_L ("t_oomcenrepsrv.exe"));
 
 #ifdef __SECURE_DATA__
 _LIT(KInstallDirFile,			"c:\\private\\10202BE9\\persists\\installdir.bin");
@@ -43,6 +42,10 @@
 _LIT(KRomUpgradeRev2File,		"z:\\private\\10202BE9\\11111112.txu");
 _LIT(KUpgradeFile,				"c:\\private\\10202BE9\\11111111.txt");
 
+_LIT(KRomUpgradeFile2,          "z:\\private\\10202BE9\\11111113.txi");
+_LIT(KUpgradeFile2,             "c:\\private\\10202BE9\\11111113.txt");
+_LIT(KPersistedUpgradeFile2,    "c:\\private\\10202BE9\\persists\\11111113.cre");
+
 _LIT(KInstallOnlyFile,			"z:\\private\\10202BE9\\11111110.cri");
 _LIT(KInstallOnlyUpgradeFile,	"z:\\private\\10202BE9\\11111110.cru");
 _LIT(KInstallFile,				"c:\\private\\10202BE9\\11111110.cre");
@@ -58,6 +61,11 @@
 
 static TUid KCurrentTestUid;
 
+//Burst rate for __UHEAP_SETBURSTFAIL
+#ifdef _DEBUG
+const TInt KBurstRate = 20;
+#endif
+
 ///////////////////////////////////////////////////////////////////////////////////////
 //Test macroses and functions
 LOCAL_C void CheckL(TInt aValue, TInt aLine)
@@ -872,7 +880,7 @@
 
 LOCAL_C void StartupUpgradeL(TBool aIsSetup)
 {
-	if(aIsSetup)
+    if(aIsSetup)
 		{
 		// Set up files for test
 		RFs fs;
@@ -886,17 +894,16 @@
 		if((err!=KErrNone)&&(err!=KErrNotFound))
 			User::Leave(err);
 
-		// Cause directory listing with no files to be written
-		CCentRepSWIWatcher*	swiWatcher = CCentRepSWIWatcher::NewL(TServerResources::iFs);
-		delete swiWatcher;
-
 		User::LeaveIfError(fm->Copy(KPersistsFileNoUpgrade, KPersistsFile));
 		User::LeaveIfError(fm->Attribs(KPersistsFile,0,KEntryAttReadOnly,TTime(0)));
 
 		User::LeaveIfError(fm->Copy(KRomUpgradeRev1File, KUpgradeFile));
 		User::LeaveIfError(fm->Attribs(KUpgradeFile,0,KEntryAttReadOnly,TTime(0)));
+		
+		User::LeaveIfError(fm->Copy(KRomUpgradeFile2, KUpgradeFile2));
+		User::LeaveIfError(fm->Attribs(KUpgradeFile2,0,KEntryAttReadOnly,TTime(0)));
 
-		CleanupStack::PopAndDestroy(2); // fs and fm
+		CleanupStack::PopAndDestroy(2, &fs); //fm and fs
 		}
 	else
 		{
@@ -995,14 +1002,14 @@
 		(*atestFuncL)(ETrue);
 
 		if (aOOMMode)
-			__UHEAP_SETFAIL(RHeap::EDeterministic, ++tryCount);
+		    __UHEAP_SETBURSTFAIL(RAllocator::EBurstFailNext, ++tryCount, KBurstRate);
 
 		TRAP(err, (*atestFuncL)(EFalse));
 		if (err!=KErrNoMemory)
 			TESTKErrNoneL(err);
 
 		if (aOOMMode)
-			__UHEAP_SETFAIL(RHeap::ENone, 0);
+		    __UHEAP_RESET;
 
 		// check that no handles have leaked
 		TInt endProcessHandleCount;
@@ -1055,12 +1062,12 @@
 		RThread().HandleCount(startProcessHandleCount, startThreadHandleCount);
 
 		if (aOOMMode)
-			__UHEAP_SETFAIL(RHeap::EDeterministic, ++tryCount);
+		    __UHEAP_SETBURSTFAIL(RAllocator::EBurstFailNext, ++tryCount, KBurstRate);
 
 		TRAP(err, (theTest->*testFuncL)());
 
 		if (aOOMMode)
-			__UHEAP_SETFAIL(RHeap::ENone, 0);
+		    __UHEAP_RESET;
 
 		if (err!=KErrNoMemory)
 			TESTKErrNoneL(err);
@@ -1120,12 +1127,12 @@
 		(theTest->*aTestFuncL)(ETrue);
 
 		if (aOOMMode)
-			__UHEAP_SETFAIL(RHeap::EDeterministic, ++tryCount);
+		    __UHEAP_SETBURSTFAIL(RAllocator::EBurstFailNext, ++tryCount, KBurstRate);
 
 		TRAP(err, (theTest->*aTestFuncL)(EFalse));
 
 		if (aOOMMode)
-			__UHEAP_SETFAIL(RHeap::ENone, 0);
+		    __UHEAP_RESET;
 
 		if (err!=KErrNoMemory)
 			TESTKErrNoneL(err);
@@ -1275,8 +1282,11 @@
 	CleanupStack::PushL(heap);
 	TUint8 creVersion;
 	heap->CreateRepositoryFromCreFileL(TServerResources::iFs,_L("c:\\private\\10202be9\\persists\\88880000.cre"),creVersion);
+#ifdef SYMBIAN_INCLUDE_APP_CENTRIC
+	TESTL(creVersion==KPersistFormatSupportsPma);
+#else	
 	TESTL(creVersion==KPersistFormatSupportsIndMetaIndicator);
-
+#endif
 	CleanupStack::PopAndDestroy(2,test);
 	TServerResources::Close();
 	}
@@ -1321,6 +1331,8 @@
 	{
 	TheTest.Next (_L (" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-LEGACY-T_OOMCENREP-0001 Starting CENREPSRV OOM Test "));
 	RFs fs;
+	TEntry entry;
+	TInt err;
 	User::LeaveIfError(fs.Connect());
 	CleanupClosePushL(fs);
 	CFileMan* fm = CFileMan::NewL(fs);
@@ -1360,7 +1372,10 @@
 
 	// Simulate SWI events before server startup
 	DoOOMNoServReposL(&StartupUpgradeL, _L("Startup Upgrade Basic Test"), EFalse);
-	DoOOMNoServReposL(&StartupDowngradeL, _L("Startup Downgrade Basic Test"), EFalse);
+    err = fs.Entry(KPersistedUpgradeFile2, entry);
+    TEST2L(err, KErrNone); // the installed keyspace (11111113.txt) should be persisted on start up.
+	
+    DoOOMNoServReposL(&StartupDowngradeL, _L("Startup Downgrade Basic Test"), EFalse);
 	DoOOMNoServReposL(&StartupUninstallL,_L("Startup Uninstall Basic Test"), EFalse);
 
 	//OOM Test aOOMMode=ETrue
@@ -1397,7 +1412,7 @@
 
 	// Delete files from bur dir
 	User::LeaveIfError(fm->Attribs(KPersistsFileNoUpgrade,0,KEntryAttReadOnly,TTime(0)));
-	TInt err=fs.Delete(KPersistsFileNoUpgrade);
+	err=fs.Delete(KPersistsFileNoUpgrade);
 	if((err!=KErrNone)&&(err!=KErrNotFound))
 		User::Leave(err);
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/config/PMA_BUR.ini	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,22 @@
+[test1]
+BackupDir=c:\BackupArchive\
+IsPartial=1
+BaseOnly=1
+DriveList=c
+IDs=0AB7E57C
+ 
+// Number of settings
+[step1]
+PMAReposExist=ETrue
+PMAExpectedGetResult=0
+PMAIsModified=ETrue
+
+[step2]
+PMAReposExist=EFalse
+PMAExpectedGetResult=-1
+PMAIsModified=EFalse
+
+[step3]
+PMAReposExist=ETrue
+PMAExpectedGetResult=0
+PMAIsModified=ETrue
\ No newline at end of file
--- a/persistentstorage/centralrepository/test/testexecute/BUR/group/Te_centrep_BURsuite.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/group/Te_centrep_BURsuite.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -22,10 +22,13 @@
 SOURCE	              Te_centrep_BURSuiteServer.cpp
 SOURCE	              Te_centrep_BURSuiteStepBase.cpp
 SOURCE              compareStep.cpp
-SOURCE              initailiseStep.cpp
+SOURCE              initialiseStep.cpp
 SOURCE              modifyStep.cpp
 SOURCE              initialiseDefStep.cpp
 SOURCE              compareDefStep.cpp
+SOURCE              comparePMAStep.cpp
+SOURCE              initialisePMAStep.cpp
+SOURCE              modifyPMaStep.cpp
 	
 USERINCLUDE   ../../../../cenrepsrv
 USERINCLUDE   ../../../../common/inc
--- a/persistentstorage/centralrepository/test/testexecute/BUR/group/bld.inf	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/group/bld.inf	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -13,10 +13,6 @@
 // Description:
 //
 
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
 PRJ_TESTEXPORTS
 
 
@@ -25,10 +21,12 @@
 
 //CentralRepository TestExecute scripts
 ../scripts/te_centrep_BURSuite.script		z:/tef_centralrepository/te_centrep_bursuite.script
+../scripts/te_centrep_bursuite_pma.script	z:/tef_centralrepository/te_centrep_bursuite_pma.script
 
 //CentralRepository TestExecute additional files
 ../scripts/backup_registration.xml		z:/tef_centralrepository/backup_registration.xml
 ../config/BUR.ini				z:/tef_centralrepository/bur.ini
+../config/PMA_BUR.ini				z:/tef_centralrepository/PMA_bur.ini
 
 
 PRJ_TESTMMPFILES
--- a/persistentstorage/centralrepository/test/testexecute/BUR/group/te_centrep_BURsuite.iby	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/group/te_centrep_BURsuite.iby	Tue Oct 19 16:26:13 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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"
@@ -27,6 +27,16 @@
 data=DATAZ_\tef_centralrepository\bur.ini 			TEF_CentralRepository\BUR.ini
 data=DATAZ_\tef_centralrepository\backup_registration.xml 	TEF_CentralRepository\backup_registration.xml
 
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+data=DATAZ_\tef_centralRepository\te_centrep_bursuite_pma.script  TEF_CentralRepository\te_centrep_bursuite_pma.script
+data=DATAZ_\tef_centralRepository\pma_bur.ini       TEF_CentralRepository\PMA_BUR.ini
+
+data=DATAZ_\PRIVATE\10202BE9\f1000200.txt PRIVATE\10202BE9\f1000200.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000200.crp PRIVATE\10202BE9\f1000200.crp
+data=DATAZ_\PRIVATE\10202BE9\f1000200.pma PRIVATE\10202BE9\f1000200.pma
+
+#endif //SYMBIAN_INCLUDE_APP_CENTRIC
+
 #ifndef __CENTREPTESTDATA_IBY__
 data=DATAZ_\private\10202be9\bacbacba.txt PRIVATE\10202BE9\BACBACBA.txt
 data=DATAZ_\private\10202be9\bac2bac2.txt PRIVATE\10202BE9\BAC2BAC2.txt
--- a/persistentstorage/centralrepository/test/testexecute/BUR/scripts/te_centrep_BURSuite.script	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/scripts/te_centrep_BURSuite.script	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -48,7 +48,7 @@
 //!         PREQ908
 
 	RUN_UTILS DeleteFile c:\private\10202be9\persists\bac2bac2.*
-	RUN_TEST_STEP 300 te_centrep_BURSuite initailiseStep 
+	RUN_TEST_STEP 300 te_centrep_BURSuite initialiseStep 
 	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_CentralRepository\BUR.ini test1
 	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_CentralRepository\BUR.ini test1
  	RUN_TEST_STEP 100 te_centrep_BURSuite compareStep z:\TEF_CentralRepository\BUR.ini step1
@@ -70,7 +70,7 @@
 //! @SYMPREQ PREQ752
 //!         PREQ908
 
-	RUN_TEST_STEP 300 te_centrep_BURSuite initailiseStep 
+	RUN_TEST_STEP 300 te_centrep_BURSuite initialiseStep 
 	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_CentralRepository\BUR.ini test1
 	RUN_UTILS CopyFile z:\private\10202be9\BADBADBA.txt c:\private\10202be9\BACBACBA.txt
 	RUN_UTILS MakeReadWrite c:\private\10202be9\BACBACBA.txt
@@ -94,7 +94,7 @@
 //! @SYMPREQ PREQ752
 //!         PREQ908
 
-	RUN_TEST_STEP 300 te_centrep_BURSuite initailiseStep 
+	RUN_TEST_STEP 300 te_centrep_BURSuite initialiseStep 
 	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_CentralRepository\BUR.ini test1
 	RUN_TEST_STEP 100 te_centrep_BURSuite modifyStep 	
 	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_CentralRepository\BUR.ini test1
@@ -117,7 +117,7 @@
 //! @SYMPREQ PREQ752
 //!         PREQ908
 
-	RUN_TEST_STEP 300 te_centrep_BURSuite initailiseStep 
+	RUN_TEST_STEP 300 te_centrep_BURSuite initialiseStep 
 	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_CentralRepository\BUR.ini test1
 	RUN_UTILS DeleteFile c:\private\10202be9\persists\bacbacba.*
 	//Delay to make sure that cache has been emptied.
@@ -165,7 +165,6 @@
 //! @SYMTestActions  Fail backup by removing persists directory, observe no panic, restore persists directory
 //! @SYMTestExpectedResults The test must not panic. Backup will fail but Centrep server will handle leave condition gracefully
 //! @SYMDEF DEF091759 
-
 	RUN_UTILS MkDir c:\private\10202be9\temp
 	RUN_UTILS CopyFile c:\private\10202be9\persists\*.* c:\private\10202be9\temp
 	RUN_UTILS DeleteDirectory c:\private\10202be9\persists
@@ -200,7 +199,7 @@
 //! the changes by the restoration and get the new values of changed keys successfully.
 //! @SYMDEF INC101923
 // cenrep notifier does not fire when restoring from backup
-	RUN_TEST_STEP 300 te_centrep_BURSuite initailiseStep 
+	RUN_TEST_STEP 300 te_centrep_BURSuite initialiseStep 
 	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_CentralRepository\BUR.ini test1
 	RUN_TEST_STEP 100 te_centrep_BURSuite modifyStep 	
 	RUN_TEST_STEP 100 te_centrep_burobserversuite RestoreNotificationsInitialiseStep
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/scripts/te_centrep_bursuite_pma.script	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,103 @@
+// 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:
+//
+
+//! @file
+//! @SYMTestSuiteName SYSLIB-CENTRALREPOSITORY-TE_CENTREP_BURSUITE
+//! @SYMScriptTestEnvironment this script requires Techview ROM for BURTestserver dependency. BURTestserver must be built for this test to run.
+//! @internalComponent
+//! @test
+
+
+PRINT Run te_centrep_bursuite_pma.script Tests
+
+LOAD_SUITE te_centrep_BURSuite
+LOAD_SUITE te_centrep_burobserversuite -SharedData
+LOAD_SUITE BURTestServer
+
+// Create spoof SID and copy backup registration file
+
+RUN_UTILS MkDir c:\private\
+RUN_UTILS MkDir c:\private\0AB7E57C\
+RUN_UTILS CopyFile z:\TEF_CentralRepository\backup_registration.xml c:\private\0AB7E57C\backup_registration.xml
+
+RUN_PROGRAM t_deletefileallfiles.exe c:\private\10202be9\persists\protected\f1000200.*
+RUN_PROGRAM t_deletefileallfiles.exe c:\private\10202be9\persists\f1000200.*
+RUN_PROGRAM t_killprocess.exe centralrepositorysrv
+DELAY 2000
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4131 //Modify
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4131
+//! @SYMTestCaseDesc Test Backup & Restore functionality, when repository modified
+//! @SYMTestPriority High
+//! @SYMTestActions  Create repository, backup, modify, restore, check values
+//! @SYMTestExpectedResults Repository should not be backed-up therefore restore should not have any effect.
+
+	RUN_TEST_STEP 300 te_centrep_BURSuite initialisePMAStep
+	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_CentralRepository\PMA_BUR.ini test1
+	RUN_TEST_STEP 100 te_centrep_BURSuite modifyPMAStep
+	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_CentralRepository\PMA_BUR.ini test1
+ 	RUN_TEST_STEP 100 te_centrep_BURSuite comparePMAStep z:\TEF_CentralRepository\PMA_BUR.ini step1
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4131 //Modify
+
+RUN_PROGRAM t_deletefileallfiles.exe c:\private\10202be9\persists\protected\f1000200.*
+RUN_PROGRAM t_killprocess.exe centralrepositorysrv
+DELAY 2000
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4132 //Delete
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4132
+//! @SYMTestCaseDesc Test Backup & Restore functionality, when repository deleted
+//! @SYMTestPriority High
+//! @SYMTestActions  Create repository, backup, delete, restore, check values
+//! @SYMTestExpectedResults Repository should not be backed-up therefore restore should not restored the missing repository.
+
+	RUN_TEST_STEP 300 te_centrep_BURSuite initialisePMAStep
+	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_CentralRepository\PMA_BUR.ini test1
+	RUN_PROGRAM t_deletefileallfiles.exe c:\private\10202be9\persists\protected\f1000200.*
+//Delay to make sure that cache has been emptied.
+	DELAY 8000
+	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_CentralRepository\PMA_BUR.ini test1
+ 	RUN_TEST_STEP 100 te_centrep_BURSuite comparePMAStep z:\TEF_CentralRepository\PMA_BUR.ini step2
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4132 //Delete
+
+RUN_PROGRAM t_deletefileallfiles.exe c:\private\10202be9\persists\protected\f1000200.*
+RUN_PROGRAM t_killprocess.exe centralrepositorysrv
+DELAY 2000
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4133 //Restore
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4133
+//! @SYMTestCaseDesc Test Backup & Restore functionality, try to restore a repository that exists in PMA drive
+//! @SYMTestPriority High
+//! @SYMTestActions  - Create non-PMA repository, backup, delete that rep, restore, check values
+//!                  - delete that repository and create PMA repository with same id
+//!                  - Try to restore the earlier backed-up repository and check values
+//! @SYMTestExpectedResults PMA repository should not be affected by the restore
+wh
+    RUN_UTILS CopyFile z:\private\10202be9\f1000200.crp c:\private\10202be9\persists\f1000200.cre
+	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_CentralRepository\PMA_BUR.ini test1
+	RUN_PROGRAM t_deletefileallfiles.exe c:\private\10202be9\persists\f1000200.*
+	
+    RUN_UTILS CopyFile z:\private\10202be9\f1000200.pma c:\private\10202be9\persists\protected\f1000200.cre
+	RUN_PROGRAM t_killprocess.exe centralrepositorysrv
+// Wait for the server to start up
+	DELAY 2000
+	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_CentralRepository\PMA_BUR.ini test1
+ 	
+     RUN_TEST_STEP 100 te_centrep_BURSuite comparePMAStep z:\TEF_CentralRepository\PMA_BUR.ini step3
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4133 //Delete
+
+RUN_PROGRAM t_deletefileallfiles.exe c:\private\10202be9\persists\protected\f1000200.*
+RUN_PROGRAM t_deletefileallfiles.exe c:\private\0AB7E57C\backup_registration.xml
+
+PRINT Completed te_centrep_bursuite_pma.script Tests
--- a/persistentstorage/centralrepository/test/testexecute/BUR/src/Te_centrep_BURSuiteServer.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/src/Te_centrep_BURSuiteServer.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -23,10 +23,13 @@
 
 #include "Te_centrep_BURSuiteServer.h"
 #include "compareStep.h"
-#include "initailiseStep.h"
+#include "initialiseStep.h"
 #include "modifyStep.h"
 #include "compareDefStep.h"
 #include "initialiseDefStep.h"
+#include "comparePMAStep.h"
+#include "initialisePMAStep.h"
+#include "modifyPMAStep.h"
 
 _LIT(KServerName,"Te_centrep_BURSuite");
 CTe_centrep_BURSuite* CTe_centrep_BURSuite::NewL()
@@ -111,16 +114,21 @@
 	CTestStep* testStep = NULL;
 	// They are created "just in time" when the worker thread is created
 	// More test steps can be added below 
-              if(aStepName == KcompareStep)
-                            testStep = new CcompareStep();
-              else if(aStepName == KinitailiseStep)
-                            testStep = new CinitailiseStep();
-              else if(aStepName == KmodifyStep)
-                            testStep = new CmodifyStep();
-              else if(aStepName == KinitialiseDefStep)
-                            testStep = new CinitialiseDefStep();
-              else if(aStepName == KcompareDefStep)
-                            testStep = new CcompareDefStep();
-
+    if(aStepName == KcompareStep)
+        testStep = new CcompareStep();
+    else if(aStepName == KinitialiseStep)
+        testStep = new CinitialiseStep();
+    else if(aStepName == KmodifyStep)
+        testStep = new CmodifyStep();
+    else if(aStepName == KinitialiseDefStep)
+        testStep = new CinitialiseDefStep();
+    else if(aStepName == KcompareDefStep)
+        testStep = new CcompareDefStep();
+    else if(aStepName == KcomparePMAStep)
+        testStep = new CcomparePMAStep();
+    else if(aStepName == KinitialisePMAStep)
+        testStep = new CinitialisePMAStep();
+    else if(aStepName == KmodifyPMAStep)
+        testStep = new CmodifyPMAStep();
 	return testStep;
 	}
--- a/persistentstorage/centralrepository/test/testexecute/BUR/src/Te_centrep_BURSuiteStepBase.h	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/src/Te_centrep_BURSuiteStepBase.h	Tue Oct 19 16:26:13 2010 +0100
@@ -1,5 +1,5 @@
 /**
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -30,11 +30,16 @@
 _LIT(KIniNumOfSettings, "NumSettings");
 _LIT(KIniExpectedGetResult, "ExpectedGetResult");
 _LIT(KIniExpectedGetValue, "ExpectedGetValue");
+_LIT(KIniPMAReposExist, "PMAReposExist");
+_LIT(KIniPMAExpectedGetResult, "PMAExpectedGetResult");
+_LIT(KIniPMAIsModified, "PMAIsModified");
 
 const TUid KUidBURTestRepository = {0xBACBACBA};
 const TUid KUidBURTestDefaultRepository = {0xBAC2BAC2};
 const TUid KUidBURDefTestRepository = {0xBAEBAEBA};
 
+const TUid KUidBURTestPMARepository = {0xF1000200};
+
 const TInt KNumBackupSettings = 18;
 const TInt KNumDefaultBackupSettings = 3;
 const TInt KNumNonBackupSettings = 16;
@@ -52,7 +57,6 @@
 const TUint32 KOrigBackupMetaInt = 0x03;
 const TInt KOrigBackupMetaIntValue = 3;
 
-
 // Keys used to test behaviour of deleted settings
 
 // Original Key with metadata 0x00000000 (no backup)
@@ -148,6 +152,51 @@
 const TUint32 KNewString164 = 0x233;
 _LIT(KString16Value4, "hhhhHHH");
 
+
+// PMA key with metadata 0x01000000, to be modified
+const TUint32 KPMAIntKey= 0x01;
+const TInt KPMAIntOrigValue = 10;
+const TInt KPMAIntModifiedValue = 15;
+
+const TUint32 KPMARealKey = 0x02;
+const TReal KPMARealOrigValue = 11.1;
+const TReal KPMARealModifiedValue = 12.8;
+
+const TUint32 KPMABinKey = 0x03;
+_LIT8(KPMABinOrigValue, "ABCD");
+_LIT8(KPMABinModifiedValue, "WXYZ");
+
+const TUint32 KPMAStrKey = 0x04;
+_LIT(KPMAStrOrigValue, "ABCDEFGHIJ");
+_LIT(KPMAStrModifiedValue, "QRSTUVWXYZ");
+
+//PMA setting to be deleted post-backup
+const TUint32 KPMADeleteIntKey = 0x05;
+const TInt KPMADeleteIntValue = 12;
+
+//PMA setting to be created post-backup
+const TUint32 KPMACreateIntKey = 0x06;
+const TInt KPMACreateIntValue = 18;
+
+//PMA setting to be created pre-backup
+const TUint32 KPMAInitIntKey= 0x07;
+const TInt KPMAInitIntOrigValue = 50;
+const TInt KPMAInitIntModifiedValue = 65;
+
+const TUint32 KPMAInitRealKey = 0x08;
+const TReal KPMAInitRealOrigValue = 44.4;
+const TReal KPMAInitRealModifiedValue = 66.6;
+
+const TUint32 KPMAInitBinKey = 0x09;
+_LIT8(KPMAInitBinOrigValue, "AbCdEf");
+_LIT8(KPMAInitBinModifiedValue, "gHiJkL");
+
+const TUint32 KPMAInitStrKey = 0x0A;
+_LIT(KPMAInitStrOrigValue, "klmNoPQr");
+_LIT(KPMAInitStrModifiedValue, "sTuvwXyZ");
+
+
+
 /////////////////////////////////////////
 
 _LIT(KPersistsFiles, 				"c:\\private\\10202BE9\\persists\\*.txt");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/src/comparePMAStep.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,263 @@
+// 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:
+//
+
+/**
+ @file
+*/
+#include "comparePMAStep.h"
+#include "Te_centrep_BURSuiteDefs.h"
+#include "Te_centrep_BURSuiteStepBase.h"
+
+CcomparePMAStep::~CcomparePMAStep()
+/**
+ * Destructor
+ */
+	{
+	}
+
+CcomparePMAStep::CcomparePMAStep()
+/**
+ * Constructor
+ */
+	{
+	// **MUST** call SetTestStepName in the constructor as the controlling
+	// framework uses the test step name immediately following construction to set
+	// up the step's unique logging ID.
+	SetTestStepName(KcomparePMAStep);
+	}
+
+TVerdict CcomparePMAStep::doTestStepL()
+/**
+ * @return - TVerdict code
+ * Override of base class pure virtual
+ * Our implementation only gets called if the base class doTestStepPreambleL() did
+ * not leave. That being the case, the current test result value will be EPass.
+ */
+	{
+    SetTestStepResult(EFail);	
+
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+	// Check on PMA repository to test that a repository which:
+	// 1. Has not been modified and hence don't have repository  
+	//    file on the PMA drive is correctly handled - This  
+	//    should always contain just the ROM default values.
+	// 2. Has been been modified (after backup) and hence has  
+    //    repository file on the PMA drive is correctly handled  
+    //    This should always contain the modified the PMA drive's 
+	//    repository values (even after restore).
+	INFO_PRINTF2(_L("Start PMA ComparePMAStep repos id: 0x%x"), KUidBURTestPMARepository);
+	
+	TBool PmaReposExist = EFalse;
+	TBool bRet = GetBoolFromConfig(ConfigSection(), KIniPMAReposExist, PmaReposExist);
+	TESTL(bRet);
+    CRepository* repository(NULL);	
+	TRAPD(r, repository = CRepository::NewL(KUidBURTestPMARepository));
+    
+    if(!PmaReposExist)
+        {
+        TESTL(r==KErrNotFound);
+        }
+    else
+        {
+        TESTL(r==KErrNone);
+        CleanupStack::PushL(repository);
+        // Int value
+        // In modify step, we will modify an 'integer' setting (after backup finished),
+        // it must still contain the modified setting after restore.
+        // During other steps, this setting will not be modified, hence it should 
+        // still have the ROM value.
+        TInt PmaExpectedResult ;
+        bRet = GetIntFromConfig(ConfigSection(), KIniPMAExpectedGetResult, PmaExpectedResult);
+        TBool PmaIsModified ;
+        bRet = GetBoolFromConfig(ConfigSection(), KIniPMAIsModified, PmaIsModified);
+        TInt PMAIntCurrentVal = 0;
+        r=repository->Get(KPMAIntKey, PMAIntCurrentVal);
+        TESTL(r==KErrNone);
+        if(PmaIsModified)
+            {
+            TESTL(PMAIntCurrentVal == KPMAIntModifiedValue);
+            }
+        else
+            {
+            TESTL(PMAIntCurrentVal == KPMAIntOrigValue);
+            }
+        
+        // Real value
+        // In modify step, we will modify a 'real' setting (after backup finished),
+        // it must still contain the modified setting after restore.
+        // During other steps, this setting will not be modified, hence it should 
+        // still have the ROM value.
+        TReal PMARealCurrentVal = 0;
+        r=repository->Get(KPMARealKey, PMARealCurrentVal);
+        TESTL(r==KErrNone); //ROM setting, should always exist
+        if(PmaIsModified)
+            {
+            TESTL(PMARealCurrentVal == KPMARealModifiedValue);
+            }
+        else
+            {
+            TESTL(PMARealCurrentVal == KPMARealOrigValue);
+            }
+        
+        // Bin value
+        // In modify step, we will modify a 'string8(binary)' setting (after backup finished),
+        // it must still contain the modified setting after restore.
+        // During other steps, this setting will not be modified, hence it should 
+        // still have the ROM value.
+        TBuf8 <20> PMABinCurrentVal;
+        r=repository->Get(KPMABinKey, PMABinCurrentVal);
+        TESTL(r==KErrNone); //ROM setting, should always exist
+        if(PmaIsModified)
+            {
+            TESTL(PMABinCurrentVal == KPMABinModifiedValue);
+            }
+        else
+            {
+            TESTL(PMABinCurrentVal == KPMABinOrigValue);
+            }
+        
+        // String value
+        // In modify step, we will modify a 'string' setting (after backup finished),
+        // it must still contain the modified setting after restore.
+        // During other steps, this setting will not be modified, hence it should 
+        // still have the ROM value.
+        TBuf <20> PMAStrCurrentVal;
+        r=repository->Get(KPMAStrKey, PMAStrCurrentVal);
+        TESTL(r==KErrNone); //ROM setting, should always exist
+        if(PmaIsModified)
+            {
+            TESTL(PMAStrCurrentVal == KPMAStrModifiedValue);
+            }
+        else
+            {
+            TESTL(PMAStrCurrentVal == KPMAStrOrigValue);
+            }
+        
+        //Deleted key
+        // In modify step, we will delete a setting (after backup finished),
+        // it must not be restored after restore is finished.
+        // During other steps, this setting will not be deleted, hence it should still exist.
+        r=repository->Get(KPMADeleteIntKey, PMAIntCurrentVal);
+        if(PmaIsModified)
+            {
+            TESTL(r==KErrNotFound);
+            }
+        else
+            {
+            TESTL(r==KErrNone);
+            TESTL(PMAIntCurrentVal==KPMADeleteIntValue);
+            }
+        
+        //Created key
+        // In modify step, we will create a new int setting (after backup finished),
+        // it must still be exist after restore.
+        // During other steps, this setting will not be created, hence it should not exist.
+        r=repository->Get(KPMACreateIntKey, PMAIntCurrentVal);
+        if(PmaIsModified)
+            {
+            TESTL(r==KErrNone);
+            TESTL(PMAIntCurrentVal==KPMACreateIntValue);
+            }
+        else
+            {
+            TESTL(r==KErrNotFound);
+            }
+        
+        
+        
+        //adsaddlkajdlkas
+        r=repository->Get(KPMAInitIntKey, PMAIntCurrentVal);
+        RDebug::Print(_L("r = %d, PmaExpectedResult = %d, PmaIsModified = %d"),r,PmaExpectedResult, PmaIsModified);
+        RDebug::Print(_L("PMAIntCurrentVal = %d, KPMAInitIntOrigValue = %d, KPMAInitIntModifiedValue = %d"), PMAIntCurrentVal, KPMAInitIntOrigValue, KPMAInitIntModifiedValue);
+        TESTL(r==PmaExpectedResult);
+        if (r == KErrNone) 
+            {
+            if(PmaIsModified)
+                {
+                TESTL(PMAIntCurrentVal == KPMAInitIntModifiedValue);
+                }
+            else
+                {
+                TESTL(PMAIntCurrentVal == KPMAInitIntOrigValue);
+                }
+            }
+        
+        // Real value
+        // In modify step, we will modify a 'real' setting (after backup finished),
+        // it must still contain the modified setting after restore.
+        // During other steps, this setting will not be modified, hence it should 
+        // still have the ROM value.
+        r=repository->Get(KPMAInitRealKey, PMARealCurrentVal);
+        RDebug::Print(_L("PMARealCurrentVal = %f, KPMAInitRealOrigValue = %f, KPMAInitRealModifiedValue = %f"), PMARealCurrentVal, KPMAInitRealOrigValue, KPMAInitRealModifiedValue);
+        TESTL(r==PmaExpectedResult);
+        if (r == KErrNone) 
+            {
+            if(PmaIsModified)
+                {
+                TESTL(PMARealCurrentVal == KPMAInitRealModifiedValue);
+                }
+            else
+                {
+                TESTL(PMARealCurrentVal == KPMAInitRealOrigValue);
+                }
+            }
+        
+        // Bin value
+        // In modify step, we will modify a 'string8(binary)' setting (after backup finished),
+        // it must still contain the modified setting after restore.
+        // During other steps, this setting will not be modified, hence it should 
+        // still have the ROM value.
+        r=repository->Get(KPMAInitBinKey, PMABinCurrentVal);
+        RDebug::Printf("PMABinCurrentVal = %s, KPMAInitBinOrigValue = %s, KPMAInitBinModifiedValue = %s", &PMABinCurrentVal, &KPMAInitBinOrigValue, &KPMAInitBinModifiedValue);
+        TESTL(r==PmaExpectedResult);
+        if (r == KErrNone) 
+            {
+            if(PmaIsModified)
+                {
+                TESTL(PMABinCurrentVal == KPMAInitBinModifiedValue);
+                }
+            else
+                {
+                TESTL(PMABinCurrentVal == KPMAInitBinOrigValue);
+                }
+            }
+        
+        // String value
+        // In modify step, we will modify a 'string' setting (after backup finished),
+        // it must still contain the modified setting after restore.
+        // During other steps, this setting will not be modified, hence it should 
+        // still have the ROM value.
+        r=repository->Get(KPMAInitStrKey, PMAStrCurrentVal);
+        RDebug::Print(_L("PMAStrCurrentVal = %S, KPMAInitStrOrigValue = %S, KPMAInitStrModifiedValue = %S"), &PMAStrCurrentVal, &KPMAInitStrOrigValue, &KPMAInitStrModifiedValue);
+        TESTL(r==PmaExpectedResult);
+        if (r == KErrNone) 
+            {
+            if(PmaIsModified)
+                {
+                TESTL(PMAStrCurrentVal == KPMAInitStrModifiedValue);
+                }
+            else
+                {
+                TESTL(PMAStrCurrentVal == KPMAInitStrOrigValue);
+                }
+            }
+        CleanupStack::PopAndDestroy(repository);
+        }
+#endif //defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+
+    SetTestStepResult(EPass);	
+
+	return TestStepResult();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/src/comparePMAStep.h	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,40 @@
+/**
+* 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:
+*
+*/
+
+
+
+/**
+ @file
+*/
+#if (!defined __COMPARE_PMA_STEP_H__)
+#define __COMPARE_PMA_STEP_H__
+#include <test/testexecutestepbase.h>
+#include "Te_centrep_BURSuiteStepBase.h"
+
+class CcomparePMAStep : public CTe_centrep_BURSuiteStepBase
+	{
+public:
+	CcomparePMAStep();
+	~CcomparePMAStep();
+	virtual TVerdict doTestStepL();
+
+private:
+	};
+
+_LIT(KcomparePMAStep,"comparePMAStep");
+
+#endif
--- a/persistentstorage/centralrepository/test/testexecute/BUR/src/initailiseStep.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +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:
-//
-
-/**
- @file
- @SYMTestSuiteName SYSLIB-CENTRALREPOSITORY-TE_CENTREP_BURSUITE
- @SYMScriptTestEnvironment this script requires Techview ROM for BURTestserver dependency. BURTestserver must be built for this test to run.
-*/
-#include "initailiseStep.h"
-#include "Te_centrep_BURSuiteDefs.h"
-
-CinitailiseStep::~CinitailiseStep()
-/**
- * Destructor
- */
-	{
-	}
-
-CinitailiseStep::CinitailiseStep()
-/**
- * Constructor
- */
-	{
-	// **MUST** call SetTestStepName in the constructor as the controlling
-	// framework uses the test step name immediately following construction to set
-	// up the step's unique logging ID.
-	SetTestStepName(KinitailiseStep);
-	}
-
-/*
-@SYMTestCaseID SYSLIB-CENTRALREPOSITORY-CIT-0131
-@SYMTestCaseDesc Test Backup & Restore functionality, when repository unchanged
-@SYMTestPriority High
-@SYMTestActions  Create repository, backup, restore, check values
-@SYMTestExpectedResults The test must not fail
-@SYMPREQ 752 Uniform settings access for remote provision and settings sharing
-@SYMPREQ 908 System file corruption recoverability
-*/
-
-/*
-@SYMTestCaseID SYSLIB-CENTRALREPOSITORY-CIT-0132
-@SYMTestCaseDesc Test Backup & Restore functionality, when repository corrupt
-@SYMTestPriority High
-@SYMTestActions  Create repository, backup, corrupt, restore, check values
-@SYMTestExpectedResults The test must not fail
-@SYMPREQ 752 Uniform settings access for remote provision and settings sharing
-@SYMPREQ 908 System file corruption recoverability
-*/
-
-/*
-@SYMTestCaseID SYSLIB-CENTRALREPOSITORY-CIT-0133
-@SYMTestCaseDesc Test Backup & Restore functionality, when repository modified
-@SYMTestPriority High
-@SYMTestActions  Create repository, backup, modify, restore, check values
-@SYMTestExpectedResults The test must not fail
-@SYMPREQ 752 Uniform settings access for remote provision and settings sharing
-@SYMPREQ 908 System file corruption recoverability
-*/
-
-/*
-@SYMTestCaseID SYSLIB-CENTRALREPOSITORY-CIT-0134
-@SYMTestCaseDesc Test Backup & Restore functionality, when repository deleted
-@SYMTestPriority High
-@SYMTestActions  Create repository, backup, delete, restore, check values
-@SYMTestExpectedResults The test must not fail
-@SYMPREQ 752 Uniform settings access for remote provision and settings sharing
-@SYMPREQ 908 System file corruption recoverability
-*/
-
-/*
-@SYMTestCaseID SYSLIB-CENTRALREPOSITORY-CIT-3415
-@SYMTestCaseDesc Restoration Notification Test
-@SYMTestPriority High
-@SYMTestActions  This test checks that the restoration sends notifications about 
-the changed repositories and keys. The test process is:
-1. Create repositories.
-2. Backup repositories.
-3. Modify repositories.
-4. Request notifications
-5. Restore repositories.
-6. Wait for the notifications and check the result of the restore.
-Step 4 and step 6 must be run in the same thread for the receiving of notifications.
-@SYMTestExpectedResults The notification requesting test step should be notified about 
-the changes by the restoration and get the new values of changed keys successfully.
-@SYMDEF INC101923 cenrep notifier does not fire when restoring from backup
-*/
-
-TVerdict CinitailiseStep::doTestStepL()
-/**
- * @return - TVerdict code
- * Override of base class pure virtual
- * Our implementation only gets called if the base class doTestStepPreambleL() did
- * not leave. That being the case, the current test result value will be EPass.
- */
-	{
-    SetTestStepResult(EFail);	
-
-	// Existance of caching functionality makes all test steps fail because file delete operations
-	// outside of CenRep's knowledge assumes non-caching behaviour.
-	// We wait until the cache is empty here to correct the behaviour.
-	User::After(KDefaultEvictionTimeout+950000);
-
- 	CRepository* repository;
-	User::LeaveIfNull(repository = CRepository::NewLC(KUidBURTestRepository));
-
-	TInt r;
-
-	// Create values to be backed up
-
-	r = repository->Create(KNewBackupInt1, KIntBackupValue1);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupInt2, KIntBackupValue2);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupInt3, KIntBackupValue3);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupInt4, KIntBackupValue4);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupReal1, KRealBackupValue1);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupReal2, KRealBackupValue2);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupReal3, KRealBackupValue3);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupReal4, KRealBackupValue4);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupString81, KString8BackupValue1);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupString82, KString8BackupValue2);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupString83, KString8BackupValue3);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupString84, KString8BackupValue4);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupString161, KString16BackupValue1);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupString162, KString16BackupValue2);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupString163, KString16BackupValue3);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewBackupString164, KString16BackupValue4);
-	TESTL(r==KErrNone);
-
-	// Create values not to be backed up
-
-	r = repository->Create(KNewInt1, KIntValue1);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewInt2, KIntValue2);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewInt3, KIntValue3);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewInt4, KIntValue4);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewReal1, KRealValue1);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewReal2, KRealValue2);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewReal3, KRealValue3);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewReal4, KRealValue4);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewString81, KString8Value1);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewString82, KString8Value2);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewString83, KString8Value3);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewString84, KString8Value4);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewString161, KString16Value1);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewString162, KString16Value2);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewString163, KString16Value3);
-	TESTL(r==KErrNone);
-	r = repository->Create(KNewString164, KString16Value4);
-	TESTL(r==KErrNone);
-
-	// Delete key not marked for backup
-	r = repository->Delete(KNoBackupDeleteTestInt);
-	TESTL(r==KErrNone);
-
-	// Delete key marked for backup	
-	r = repository->Delete(KBackupDeleteTestInt) ;
-	TESTL(r==KErrNone);
-	
-	// Check that keys deleted in initialise step have really gone.
-	TInt value ;
-	r=repository->Get(KNoBackupDeleteTestInt, value);
-	TESTL(r==KErrNotFound) ;
-	
-	r=repository->Get(KBackupDeleteTestInt, value);
-	TESTL(r==KErrNotFound) ;
-	
-	CleanupStack::PopAndDestroy(repository);
-
-	SetTestStepResult(EPass);
-	
-	return TestStepResult();
-	}
-
--- a/persistentstorage/centralrepository/test/testexecute/BUR/src/initailiseStep.h	Mon Sep 27 11:59:56 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +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:
-*
-*/
-
-
-
-/**
- @file
-*/
-#if (!defined __INITAILISE_STEP_H__)
-#define __INITAILISE_STEP_H__
-#include <test/testexecutestepbase.h>
-#include "Te_centrep_BURSuiteStepBase.h"
-#include "srvreqs.h"
-#include "srvdefs.h"
-#include "cachemgr.h"
-
-class CinitailiseStep : public CTe_centrep_BURSuiteStepBase
-	{
-public:
-	CinitailiseStep();
-	~CinitailiseStep();
-	virtual TVerdict doTestStepL();
-
-private:
-	};
-
-_LIT(KinitailiseStep,"initailiseStep");
-
-#endif
--- a/persistentstorage/centralrepository/test/testexecute/BUR/src/initialiseDefStep.h	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/src/initialiseDefStep.h	Tue Oct 19 16:26:13 2010 +0100
@@ -20,8 +20,8 @@
 /**
  @file
 */
-#if (!defined __INITAILISE_DEF_STEP_H__)
-#define __INITAILISE_DEF_STEP_H__
+#if (!defined __INITIALISE_DEF_STEP_H__)
+#define __INITIALISE_DEF_STEP_H__
 #include <test/testexecutestepbase.h>
 #include "Te_centrep_BURSuiteStepBase.h"
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/src/initialisePMAStep.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,79 @@
+// 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:
+//
+
+/**
+ @file
+ @SYMTestSuiteName SYSLIB-CENTRALREPOSITORY-TE_CENTREP_BURSUITE
+ @SYMScriptTestEnvironment this script requires Techview ROM for BURTestserver dependency. BURTestserver must be built for this test to run.
+*/
+#include "initialisePMAStep.h"
+#include "Te_centrep_BURSuiteDefs.h"
+
+CinitialisePMAStep::~CinitialisePMAStep()
+/**
+ * Destructor
+ */
+	{
+	}
+
+CinitialisePMAStep::CinitialisePMAStep()
+/**
+ * Constructor
+ */
+	{
+	// **MUST** call SetTestStepName in the constructor as the controlling
+	// framework uses the test step name immediately following construction to set
+	// up the step's unique logging ID.
+	SetTestStepName(KinitialisePMAStep);
+	}
+
+TVerdict CinitialisePMAStep::doTestStepL()
+/**
+ * @return - TVerdict code
+ * Override of base class pure virtual
+ * Our implementation only gets called if the base class doTestStepPreambleL() did
+ * not leave. That being the case, the current test result value will be EPass.
+ */
+	{
+    SetTestStepResult(EFail);
+
+ 	
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+	INFO_PRINTF2(_L("Start PMA InitialiseStep repos id: 0x%x"), KUidBURTestPMARepository);
+	
+    CRepository* repository;
+    repository = CRepository::NewLC(KUidBURTestPMARepository);
+
+    TInt r = repository->Create(KPMAInitIntKey, KPMAInitIntOrigValue);
+    TESTL(r==KErrNone);
+    
+    r = repository->Create(KPMAInitRealKey, KPMAInitRealOrigValue);
+    TESTL(r==KErrNone);
+    
+    r = repository->Create(KPMAInitBinKey, KPMAInitBinOrigValue);
+    TESTL(r==KErrNone);
+    
+    r = repository->Create(KPMAInitStrKey, KPMAInitStrOrigValue);
+    TESTL(r==KErrNone);
+    
+    CleanupStack::PopAndDestroy(repository);
+        //}
+#endif //defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+
+    SetTestStepResult(EPass);
+	
+	return TestStepResult();
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/src/initialisePMAStep.h	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,43 @@
+/**
+* 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:
+*
+*/
+
+
+
+/**
+ @file
+*/
+#if (!defined __INITIALISE_PMA_STEP_H__)
+#define __INITIALISE_PMA_STEP_H__
+#include <test/testexecutestepbase.h>
+#include "Te_centrep_BURSuiteStepBase.h"
+#include "srvreqs.h"
+#include "srvdefs.h"
+#include "cachemgr.h"
+
+class CinitialisePMAStep : public CTe_centrep_BURSuiteStepBase
+	{
+public:
+	CinitialisePMAStep();
+	~CinitialisePMAStep();
+	virtual TVerdict doTestStepL();
+
+private:
+	};
+
+_LIT(KinitialisePMAStep,"initialisePMAStep");
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/src/initialiseStep.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,212 @@
+// 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:
+//
+
+/**
+ @file
+ @SYMTestSuiteName SYSLIB-CENTRALREPOSITORY-TE_CENTREP_BURSUITE
+ @SYMScriptTestEnvironment this script requires Techview ROM for BURTestserver dependency. BURTestserver must be built for this test to run.
+*/
+#include "initialiseStep.h"
+#include "Te_centrep_BURSuiteDefs.h"
+
+CinitialiseStep::~CinitialiseStep()
+/**
+ * Destructor
+ */
+	{
+	}
+
+CinitialiseStep::CinitialiseStep()
+/**
+ * Constructor
+ */
+	{
+	// **MUST** call SetTestStepName in the constructor as the controlling
+	// framework uses the test step name immediately following construction to set
+	// up the step's unique logging ID.
+	SetTestStepName(KinitialiseStep);
+	}
+
+/*
+@SYMTestCaseID SYSLIB-CENTRALREPOSITORY-CIT-0131
+@SYMTestCaseDesc Test Backup & Restore functionality, when repository unchanged
+@SYMTestPriority High
+@SYMTestActions  Create repository, backup, restore, check values
+@SYMTestExpectedResults The test must not fail
+@SYMPREQ 752 Uniform settings access for remote provision and settings sharing
+@SYMPREQ 908 System file corruption recoverability
+*/
+
+/*
+@SYMTestCaseID SYSLIB-CENTRALREPOSITORY-CIT-0132
+@SYMTestCaseDesc Test Backup & Restore functionality, when repository corrupt
+@SYMTestPriority High
+@SYMTestActions  Create repository, backup, corrupt, restore, check values
+@SYMTestExpectedResults The test must not fail
+@SYMPREQ 752 Uniform settings access for remote provision and settings sharing
+@SYMPREQ 908 System file corruption recoverability
+*/
+
+/*
+@SYMTestCaseID SYSLIB-CENTRALREPOSITORY-CIT-0133
+@SYMTestCaseDesc Test Backup & Restore functionality, when repository modified
+@SYMTestPriority High
+@SYMTestActions  Create repository, backup, modify, restore, check values
+@SYMTestExpectedResults The test must not fail
+@SYMPREQ 752 Uniform settings access for remote provision and settings sharing
+@SYMPREQ 908 System file corruption recoverability
+*/
+
+/*
+@SYMTestCaseID SYSLIB-CENTRALREPOSITORY-CIT-0134
+@SYMTestCaseDesc Test Backup & Restore functionality, when repository deleted
+@SYMTestPriority High
+@SYMTestActions  Create repository, backup, delete, restore, check values
+@SYMTestExpectedResults The test must not fail
+@SYMPREQ 752 Uniform settings access for remote provision and settings sharing
+@SYMPREQ 908 System file corruption recoverability
+*/
+
+/*
+@SYMTestCaseID SYSLIB-CENTRALREPOSITORY-CIT-3415
+@SYMTestCaseDesc Restoration Notification Test
+@SYMTestPriority High
+@SYMTestActions  This test checks that the restoration sends notifications about 
+the changed repositories and keys. The test process is:
+1. Create repositories.
+2. Backup repositories.
+3. Modify repositories.
+4. Request notifications
+5. Restore repositories.
+6. Wait for the notifications and check the result of the restore.
+Step 4 and step 6 must be run in the same thread for the receiving of notifications.
+@SYMTestExpectedResults The notification requesting test step should be notified about 
+the changes by the restoration and get the new values of changed keys successfully.
+@SYMDEF INC101923 cenrep notifier does not fire when restoring from backup
+*/
+
+TVerdict CinitialiseStep::doTestStepL()
+/**
+ * @return - TVerdict code
+ * Override of base class pure virtual
+ * Our implementation only gets called if the base class doTestStepPreambleL() did
+ * not leave. That being the case, the current test result value will be EPass.
+ */
+	{
+    SetTestStepResult(EFail);	
+
+	// Existance of caching functionality makes all test steps fail because file delete operations
+	// outside of CenRep's knowledge assumes non-caching behaviour.
+	// We wait until the cache is empty here to correct the behaviour.
+	User::After(KDefaultEvictionTimeout+950000);
+
+ 	CRepository* repository;
+	User::LeaveIfNull(repository = CRepository::NewLC(KUidBURTestRepository));
+
+	TInt r;
+
+	// Create values to be backed up
+
+	r = repository->Create(KNewBackupInt1, KIntBackupValue1);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupInt2, KIntBackupValue2);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupInt3, KIntBackupValue3);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupInt4, KIntBackupValue4);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupReal1, KRealBackupValue1);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupReal2, KRealBackupValue2);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupReal3, KRealBackupValue3);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupReal4, KRealBackupValue4);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupString81, KString8BackupValue1);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupString82, KString8BackupValue2);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupString83, KString8BackupValue3);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupString84, KString8BackupValue4);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupString161, KString16BackupValue1);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupString162, KString16BackupValue2);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupString163, KString16BackupValue3);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewBackupString164, KString16BackupValue4);
+	TESTL(r==KErrNone);
+
+	// Create values not to be backed up
+
+	r = repository->Create(KNewInt1, KIntValue1);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewInt2, KIntValue2);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewInt3, KIntValue3);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewInt4, KIntValue4);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewReal1, KRealValue1);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewReal2, KRealValue2);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewReal3, KRealValue3);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewReal4, KRealValue4);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewString81, KString8Value1);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewString82, KString8Value2);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewString83, KString8Value3);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewString84, KString8Value4);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewString161, KString16Value1);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewString162, KString16Value2);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewString163, KString16Value3);
+	TESTL(r==KErrNone);
+	r = repository->Create(KNewString164, KString16Value4);
+	TESTL(r==KErrNone);
+
+	// Delete key not marked for backup
+	r = repository->Delete(KNoBackupDeleteTestInt);
+	TESTL(r==KErrNone);
+
+	// Delete key marked for backup	
+	r = repository->Delete(KBackupDeleteTestInt) ;
+	TESTL(r==KErrNone);
+	
+	// Check that keys deleted in initialise step have really gone.
+	TInt value ;
+	r=repository->Get(KNoBackupDeleteTestInt, value);
+	TESTL(r==KErrNotFound) ;
+	
+	r=repository->Get(KBackupDeleteTestInt, value);
+	TESTL(r==KErrNotFound) ;
+	
+	CleanupStack::PopAndDestroy(repository);
+
+	SetTestStepResult(EPass);
+	
+	return TestStepResult();
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/src/initialiseStep.h	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,43 @@
+/**
+* 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:
+*
+*/
+
+
+
+/**
+ @file
+*/
+#if (!defined __INITIALISE_STEP_H__)
+#define __INITIALISE_STEP_H__
+#include <test/testexecutestepbase.h>
+#include "Te_centrep_BURSuiteStepBase.h"
+#include "srvreqs.h"
+#include "srvdefs.h"
+#include "cachemgr.h"
+
+class CinitialiseStep : public CTe_centrep_BURSuiteStepBase
+	{
+public:
+	CinitialiseStep();
+	~CinitialiseStep();
+	virtual TVerdict doTestStepL();
+
+private:
+	};
+
+_LIT(KinitialiseStep,"initialiseStep");
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/src/modifyPMAStep.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,97 @@
+// 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:
+//
+
+/**
+ @file
+*/
+#include "modifyPMAStep.h"
+#include "Te_centrep_BURSuiteDefs.h"
+
+CmodifyPMAStep::~CmodifyPMAStep()
+/**
+ * Destructor
+ */
+	{
+	}
+
+CmodifyPMAStep::CmodifyPMAStep()
+/**
+ * Constructor
+ */
+	{
+	// **MUST** call SetTestStepName in the constructor as the controlling
+	// framework uses the test step name immediately following construction to set
+	// up the step's unique logging ID.
+	SetTestStepName(KmodifyPMAStep);
+	}
+
+TVerdict CmodifyPMAStep::doTestStepL()
+/**
+ * @return - TVerdict code
+ * Override of base class pure virtual
+ * Our implementation only gets called if the base class doTestStepPreambleL() did
+ * not leave. That being the case, the current test result value will be EPass.
+ */
+	{
+    SetTestStepResult(EFail);	
+	
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+    CRepository* repository;
+    TInt r;
+	
+    INFO_PRINTF2(_L("Start PMA ModifyPMAStep repos id: 0x%x"), KUidBURTestPMARepository);
+	repository = CRepository::NewLC(KUidBURTestPMARepository);
+    // Modify current entries
+    r = repository->Set(KPMAIntKey, KPMAIntModifiedValue);
+    TESTL(r==KErrNone);
+    
+    r = repository->Set(KPMARealKey, KPMARealModifiedValue);
+    TESTL(r==KErrNone);
+    
+    r = repository->Set(KPMABinKey, KPMABinModifiedValue);
+    TESTL(r==KErrNone);
+    
+    r = repository->Set(KPMAStrKey, KPMAStrModifiedValue);
+    TESTL(r==KErrNone);
+        
+
+    // Delete keys
+    r = repository->Delete(KPMADeleteIntKey);
+    TESTL(r==KErrNone);
+    
+    r = repository->Create(KPMACreateIntKey, KPMACreateIntValue);
+    TESTL(r==KErrNone);
+    
+    
+    // Modify current entries
+    r = repository->Set(KPMAInitIntKey, KPMAInitIntModifiedValue);
+    TESTL(r==KErrNone);
+    
+    r = repository->Set(KPMAInitRealKey, KPMAInitRealModifiedValue);
+    TESTL(r==KErrNone);
+    
+    r = repository->Set(KPMAInitBinKey, KPMAInitBinModifiedValue);
+    TESTL(r==KErrNone);
+    
+    r = repository->Set(KPMAInitStrKey, KPMAInitStrModifiedValue);
+    TESTL(r==KErrNone);
+
+    CleanupStack::PopAndDestroy(repository);
+#endif //defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+
+    SetTestStepResult(EPass);
+    
+	return TestStepResult();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/BUR/src/modifyPMAStep.h	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,40 @@
+/**
+* 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:
+*
+*/
+
+
+
+/**
+ @file
+*/
+#if (!defined __MODIFY_PMA_STEP_H__)
+#define __MODIFY_PMA_STEP_H__
+#include <test/testexecutestepbase.h>
+#include "Te_centrep_BURSuiteStepBase.h"
+
+class CmodifyPMAStep : public CTe_centrep_BURSuiteStepBase
+	{
+public:
+	CmodifyPMAStep();
+	~CmodifyPMAStep();
+	virtual TVerdict doTestStepL();
+
+private:
+	};
+
+_LIT(KmodifyPMAStep,"modifyPMAStep");
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/config/SWI-PMA-PU.ini	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,306 @@
+[Install_KP401]
+sis=z:\TEF_CentralRepository\KP401s.sis
+[Install_KP402]
+sis=z:\TEF_CentralRepository\KP402s.sis
+[Install_KP403]
+sis=z:\TEF_CentralRepository\KP403s.sis
+[Install_KP404]
+sis=z:\TEF_CentralRepository\KP404s.sis
+[Install_KP405]
+sis=z:\TEF_CentralRepository\KP405s.sis
+[Install_KP406]
+sis=z:\TEF_CentralRepository\KP406s.sis
+[Install_KP407]
+sis=z:\TEF_CentralRepository\KP407s.sis
+
+[Install_KP411]
+sis=z:\TEF_CentralRepository\KP411s.sis
+[Install_KP412]
+sis=z:\TEF_CentralRepository\KP412s.sis
+[Install_KP413]
+sis=z:\TEF_CentralRepository\KP413s.sis
+[Install_KP414]
+sis=z:\TEF_CentralRepository\KP414s.sis
+[Install_KP415]
+sis=z:\TEF_CentralRepository\KP415s.sis
+[Install_KP416]
+sis=z:\TEF_CentralRepository\KP416s.sis
+[Install_KP417]
+sis=z:\TEF_CentralRepository\KP417s.sis
+
+[Install_KP421]
+sis=z:\TEF_CentralRepository\KP421s.sis
+[Install_KP422]
+sis=z:\TEF_CentralRepository\KP422s.sis
+[Install_KP423]
+sis=z:\TEF_CentralRepository\KP423s.sis
+
+[Install_KP431]
+sis=z:\TEF_CentralRepository\KP431s.sis
+[Install_KP432]
+sis=z:\TEF_CentralRepository\KP432s.sis
+[Install_KP433]
+sis=z:\TEF_CentralRepository\KP433s.sis
+
+
+
+[Install_PMATxt_NonExist_Rep]
+RepositoryKey=F1000401
+RepositoryPresent=0
+
+[Install_PMATxt_to_TxtRep_in_ROM]
+RepositoryKey=F1000402
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMATxt_to_CreRep_in_ROM]
+RepositoryKey=F1000403
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMATxt_to_PMATxtRep_in_ROM]
+RepositoryKey=F1000404
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMATxt_to_PMACreRep_in_ROM]
+RepositoryKey=F1000405
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMATxt_to_PMACreRep_in_PMADrive]
+RepositoryKey=F1000406
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMATxt_to_CreRep_in_Persist]
+RepositoryKey=F1000407
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMACre_NonExist_Rep]
+RepositoryKey=F1000411
+RepositoryPresent=0
+
+[Install_PMACre_to_TxtRep_in_ROM]
+RepositoryKey=F1000412
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+
+[Install_PMACre_to_CreRep_in_ROM]
+RepositoryKey=F1000413
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMACre_to_PMATxtRep_in_ROM]
+RepositoryKey=F1000414
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMACre_to_PMACreRep_in_ROM]
+RepositoryKey=F1000415
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMACre_to_PMACreRep_in_PMADrive]
+RepositoryKey=F1000416
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMACre_to_CreRep_in_Persist]
+RepositoryKey=F1000417
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_NormalTxt_to_PMATxtRep_in_ROM]
+RepositoryKey=F1000421
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_NormalTxt_to_PMACreRep_in_ROM]
+RepositoryKey=F1000422
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_NormalTxt_to_PMACreRep_in_PMADrive]
+RepositoryKey=F1000423
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_NormalCre_to_PMATxtRep_in_ROM]
+RepositoryKey=F1000431
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_NormalCre_to_PMACreRep_in_ROM]
+RepositoryKey=F1000432
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_NormalCre_to_PMACreRep_in_PMADrive]
+RepositoryKey=F1000433
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/config/SWI-PMA-SP.ini	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,307 @@
+[Install_KS401]
+sis=z:\TEF_CentralRepository\KS401s.sis
+[Install_KS402]
+sis=z:\TEF_CentralRepository\KS402s.sis
+[Install_KS403]
+sis=z:\TEF_CentralRepository\KS403s.sis
+[Install_KS404]
+sis=z:\TEF_CentralRepository\KS404s.sis
+[Install_KS405]
+sis=z:\TEF_CentralRepository\KS405s.sis
+[Install_KS406]
+sis=z:\TEF_CentralRepository\KS406s.sis
+[Install_KS407]
+sis=z:\TEF_CentralRepository\KS407s.sis
+
+[Install_KS411]
+sis=z:\TEF_CentralRepository\KS411s.sis
+[Install_KS412]
+sis=z:\TEF_CentralRepository\KS412s.sis
+[Install_KS413]
+sis=z:\TEF_CentralRepository\KS413s.sis
+[Install_KS414]
+sis=z:\TEF_CentralRepository\KS414s.sis
+[Install_KS415]
+sis=z:\TEF_CentralRepository\KS415s.sis
+[Install_KS416]
+sis=z:\TEF_CentralRepository\KS416s.sis
+[Install_KS417]
+sis=z:\TEF_CentralRepository\KS417s.sis
+
+[Install_KS421]
+sis=z:\TEF_CentralRepository\KS421s.sis
+[Install_KS422]
+sis=z:\TEF_CentralRepository\KS422s.sis
+[Install_KS423]
+sis=z:\TEF_CentralRepository\KS423s.sis
+
+[Install_KS431]
+sis=z:\TEF_CentralRepository\KS431s.sis
+[Install_KS432]
+sis=z:\TEF_CentralRepository\KS432s.sis
+[Install_KS433]
+sis=z:\TEF_CentralRepository\KS433s.sis
+
+
+
+
+[Install_PMATxt_NonExist_Rep]
+RepositoryKey=F1000401
+RepositoryPresent=0
+
+[Install_PMATxt_to_TxtRep_in_ROM]
+RepositoryKey=F1000402
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMATxt_to_CreRep_in_ROM]
+RepositoryKey=F1000403
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMATxt_to_PMATxtRep_in_ROM]
+RepositoryKey=F1000404
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMATxt_to_PMACreRep_in_ROM]
+RepositoryKey=F1000405
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMATxt_to_PMACreRep_in_PMADrive]
+RepositoryKey=F1000406
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMATxt_to_CreRep_in_Persist]
+RepositoryKey=F1000407
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMACre_NonExist_Rep]
+RepositoryKey=F1000411
+RepositoryPresent=0
+
+[Install_PMACre_to_TxtRep_in_ROM]
+RepositoryKey=F1000412
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+
+[Install_PMACre_to_CreRep_in_ROM]
+RepositoryKey=F1000413
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMACre_to_PMATxtRep_in_ROM]
+RepositoryKey=F1000414
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMACre_to_PMACreRep_in_ROM]
+RepositoryKey=F1000415
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMACre_to_PMACreRep_in_PMADrive]
+RepositoryKey=F1000416
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_PMACre_to_CreRep_in_Persist]
+RepositoryKey=F1000417
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_NormalTxt_to_PMATxtRep_in_ROM]
+RepositoryKey=F1000421
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_NormalTxt_to_PMACreRep_in_ROM]
+RepositoryKey=F1000422
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_NormalTxt_to_PMACreRep_in_PMADrive]
+RepositoryKey=F1000423
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_NormalCre_to_PMATxtRep_in_ROM]
+RepositoryKey=F1000431
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_NormalCre_to_PMACreRep_in_ROM]
+RepositoryKey=F1000432
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
+
+[Install_NormalCre_to_PMACreRep_in_PMADrive]
+RepositoryKey=F1000433
+RepositoryPresent=1
+ExpectedNumSettings=3
+NumInts=1
+NumReals=1
+NumStrings=1
+IntKey0=800
+IntVal0=8000
+RealKey0=900
+RealVal0=230.40000
+StringKey0=a00
+StringVal0=test string 0xa0000
--- a/persistentstorage/centralrepository/test/testexecute/SWI/data/centrepswiteststub.pkg	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/data/centrepswiteststub.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -1,5 +1,5 @@
 ;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; Copyright (c) 2009-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"
@@ -83,3 +83,22 @@
 ""-"z:\private\10202be9\90011113.cre"
 ""-"z:\private\10202be9\90011114.cre"
 ""-"z:\private\10202be9\90011115.cre"
+
+""-"z:\private\10202be9\f1000402.txt"
+""-"z:\private\10202be9\f1000403.cre"
+""-"z:\private\10202be9\f1000404.txt"
+""-"z:\private\10202be9\f1000405.cre"
+""-"z:\private\10202be9\f1000406.txt"
+""-"z:\private\10202be9\f1000407.txt"
+""-"z:\private\10202be9\f1000412.txt"
+""-"z:\private\10202be9\f1000413.cre"
+""-"z:\private\10202be9\f1000414.txt"
+""-"z:\private\10202be9\f1000415.cre"
+""-"z:\private\10202be9\f1000416.txt"
+""-"z:\private\10202be9\f1000417.txt"
+""-"z:\private\10202be9\f1000421.txt"
+""-"z:\private\10202be9\f1000422.cre"
+""-"z:\private\10202be9\f1000423.txt"
+""-"z:\private\10202be9\f1000431.txt"
+""-"z:\private\10202be9\f1000432.cre"
+""-"z:\private\10202be9\f1000433.txt"
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/centrepswiteststub.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/centrepswiteststub.sis has changed
--- a/persistentstorage/centralrepository/test/testexecute/SWI/group/bld.inf	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/group/bld.inf	Tue Oct 19 16:26:13 2010 +0100
@@ -62,6 +62,125 @@
 ../data/keyspaces/5155155F.cre						z:/private/10202be9/5155155f.cre
 ../data/keyspaces/51551652.cre						z:/private/10202be9/51551652.cre
 
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+../scripts/te_centrep_swisuite_pma.script           z:/tef_centralrepository/te_centrep_swisuite_pma.script
+../scripts/te_centrep_swisuite_pma_sp.script		z:/tef_centralrepository/te_centrep_swisuite_pma_sp.script
+../scripts/te_centrep_swisuite_pma_pu.script		z:/tef_centralrepository/te_centrep_swisuite_pma_pu.script
+../config/SWI-PMA-SP.ini                            z:/tef_centralrepository/swi-pma-sp.ini
+../config/SWI-PMA-PU.ini                            z:/tef_centralrepository/swi-pma-pu.ini
+
+../pma_data/orig_rep/f1000402.txt                   z:/private/10202be9/f1000402.txt
+../pma_data/orig_rep/f1000403.cre                   z:/private/10202be9/f1000403.cre
+../pma_data/orig_rep/f1000404.txt                   z:/private/10202be9/f1000404.txt
+../pma_data/orig_rep/f1000405.cre                   z:/private/10202be9/f1000405.cre 
+../pma_data/orig_rep/f1000406.pma                   z:/private/10202be9/f1000406.pma
+../pma_data/orig_rep/f1000406.txt                   z:/private/10202be9/f1000406.txt
+../pma_data/orig_rep/f1000407.txt                   z:/private/10202be9/f1000407.txt
+../pma_data/orig_rep/f1000407.crp                   z:/private/10202be9/f1000407.crp
+../pma_data/orig_rep/f1000412.txt                   z:/private/10202be9/f1000412.txt
+../pma_data/orig_rep/f1000413.cre                   z:/private/10202be9/f1000413.cre
+../pma_data/orig_rep/f1000414.txt                   z:/private/10202be9/f1000414.txt
+../pma_data/orig_rep/f1000415.cre                   z:/private/10202be9/f1000415.cre
+../pma_data/orig_rep/f1000416.pma                   z:/private/10202be9/f1000416.pma
+../pma_data/orig_rep/f1000416.txt                   z:/private/10202be9/f1000416.txt
+../pma_data/orig_rep/f1000417.txt                   z:/private/10202be9/f1000417.txt
+../pma_data/orig_rep/f1000417.crp                   z:/private/10202be9/f1000417.crp
+../pma_data/orig_rep/f1000421.txt                   z:/private/10202be9/f1000421.txt
+../pma_data/orig_rep/f1000422.cre                   z:/private/10202be9/f1000422.cre
+../pma_data/orig_rep/f1000423.txt                   z:/private/10202be9/f1000423.txt
+../pma_data/orig_rep/f1000423.pma                   z:/private/10202be9/f1000423.pma
+../pma_data/orig_rep/f1000431.txt                   z:/private/10202be9/f1000431.txt
+../pma_data/orig_rep/f1000432.cre                   z:/private/10202be9/f1000432.cre
+../pma_data/orig_rep/f1000433.txt                   z:/private/10202be9/f1000433.txt
+../pma_data/orig_rep/f1000433.pma                   z:/private/10202be9/f1000433.pma
+
+#if defined(__SERIES60_) && defined(PDS_FULL_UI_TEST)
+../pma_data/rnd_sis/KS401s.sis                       z:/tef_centralrepository/ks401s.sis
+../pma_data/rnd_sis/KS402s.sis                       z:/tef_centralrepository/ks402s.sis
+../pma_data/rnd_sis/KS403s.sis                       z:/tef_centralrepository/ks403s.sis
+../pma_data/rnd_sis/KS404s.sis                       z:/tef_centralrepository/ks404s.sis
+../pma_data/rnd_sis/KS405s.sis                       z:/tef_centralrepository/ks405s.sis
+../pma_data/rnd_sis/KS406s.sis                       z:/tef_centralrepository/ks406s.sis
+../pma_data/rnd_sis/KS407s.sis                       z:/tef_centralrepository/ks407s.sis
+../pma_data/rnd_sis/KS411s.sis                       z:/tef_centralrepository/ks411s.sis
+../pma_data/rnd_sis/KS412s.sis                       z:/tef_centralrepository/ks412s.sis
+../pma_data/rnd_sis/KS413s.sis                       z:/tef_centralrepository/ks413s.sis
+../pma_data/rnd_sis/KS414s.sis                       z:/tef_centralrepository/ks414s.sis
+../pma_data/rnd_sis/KS415s.sis                       z:/tef_centralrepository/ks415s.sis
+../pma_data/rnd_sis/KS416s.sis                       z:/tef_centralrepository/ks416s.sis
+../pma_data/rnd_sis/KS417s.sis                       z:/tef_centralrepository/ks417s.sis
+../pma_data/rnd_sis/KS421s.sis                       z:/tef_centralrepository/ks421s.sis
+../pma_data/rnd_sis/KS422s.sis                       z:/tef_centralrepository/ks422s.sis
+../pma_data/rnd_sis/KS423s.sis                       z:/tef_centralrepository/ks423s.sis
+../pma_data/rnd_sis/KS431s.sis                       z:/tef_centralrepository/ks431s.sis
+../pma_data/rnd_sis/KS432s.sis                       z:/tef_centralrepository/ks432s.sis
+../pma_data/rnd_sis/KS433s.sis                       z:/tef_centralrepository/ks433s.sis
+
+../pma_data/rnd_sis/KP401s.sis                       z:/tef_centralrepository/kp401s.sis
+../pma_data/rnd_sis/KP402s.sis                       z:/tef_centralrepository/kp402s.sis
+../pma_data/rnd_sis/KP403s.sis                       z:/tef_centralrepository/kp403s.sis
+../pma_data/rnd_sis/KP404s.sis                       z:/tef_centralrepository/kp404s.sis
+../pma_data/rnd_sis/KP405s.sis                       z:/tef_centralrepository/kp405s.sis
+../pma_data/rnd_sis/KP406s.sis                       z:/tef_centralrepository/kp406s.sis
+../pma_data/rnd_sis/KP407s.sis                       z:/tef_centralrepository/kp407s.sis
+../pma_data/rnd_sis/KP411s.sis                       z:/tef_centralrepository/kp411s.sis
+../pma_data/rnd_sis/KP412s.sis                       z:/tef_centralrepository/kp412s.sis
+../pma_data/rnd_sis/KP413s.sis                       z:/tef_centralrepository/kp413s.sis
+../pma_data/rnd_sis/KP414s.sis                       z:/tef_centralrepository/kp414s.sis
+../pma_data/rnd_sis/KP415s.sis                       z:/tef_centralrepository/kp415s.sis
+../pma_data/rnd_sis/KP416s.sis                       z:/tef_centralrepository/kp416s.sis
+../pma_data/rnd_sis/KP417s.sis                       z:/tef_centralrepository/kp417s.sis
+../pma_data/rnd_sis/KP421s.sis                       z:/tef_centralrepository/kp421s.sis
+../pma_data/rnd_sis/KP422s.sis                       z:/tef_centralrepository/kp422s.sis
+../pma_data/rnd_sis/KP423s.sis                       z:/tef_centralrepository/kp423s.sis
+../pma_data/rnd_sis/KP431s.sis                       z:/tef_centralrepository/kp431s.sis
+../pma_data/rnd_sis/KP432s.sis                       z:/tef_centralrepository/kp432s.sis
+../pma_data/rnd_sis/KP433s.sis                       z:/tef_centralrepository/kp433s.sis
+#else
+../pma_data/techview_sis/KS401s.sis                  z:/tef_centralrepository/ks401s.sis
+../pma_data/techview_sis/KS402s.sis                  z:/tef_centralrepository/ks402s.sis
+../pma_data/techview_sis/KS403s.sis                  z:/tef_centralrepository/ks403s.sis
+../pma_data/techview_sis/KS404s.sis                  z:/tef_centralrepository/ks404s.sis
+../pma_data/techview_sis/KS405s.sis                  z:/tef_centralrepository/ks405s.sis
+../pma_data/techview_sis/KS406s.sis                  z:/tef_centralrepository/ks406s.sis
+../pma_data/techview_sis/KS407s.sis                  z:/tef_centralrepository/ks407s.sis
+../pma_data/techview_sis/KS411s.sis                  z:/tef_centralrepository/ks411s.sis
+../pma_data/techview_sis/KS412s.sis                  z:/tef_centralrepository/ks412s.sis
+../pma_data/techview_sis/KS413s.sis                  z:/tef_centralrepository/ks413s.sis
+../pma_data/techview_sis/KS414s.sis                  z:/tef_centralrepository/ks414s.sis
+../pma_data/techview_sis/KS415s.sis                  z:/tef_centralrepository/ks415s.sis
+../pma_data/techview_sis/KS416s.sis                  z:/tef_centralrepository/ks416s.sis
+../pma_data/techview_sis/KS417s.sis                  z:/tef_centralrepository/ks417s.sis
+../pma_data/techview_sis/KS421s.sis                  z:/tef_centralrepository/ks421s.sis
+../pma_data/techview_sis/KS422s.sis                  z:/tef_centralrepository/ks422s.sis
+../pma_data/techview_sis/KS423s.sis                  z:/tef_centralrepository/ks423s.sis
+../pma_data/techview_sis/KS431s.sis                  z:/tef_centralrepository/ks431s.sis
+../pma_data/techview_sis/KS432s.sis                  z:/tef_centralrepository/ks432s.sis
+../pma_data/techview_sis/KS433s.sis                  z:/tef_centralrepository/ks433s.sis
+
+../pma_data/techview_sis/KP401s.sis                  z:/tef_centralrepository/kp401s.sis
+../pma_data/techview_sis/KP402s.sis                  z:/tef_centralrepository/kp402s.sis
+../pma_data/techview_sis/KP403s.sis                  z:/tef_centralrepository/kp403s.sis
+../pma_data/techview_sis/KP404s.sis                  z:/tef_centralrepository/kp404s.sis
+../pma_data/techview_sis/KP405s.sis                  z:/tef_centralrepository/kp405s.sis
+../pma_data/techview_sis/KP406s.sis                  z:/tef_centralrepository/kp406s.sis
+../pma_data/techview_sis/KP407s.sis                  z:/tef_centralrepository/kp407s.sis
+../pma_data/techview_sis/KP411s.sis                  z:/tef_centralrepository/kp411s.sis
+../pma_data/techview_sis/KP412s.sis                  z:/tef_centralrepository/kp412s.sis
+../pma_data/techview_sis/KP413s.sis                  z:/tef_centralrepository/kp413s.sis
+../pma_data/techview_sis/KP414s.sis                  z:/tef_centralrepository/kp414s.sis
+../pma_data/techview_sis/KP415s.sis                  z:/tef_centralrepository/kp415s.sis
+../pma_data/techview_sis/KP416s.sis                  z:/tef_centralrepository/kp416s.sis
+../pma_data/techview_sis/KP417s.sis                  z:/tef_centralrepository/kp417s.sis
+../pma_data/techview_sis/KP421s.sis                  z:/tef_centralrepository/kp421s.sis
+../pma_data/techview_sis/KP422s.sis                  z:/tef_centralrepository/kp422s.sis
+../pma_data/techview_sis/KP423s.sis                  z:/tef_centralrepository/kp423s.sis
+../pma_data/techview_sis/KP431s.sis                  z:/tef_centralrepository/kp431s.sis
+../pma_data/techview_sis/KP432s.sis                  z:/tef_centralrepository/kp432s.sis
+../pma_data/techview_sis/KP433s.sis                  z:/tef_centralrepository/kp433s.sis
+#endif
+
+#endif
 
 // Copy in our swicertstore.dat so our signed sis files can install.
 ../data/certstore/swicertstore.dat						z:/resource/swicertstore.dat
--- a/persistentstorage/centralrepository/test/testexecute/SWI/group/te_centrep_SWIsuite.iby	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/group/te_centrep_SWIsuite.iby	Tue Oct 19 16:26:13 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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"
@@ -110,6 +110,80 @@
 data=DATAZ_\tef_centralrepository\appy2s.sis 				TEF_CentralRepository\APPY2s.sis
 data=DATAZ_\tef_centralrepository\ksy2s.sis 				TEF_CentralRepository\KSY2s.sis
 
+#if defined(SYMBIAN_INCLUDE_APP_CENTRIC)
+data=DATAZ_\PRIVATE\10202BE9\f1000402.txt       PRIVATE\10202BE9\f1000402.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000403.cre       PRIVATE\10202BE9\f1000403.cre
+data=DATAZ_\PRIVATE\10202BE9\f1000404.txt       PRIVATE\10202BE9\f1000404.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000405.cre       PRIVATE\10202BE9\f1000405.cre
+data=DATAZ_\PRIVATE\10202BE9\f1000406.pma       PRIVATE\10202BE9\f1000406.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000406.txt       PRIVATE\10202BE9\f1000406.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000407.txt       PRIVATE\10202BE9\f1000407.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000407.crp       PRIVATE\10202BE9\f1000407.crp
+data=DATAZ_\PRIVATE\10202BE9\f1000412.txt       PRIVATE\10202BE9\f1000412.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000413.cre       PRIVATE\10202BE9\f1000413.cre
+data=DATAZ_\PRIVATE\10202BE9\f1000414.txt       PRIVATE\10202BE9\f1000414.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000415.cre       PRIVATE\10202BE9\f1000415.cre
+data=DATAZ_\PRIVATE\10202BE9\f1000416.pma       PRIVATE\10202BE9\f1000416.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000416.txt       PRIVATE\10202BE9\f1000416.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000417.txt       PRIVATE\10202BE9\f1000417.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000417.crp       PRIVATE\10202BE9\f1000417.crp
+data=DATAZ_\PRIVATE\10202BE9\f1000421.txt       PRIVATE\10202BE9\f1000421.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000422.cre       PRIVATE\10202BE9\f1000422.cre
+data=DATAZ_\PRIVATE\10202BE9\f1000423.txt       PRIVATE\10202BE9\f1000423.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000423.pma       PRIVATE\10202BE9\f1000423.pma
+data=DATAZ_\PRIVATE\10202BE9\f1000431.txt       PRIVATE\10202BE9\f1000431.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000432.cre       PRIVATE\10202BE9\f1000432.cre
+data=DATAZ_\PRIVATE\10202BE9\f1000433.txt       PRIVATE\10202BE9\f1000433.txt
+data=DATAZ_\PRIVATE\10202BE9\f1000433.pma       PRIVATE\10202BE9\f1000433.pma
+
+data=DATAZ_\TEF_CentralRepository\te_centrep_swisuite_pma.script        TEF_CentralRepository\te_centrep_swisuite_pma.script
+data=DATAZ_\TEF_CentralRepository\te_centrep_swisuite_pma_sp.script 	TEF_CentralRepository\te_centrep_swisuite_pma_sp.script
+data=DATAZ_\TEF_CentralRepository\te_centrep_swisuite_pma_pu.script 	TEF_CentralRepository\te_centrep_swisuite_pma_pu.script
+data=DATAZ_\TEF_CentralRepository\SWI-PMA-SP.ini 			TEF_CentralRepository\SWI-PMA-SP.ini
+data=DATAZ_\TEF_CentralRepository\SWI-PMA-PU.ini 			TEF_CentralRepository\SWI-PMA-PU.ini
+
+data=DATAZ_\TEF_CentralRepository\KS401s.sis                TEF_CentralRepository\KS401s.sis
+data=DATAZ_\TEF_CentralRepository\KS402s.sis                TEF_CentralRepository\KS402s.sis
+data=DATAZ_\TEF_CentralRepository\KS403s.sis                TEF_CentralRepository\KS403s.sis
+data=DATAZ_\TEF_CentralRepository\KS404s.sis                TEF_CentralRepository\KS404s.sis
+data=DATAZ_\TEF_CentralRepository\KS405s.sis                TEF_CentralRepository\KS405s.sis
+data=DATAZ_\TEF_CentralRepository\KS406s.sis                TEF_CentralRepository\KS406s.sis
+data=DATAZ_\TEF_CentralRepository\KS407s.sis                TEF_CentralRepository\KS407s.sis
+data=DATAZ_\TEF_CentralRepository\KS411s.sis                TEF_CentralRepository\KS411s.sis
+data=DATAZ_\TEF_CentralRepository\KS412s.sis                TEF_CentralRepository\KS412s.sis
+data=DATAZ_\TEF_CentralRepository\KS413s.sis                TEF_CentralRepository\KS413s.sis
+data=DATAZ_\TEF_CentralRepository\KS414s.sis                TEF_CentralRepository\KS414s.sis
+data=DATAZ_\TEF_CentralRepository\KS415s.sis                TEF_CentralRepository\KS415s.sis
+data=DATAZ_\TEF_CentralRepository\KS416s.sis                TEF_CentralRepository\KS416s.sis
+data=DATAZ_\TEF_CentralRepository\KS417s.sis                TEF_CentralRepository\KS417s.sis
+data=DATAZ_\TEF_CentralRepository\KS421s.sis                TEF_CentralRepository\KS421s.sis
+data=DATAZ_\TEF_CentralRepository\KS422s.sis                TEF_CentralRepository\KS422s.sis
+data=DATAZ_\TEF_CentralRepository\KS423s.sis                TEF_CentralRepository\KS423s.sis
+data=DATAZ_\TEF_CentralRepository\KS431s.sis                TEF_CentralRepository\KS431s.sis
+data=DATAZ_\TEF_CentralRepository\KS432s.sis                TEF_CentralRepository\KS432s.sis
+data=DATAZ_\TEF_CentralRepository\KS433s.sis                TEF_CentralRepository\KS433s.sis
+
+data=DATAZ_\TEF_CentralRepository\KP401s.sis                TEF_CentralRepository\KP401s.sis
+data=DATAZ_\TEF_CentralRepository\KP402s.sis                TEF_CentralRepository\KP402s.sis
+data=DATAZ_\TEF_CentralRepository\KP403s.sis                TEF_CentralRepository\KP403s.sis
+data=DATAZ_\TEF_CentralRepository\KP404s.sis                TEF_CentralRepository\KP404s.sis
+data=DATAZ_\TEF_CentralRepository\KP405s.sis                TEF_CentralRepository\KP405s.sis
+data=DATAZ_\TEF_CentralRepository\KP406s.sis                TEF_CentralRepository\KP406s.sis
+data=DATAZ_\TEF_CentralRepository\KP407s.sis                TEF_CentralRepository\KP407s.sis
+data=DATAZ_\TEF_CentralRepository\KP411s.sis                TEF_CentralRepository\KP411s.sis
+data=DATAZ_\TEF_CentralRepository\KP412s.sis                TEF_CentralRepository\KP412s.sis
+data=DATAZ_\TEF_CentralRepository\KP413s.sis                TEF_CentralRepository\KP413s.sis
+data=DATAZ_\TEF_CentralRepository\KP414s.sis                TEF_CentralRepository\KP414s.sis
+data=DATAZ_\TEF_CentralRepository\KP415s.sis                TEF_CentralRepository\KP415s.sis
+data=DATAZ_\TEF_CentralRepository\KP416s.sis                TEF_CentralRepository\KP416s.sis
+data=DATAZ_\TEF_CentralRepository\KP417s.sis                TEF_CentralRepository\KP417s.sis
+data=DATAZ_\TEF_CentralRepository\KP421s.sis                TEF_CentralRepository\KP421s.sis
+data=DATAZ_\TEF_CentralRepository\KP422s.sis                TEF_CentralRepository\KP422s.sis
+data=DATAZ_\TEF_CentralRepository\KP423s.sis                TEF_CentralRepository\KP423s.sis
+data=DATAZ_\TEF_CentralRepository\KP431s.sis                TEF_CentralRepository\KP431s.sis
+data=DATAZ_\TEF_CentralRepository\KP432s.sis                TEF_CentralRepository\KP432s.sis
+data=DATAZ_\TEF_CentralRepository\KP433s.sis                TEF_CentralRepository\KP433s.sis
+#endif 
 
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP401.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP401"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000401.txt"-"c:\private\10202be9\f1000401.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP402.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP402"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000402.txt"-"c:\private\10202be9\f1000402.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP403.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP403"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000403.txt"-"c:\private\10202be9\f1000403.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP404.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP404"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000404.txt"-"c:\private\10202be9\f1000404.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP405.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP405"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000405.txt"-"c:\private\10202be9\f1000405.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP406.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP406"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000406.txt"-"c:\private\10202be9\f1000406.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP407.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP407"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000407.txt"-"c:\private\10202be9\f1000407.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP411.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP411"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000411.cre"-"c:\private\10202be9\f1000411.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP412.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP412"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000412.cre"-"c:\private\10202be9\f1000412.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP413.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP413"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000413.cre"-"c:\private\10202be9\f1000413.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP414.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP414"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000414.cre"-"c:\private\10202be9\f1000414.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP415.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP415"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000415.cre"-"c:\private\10202be9\f1000415.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP416.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP416"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000416.cre"-"c:\private\10202be9\f1000416.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP417.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP417"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000417.cre"-"c:\private\10202be9\f1000417.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP421.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP421"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000421.txt"-"c:\private\10202be9\f1000421.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP422.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP422"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000422.txt"-"c:\private\10202be9\f1000422.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP423.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP423"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000423.txt"-"c:\private\10202be9\f1000423.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP431.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP431"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000431.cre"-"c:\private\10202be9\f1000431.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP432.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP432"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000432.cre"-"c:\private\10202be9\f1000432.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KP433.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KP433"}, (0x102819fc), 1, 1, 2, TYPE=PU
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000433.cre"-"c:\private\10202be9\f1000433.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS401.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS401"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000401.txt"-"c:\private\10202be9\f1000401.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS402.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS402"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000402.txt"-"c:\private\10202be9\f1000402.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS403.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS403"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000403.txt"-"c:\private\10202be9\f1000403.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS404.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS404"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000404.txt"-"c:\private\10202be9\f1000404.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS405.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS405"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000405.txt"-"c:\private\10202be9\f1000405.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS406.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS406"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000406.txt"-"c:\private\10202be9\f1000406.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS407.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS407"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000407.txt"-"c:\private\10202be9\f1000407.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS411.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS411"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000411.cre"-"c:\private\10202be9\f1000411.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS412.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS412"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000412.cre"-"c:\private\10202be9\f1000412.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS413.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS413"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000413.cre"-"c:\private\10202be9\f1000413.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS414.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS414"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000414.cre"-"c:\private\10202be9\f1000414.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS415.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS415"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000415.cre"-"c:\private\10202be9\f1000415.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS416.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS416"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000416.cre"-"c:\private\10202be9\f1000416.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS417.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS417"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000417.cre"-"c:\private\10202be9\f1000417.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS421.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS421"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000421.txt"-"c:\private\10202be9\f1000421.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS422.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS422"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000422.txt"-"c:\private\10202be9\f1000422.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS423.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS423"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000423.txt"-"c:\private\10202be9\f1000423.txt"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS431.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS431"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000431.cre"-"c:\private\10202be9\f1000431.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS432.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS433"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000433.cre"-"c:\private\10202be9\f1000433.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/KS433.pkg	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,24 @@
+; 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:
+;
+
+&EN
+
+#{"KS433"}, (0x102819fc), 1, 1, 2, TYPE=SP
+
+%{"Symbian Software Ltd."}
+:"Symbian Software Ltd."
+
+"swi_rep\f1000433.cre"-"c:\private\10202be9\f1000433.cre"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/pma_data/dosis.bat	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,121 @@
+@echo off
+rem
+rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+@echo on
+
+@if not exist "%1" md "%1"
+@if not exist "%1" goto :InvalidFolder
+@if not exist "%2" goto :MissingCert
+@if not exist "%3" goto :MissingKey
+
+
+makesis KS401.pkg KS401.sis
+signsis -S KS401.sis KS401s.sis %2 %3
+makesis KP401.pkg KP401.sis
+signsis -S KP401.sis KP401s.sis %2 %3
+makesis KS402.pkg KS402.sis
+signsis -S KS402.sis KS402s.sis %2 %3
+makesis KP402.pkg KP402.sis
+signsis -S KP402.sis KP402s.sis %2 %3
+makesis KS403.pkg KS403.sis
+signsis -S KS403.sis KS403s.sis %2 %3
+makesis KP403.pkg KP403.sis
+signsis -S KP403.sis KP403s.sis %2 %3
+makesis KS404.pkg KS404.sis
+signsis -S KS404.sis KS404s.sis %2 %3
+makesis KP404.pkg KP404.sis
+signsis -S KP404.sis KP404s.sis %2 %3
+makesis KS405.pkg KS405.sis
+signsis -S KS405.sis KS405s.sis %2 %3
+makesis KP405.pkg KP405.sis
+signsis -S KP405.sis KP405s.sis %2 %3
+makesis KS406.pkg KS406.sis
+signsis -S KS406.sis KS406s.sis %2 %3
+makesis KP406.pkg KP406.sis
+signsis -S KP406.sis KP406s.sis %2 %3
+makesis KS407.pkg KS407.sis
+signsis -S KS407.sis KS407s.sis %2 %3
+makesis KP407.pkg KP407.sis
+signsis -S KP407.sis KP407s.sis %2 %3
+makesis KS411.pkg KS411.sis
+signsis -S KS411.sis KS411s.sis %2 %3
+makesis KP411.pkg KP411.sis
+signsis -S KP411.sis KP411s.sis %2 %3
+makesis KS412.pkg KS412.sis
+signsis -S KS412.sis KS412s.sis %2 %3
+makesis KP412.pkg KP412.sis
+signsis -S KP412.sis KP412s.sis %2 %3
+makesis KS413.pkg KS413.sis
+signsis -S KS413.sis KS413s.sis %2 %3
+makesis KP413.pkg KP413.sis
+signsis -S KP413.sis KP413s.sis %2 %3
+makesis KS414.pkg KS414.sis
+signsis -S KS414.sis KS414s.sis %2 %3
+makesis KP414.pkg KP414.sis
+signsis -S KP414.sis KP414s.sis %2 %3
+makesis KS415.pkg KS415.sis
+signsis -S KS415.sis KS415s.sis %2 %3
+makesis KP415.pkg KP415.sis
+signsis -S KP415.sis KP415s.sis %2 %3
+makesis KS416.pkg KS416.sis
+signsis -S KS416.sis KS416s.sis %2 %3
+makesis KP416.pkg KP416.sis
+signsis -S KP416.sis KP416s.sis %2 %3
+makesis KS417.pkg KS417.sis
+signsis -S KS417.sis KS417s.sis %2 %3
+makesis KP417.pkg KP417.sis
+signsis -S KP417.sis KP417s.sis %2 %3
+makesis KS421.pkg KS421.sis
+signsis -S KS421.sis KS421s.sis %2 %3
+makesis KP421.pkg KP421.sis
+signsis -S KP421.sis KP421s.sis %2 %3
+makesis KS422.pkg KS422.sis
+signsis -S KS422.sis KS422s.sis %2 %3
+makesis KP422.pkg KP422.sis
+signsis -S KP422.sis KP422s.sis %2 %3
+makesis KS423.pkg KS423.sis
+signsis -S KS423.sis KS423s.sis %2 %3
+makesis KP423.pkg KP423.sis
+signsis -S KP423.sis KP423s.sis %2 %3
+makesis KS431.pkg KS431.sis
+signsis -S KS431.sis KS431s.sis %2 %3
+makesis KP431.pkg KP431.sis
+signsis -S KP431.sis KP431s.sis %2 %3
+makesis KS432.pkg KS432.sis
+signsis -S KS432.sis KS432s.sis %2 %3
+makesis KP432.pkg KP432.sis
+signsis -S KP432.sis KP432s.sis %2 %3
+makesis KS433.pkg KS433.sis
+signsis -S KS433.sis KS433s.sis %2 %3
+makesis KP433.pkg KP433.sis
+signsis -S KP433.sis KP433s.sis %2 %3
+
+
+echo f | XCOPY /fry *.sis %1\
+del /f *.sis
+@goto :EOF
+
+:InvalidFolder
+@echo ERROR: Can't create folder %1
+@goto :EOF
+
+:MissingCert
+@echo ERROR: Missing certificate %2
+@goto :EOF
+
+:MissingKey
+@echo ERROR: Missing certificate key %3
+@goto :EOF
\ No newline at end of file
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000402.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000403.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000404.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000405.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000406.pma has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000406.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000407.crp has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000407.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000412.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000413.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000414.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000415.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000416.pma has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000416.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000417.crp has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000417.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000421.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000422.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000423.pma has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000423.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000431.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000432.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000433.pma has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/orig_rep/f1000433.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP401.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP401s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP402.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP402s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP403.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP403s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP404.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP404s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP405.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP405s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP406.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP406s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP407.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP407s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP411.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP411s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP412.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP412s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP413.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP413s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP414.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP414s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP415.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP415s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP416.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP416s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP417.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP417s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP421.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP421s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP422.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP422s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP423.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP423s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP431.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP431s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP432.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP432s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP433.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KP433s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS401.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS401s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS402.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS402s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS403.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS403s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS404.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS404s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS405.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS405s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS406.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS406s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS407.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS407s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS411.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS411s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS412.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS412s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS413.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS413s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS414.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS414s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS415.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS415s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS416.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS416s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS417.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS417s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS421.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS421s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS422.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS422s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS423.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS423s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS431.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS431s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS432.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS432s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS433.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/rnd_sis/KS433s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000401.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000402.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000403.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000404.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000405.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000406.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000407.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000411.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000412.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000413.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000414.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000415.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000416.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000417.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000421.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000422.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000423.txt has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000431.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000432.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/swi_rep/f1000433.cre has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP401.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP401s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP402.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP402s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP403.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP403s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP404.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP404s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP405.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP405s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP406.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP406s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP407.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP407s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP411.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP411s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP412.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP412s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP413.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP413s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP414.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP414s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP415.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP415s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP416.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP416s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP417.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP417s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP421.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP421s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP422.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP422s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP423.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP423s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP431.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP431s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP432.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP432s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP433.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KP433s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS401.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS401s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS402.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS402s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS403.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS403s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS404.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS404s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS405.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS405s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS406.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS406s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS407.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS407s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS411.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS411s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS412.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS412s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS413.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS413s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS414.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS414s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS415.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS415s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS416.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS416s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS417.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS417s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS421.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS421s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS422.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS422s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS423.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS423s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS431.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS431s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS432.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS432s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS433.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/pma_data/techview_sis/KS433s.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/scripts/te_centrep_swisuite_pma.script	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,23 @@
+// 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:
+// @file
+// 
+//
+
+//! @SYMTestSuiteName PDS-TEF-CENTREP-SWISUITE
+//! @SYMScriptTestEnvironment TEF
+//! @internalComponent
+//! @test
+RUN_SCRIPT  z:\TEF_CentralRepository\te_centrep_swisuite_pma_sp.script
+RUN_SCRIPT  z:\TEF_CentralRepository\te_centrep_swisuite_pma_pu.script
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/scripts/te_centrep_swisuite_pma_pu.script	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,332 @@
+// 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:
+// @file
+// 
+//
+
+//! @SYMTestSuiteName PDS-TEF-CENTREP-SWISUITE
+//! @SYMScriptTestEnvironment TEF
+//! @internalComponent
+//! @test
+
+PRINT Run PU (Partial Upgrade) installation te_centrep_SWI Suite Tests
+
+LOAD_SUITE te_centrep_SWISuite
+
+RUN_UTILS MkDir c:\private\
+RUN_UTILS DeleteFile c:\private\10202be9\f10004*.txt
+RUN_UTILS DeleteFile c:\private\10202be9\f10004*.cre
+RUN_UTILS DeleteFile c:\private\10202be9\persists\f10004*.txt
+RUN_UTILS DeleteFile c:\private\10202be9\persists\f10004*.cre
+RUN_UTILS DeleteFile c:\private\10202be9\persists\protected\f10004*.txt
+RUN_UTILS DeleteFile c:\private\10202be9\persists\protected\f10004*.cre
+
+RUN_UTILS CopyFile z:\private\10202be9\f1000406.pma c:\private\10202be9\persists\protected\f1000406.cre
+RUN_UTILS CopyFile z:\private\10202be9\f1000407.crp c:\private\10202be9\persists\f1000407.cre
+RUN_UTILS CopyFile z:\private\10202be9\f1000416.pma c:\private\10202be9\persists\protected\f1000416.cre
+RUN_UTILS CopyFile z:\private\10202be9\f1000417.crp c:\private\10202be9\persists\f1000417.cre
+RUN_UTILS CopyFile z:\private\10202be9\f1000423.pma c:\private\10202be9\persists\protected\f1000423.cre
+RUN_UTILS CopyFile z:\private\10202be9\f1000433.pma c:\private\10202be9\persists\protected\f1000433.cre
+
+RUN_PROGRAM t_killprocess.exe centralrepositorysrv
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4154
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4154
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP401.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a new 'txt' PMA keyspace (which does not previously exist).
+//! @SYMTestExpectedResults The new keyspace KP401 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_NonExist_Rep
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP401
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_NonExist_Rep
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4154
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4155
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4155
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP402.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' PMA keyspace on top of an existing 'txt' Non-PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KP402 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_to_TxtRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP402
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_to_TxtRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4155
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4156
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4156
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP403.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' PMA keyspace on top of an existing 'cre' Non-PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KP403 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_to_CreRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP403
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_to_CreRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4156
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4157
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4157
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP404.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' PMA keyspace on top of an existing 'txt' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KP404 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_to_PMATxtRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP404
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_to_PMATxtRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4157
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4158
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4158
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP405.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' PMA keyspace on top of an existing 'cre' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KP405 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_to_PMACreRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP405
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_to_PMACreRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4158
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4159
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4159
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP406.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' PMA keyspace on top of an existing 'cre' PMA keyspace that exists in the PMA drive.
+//! @SYMTestExpectedResults The new keyspace KP406 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_to_PMACreRep_in_PMADrive
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP406
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_to_PMACreRep_in_PMADrive
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4159
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4160
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4160
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP407.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' PMA keyspace on top of an existing 'cre' Non-PMA keyspace that exists in the persists folder.
+//! @SYMTestExpectedResults The new keyspace KP407 is not installed
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_to_CreRep_in_Persist
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP407
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMATxt_to_CreRep_in_Persist
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4160
+
+
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4161
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4161
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP411.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a new 'cre' PMA keyspace (which does not previously exist).
+//! @SYMTestExpectedResults The new keyspace KP411 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_NonExist_Rep
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP411
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_NonExist_Rep
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4161
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4162
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4162
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP412.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' PMA keyspace on top of an existing 'txt' Non-PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KP412 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_to_TxtRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP412
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_to_TxtRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4162
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4163
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4163
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP413.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' PMA keyspace on top of an existing 'cre' Non-PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KP413 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_to_CreRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP413
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_to_CreRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4163
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4164
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4164
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP414.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' PMA keyspace on top of an existing 'txt' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KP414 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_to_PMATxtRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP414
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_to_PMATxtRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4164
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4165
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4165
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP415.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' PMA keyspace on top of an existing 'cre' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KP415 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_to_PMACreRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP415
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_to_PMACreRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4165
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4166
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4166
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP416.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' PMA keyspace on top of an existing 'cre' PMA keyspace that exists in the PMA drive.
+//! @SYMTestExpectedResults The new keyspace KP416 is not installed
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_to_PMACreRep_in_PMADrive
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP416
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_to_PMACreRep_in_PMADrive
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4166
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4167
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4167
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP417.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' PMA keyspace on top of an existing 'cre' Non-PMA keyspace that exists in the persists folder.
+//! @SYMTestExpectedResults The new keyspace KP407 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_to_CreRep_in_Persist
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP417
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_PMACre_to_CreRep_in_Persist
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4167
+
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4168
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4168
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP421.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' Non-PMA keyspace on top of an existing 'txt' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KP421 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_NormalTxt_to_PMATxtRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP421
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_NormalTxt_to_PMATxtRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4168
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4169
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4169
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP422.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' Non-PMA keyspace on top of an existing 'cre' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KP422 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_NormalTxt_to_PMACreRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP422
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_NormalTxt_to_PMACreRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4169
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4170
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4170
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP423.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' Non-PMA keyspace on top of an existing 'cre' PMA keyspace that exists in the PMA drive.
+//! @SYMTestExpectedResults The new keyspace KP423 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_NormalTxt_to_PMACreRep_in_PMADrive
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP423
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_NormalTxt_to_PMACreRep_in_PMADrive
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4170
+
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4171
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4171
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP431.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' Non-PMA keyspace on top of an existing 'txt' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KP431 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_NormalCre_to_PMATxtRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP431
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_NormalCre_to_PMATxtRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4171
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4172
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4172
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP432.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' Non-PMA keyspace on top of an existing 'cre' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KP432 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_NormalCre_to_PMACreRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP432
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_NormalCre_to_PMACreRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4172
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4173
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4173
+//! @SYMTestCaseDesc  Verify that a ‘PU’ installation won't create a new keyspace, KP433.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' Non-PMA keyspace on top of an existing 'cre' PMA keyspace that exists in the PMA drive.
+//! @SYMTestExpectedResults The new keyspace KP433 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_NormalCre_to_PMACreRep_in_PMADrive
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_KP433
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-PU.ini Install_NormalCre_to_PMACreRep_in_PMADrive
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4173
+
+RUN_UTILS DeleteFile c:\private\10202be9\f10004*.txt
+RUN_UTILS DeleteFile c:\private\10202be9\f10004*.cre
+RUN_UTILS DeleteFile c:\private\10202be9\persists\f10004*.txt
+RUN_UTILS DeleteFile c:\private\10202be9\persists\f10004*.cre
+RUN_UTILS DeleteFile c:\private\10202be9\persists\protected\f10004*.txt
+RUN_UTILS DeleteFile c:\private\10202be9\persists\protected\f10004*.cre
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/scripts/te_centrep_swisuite_pma_sp.script	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,332 @@
+// 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:
+// @file
+// 
+//
+
+//! @SYMTestSuiteName PDS-TEF-CENTREP-SWISUITE
+//! @SYMScriptTestEnvironment TEF
+//! @internalComponent
+//! @test
+
+PRINT Run SP (Standard Patch) installation te_centrep_SWI Suite Tests
+
+LOAD_SUITE te_centrep_SWISuite
+
+RUN_UTILS MkDir c:\private\
+RUN_UTILS DeleteFile c:\private\10202be9\f10004*.txt
+RUN_UTILS DeleteFile c:\private\10202be9\f10004*.cre
+RUN_UTILS DeleteFile c:\private\10202be9\persists\f10004*.txt
+RUN_UTILS DeleteFile c:\private\10202be9\persists\f10004*.cre
+RUN_UTILS DeleteFile c:\private\10202be9\persists\protected\f10004*.txt
+RUN_UTILS DeleteFile c:\private\10202be9\persists\protected\f10004*.cre
+
+RUN_UTILS CopyFile z:\private\10202be9\f1000406.pma c:\private\10202be9\persists\protected\f1000406.cre
+RUN_UTILS CopyFile z:\private\10202be9\f1000407.crp c:\private\10202be9\persists\f1000407.cre
+RUN_UTILS CopyFile z:\private\10202be9\f1000416.pma c:\private\10202be9\persists\protected\f1000416.cre
+RUN_UTILS CopyFile z:\private\10202be9\f1000417.crp c:\private\10202be9\persists\f1000417.cre
+RUN_UTILS CopyFile z:\private\10202be9\f1000423.pma c:\private\10202be9\persists\protected\f1000423.cre
+RUN_UTILS CopyFile z:\private\10202be9\f1000433.pma c:\private\10202be9\persists\protected\f1000433.cre
+
+RUN_PROGRAM t_killprocess.exe centralrepositorysrv
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4134
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4134
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS401.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a new 'txt' PMA keyspace (which does not previously exist).
+//! @SYMTestExpectedResults The new keyspace KS401 is not installed
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_NonExist_Rep
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS401
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_NonExist_Rep
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4134
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4135
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4135
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS402.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' PMA keyspace on top of an existing 'txt' Non-PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KS402 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_to_TxtRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS402
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_to_TxtRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4135
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4136
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4136
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS403.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' PMA keyspace on top of an existing 'cre' Non-PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KS403 is not installed
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_to_CreRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS403
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_to_CreRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4136
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4137
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4137
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS404.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' PMA keyspace on top of an existing 'txt' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KS404 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_to_PMATxtRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS404
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_to_PMATxtRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4137
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4138
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4138
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS405.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' PMA keyspace on top of an existing 'cre' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KS405 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_to_PMACreRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS405
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_to_PMACreRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4138
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4139
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4139
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS406.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' PMA keyspace on top of an existing 'cre' PMA keyspace that exists in the PMA drive.
+//! @SYMTestExpectedResults The new keyspace KS406 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_to_PMACreRep_in_PMADrive
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS406
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_to_PMACreRep_in_PMADrive
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4139
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4140
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4140
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS407.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' PMA keyspace on top of an existing 'cre' Non-PMA keyspace that exists in the persists folder.
+//! @SYMTestExpectedResults The new keyspace KS407 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_to_CreRep_in_Persist
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS407
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMATxt_to_CreRep_in_Persist
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4140
+
+
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4141
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4141
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS411.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a new 'cre' PMA keyspace (which does not previously exist).
+//! @SYMTestExpectedResults The new keyspace KS411 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_NonExist_Rep
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS411
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_NonExist_Rep
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4141
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4142
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4142
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS412.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' PMA keyspace on top of an existing 'txt' Non-PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KS412 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_to_TxtRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS412
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_to_TxtRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4142
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4143
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4143
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS413.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' PMA keyspace on top of an existing 'cre' Non-PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KS413 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_to_CreRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS413
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_to_CreRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4143
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4144
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4144
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS414.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' PMA keyspace on top of an existing 'txt' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KS414 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_to_PMATxtRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS414
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_to_PMATxtRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4144
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4145
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4145
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS415.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' PMA keyspace on top of an existing 'cre' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KS415 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_to_PMACreRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS415
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_to_PMACreRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4145
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4146
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4146
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS416.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' PMA keyspace on top of an existing 'cre' PMA keyspace that exists in the PMA drive.
+//! @SYMTestExpectedResults The new keyspace KS416 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_to_PMACreRep_in_PMADrive
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS416
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_to_PMACreRep_in_PMADrive
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4146
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4147
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4147
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS417.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' PMA keyspace on top of an existing 'cre' Non-PMA keyspace that exists in the persists folder.
+//! @SYMTestExpectedResults The new keyspace KS407 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_to_CreRep_in_Persist
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS417
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_PMACre_to_CreRep_in_Persist
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4147
+
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4148
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4148
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS421.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' Non-PMA keyspace on top of an existing 'txt' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KS421 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_NormalTxt_to_PMATxtRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS421
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_NormalTxt_to_PMATxtRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4148
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4149
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4149
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS422.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' Non-PMA keyspace on top of an existing 'cre' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KS422 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_NormalTxt_to_PMACreRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS422
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_NormalTxt_to_PMACreRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4149
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4150
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4150
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS423.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'txt' Non-PMA keyspace on top of an existing 'cre' PMA keyspace that exists in the PMA drive.
+//! @SYMTestExpectedResults The new keyspace KS423 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_NormalTxt_to_PMACreRep_in_PMADrive
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS423
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_NormalTxt_to_PMACreRep_in_PMADrive
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4150
+
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4151
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4151
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS431.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' Non-PMA keyspace on top of an existing 'txt' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KS431 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_NormalCre_to_PMATxtRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS431
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_NormalCre_to_PMATxtRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4151
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4152
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4152
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS432.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' Non-PMA keyspace on top of an existing 'cre' PMA keyspace that exists in ROM.
+//! @SYMTestExpectedResults The new keyspace KS432 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_NormalCre_to_PMACreRep_in_ROM
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS432
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_NormalCre_to_PMACreRep_in_ROM
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4152
+
+START_TESTCASE PDS-CENTRALREPOSITORY-CT-4153
+//! @SYMTestCaseID PDS-CENTRALREPOSITORY-CT-4153
+//! @SYMTestCaseDesc  Verify that a ‘SP’ installation won't create a new keyspace, KS433.
+//! @SYMTestPriority  High
+//! @SYMTestActions   Install a 'cre' Non-PMA keyspace on top of an existing 'cre' PMA keyspace that exists in the PMA drive.
+//! @SYMTestExpectedResults The new keyspace KS433 is not installed
+
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_NormalCre_to_PMACreRep_in_PMADrive
+    //Delay to get around race condition in SWI
+    DELAY 2500
+    RUN_TEST_STEP 100 te_centrep_SWISuite InstallStep z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_KS433
+    RUN_TEST_STEP 100 te_centrep_SWISuite RepositoryCheck z:\TEF_CentralRepository\SWI-PMA-SP.ini Install_NormalCre_to_PMACreRep_in_PMADrive
+END_TESTCASE PDS-CENTRALREPOSITORY-CT-4153
+
+RUN_UTILS DeleteFile c:\private\10202be9\f10004*.txt
+RUN_UTILS DeleteFile c:\private\10202be9\f10004*.cre
+RUN_UTILS DeleteFile c:\private\10202be9\persists\f10004*.txt
+RUN_UTILS DeleteFile c:\private\10202be9\persists\f10004*.cre
+RUN_UTILS DeleteFile c:\private\10202be9\persists\protected\f10004*.txt
+RUN_UTILS DeleteFile c:\private\10202be9\persists\protected\f10004*.cre
+
--- a/persistentstorage/centralrepository/test/testexecute/convtool/group/TE_CentRepConvTool.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/centralrepository/test/testexecute/convtool/group/TE_CentRepConvTool.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -15,6 +15,11 @@
 // 
 //
 
+// This macro switches the PMA drive the 'protected' directory
+// under persists on the system drive, instead of using the
+// protected drive. This is for development purposes only. 
+MACRO SYMBIAN_CENTREP_PMA_TEST
+
 MACRO CENTREP_CONV_TOOL
 
 TARGET		centrepconvtooltestsvr.exe
--- a/persistentstorage/dbms/bmake/EDBMS.MMP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/bmake/EDBMS.MMP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1997-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"
@@ -34,6 +34,9 @@
 
 targettype	dll
 
+//CodeWarrior compilation options - disable the "illegal pragma" warning
+OPTION CW -w noillpragmas
+
 userinclude	 ../inc
 userinclude	 ../Inc2
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
--- a/persistentstorage/dbms/bmake/Edbspconv.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/bmake/Edbspconv.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -26,6 +26,9 @@
 
 SMPSAFE
 
+//CodeWarrior compilation options - disable the "illegal pragma" warning
+OPTION CW -w noillpragmas
+
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 USERINCLUDE       ../inc
 USERINCLUDE       ../security
--- a/persistentstorage/dbms/security/SC_PassAllPolicy.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/security/SC_PassAllPolicy.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -36,6 +36,9 @@
 	return ETrue;
 	}
 
+#pragma BullseyeCoverage off
+#pragma CTC SKIP
+
 //The method initializes aPolicy parameter with "EAlwaysPass" type policy instance and
 //returns KErrNone.
 TInt CPassAllPolicy::Get(TPolicyType, TSecurityPolicy& aPolicy) const
@@ -45,6 +48,9 @@
 	return KErrNone;
 	}
 
+#pragma CTC ENDSKIP
+#pragma BullseyeCoverage on
+
 #ifdef __DBDUMP__
 void CPassAllPolicy::Dump(RFile& aFile) const
 	{
--- a/persistentstorage/dbms/security/SC_Policy.h	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/security/SC_Policy.h	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -80,7 +80,6 @@
 	{
 public:
 	static CDbPolicy* NewLC(const RPolicyCollection& aPolicyCollection);
-	inline static CDbPolicy* NewL(const RPolicyCollection& aPolicyCollection);
 	virtual ~CDbPolicy();
 	virtual TBool Check(const RMessage2& aMessage, TPolicyType aPolicyType) const; 
 	virtual void InvariantL() const;
@@ -104,9 +103,6 @@
 	static CTblPolicy* NewLC(const TDesC& aTblName, 
 							 const RPolicyCollection& aPolicyCollection,
 							 const CDbPolicy* aDbPolicy);
-	inline static CTblPolicy* NewL(const TDesC& aTblName, 
-								   const RPolicyCollection& aPolicyCollection,
-								   const CDbPolicy* aDbPolicy);
 	virtual ~CTblPolicy();
 	virtual TBool Check(const RMessage2& aMessage, TPolicyType aPolicyType) const; 
 	virtual TInt Get(TPolicyType aPolicyType, TSecurityPolicy& aPolicy) const;
@@ -149,7 +145,6 @@
 	{
 public:
 	inline TPolicyDomainReader(const CPolicyDomain& aPolicyDomain);
-	inline TUid Uid() const;
 	inline const CDbPolicy& DbPolicy() const;
 	inline void ResetTblPos() const;
 	inline TInt TblPolicyCount() const;
@@ -226,7 +221,6 @@
 	friend class TPolicyDomainReader;
 public:
 	static CPolicyDomain* NewLC(TUid aUid, MPolicyDomainLoader& aPDLoader);
-	inline static CPolicyDomain* NewL(TUid aUid, MPolicyDomainLoader& aPDLoader);
 	virtual ~CPolicyDomain();
 	void ExternalizeL(MPolicyDomainPersister& aPDPersister) const;
 
--- a/persistentstorage/dbms/security/SC_Policy.inl	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/security/SC_Policy.inl	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -42,19 +42,6 @@
 	{
 	}
 
-/**
-Standard phase-one CDbPolicy factory method.
-@param aPolicyCollection A collection of R/W/S policies.
-@return A pointer to just created CDbPolicy instance.
-@leave System-wide error codes, including KErrNoMemory
-*/
-inline CDbPolicy* CDbPolicy::NewL(const RPolicyCollection& aPolicyCollection)
-	{
-	CDbPolicy* policy = CDbPolicy::NewLC(aPolicyCollection);
-	CleanupStack::Pop(policy);
-	return policy;
-	}
-
 //////////////////////////////////////////////////////////////////////////////////////////////
 //class CTblPolicy
 
@@ -67,23 +54,6 @@
 	}
 
 /**
-Standard phase-one CTblPolicy factory method.
-@param aTblName The name of the table, access to which is controlled by the supplied policies
-@param aPolicyCollection A collection of R/W/S policies.
-@param aDbPolicy The related for the table database policy.
-@return A pointer to just created CTblPolicy instance.
-@leave System-wide error codes, including KErrNoMemory
-*/
-inline CTblPolicy* CTblPolicy::NewL(const TDesC& aTblName, 
-									const RPolicyCollection& aPolicyCollection,
-									const CDbPolicy* aDbPolicy)
-	{
-	CTblPolicy* policy = CTblPolicy::NewLC(aTblName, aPolicyCollection, aDbPolicy);
-	CleanupStack::Pop(policy);
-	return policy;
-	}
-
-/**
 @return A const reference to the table name.
 */
 inline const TDesC& CTblPolicy::TableName() const
@@ -111,22 +81,6 @@
 	}
 
 /**
-Standard phase-one CPolicyDomain factory method.
-@param aUid The format uid of the databases, access to which is controlled by security policies
-@param aPDLoader The interface, which actual implementation is used to load the related set
-                 of security policies into CPolicyDomain collection. Currently CPolicyDomain
-				 policy collection can be loaded from a text or binary policy file.
-@return A pointer to just created CPolicyDomain instance.
-@leave System-wide error codes, including KErrNoMemory
-*/
-inline CPolicyDomain* CPolicyDomain::NewL(TUid aUid, MPolicyDomainLoader& aPDLoader)
-	{
-	CPolicyDomain* domain = CPolicyDomain::NewLC(aUid, aPDLoader);
-	CleanupStack::Pop(domain);
-	return domain;
-	}
-
-/**
 @return Policy domain UID.
 */
 inline TUid CPolicyDomain::Uid() const
@@ -202,14 +156,6 @@
 	}
 
 /**
-@return The UID of the related CPolicyDomain object.
-*/
-inline TUid TPolicyDomainReader::Uid() const
-	{
-	return iPolicyDomain.Uid();
-	}
-
-/**
 @return A const reference to the existing CDbPolicy instance - part of the related
         CPolicyDomain security policies collection.
 */
--- a/persistentstorage/dbms/security/SC_PolicySpace.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/security/SC_PolicySpace.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -112,6 +112,7 @@
 	while(it.Next(pair))
 		{
 		delete pair.iData;
+		pair.iData = NULL;
 		}
 	iPDCollection.Close();
 	delete iPassAllTblPolicy;
--- a/persistentstorage/dbms/security/SC_TextOut.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/security/SC_TextOut.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -18,6 +18,9 @@
 #include "SC_Strings.h"
 #include "SC_TextOut.h"
 
+#pragma BullseyeCoverage off
+#pragma CTC SKIP
+
 namespace DBSC
 {
 
@@ -139,3 +142,6 @@
 	}
 
 } //end of - namespace DBSC
+
+#pragma CTC ENDSKIP
+#pragma BullseyeCoverage on
--- a/persistentstorage/dbms/tdbms/t_dbalter.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbalter.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -647,23 +647,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/dbms/tdbms/t_dbapi.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbapi.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1787,23 +1787,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/dbms/tdbms/t_dbbackupsid.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbbackupsid.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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,6 +32,7 @@
 	{
 	if(!aValue)
 		{
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -39,7 +40,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -156,7 +157,7 @@
 	for(TInt i=0;i<paths->Count();++i)
 		{
 		const TDesC& dd = (*paths)[i];
-		RDebug::Print(_L("  Database %d: %S\r\n"), i + 1, &dd);
+		TheTest.Printf(_L("  Database %d: %S\r\n"), i + 1, &dd);
 		}
 	delete paths;
 	paths = NULL;
--- a/persistentstorage/dbms/tdbms/t_dbbench.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbbench.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -20,157 +20,32 @@
 #include <e32svr.h>
 #include <hal.h>
 #include <d32dbmsconstants.h>
-
-// MSVC++ up to 5.0 has problems with expanding inline functions
-// This disables the mad warnings for the whole project
-#if defined(NDEBUG) && defined(__VC32__) && _MSC_VER<=1100
-#pragma warning(disable : 4710)			// function not expanded. MSVC 5.0 is stupid
-#endif
+#include "t_dbcmdlineutil.h"
 
-class TTimer
-	{
-public:
-	void Start();
-	TReal Stop() const;
-private:
-	TUint iTicks;
-	};
+TCmdLineParams TheCmdLineParams;
+TFileName TheDbFileName;
+RFile TheLogFile; 
+RTest TheTest(_L("t_dbbench"));
+RDbNamedDatabase TheDatabase;
+RDbView TheView;
+RFs TheFs;
 
-LOCAL_D RTest test(_L("t_dbbench"));
-LOCAL_D CTrapCleanup* TheTrapCleanup;
-LOCAL_D RDbNamedDatabase TheDatabase;
-LOCAL_D RDbView TheView;
-LOCAL_D RFs TheFs;
+TBuf<250> TheLogLine;
+TBuf8<250> TheLogLine8;
 
-const TInt KTestCleanupStack=0x20;
-//T_BENCH file shall not be deleted at the end of the test! It will be used by T_COMP test.
-const TPtrC KTestDatabase=_S("\\DBMS-TST\\T_BENCH.DB");
 const TPtrC KTableName=_S("Test");
 const TPtrC KColCluster=_S("Cluster");
 const TPtrC KColXcluster=_S("xCluster");
 const TPtrC KColRandom=_S("Random");
 const TPtrC KColXrandom=_S("xRandom");
-const TInt KRecords=2000;
-
-static TTimer TheTimer;
-
-void TTimer::Start()
-	{
-	iTicks=User::FastCounter();
-	}
-
-TReal TTimer::Stop() const
-	{
-	TUint ticks = User::FastCounter() - iTicks;
-	TInt freq = 0;
-	test(HAL::Get(HAL::EFastCounterFrequency, freq) == KErrNone);
-	const TInt KMicroSecIn1Sec = 1000000;
-	const TInt KMsIn1Sec = 1000;
-	double v = ((double)ticks * KMicroSecIn1Sec) / (double)freq; TInt v2 = (TInt)v;
-	return v2 / KMsIn1Sec;
-	}
-
-LOCAL_C void CloseDatabase()
-	{
-	TheDatabase.Close();
-	}
-
-/**
-Create the database: keep the code 050 compatible
-
-@SYMTestCaseID          SYSLIB-DBMS-CT-0577
-@SYMTestCaseDesc        Benchmark Tests. Creation of a local Database test
-@SYMTestPriority        Medium
-@SYMTestActions        	Attempt to test RDbNamedDatabase::CreateTable(),RDbNamedDatabase::CreateIndex(),
-						RDbNamedDatabase::Compact(),RDbView::Prepare() functions
-@SYMTestExpectedResults Test must not fail
-@SYMREQ                 REQ0000
-*/
-LOCAL_C void CreateDatabaseL()
-	{
-	test.Next(_L(" @SYMTestCaseID:SYSLIB-DBMS-CT-0577 "));
-	User::LeaveIfError(TheDatabase.Replace(TheFs,KTestDatabase));
-	CDbColSet& set=*CDbColSet::NewLC();
-	TDbCol col(KColCluster,EDbColInt32);
-	col.iAttributes=col.ENotNull;
-	set.AddL(col);
-	col.iName=KColXcluster;
-	set.AddL(col);
-	col.iName=KColRandom;
-	set.AddL(col);
-	col.iName=KColXrandom;
-	set.AddL(col);
-	TInt r=TheDatabase.CreateTable(KTableName,set);
-	test (r==KErrNone);
-	CleanupStack::PopAndDestroy();
-	TheTimer.Start();
-	r=TheView.Prepare(TheDatabase,_L("select * from test"),TheView.EInsertOnly);
-	TheDatabase.Begin();
-	test (r==KErrNone);
-	TInt jj=0;
-	for (TInt ii=0;ii<KRecords;++ii)
-		{
-		TheView.InsertL();
-		jj=(jj+23);
-		if (jj>=KRecords)
-			jj-=KRecords;
-		TheView.SetColL(1,ii);
-		TheView.SetColL(2,ii);
-		TheView.SetColL(3,jj);
-		TheView.SetColL(4,jj);
-		TheView.PutL();
-		}
-	r=TheDatabase.Commit();
-	test (r==KErrNone);
-	TheView.Close();
-	test.Printf(_L("Build table: %7.1f ms\n"),TheTimer.Stop());
-	TheTimer.Start();
-	CDbKey& key=*CDbKey::NewLC();
-	key.AddL(KColXcluster);
-	key.MakeUnique();
-	r=TheDatabase.CreateIndex(KColXcluster,KTableName,key);
-	test (r==KErrNone);
-	test.Printf(_L("Cluster index: %7.1f ms\n"),TheTimer.Stop());
-	TheTimer.Start();
-	key.Clear();
-	key.AddL(KColXrandom);
-	r=TheDatabase.CreateIndex(KColXrandom,KTableName,key);
-	test (r==KErrNone);
-	CleanupStack::PopAndDestroy();
-	test.Printf(_L("Random index: %7.1f ms\n"),TheTimer.Stop());
-	TheTimer.Start();
-	r = TheDatabase.Compact();
-	test.Printf(_L("Compact: %7.1f ms\n"),TheTimer.Stop());
-	test (r == KErrNone);
-	}
-
-LOCAL_C TReal Evaluate(const TDesC& aSql)
-	{
-	TInt m=1;
-	for (;;)
-		{
-		TheTimer.Start();
-		for (TInt ii=0;ii<m;++ii)
-			{
-			TInt r=TheView.Prepare(TheDatabase,aSql,KDbUnlimitedWindow,TheView.EReadOnly);
-			if (r<0)
-				return r;
-			r=TheView.EvaluateAll();
-			test (r==KErrNone);
-			TheView.Close();
-			}
-		TReal t=TheTimer.Stop();
-		if (t>=100.0)
-			return t/m;
-		m*=4;
-		}
-	}
+const TInt  KRecords=2000;
 
 struct TTest
 	{
 	const TText* iName;
 	const TText* iQuery;
 	};
+
 const TTest KQuery[]=
 	{
 	{_S("project"),_S("select cluster,xcluster,random,xrandom from test")},
@@ -185,6 +60,200 @@
 	{_S("all 4"),_S("select * from test where xcluster<500 and xrandom<200 order by xcluster")}
 	};
 
+///////////////////////////////////////////////////////////////////////////////////////
+
+void TestEnvDestroy()
+	{
+	TheView.Close();
+	TheDatabase.Close();
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		(void)TheLogFile.Flush();
+		TheLogFile.Close();
+		}
+	//T_BENCH.DB cannot be deleted here, because it is used by T_DBCOMP test!
+	TheFs.Close();
+	}
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Test macros and functions
+void Check1(TInt aValue, TInt aLine)
+	{
+	if(!aValue)
+		{
+		TestEnvDestroy();
+		TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
+		TheTest(EFalse, aLine);
+		}
+	}
+void Check2(TInt aValue, TInt aExpected, TInt aLine)
+	{
+	if(aValue != aExpected)
+		{
+		TestEnvDestroy();
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest(EFalse, aLine);
+		}
+	}
+#define TEST(arg) ::Check1((arg), __LINE__)
+#define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__)
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+TInt FastCounterFrequency()
+	{
+	static TInt freq = 0;
+	if(freq == 0)
+		{
+		TEST2(HAL::Get(HAL::EFastCounterFrequency, freq), KErrNone);
+		}
+	return freq;
+	}
+
+//Prints the test case title and execution time in microseconds
+void PrintResult(const TDesC& aTitle, TUint32 aStartTicks, TUint32 aEndTicks, TInt aIterations = 0)
+	{
+	TInt freq = FastCounterFrequency();
+	TInt64 diffTicks = (TInt64)aEndTicks - (TInt64)aStartTicks;
+	if(diffTicks < 0)
+		{
+		diffTicks = KMaxTUint32 + diffTicks + 1;
+		}
+	const TInt KMicroSecIn1Sec = 1000000;
+	TInt32 us = (diffTicks * KMicroSecIn1Sec) / freq;
+	if(aIterations > 0)
+		{
+		us /= aIterations;
+		}
+	TheTest.Printf(_L("%S: %d us\r\n"), &aTitle, us);
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		TheLogLine.Format(_L("%S¬%d¬us\r\n"), &aTitle, us);
+		TheLogLine8.Copy(TheLogLine);
+		(void)TheLogFile.Write(TheLogLine8);
+		}
+	}
+
+//Calculates time in microseconds
+TInt CalcTime(TUint32 aStartTicks, TUint32 aEndTicks)
+	{
+	TInt freq = FastCounterFrequency();
+	TInt64 diffTicks = (TInt64)aEndTicks - (TInt64)aStartTicks;
+	if(diffTicks < 0)
+		{
+		diffTicks = KMaxTUint32 + diffTicks + 1;
+		}
+	const TInt KMicroSecIn1Sec = 1000000;
+	TInt32 us = (diffTicks * KMicroSecIn1Sec) / freq;
+	return us;
+	}
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+/**
+Create the database: keep the code 050 compatible
+
+@SYMTestCaseID          SYSLIB-DBMS-CT-0577
+@SYMTestCaseDesc        Benchmark Tests. Creation of a local Database test
+@SYMTestPriority        Medium
+@SYMTestActions        	Attempt to test RDbNamedDatabase::CreateTable(),RDbNamedDatabase::CreateIndex(),
+						RDbNamedDatabase::Compact(),RDbView::Prepare() functions
+@SYMTestExpectedResults Test must not fail
+@SYMREQ                 REQ0000
+*/
+void CreateDatabaseL()
+	{
+	TInt err = TheDatabase.Replace(TheFs, TheDbFileName);
+	TEST2(err, KErrNone);
+	
+	CDbColSet* set = CDbColSet::NewLC();
+	TDbCol col(KColCluster,EDbColInt32);
+	col.iAttributes=col.ENotNull;
+	set->AddL(col);
+	col.iName=KColXcluster;
+	set->AddL(col);
+	col.iName=KColRandom;
+	set->AddL(col);
+	col.iName=KColXrandom;
+	set->AddL(col);
+	
+	err = TheDatabase.CreateTable(KTableName, *set);
+	TEST2(err, KErrNone);
+	CleanupStack::PopAndDestroy(set);
+	
+	TUint32 ticksStart = User::FastCounter();
+	err = TheView.Prepare(TheDatabase,_L("select * from test"),TheView.EInsertOnly);
+	TEST2(err, KErrNone);
+	TheDatabase.Begin();
+	TInt jj=0;
+	for (TInt ii=0;ii<KRecords;++ii)
+		{
+		TheView.InsertL();
+		jj=(jj+23);
+		if (jj>=KRecords)
+			jj-=KRecords;
+		TheView.SetColL(1,ii);
+		TheView.SetColL(2,ii);
+		TheView.SetColL(3,jj);
+		TheView.SetColL(4,jj);
+		TheView.PutL();
+		}
+	err = TheDatabase.Commit();
+	TEST2(err, KErrNone);
+	TheView.Close();
+	TUint32 ticksEnd = User::FastCounter();
+	PrintResult(_L("Build table"), ticksStart, ticksEnd);
+	
+	ticksStart = User::FastCounter();
+	CDbKey* key = CDbKey::NewLC();
+	key->AddL(KColXcluster);
+	key->MakeUnique();
+	err = TheDatabase.CreateIndex(KColXcluster,KTableName,*key);
+	TEST2(err, KErrNone);
+	ticksEnd = User::FastCounter();
+	PrintResult(_L("Cluster index"), ticksStart, ticksEnd);
+	
+	ticksStart = User::FastCounter();
+	key->Clear();
+	key->AddL(KColXrandom);
+	err = TheDatabase.CreateIndex(KColXrandom,KTableName,*key);
+	TEST2(err, KErrNone);
+	CleanupStack::PopAndDestroy(key);
+	ticksEnd = User::FastCounter();
+	PrintResult(_L("Random index"), ticksStart, ticksEnd);
+	
+	ticksStart = User::FastCounter();
+	err = TheDatabase.Compact();
+	ticksEnd = User::FastCounter();
+	PrintResult(_L("Compact"), ticksStart, ticksEnd);
+	TEST2(err, KErrNone);
+	}
+
+void Evaluate(const TDesC& aTitle, const TDesC& aSql)
+	{
+	TInt m = 1;
+	for(;;)
+		{
+		TUint32 ticksStart = User::FastCounter();
+		for(TInt i=0; i<m; ++i)
+			{
+			TInt err = TheView.Prepare(TheDatabase,aSql,KDbUnlimitedWindow,TheView.EReadOnly);
+			TEST2(err, KErrNone);
+			err = TheView.EvaluateAll();
+			TEST2(err, KErrNone);
+			TheView.Close();
+			}
+		TUint32 ticksEnd = User::FastCounter();
+		TInt us = CalcTime(ticksStart, ticksEnd);
+		if(us > 100000)
+			{
+			PrintResult(aTitle, ticksStart, ticksEnd, m);
+			return;
+			}
+		m *= 4;
+		}
+	}
+
 /**
 @SYMTestCaseID          SYSLIB-DBMS-CT-0578
 @SYMTestCaseDesc        Benchmark Test.Querying a local Database Test
@@ -193,102 +262,68 @@
 @SYMTestExpectedResults Test must not fail
 @SYMREQ                 REQ0000
 */
-LOCAL_C void Queries()
+void Queries()
 	{
-	test.Next(_L(" @SYMTestCaseID:SYSLIB-DBMS-CT-0578 "));
-	for (TUint ii=0;ii<sizeof(KQuery)/sizeof(KQuery[0]);++ii)
+	for(TUint ii=0;ii<sizeof(KQuery)/sizeof(KQuery[0]);++ii)
 		{
-		test.Printf(_L("%15s: "),KQuery[ii].iName);
-		TReal t=Evaluate(TPtrC(KQuery[ii].iQuery));
-		if (t<0.0)
-			test.Printf(_L("-\n"));
-		else
-			test.Printf(_L("%7.1f ms\n"),t);
+		Evaluate(TPtrC(KQuery[ii].iName), TPtrC(KQuery[ii].iQuery));
 		}
 	}
 
-//
-// Benchmark tests
-//
-LOCAL_C void BenchTestL()
+void BenchTestL()
 	{
+	TheTest.Start(_L("@SYMTestCaseID:SYSLIB-DBMS-CT-0577 RDbNamedDatabase performance test"));
 	CreateDatabaseL();
+	
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-DBMS-CT-0578 SQL queries performance test"));
 	Queries();
-	CloseDatabase();
+	
+	TheDatabase.Close();
 	}
 
-//
-// Prepare the test directory.
-//
-LOCAL_C void setupTestDirectory()
+void TestEnvInit()
     {
-	TInt r=TheFs.Connect();
-	test(r==KErrNone);
-//
-#if 0
-	TDriveList drives;
-	TheFs.DriveList(drives);
-	if (drives[EDriveK] == KDriveAbsent)
+	TInt err = TheFs.Connect();
+	TEST2(err, KErrNone);
+	
+	err = TheFs.MkDirAll(TheDbFileName);
+	TEST(err == KErrNone || err == KErrAlreadyExists);
+	
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
 		{
-		TInt r = TheFs.AddFileSystem(_L("ELFFS"));
-		test (r == KErrNone);
-		r = TheFs.MountFileSystem(_L("Lffs"),EDriveK);
-		if (r == KErrCorrupt || r == KErrNotReady)
-			{
-			RFormat format;
-			TInt    count;
-			r = format.Open(TheFs, _L("K:\\"), EHighDensity, count);
-			test (r == KErrNone);
-			while (count)
-				format.Next(count);
-			format.Close();
-    		}
-		else
-			test (r == KErrNone);
+		err = TheLogFile.Replace(TheFs, TheCmdLineParams.iLogFileName, EFileRead | EFileWrite);
+		TEST2(err, KErrNone);
+		LogConfig(TheLogFile, TheCmdLineParams);
 		}
-#endif
-//
-	r=TheFs.MkDir(KTestDatabase);
-	test(r==KErrNone || r==KErrAlreadyExists);
-	}
+    }
+
+TInt E32Main()
+    {
+	TheTest.Title();
+
+	CTrapCleanup* tc = CTrapCleanup::New();
+	TheTest(tc != NULL);
 
-//
-// Initialise the cleanup stack.
-//
-LOCAL_C void setupCleanup()
-    {
-	TheTrapCleanup=CTrapCleanup::New();
-	test(TheTrapCleanup!=NULL);
-	TRAPD(r,\
-		{\
-		for (TInt i=KTestCleanupStack;i>0;i--)\
-			CleanupStack::PushL((TAny*)0);\
-		CleanupStack::Pop(KTestCleanupStack);\
-		});
-	test(r==KErrNone);
-	}
+	GetCmdLineParams(TheTest, _L("t_dbbench"), TheCmdLineParams);
+	_LIT(KDbName, "c:\\dbms-tst\\t_bench.db");
+	PrepareDbName(KDbName, TheCmdLineParams.iDriveName, TheDbFileName);
+	TheTest.Printf(_L("==Database: %S\r\n"), &TheDbFileName); 
 
-//
-// entry point
-//
-GLDEF_C TInt E32Main()
-    {
-	test.Title();
-	setupTestDirectory();
-	setupCleanup();
 	__UHEAP_MARK;
-//
-	test.Start(_L("Benchmarking..."));
-	TRAPD(r,BenchTestL());
-	test(r==KErrNone);
-	test.End();
-//
+	
+	TestEnvInit();
+	TRAPD(err, BenchTestL());
+	TEST2(err, KErrNone);
+	TestEnvDestroy();
+	
 	__UHEAP_MARKEND;
-	delete TheTrapCleanup;
 
-	//T_BENCH.DB cannot be deleted here, because it is used by T_COMP test!
-
-	TheFs.Close();
-	test.Close();
-	return 0;
+	User::Heap().Check();
+	
+	TheTest.End();
+	TheTest.Close();
+	
+	delete tc;
+	
+	return KErrNone;
     }
--- a/persistentstorage/dbms/tdbms/t_dbbench.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbbench.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -20,7 +20,7 @@
 userinclude ../inc
 
 SOURCEPATH	. 
-source 		t_dbbench.cpp
+source 		t_dbbench.cpp t_dbcmdlineutil.cpp
 
 library euser.lib efsrv.lib edbms.lib hal.lib
 
--- a/persistentstorage/dbms/tdbms/t_dbbig.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbbig.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -517,23 +517,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/dbms/tdbms/t_dbbug.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbbug.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -359,7 +359,6 @@
     {
     _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("*");
@@ -376,7 +375,6 @@
                 {
                 // If the found name is other valid application name
                 // starting with aProcessName string.
-                //RDebug::Print(_L(":: Process name: \"%S\".\n"), &name);
                 continue;
                 }
             }
@@ -384,7 +382,6 @@
         if (proc.Open(name) == KErrNone)
             {
             proc.Kill(0);
-            //RDebug::Print(_L("\"%S\" process killed.\n"), &name);
             }
         proc.Close();
         }
@@ -593,23 +590,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/dbms/tdbms/t_dbcmdlineutil.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,147 @@
+// 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:
+//
+#include <e32test.h>
+#include "t_dbcmdlineutil.h"
+
+static void GetCmdLine(RTest& aTest, const TDesC& aTestName, TDes& aCmdLine)
+	{
+	User::CommandLine(aCmdLine);
+	aCmdLine.TrimAll();
+	if(aCmdLine.Length() == 0)
+		{
+		aTest.Printf(_L("Usage: %S [/drv=<drive letter>:] [/logfile=<log file name>]\r\n"), &aTestName);
+		return;
+		}
+	aCmdLine.Append(TChar('/'));
+	}
+
+static void ExtractCmdLineParams(TDes& aCmdLine,  RArray<TPtrC>& aPrmNames, RArray<TPtrC>& aPrmValues)
+	{
+	aPrmNames.Reset();	
+	aPrmValues.Reset();	
+	
+	enum TState{EWaitPrmStart, EReadPrmName, EReadPrmValue};
+	TState state = EWaitPrmStart;
+	TInt startPos = -1;
+	TPtr prmName(0, 0);
+	TPtr prmValue(0, 0);
+	
+	aCmdLine.Append(TChar('/'));
+	
+	for(TInt i=0;i<aCmdLine.Length();++i)
+		{
+		switch(state)
+			{
+			case EWaitPrmStart:
+				if(aCmdLine[i] == TChar('/'))
+					{
+					startPos = i + 1;
+					prmName.Zero();
+					state = EReadPrmName;
+					}
+				break;
+			case EReadPrmName:
+				if(aCmdLine[i] == TChar('='))
+					{
+					TPtr p = aCmdLine.MidTPtr(startPos, i - startPos);
+					prmName.Set(p);
+					prmName.TrimRight();
+					startPos = i + 1;
+					prmValue.Zero();
+					state = EReadPrmValue;
+					}
+				break;
+			case EReadPrmValue:
+				if(aCmdLine[i] == TChar('/'))
+					{
+					TPtr p = aCmdLine.MidTPtr(startPos, i - startPos);
+					prmValue.Set(p);
+					prmValue.Trim();
+					startPos = i + 1;
+					aPrmNames.Append(prmName);
+					aPrmValues.Append(prmValue);
+					prmName.Zero();
+					prmValue.Zero();
+					state = EReadPrmName;
+					}
+				break;
+			default:
+				break;
+			}
+		}
+	}
+
+static void ExtractParamNamesAndValues(const RArray<TPtrC>& aPrmNames, const RArray<TPtrC>& aPrmValues, TCmdLineParams& aCmdLineParams)
+	{
+	__ASSERT_ALWAYS(aPrmNames.Count() == aPrmValues.Count(), User::Invariant());
+	
+	aCmdLineParams.SetDefaults();
+	
+	for(TInt i=0;i<aPrmNames.Count();++i)
+		{
+		if(aPrmNames[i].CompareF(_L("drv")) == 0)
+			{
+			if(aPrmValues[i].Length() == 2 && aPrmValues[i][1] == TChar(':'))
+				{
+				TChar ch(aPrmValues[i][0]);
+				ch.LowerCase();
+				if(ch >= TChar('a') && ch <= TChar('z'))
+					aCmdLineParams.iDriveName.Copy(aPrmValues[i]);
+				}
+			}
+		else if(aPrmNames[i].CompareF(_L("logfile")) == 0)
+			{
+			aCmdLineParams.iLogFileName.Copy(aPrmValues[i]);
+			}
+		}
+	}
+
+void GetCmdLineParams(RTest& aTest, const TDesC& aTestName, TCmdLineParams& aCmdLineParams)
+	{
+	TBuf<200> cmdLine;
+	GetCmdLine(aTest, aTestName, cmdLine);
+	RArray<TPtrC> prmNames;
+	RArray<TPtrC> prmValues;
+	ExtractCmdLineParams(cmdLine, prmNames, prmValues);
+	ExtractParamNamesAndValues(prmNames, prmValues, aCmdLineParams);
+	prmValues.Close();
+	prmNames.Close();
+	aTest.Printf(_L("--PRM--Database drive: %S\r\n"), &aCmdLineParams.iDriveName);
+	if(aCmdLineParams.iLogFileName.Length() > 0)
+		{
+		aTest.Printf(_L("--PRM--Log file name: %S\r\n"), &aCmdLineParams.iLogFileName);
+		}
+	else
+		{
+		aTest.Printf(_L("--PRM--Test output: to screen only\r\n"));
+		}
+	}
+
+void PrepareDbName(const TDesC& aDeafultDbName, const TDriveName& aDriveName, TDes& aDbName)
+	{
+	TParse parse;
+	parse.Set(aDriveName, &aDeafultDbName, 0);
+	const TDesC& dbFilePath = parse.FullName();
+	aDbName.Copy(dbFilePath);
+	}
+
+void LogConfig(RFile& aLogFile, const TCmdLineParams& aCmdLineParams)
+	{
+	TBuf8<100> buf;
+	buf.Format(_L8("Database drive:%S\r\n"), &aCmdLineParams.iDriveName);
+	(void)aLogFile.Write(buf);
+	buf.Format(_L8("\r\n\r\n"));
+	(void)aLogFile.Write(buf);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/dbms/tdbms/t_dbcmdlineutil.h	Tue Oct 19 16:26:13 2010 +0100
@@ -0,0 +1,44 @@
+// 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:
+//
+
+#ifndef T_DBCMDLINEUTIL_H
+#define T_DBCMDLINEUTIL_H
+
+#include <f32file.h>
+
+class RTest;
+
+struct TCmdLineParams
+	{
+	inline TCmdLineParams()
+		{
+		SetDefaults();
+		}
+	
+	inline void SetDefaults()
+		{
+		iDriveName.Copy(_L("c:"));
+		iLogFileName.Zero();
+		}
+
+	TDriveName	iDriveName;
+	TFileName	iLogFileName;
+	};
+
+void GetCmdLineParams(RTest& aTest, const TDesC& aTestName, TCmdLineParams& aCmdLineParams);
+void PrepareDbName(const TDesC& aDeafultDbName, const TDriveName& aDriveName, TDes& aDbName);
+void LogConfig(RFile& aLogFile, const TCmdLineParams& aCmdLineParams);
+
+#endif//T_DBCMDLINEUTIL_H
--- a/persistentstorage/dbms/tdbms/t_dbcomp.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbcomp.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -99,7 +99,7 @@
 	{
 	if(!aValue)
 		{
-		TheTest.Printf(_L("*** Boolean expression evaluated to false!\r\n"));
+		TheTest.Printf(_L("*** Expression evaluated to false!\r\n"));
 		DestroyTestEnv();
 		TheTest(EFalse, aLine);
 		}
--- a/persistentstorage/dbms/tdbms/t_dbdefect.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbdefect.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -75,6 +75,7 @@
 	{
 	if(!aValue)
 		{
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TestCleanup();
 		TheTest(EFalse, aLine);
 		}
@@ -87,7 +88,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TestCleanup();
 		TheTest(EFalse, aLine);
 		}
@@ -448,7 +449,7 @@
 
 	for(TInt i =0;i<KNumQueries;++i)
 		{
-		RDebug::Print(_L("Executing statement: %s \n"),(KQuery[i].query));
+		TheTest.Printf(_L("Executing statement: %s \n"),(KQuery[i].query));
 		RDbView view;
 		view.Prepare(database, TDbQuery(TPtrC(KQuery[i].query), EDbCompareFolded), view.EReadOnly);
 		view.EvaluateAll();
@@ -464,7 +465,7 @@
 			TScriptLine text;
 			rd.ReadL(text,view.ColLength(1));
 			CleanupStack::PopAndDestroy();
-			RDebug::Print(_L("Expected result: %s Actual Result: %S\n"),(KQuery[i].result),&text);
+			TheTest.Printf(_L("Expected result: %s Actual Result: %S\n"),(KQuery[i].result),&text);
 			TInt err = text.Compare(TPtrC(KQuery[i].result));
 			TheTest(err ==0);
 			view.NextL();
@@ -479,7 +480,7 @@
 
 	for(TInt j =0;j<KNumBadQueries;++j)
 		{
-		RDebug::Print(_L("Executing illegal statement: %s \n"),(KBadQuery[j].query));
+		TheTest.Printf(_L("Executing illegal statement: %s \n"),(KBadQuery[j].query));
 		RDbView view;
 		TInt prepErr = view.Prepare(database, TDbQuery(TPtrC(KBadQuery[j].query), EDbCompareFolded), view.EReadOnly);
 		TheTest(prepErr==KErrArgument);
@@ -542,7 +543,7 @@
 
 	for(TInt i =0;i<KNumQueries;++i)
 		{
-		RDebug::Print(_L("Executing statement: %s \n"),(KQuery[i].query));
+		TheTest.Printf(_L("Executing statement: %s \n"),(KQuery[i].query));
 		RDbView view;
 		TInt prepErr = view.Prepare(database, TDbQuery(TPtrC(KQuery[i].query), EDbCompareFolded), view.EReadOnly);
 		TheTest(prepErr>=0);
@@ -560,7 +561,7 @@
 			rd.OpenLC(view,1);
 			rd.ReadL(colname,view.ColLength(1));
 			CleanupStack::PopAndDestroy();
-			RDebug::Print(_L("Expected result: %S Actual Result: %S\n"),&result,&colname);
+			TheTest.Printf(_L("Expected result: %S Actual Result: %S\n"),&result,&colname);
 			TInt err = colname.CompareF(result);
 			TheTest(err ==0);
 
@@ -577,7 +578,7 @@
 
 	for(TInt j =0;j<KNumBadQueries;++j)
 		{
-		RDebug::Print(_L("Executing illegal statement: %s \n"),(KBadQuery[j].query));
+		TheTest.Printf(_L("Executing illegal statement: %s \n"),(KBadQuery[j].query));
 		RDbView view;
 		TInt prepErr = view.Prepare(database, TDbQuery(TPtrC(KBadQuery[j].query), EDbCompareFolded), view.EReadOnly);
 		TheTest(prepErr==KErrArgument);
@@ -641,7 +642,7 @@
 
 	for(TInt i =0;i<KNumQueries;++i)
 		{
-		RDebug::Print(_L("Executing statement: %s \n"),(KQuery[i].query));
+		TheTest.Printf(_L("Executing statement: %s \n"),(KQuery[i].query));
 		RDbView view;
 		TInt prepErr = view.Prepare(database, TDbQuery(TPtrC(KQuery[i].query), EDbCompareFolded), view.EReadOnly);
 		if(TPtrC(KQuery[i].result).Length() == 0)
@@ -659,7 +660,7 @@
 			view.GetL();
 			colname = view.ColDes(1);
 			res= KQuery[i].result;
-			RDebug::Print(_L("Expected result: %s Actual Result: %S\n"),(KQuery[i].result),&colname);
+			TheTest.Printf(_L("Expected result: %s Actual Result: %S\n"),(KQuery[i].result),&colname);
 			TInt err =	colname.Compare(TPtrC(KQuery[i].result));
 			TheTest(err ==0);
 			view.NextL();
@@ -672,7 +673,7 @@
 
 	for(TInt j =0;j<KNumBadQueries;++j)
 		{
-		RDebug::Print(_L("Executing illegal statement: %s \n"),(KBadQuery[j].query));
+		TheTest.Printf(_L("Executing illegal statement: %s \n"),(KBadQuery[j].query));
 		RDbView view;
 		TInt prepErr = view.Prepare(database, TDbQuery(TPtrC(KBadQuery[j].query), EDbCompareFolded), view.EReadOnly);
 		TheTest(prepErr==KErrArgument);
@@ -1274,7 +1275,7 @@
 		view.GetL();
 		TPtrC t1 = view.ColDes(1);
 		TPtrC t2 = view.ColDes(2);
-		RDebug::Print(_L("T1=\"%S\", T2=\"%S\"\r\n"), &t1, &t2);
+		TheTest.Printf(_L("T1=\"%S\", T2=\"%S\"\r\n"), &t1, &t2);
 		++cnt;
 		}
 	view.Close();
--- a/persistentstorage/dbms/tdbms/t_dbenvcreate.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbenvcreate.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -49,7 +49,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/dbms/tdbms/t_dbenvdestroy.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbenvdestroy.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -40,7 +40,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -50,11 +50,11 @@
 
 static void DeleteTestDatabase(TUid aUid, const TDesC& aDbName)
 	{
-	RDebug::Print(_L("Deleting %X \"%S\" database.\n"), aUid, &aDbName);
+	TheTest.Printf(_L("Deleting %X \"%S\" database.\n"), aUid, &aDbName);
 	TInt err = TheDbs.DeleteDatabase(aDbName, aUid);
 	if(err != KErrNone && err != KErrNotFound)
 		{
-		RDebug::Print(_L("Error %d deleting \"%S\" database.\n"), err, &aDbName);
+		TheTest.Printf(_L("Error %d deleting \"%S\" database.\n"), err, &aDbName);
 		}
 	}
 
--- a/persistentstorage/dbms/tdbms/t_dbfail.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbfail.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -910,23 +910,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/dbms/tdbms/t_dbfail2.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbfail2.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -34,7 +34,7 @@
 LOCAL_C void DbCreate2L()
 	{
 	User::LeaveIfError(TheDatabase.Create(TheDbs, KTestDatabase2, TheFormat2));
-	RDebug::Print(_L("Secure shared database created.\n"));
+	test.Printf(_L("Secure shared database created.\n"));
 	}
 
 LOCAL_C void DbDatabaseNamesL()
@@ -46,22 +46,22 @@
 	for(i=0;i<cnt;++i)
 		{
 		const TDesC& name = (*dbNames)[i];
-		RDebug::Print(_L("%02d. %S\n"), i + 1, &name);
+		test.Printf(_L("%02d. %S\n"), i + 1, &name);
 		}
 	delete dbNames;
-	RDebug::Print(_L("Secure shared database - DatabaseNamesL().\n"));
+	test.Printf(_L("Secure shared database - DatabaseNamesL().\n"));
 	}
 
 LOCAL_C void DbCopyDatabaseL()
 	{
 	User::LeaveIfError(TheDbs.CopyDatabase(KTestDatabase2, KTestDatabase3, KPolicyUid));
-	RDebug::Print(_L("Secure shared database - CopyDatabase().\n"));
+	test.Printf(_L("Secure shared database - CopyDatabase().\n"));
 	}
 
 LOCAL_C void DbDeleteDatabaseL()
 	{
 	User::LeaveIfError(TheDbs.DeleteDatabase(KTestDatabase2, KPolicyUid));
-	RDebug::Print(_L("Secure shared database - DeleteDatabase().\n"));
+	test.Printf(_L("Secure shared database - DeleteDatabase().\n"));
 	}
 
 LOCAL_C void DbOpen2L()
@@ -70,7 +70,7 @@
 	CleanupClosePushL(TheDatabase);
 	delete TheDatabase.TableNamesL();	// force a schema load
 	CleanupStack::Pop();
-	RDebug::Print(_L("Secure shared database - Open().\n"));
+	test.Printf(_L("Secure shared database - Open().\n"));
 	}
 
 GLDEF_C void TestOpen2()
--- a/persistentstorage/dbms/tdbms/t_dbindex.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbindex.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -1237,23 +1237,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/dbms/tdbms/t_dblimit.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dblimit.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -262,23 +262,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/dbms/tdbms/t_dblongcol.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dblongcol.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -35,23 +35,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			TheTest.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				TheTest.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				TheTest.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		TheTest.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
@@ -64,6 +64,7 @@
 	if(!aValue)
 		{
 		::DeleteDataFile(KSearchTestDbPath);
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -72,7 +73,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		::DeleteDataFile(KSearchTestDbPath);
 		TheTest(EFalse, aLine);
 		}
@@ -85,7 +86,7 @@
 
 static void LeaveL(TInt aLine, TInt aError)
 	{
-	RDebug::Print(_L("*** Leave. Error: %d, line: %d\r\n"), aError, aLine);
+	TheTest.Printf(_L("*** Leave. Error: %d, line: %d\r\n"), aError, aLine);
 	User::Leave(aError);
 	}
 static void LeaveIfErrorL(TInt aLine, TInt aError)
--- a/persistentstorage/dbms/tdbms/t_dbood.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbood.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -88,6 +88,16 @@
 
 #endif
 
+//The drive that will be used in case if the original drive, where KTestDir is supposed to be created, is not present. 
+const TInt KTestDrive2 = EDriveC;
+_LIT(KTestDatabase2, "C:\\DBMS-TST\\T_DbmsOOD.DB");
+_LIT(KLargeFileName2, "C:\\DBMS-TST\\DeleteMe");
+
+TInt TheTestDrive = -1;
+TFileName TheTestDatabase;
+TFileName TheLargeFileName;
+
+	
 static void AssembleLargeFileName(const TDesC& aFileName, TInt aFileNumber, TDes& aResultPath)
 	{
 	_LIT(KFormatStr, "%S.%03d");
@@ -109,23 +119,23 @@
 		err = fsSession.Entry(aFullName, entry);
 		if(err == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			TheTest.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				TheTest.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				TheTest.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		TheTest.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	return err;
 	}
@@ -136,7 +146,7 @@
 	for(TInt i=0;i<1000;++i)
 		{
 		TBuf<KMaxFileName> filePath;
-		AssembleLargeFileName(KLargeFileName, i, filePath);
+		AssembleLargeFileName(TheLargeFileName, i, filePath);
 		if(DeleteDataFile(filePath) != KErrNone)
 			{
 			break;
@@ -152,7 +162,7 @@
 		TheDb.Close();
 		}
 	TheDbSession.Close();
-	DeleteDataFile(KTestDatabase);
+	DeleteDataFile(TheTestDatabase);
 	DeleteLargeDataFiles();
 	}
 
@@ -164,6 +174,7 @@
 	{
 	if(!aValue)
 		{
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		DeleteDataFiles();
 		TheTest(EFalse, aLine);
 		}
@@ -173,7 +184,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		DeleteDataFiles();
 		TheTest(EFalse, aLine);
 		}
@@ -190,10 +201,14 @@
 //TheFs.Connect() has to be called already.
 static void SetupTestDirectory()
     {
-	TInt err = TheFs.MkDir(KTestDatabase);
-	if(err != KErrNone)
+	TInt err = TheFs.MkDir(TheTestDatabase);
+	if(err != KErrNone && err != KErrAlreadyExists)
 	    {
-	    RDebug::Print(_L("*** SetupTestDirectory(), RFs::MkDir(), err=%d\r\n"), err);
+		TheTest.Printf(_L("*** SetupTestDirectory(), RFs::MkDir(), drive=%d, err=%d.\r\nNext attempt with drive %d.\r\n"), TheTestDrive, err, KTestDrive2);
+	    TheTestDrive = KTestDrive2;
+		TheTestDatabase.Copy(KTestDatabase2);
+		TheLargeFileName.Copy(KLargeFileName2);
+		err = TheFs.MkDir(TheTestDatabase);
 	    }
 	TEST(err == KErrNone || err == KErrAlreadyExists);
 	}
@@ -201,7 +216,7 @@
 //Leaves with info message printed out
 static void LeaveL(TInt aError, TInt aLine)
 	{
-	RDebug::Print(_L("*** Leave. Error: %d, Line: %d\r\n"), aError, aLine);
+	TheTest.Printf(_L("*** Leave. Error: %d, Line: %d\r\n"), aError, aLine);
 	User::Leave(aError);
 	}
 
@@ -240,7 +255,7 @@
 static TInt64 FreeDiskSpaceL()
 	{
 	TVolumeInfo volInfoBefore;
-	LEAVE_IF_ERROR(TheFs.Volume(volInfoBefore, KTestDrive));
+	LEAVE_IF_ERROR(TheFs.Volume(volInfoBefore, TheTestDrive));
 	return volInfoBefore.iFree;
 	}
 
@@ -262,13 +277,13 @@
 	TInt fileNo = 0;
 	const TInt KLargeFileSize = 1000000000;
 	TInt64 diskSpace = FreeDiskSpaceL();
-	RDebug::Print(_L("CreateLargeFileL: free space before = %ld\n"), diskSpace);
+	TheTest.Printf(_L("CreateLargeFileL: free space before = %ld\n"), diskSpace);
 	TBuf<KMaxFileName> filePath;
     const TInt64 KMinDiskSpace = 200;
 	//Reserve almost all disk space, except a small amount - 200 bytes.
 	while(diskSpace > KMinDiskSpace)
 		{
-		AssembleLargeFileName(KLargeFileName, fileNo++, filePath);
+		AssembleLargeFileName(TheLargeFileName, fileNo++, filePath);
 		TInt fileSize = KLargeFileSize;
         if(diskSpace < (TInt64)KLargeFileSize)
             {
@@ -277,17 +292,17 @@
             }
 		DoCreateLargeFileL(filePath, fileSize);
 		diskSpace = FreeDiskSpaceL();
-		RDebug::Print(_L("----CreateLargeFileL, step %d, free space = %ld\n"), fileNo, diskSpace);
+		TheTest.Printf(_L("----CreateLargeFileL, step %d, free space = %ld\n"), fileNo, diskSpace);
 		}
 	diskSpace = FreeDiskSpaceL();
-	RDebug::Print(_L("CreateLargeFileL: free space after = %ld\n"), diskSpace);
+	TheTest.Printf(_L("CreateLargeFileL: free space after = %ld\n"), diskSpace);
 	}
 
 //Reserves disk space for TheDbSession instance.
 //TheDbSession instance has to be connected already.
 static void ReserveDiskSpace()
 	{
-	TInt err = TheDbSession.ReserveDriveSpace(KTestDrive, KReservedSpaceSize);
+	TInt err = TheDbSession.ReserveDriveSpace(TheTestDrive, KReservedSpaceSize);
 	TEST2(err, KErrNone);
 	}
 
@@ -295,14 +310,14 @@
 //TheDbSession instance has to be connected already.
 static void FreeReservedSpace()
 	{
-	TheDbSession.FreeReservedSpace(KTestDrive);
+	TheDbSession.FreeReservedSpace(TheTestDrive);
 	}
 
 //Gets an access to the reserved disk space for TheDbSession instance.
 //TheDbSession instance has to be connected already.
 static void UnlockReservedSpace()
 	{
-	TInt err = TheDbSession.GetReserveAccess(KTestDrive);
+	TInt err = TheDbSession.GetReserveAccess(TheTestDrive);
 	TEST2(err, KErrNone);
 	}
 
@@ -310,7 +325,7 @@
 //TheDbSession instance has to be connected already.
 static void LockReservedSpace()
 	{
-	(void)TheDbSession.ReleaseReserveAccess(KTestDrive);
+	(void)TheDbSession.ReleaseReserveAccess(TheTestDrive);
 	}
 
 //Creates the test DBMS session
@@ -327,12 +342,12 @@
 static void CreateTestDatabase(RDbs& aDbs, RDbNamedDatabase& aDb)
 	{
 	//Create the test database.
-	TInt err = aDb.Replace(TheFs, KTestDatabase);
+	TInt err = aDb.Replace(TheFs, TheTestDatabase);
 	TEST2(err, KErrNone);
 	TheDb.Close();
 	//Open it now using DBMS session (so, on DBMS server side), because we want to test
 	//server side RFs sessions - handling "out of disk space" situations.
-	err = aDb.Open(aDbs, KTestDatabase);
+	err = aDb.Open(aDbs, TheTestDatabase);
 	TEST2(err, KErrNone);
 	}
 
@@ -412,37 +427,37 @@
 	LEAVE_IF_ERROR(dbs.Connect());
 
 	//Reserve disk space
-	TInt err = dbs.ReserveDriveSpace(KTestDrive, KReservedSpaceSize);
+	TInt err = dbs.ReserveDriveSpace(TheTestDrive, KReservedSpaceSize);
 	TEST2(err, KErrNone);
 
 	//An attempt to re-reserve it
-   	err = dbs.ReserveDriveSpace(KTestDrive, KReservedSpaceSize);
+   	err = dbs.ReserveDriveSpace(TheTestDrive, KReservedSpaceSize);
 	TEST2(err, KErrInUse);
 
 	//Get an access to the reserved disk space
-	err = dbs.GetReserveAccess(KTestDrive);
+	err = dbs.GetReserveAccess(TheTestDrive);
 	TEST2(err, KErrNone);
 
 	//An attempt to get an access to the reserved space twice.
-	err = dbs.GetReserveAccess(KTestDrive);
+	err = dbs.GetReserveAccess(TheTestDrive);
 	TEST2(err, KErrInUse);
 
 	//This call must fail, because it tries to get an access to the reserved space of
 	//not the same drive, for which ReserveDriveSpace() was called.
-	err = dbs.GetReserveAccess(KTestDrive + 1);
+	err = dbs.GetReserveAccess(TheTestDrive + 1);
 	TEST(err != KErrNone);
 
-	(void)dbs.ReleaseReserveAccess(KTestDrive);
+	(void)dbs.ReleaseReserveAccess(TheTestDrive);
 
 	//An attempt to release the reserved space twice. This call will panic in debug mode.
-	//(void)dbs.ReleaseReserveAccess(KTestDrive);
+	//(void)dbs.ReleaseReserveAccess(TheTestDrive);
 
 	//Cancel reserving an additional disk space
-	dbs.FreeReservedSpace(KTestDrive);
+	dbs.FreeReservedSpace(TheTestDrive);
 
 	//Cancel reserving an additional disk space twice
     //This call will panic in debug mode.
-	//dbs.FreeReservedSpace(KTestDrive);
+	//dbs.FreeReservedSpace(TheTestDrive);
 
 	CleanupStack::PopAndDestroy(&dbs);
 	}
@@ -460,9 +475,9 @@
 static void TransactionTestL()
 	{
     TVolumeIOParamInfo volIoPrm;
-    TInt err = TheFs.VolumeIOParam(KTestDrive, volIoPrm);
+    TInt err = TheFs.VolumeIOParam(TheTestDrive, volIoPrm);
     TEST2(err, KErrNone);
-    RDebug::Print(_L("--Drive %d. BlockSize=%d, ClusterSize=%d, RecReadBufSize=%d, RecWriteBufSize=%d\r\n"), KTestDrive, volIoPrm.iBlockSize, volIoPrm.iClusterSize, volIoPrm.iRecReadBufSize, volIoPrm.iRecWriteBufSize);
+    TheTest.Printf(_L("--Drive %d. BlockSize=%d, ClusterSize=%d, RecReadBufSize=%d, RecWriteBufSize=%d\r\n"), TheTestDrive, volIoPrm.iBlockSize, volIoPrm.iClusterSize, volIoPrm.iRecReadBufSize, volIoPrm.iRecWriteBufSize);
     /////////////////////////////////////////////////////////
 	CreateTestDbSession();
     //Rserve disk space
@@ -471,21 +486,21 @@
 	CreateTestDatabase(TheDbSession, TheDb);
 	CreateTestTableL(TheDb);
 	AddTestDataL(TheDb);
-    RDebug::Print(_L("--Simulate an \"out of disk space\" situation with creating a very large data file, which occupies almost the all the available disk space.\r\n"));
+	TheTest.Printf(_L("--Simulate an \"out of disk space\" situation with creating a very large data file, which occupies almost the all the available disk space.\r\n"));
 	CreateLargeFileL();
-    RDebug::Print(_L("--Attempt to delete test data records. The transaction must fail, because of \"out of disk space\".\r\n"));
+	TheTest.Printf(_L("--Attempt to delete test data records. The transaction must fail, because of \"out of disk space\".\r\n"));
     TInt64 diskSpace = FreeDiskSpaceL();
-	RDebug::Print(_L("--Attempt to delete test data records. Free disk space = %ld\n"), diskSpace);
+    TheTest.Printf(_L("--Attempt to delete test data records. Free disk space = %ld\n"), diskSpace);
 	TRAP(err, DeleteRecordsL());
-	RDebug::Print(_L("--DeleteRecordsL() returned %d error\r\n"), err);
+	TheTest.Printf(_L("--DeleteRecordsL() returned %d error\r\n"), err);
 	TEST(err != KErrNone);
-    RDebug::Print(_L("--The attempt failed with err=%d. Get an access to the reserved disk space.\r\n"), err);
+	TheTest.Printf(_L("--The attempt failed with err=%d. Get an access to the reserved disk space.\r\n"), err);
     UnlockReservedSpace();
-	RDebug::Print(_L("--Try again with getting an access to the reserved disk space.\n"));
+    TheTest.Printf(_L("--Try again with getting an access to the reserved disk space.\n"));
     diskSpace = FreeDiskSpaceL();
-    RDebug::Print(_L("After GetReserveAccess(), free disk space = %ld\r\n"), diskSpace);
+    TheTest.Printf(_L("After GetReserveAccess(), free disk space = %ld\r\n"), diskSpace);
 	DeleteRecordsL();
-	RDebug::Print(_L("--\"Delete\" transaction was completed successfully.\n"));
+	TheTest.Printf(_L("--\"Delete\" transaction was completed successfully.\n"));
     //Free the resources, used in the test
 	DeleteLargeDataFiles();
 	LockReservedSpace();
@@ -514,7 +529,7 @@
 
     RDbNamedDatabase db1;
     CleanupClosePushL(db1);
-	TInt err = db1.Open(dbSess1, KTestDatabase);
+	TInt err = db1.Open(dbSess1, TheTestDatabase);
 	TEST2(err, KErrNone);
 
 	RDbTable tbl1;
@@ -528,7 +543,7 @@
 
     RDbNamedDatabase db2;
     CleanupClosePushL(db2);
-	err = db2.Open(dbSess2, KTestDatabase);
+	err = db2.Open(dbSess2, TheTestDatabase);
 	TEST2(err, KErrNone);
 
 	RDbTable tbl2;
@@ -585,20 +600,20 @@
     LEAVE_IF_ERROR(dbSess2.Connect());
 
     //Play with "ReserveDriveSpace" on both sessions
-    TInt err = dbSess1.ReserveDriveSpace(KTestDrive, KReservedSpaceSize);
+    TInt err = dbSess1.ReserveDriveSpace(TheTestDrive, KReservedSpaceSize);
     TEST2(err, KErrNone);
-    err = dbSess2.ReserveDriveSpace(KTestDrive, KReservedSpaceSize);
+    err = dbSess2.ReserveDriveSpace(TheTestDrive, KReservedSpaceSize);
     TEST2(err, KErrNone);
-    dbSess2.FreeReservedSpace(KTestDrive);
-    err = dbSess2.ReserveDriveSpace(KTestDrive, KReservedSpaceSize);
+    dbSess2.FreeReservedSpace(TheTestDrive);
+    err = dbSess2.ReserveDriveSpace(TheTestDrive, KReservedSpaceSize);
     TEST2(err, KErrNone);
 
     //Get an access to the reserved space through session 2
-	err = dbSess2.GetReserveAccess(KTestDrive);
+	err = dbSess2.GetReserveAccess(TheTestDrive);
     TEST2(err, KErrNone);
     //Free/re-reserve disk space for session 1.
-    dbSess1.FreeReservedSpace(KTestDrive);
-    err = dbSess1.ReserveDriveSpace(KTestDrive, KReservedSpaceSize);
+    dbSess1.FreeReservedSpace(TheTestDrive);
+    err = dbSess1.ReserveDriveSpace(TheTestDrive, KReservedSpaceSize);
     TEST2(err, KErrNone);
 
     //Create session4
@@ -607,7 +622,7 @@
     LEAVE_IF_ERROR(dbSess4.Connect());
 
     //Try to reserve space for session 4.
-    err = dbSess4.ReserveDriveSpace(KTestDrive, KReservedSpaceSize);
+    err = dbSess4.ReserveDriveSpace(TheTestDrive, KReservedSpaceSize);
     TEST2(err, KErrNone);
 
     //Create session3
@@ -615,41 +630,41 @@
     CleanupClosePushL(dbSess3);
     LEAVE_IF_ERROR(dbSess3.Connect());
     //Try to reserve space for session 3.
-    err = dbSess3.ReserveDriveSpace(KTestDrive, KReservedSpaceSize);
+    err = dbSess3.ReserveDriveSpace(TheTestDrive, KReservedSpaceSize);
     TEST2(err, KErrNone);
 
     //Release and free session 2 access to the reserved space.
-    (void)dbSess2.ReleaseReserveAccess(KTestDrive);
-    dbSess2.FreeReservedSpace(KTestDrive);
+    (void)dbSess2.ReleaseReserveAccess(TheTestDrive);
+    dbSess2.FreeReservedSpace(TheTestDrive);
 
-    dbSess3.FreeReservedSpace(KTestDrive);
+    dbSess3.FreeReservedSpace(TheTestDrive);
     CleanupStack::PopAndDestroy(&dbSess3);
 
-    dbSess4.FreeReservedSpace(KTestDrive);
+    dbSess4.FreeReservedSpace(TheTestDrive);
     CleanupStack::PopAndDestroy(&dbSess4);
 
     //Get an access to the reserved space through session 2.
     //But it was freed, so the call will fail.
-	err = dbSess2.GetReserveAccess(KTestDrive);
+	err = dbSess2.GetReserveAccess(TheTestDrive);
     TEST(err != KErrNone);
 
     //Free/re-reserve disk space for session 1.
-    dbSess1.FreeReservedSpace(KTestDrive);
-    err = dbSess1.ReserveDriveSpace(KTestDrive, KReservedSpaceSize);
+    dbSess1.FreeReservedSpace(TheTestDrive);
+    err = dbSess1.ReserveDriveSpace(TheTestDrive, KReservedSpaceSize);
     TEST2(err, KErrNone);
 
     //Grant/release the access to the reserved space for session 1.
-	err = dbSess1.GetReserveAccess(KTestDrive);
+	err = dbSess1.GetReserveAccess(TheTestDrive);
     TEST2(err, KErrNone);
-    (void)dbSess1.ReleaseReserveAccess(KTestDrive);
+    (void)dbSess1.ReleaseReserveAccess(TheTestDrive);
 
     //Grant an access to the reserved space for session 2.
     //The call will fail because there is no reserved disk space for session 2.
-	err = dbSess2.GetReserveAccess(KTestDrive);
+	err = dbSess2.GetReserveAccess(TheTestDrive);
     TEST(err != KErrNone);
 
     //Free the reserved space - session 1
-    dbSess1.FreeReservedSpace(KTestDrive);
+    dbSess1.FreeReservedSpace(TheTestDrive);
 
     CleanupStack::PopAndDestroy(&dbSess2);
     CleanupStack::PopAndDestroy(&dbSess1);
@@ -670,10 +685,10 @@
 	dbs.ResourceMark();
 	for(TInt count=1;;++count)
 		{
-        RDebug::Print(_L("OOMTest1. Count=%d\n"), count);
+		TheTest.Printf(_L("OOMTest1. Count=%d\n"), count);
 		dbs.SetHeapFailure(RHeap::EFailNext, count);
 
-		TInt ret = dbs.ReserveDriveSpace(KTestDrive, KReservedSpaceSize);
+		TInt ret = dbs.ReserveDriveSpace(TheTestDrive, KReservedSpaceSize);
 
 		if(ret == KErrNoMemory)
 			{
@@ -681,7 +696,7 @@
 			}
 		else if(ret == KErrNone)
 			{
-			dbs.FreeReservedSpace(KTestDrive);
+			dbs.FreeReservedSpace(TheTestDrive);
 			break;
 			}
 		else
@@ -706,14 +721,14 @@
     {
     RDbs dbs;
     TEST2(dbs.Connect(), KErrNone);
-	TEST2(dbs.ReserveDriveSpace(KTestDrive, KReservedSpaceSize), KErrNone);
+	TEST2(dbs.ReserveDriveSpace(TheTestDrive, KReservedSpaceSize), KErrNone);
 	dbs.ResourceMark();
 	for(TInt count=1;;++count)
 		{
-        RDebug::Print(_L("OOMTest2. Count=%d\n"), count);
+		TheTest.Printf(_L("OOMTest2. Count=%d\n"), count);
 		dbs.SetHeapFailure(RHeap::EFailNext, count);
 
-		TInt ret = dbs.GetReserveAccess(KTestDrive);
+		TInt ret = dbs.GetReserveAccess(TheTestDrive);
 
 		if(ret == KErrNoMemory)
 			{
@@ -721,7 +736,7 @@
 			}
 		else if(ret == KErrNone)
 			{
-			(void)dbs.ReleaseReserveAccess(KTestDrive);
+			(void)dbs.ReleaseReserveAccess(TheTestDrive);
 			break;
 			}
 		else
@@ -730,7 +745,7 @@
 			}
 		}
 
-	dbs.FreeReservedSpace(KTestDrive);
+	dbs.FreeReservedSpace(TheTestDrive);
     dbs.SetHeapFailure(RHeap::ENone, 0);
     dbs.Close();
     }
@@ -743,7 +758,7 @@
 	//Create DBMS session. Reserve drive space.
     RDbs dbs;
     TEST2(dbs.Connect(), KErrNone);
-	TEST2(dbs.ReserveDriveSpace(KTestDrive, KReservedSpaceSize), KErrNone);
+	TEST2(dbs.ReserveDriveSpace(TheTestDrive, KReservedSpaceSize), KErrNone);
 	//Panic thread. See DBMS server behaviour - will it panic or not?
 	//If DBMS server panics in _DEBUG mode - DEF057265 is not properly fixed.
 	User::Panic(_L("Simulate DBMS client failuer"), 0);
@@ -813,6 +828,10 @@
 	CTrapCleanup* trapCleanup = CTrapCleanup::New();
 	TEST(trapCleanup != NULL);
 
+	TheTestDrive = KTestDrive;
+	TheTestDatabase.Copy(KTestDatabase);
+	TheLargeFileName.Copy(KLargeFileName);
+	
 	DeleteLargeDataFiles();
 
 	TInt err = TheFs.Connect();
--- a/persistentstorage/dbms/tdbms/t_dbpanic.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbpanic.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -157,23 +157,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/dbms/tdbms/t_dbperf1.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbperf1.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -18,6 +18,7 @@
 #include <bautils.h>
 #include <hal.h>
 #include <d32dbms.h>
+#include "t_dbcmdlineutil.h"
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
@@ -52,6 +53,12 @@
 	ECompactAtEnd
 	};
 	
+TCmdLineParams TheCmdLineParams;
+RFile TheLogFile; 
+TBuf<250> TheLogLine;
+TBuf8<250> TheLogLine8;
+TBuf<200> TheTestTitle;
+
 ///////////////////////////////////////////////////////////////////////////////////////
 
 void TestEnvDestroy()
@@ -59,6 +66,11 @@
 	TheDbs.Close();
 	TheFs.Delete(TheNonSecureDbName2);
 	TheFs.Delete(TheNonSecureDbName);
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		(void)TheLogFile.Flush();
+		TheLogFile.Close();
+		}
 	TheFs.Close();
 	}
 
@@ -70,7 +82,7 @@
 	if(!aValue)
 		{
 		TestEnvDestroy();
-		TheTest.Printf(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -95,6 +107,13 @@
 
 	err = TheFs.MkDir(TheNonSecureDbName);
 	TEST(err == KErrNone || err == KErrAlreadyExists);
+
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		err = TheLogFile.Replace(TheFs, TheCmdLineParams.iLogFileName, EFileRead | EFileWrite);
+		TEST2(err, KErrNone);
+		LogConfig(TheLogFile, TheCmdLineParams);
+		}
 	
 	err = TheDbs.Connect();
 	TEST2(err, KErrNone);
@@ -157,36 +176,15 @@
 		}
 	const TInt KMicroSecIn1Sec = 1000000;
 	TInt32 us = (diffTicks * KMicroSecIn1Sec) / freq;
-	TheTest.Printf(_L("####Execution time: %d ms\r\n"), us / 1000);
+	TheTest.Printf(_L("%S: %d us\r\n"), &TheTestTitle, us);
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		TheLogLine.Format(_L("%S¬%d¬us\r\n"), &TheTestTitle, us);
+		TheLogLine8.Copy(TheLogLine);
+		(void)TheLogFile.Write(TheLogLine8);
+		}
 	}
 	
-void PrintFileSize(const TDesC& aFileName)
-	{
-	RFile file;
-	TInt err = file.Open(TheFs, aFileName, EFileRead);
-	TEST2(err, KErrNone);
-	TInt size = 0;
-	err = file.Size(size);
-	TEST2(err, KErrNone);
-	TheTest.Printf(_L("####FileSize: %d\r\n"), size);
-	file.Close();
-	}
-
-void PrintString(const TDesC& aStr)
-	{
-	TheTest.Printf(_L("Str begin~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n"));
-	TPtrC ptr(aStr);
-	while(ptr.Length() > 0)
-		{
-		TPtrC ptr2;
-		TInt len = Min(ptr.Length(), 60);
-		ptr2.Set(ptr.Left(len));
-		TheTest.Printf(_L("%S\r\n"), &ptr2);
-		ptr.Set(ptr.Mid(len));
-		}
-	TheTest.Printf(_L("Str end~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n"));
-	}
-
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 ///////     DBMS SERVER performance tests
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -398,18 +396,6 @@
 //Executes SQL script
 void ExecuteSqlScript(RDbDatabase& aDb, const TDesC& aScriptFileName, TCompactDbOption aCompactDbOpt)
 	{
-	if(aCompactDbOpt == ECompactAfterCommit)
-		{
-		TheTest.Printf(_L("===Execute DB script: Compact after COMMIT\r\n"));	
-		}
-	else if(aCompactDbOpt == ECompactAtEnd)
-		{
-		TheTest.Printf(_L("===Execute DB script: Compact at end\r\n"));	
-		}
-	else
-		{
-		TheTest.Printf(_L("===Execute DB script: No compaction\r\n"));	
-		}
 	HBufC* fullDbScript = ReadSqlScript(aScriptFileName);
 	TUint32 start = User::FastCounter();
 	TPtrC ptr(fullDbScript->Des());
@@ -426,10 +412,6 @@
 			TheTest.Printf(_L("###ERROR 'Out of memory'! The test cannot be completed!\r\n"));
 			return;	
 			}
-		if(rc != 1)	
-			{
-			PrintString(sql);
-			}
 		TEST2(rc, 1);
 		if((stmtCnt % 200) == 0) //~16 transactions (~3270 statements total)
 			{
@@ -455,7 +437,6 @@
 	TUint32 end = User::FastCounter();
 	PrintStats(start, end);
 	delete fullDbScript;
-	TheTest.Printf(_L("###Processed records: %d\r\n"), stmtCnt);
 	}
 
 ///////////////////////////////////////////////////////////////////////////////////////
@@ -463,7 +444,6 @@
 //"INSERT" test function
 void InsertTest(TTestType aTestType, const TDesC& aDbFileName, TCompactDbOption aCompactDbOpt)
 	{
-	TheTest.Printf(_L("\"Insert\" test\r\n"));
 	RDbDatabase db = TDbHelper::Open(aTestType, aDbFileName);
 	ExecuteSqlScript(db, KFillDbScript, aCompactDbOpt);
 	RDbTable tbl;
@@ -480,23 +460,6 @@
 //"UPDATE" test function
 void UpdateTest(TTestType aTestType, const TDesC& aDbFileName, const TDesC& aUpdateSql, TCompactDbOption aCompactDbOpt)
 	{
-	if(aCompactDbOpt == ECompactAfterEvery10Rec)
-		{
-		TheTest.Printf(_L("===Update: Compact after every 10 records\r\n"));	
-		}
-	else if(aCompactDbOpt == ECompactAfterEveryUpd)
-		{
-		TheTest.Printf(_L("===Update: Compact after every update\r\n"));	
-		}
-	else if(aCompactDbOpt == ECompactAtEnd)
-		{
-		TheTest.Printf(_L("===Update: Compact at end\r\n"));	
-		}
-	else
-		{
-		TheTest.Printf(_L("===Update: No compaction\r\n"));	
-		}
-	TheTest.Printf(_L("\"Update\" test\r\n"));
 	RDbDatabase db = TDbHelper::Open(aTestType, aDbFileName);
 
 	TUint32 start = User::FastCounter();
@@ -505,10 +468,6 @@
 		TBuf<200> sql;
 		sql.Format(aUpdateSql, &KFirstName, id, &KLastName, id, &KCompanyName, id, id);
 		TInt rc = db.Execute(sql);
-		if(rc != 1)	
-			{
-			PrintString(sql);
-			}
 		TEST2(rc, 1);
 		if(aCompactDbOpt == ECompactAfterEveryUpd || (aCompactDbOpt == ECompactAfterEvery10Rec && (updateOpCnt % 10) == 0))
 			{
@@ -529,7 +488,6 @@
 //"SELECT" test function
 void SelectTestL(TTestType aTestType, const TDesC& aDbFileName, const TDesC& aSelectSql)
 	{
-	TheTest.Printf(_L("\"Select\" test\r\n"));
 	RDbDatabase db = TDbHelper::Open(aTestType, aDbFileName);
 	TDbQuery query(aSelectSql);
 	RDbView view;
@@ -564,15 +522,6 @@
 //"DELETE" test function
 void DeleteTest(TTestType aTestType, const TDesC& aDbFileName, const TDesC& aDeleteSql, TCompactDbOption aCompactDbOpt)
 	{
-	if(aCompactDbOpt == ECompactAtEnd)
-		{
-		TheTest.Printf(_L("===Delete: Compact at end\r\n"));	
-		}
-	else
-		{
-		TheTest.Printf(_L("===Delete: No compaction\r\n"));	
-		}
-	TheTest.Printf(_L("\"Delete\" test\r\n"));
 	RDbDatabase db = TDbHelper::Open(aTestType, aDbFileName);
 	TUint32 start = User::FastCounter();
 	TInt rc = db.Execute(aDeleteSql);
@@ -609,128 +558,92 @@
 	CleanupStack::PushL(fm);
 
 	//==================================== CLIENT ==========================================================
-	TheTest.Printf(_L("DBMS, insert, UTF16 SQL strings, non-secure db, client, no db compaction\r\n"));
+	TheTestTitle.Copy(_L("DBMS, insert, UTF16 SQL strings, non-secure db, client, no db compaction"));
 	TDbHelper::CreateL(TheNonSecureDbName);
 	InsertTest(EClientDbTest, TheNonSecureDbName, ENoCompaction);
-	PrintFileSize(TheNonSecureDbName);
 	
-	TheTest.Printf(_L("DBMS, insert, UTF16 SQL strings, non-secure db, client, db compaction at end\r\n"));
+	TheTestTitle.Copy(_L("DBMS, insert, UTF16 SQL strings, non-secure db, client, db compaction at end"));
 	TDbHelper::CreateL(TheNonSecureDbName);
 	InsertTest(EClientDbTest, TheNonSecureDbName, ECompactAtEnd);
-	PrintFileSize(TheNonSecureDbName);
 	
-	TheTest.Printf(_L("DBMS, insert, UTF16 SQL strings, non-secure db, client, db compaction after commit\r\n"));
+	TheTestTitle.Copy(_L("DBMS, insert, UTF16 SQL strings, non-secure db, client, db compaction after commit"));
 	TDbHelper::CreateL(TheNonSecureDbName);
 	InsertTest(EClientDbTest, TheNonSecureDbName, ECompactAfterCommit);
-	PrintFileSize(TheNonSecureDbName);
 
 	TInt err = fm->Copy(TheNonSecureDbName, TheNonSecureDbName2);
 	TEST2(err, KErrNone);
 	
-	TheTest.Printf(_L("DBMS, update, UTF16 SQL strings, non-secure db, client, no db compaction\r\n"));
+	TheTestTitle.Copy(_L("DBMS, update, UTF16 SQL strings, non-secure db, client, no db compaction"));
 	UpdateTest(EClientDbTest, TheNonSecureDbName, KUpdateSql(), ENoCompaction);
-	PrintFileSize(TheNonSecureDbName);
 	err = fm->Copy(TheNonSecureDbName2, TheNonSecureDbName);
 	TEST2(err, KErrNone);
 	
-	TheTest.Printf(_L("DBMS, update, UTF16 SQL strings, non-secure db, client, db compaction at end\r\n"));
+	TheTestTitle.Copy(_L("DBMS, update, UTF16 SQL strings, non-secure db, client, db compaction at end"));
 	UpdateTest(EClientDbTest, TheNonSecureDbName, KUpdateSql(), ECompactAtEnd);
-	PrintFileSize(TheNonSecureDbName);
 	err = fm->Copy(TheNonSecureDbName2, TheNonSecureDbName);
 	TEST2(err, KErrNone);
 
-	TheTest.Printf(_L("DBMS, update, UTF16 SQL strings, non-secure db, client, db compaction after every 10 records\r\n"));
+	TheTestTitle.Copy(_L("DBMS, update, UTF16 SQL strings, non-secure db, client, db compaction after every 10 records"));
 	UpdateTest(EClientDbTest, TheNonSecureDbName, KUpdateSql(), ECompactAfterEvery10Rec);
-	PrintFileSize(TheNonSecureDbName);
-//L	err = fm->Copy(TheNonSecureDbName2, TheNonSecureDbName);
-//L	TEST2(err, KErrNone);
 	
-//L	TheTest.Printf(_L("DBMS, update, UTF16 SQL strings, non-secure db, client, db compaction after every update\r\n"));
-//L	UpdateTest(EClientDbTest, TheNonSecureDbName, KUpdateSql(), ECompactAfterEveryUpd);
-//L	PrintFileSize(TheNonSecureDbName);
-	
-	TheTest.Printf(_L("DBMS, select, UTF16 SQL strings, non-secure db, client\r\n"));
+	TheTestTitle.Copy(_L("DBMS, select, UTF16 SQL strings, non-secure db, client"));
 	SelectTestL(EClientDbTest, TheNonSecureDbName, KSelectSql());
 
-	TheTest.Printf(_L("DBMS, delete, UTF16 SQL strings, non-secure db, client\r\n"));
+	TheTestTitle.Copy(_L("DBMS, delete, UTF16 SQL strings, non-secure db, client"));
 	DeleteTest(EClientDbTest, TheNonSecureDbName, KDeleteSql(), ECompactAtEnd);
-	PrintFileSize(TheNonSecureDbName);
 
 	//==================================== SERVER ==========================================================
 
-	TheTest.Printf(_L("DBMS, insert, UTF16 SQL strings, non-secure db, server, no db compaction\r\n"));
+	TheTestTitle.Copy(_L("DBMS, insert, UTF16 SQL strings, non-secure db, server, no db compaction"));
 	TDbHelper::CreateL(TheNonSecureDbName);
 	InsertTest(EServerDbTest, TheNonSecureDbName, ENoCompaction);
-	PrintFileSize(TheNonSecureDbName);
 	
-	TheTest.Printf(_L("DBMS, insert, UTF16 SQL strings, non-secure db, server, db compaction at end\r\n"));
+	TheTestTitle.Copy(_L("DBMS, insert, UTF16 SQL strings, non-secure db, server, db compaction at end"));
 	TDbHelper::CreateL(TheNonSecureDbName);
 	InsertTest(EServerDbTest, TheNonSecureDbName, ECompactAtEnd);
-	PrintFileSize(TheNonSecureDbName);
 
-	TheTest.Printf(_L("DBMS, insert, UTF16 SQL strings, non-secure db, server, db compaction after commit\r\n"));
+	TheTestTitle.Copy(_L("DBMS, insert, UTF16 SQL strings, non-secure db, server, db compaction after commit"));
 	TDbHelper::CreateL(TheNonSecureDbName);
 	InsertTest(EServerDbTest, TheNonSecureDbName, ECompactAfterCommit);
-	PrintFileSize(TheNonSecureDbName);
 
 	err = fm->Copy(TheNonSecureDbName, TheNonSecureDbName2);
 	TEST2(err, KErrNone);
 
-	TheTest.Printf(_L("DBMS, update, UTF16 SQL strings, non-secure db, server, no db compaction\r\n"));
+	TheTestTitle.Copy(_L("DBMS, update, UTF16 SQL strings, non-secure db, server, no db compaction"));
 	UpdateTest(EServerDbTest, TheNonSecureDbName, KUpdateSql(), ENoCompaction);
-	PrintFileSize(TheNonSecureDbName);
 	err = fm->Copy(TheNonSecureDbName2, TheNonSecureDbName);
 	TEST2(err, KErrNone);
 	
-	TheTest.Printf(_L("DBMS, update, UTF16 SQL strings, non-secure db, server, db compaction at end\r\n"));
+	TheTestTitle.Copy(_L("DBMS, update, UTF16 SQL strings, non-secure db, server, db compaction at end"));
 	UpdateTest(EServerDbTest, TheNonSecureDbName, KUpdateSql(), ECompactAtEnd);
-	PrintFileSize(TheNonSecureDbName);
 	err = fm->Copy(TheNonSecureDbName2, TheNonSecureDbName);
 	TEST2(err, KErrNone);
 
-	TheTest.Printf(_L("DBMS, update, UTF16 SQL strings, non-secure db, server, db compaction after every 10 records\r\n"));
+	TheTestTitle.Copy(_L("DBMS, update, UTF16 SQL strings, non-secure db, server, db compaction after every 10 records"));
 	UpdateTest(EServerDbTest, TheNonSecureDbName, KUpdateSql(), ECompactAfterEvery10Rec);
-	PrintFileSize(TheNonSecureDbName);
-//L	err = fm->Copy(TheNonSecureDbName2, TheNonSecureDbName);
-//L	TEST2(err, KErrNone);
-
-//L	TheTest.Printf(_L("DBMS, update, UTF16 SQL strings, non-secure db, server, db compaction after every update\r\n"));
-//L	UpdateTest(EServerDbTest, TheNonSecureDbName, KUpdateSql(), ECompactAfterEveryUpd);
-//L	PrintFileSize(TheNonSecureDbName);
 	
-	TheTest.Printf(_L("DBMS, select, UTF16 SQL strings, non-secure db, server\r\n"));
+	TheTestTitle.Copy(_L("DBMS, select, UTF16 SQL strings, non-secure db, server"));
 	SelectTestL(EServerDbTest, TheNonSecureDbName, KSelectSql());
 
-	TheTest.Printf(_L("DBMS, delete, UTF16 SQL strings, non-secure db, server\r\n"));
+	TheTestTitle.Copy(_L("DBMS, delete, UTF16 SQL strings, non-secure db, server"));
 	DeleteTest(EServerDbTest, TheNonSecureDbName, KDeleteSql(), ECompactAtEnd);
-	PrintFileSize(TheNonSecureDbName);
 	
 	//======================================================================================================
 	CleanupStack::PopAndDestroy(fm);
 	}
 
-//Usage: "t_dbperf1 [<drive letter>:]"
-
 TInt E32Main()
 	{
 	TheTest.Title();
 	
 	CTrapCleanup* tc = CTrapCleanup::New();
 
-	//Construct test database file names, using the passed as an optional argument drive letter 
-	TFileName fname;
-	TParse parse;
-	User::CommandLine(fname);
-	
+	GetCmdLineParams(TheTest, _L("t_dbperf1"), TheCmdLineParams);
 	_LIT(KNonSecureDbName, "c:\\test\\t_dbperf1_1.db");
-	parse.Set(fname, &KNonSecureDbName, 0);
-	const TDesC& dbFilePath1 = parse.FullName();
-	TheNonSecureDbName.Copy(dbFilePath1);
-
+	PrepareDbName(KNonSecureDbName, TheCmdLineParams.iDriveName, TheNonSecureDbName);
 	_LIT(KNonSecureDbName2, "c:\\test\\t_dbperf1_2.db");
-	parse.Set(fname, &KNonSecureDbName2, 0);
-	const TDesC& dbFilePath2 = parse.FullName();
-	TheNonSecureDbName2.Copy(dbFilePath2);
+	PrepareDbName(KNonSecureDbName2, TheCmdLineParams.iDriveName, TheNonSecureDbName2);
+	TheTest.Printf(_L("==Databases: %S, %S\r\n"), &TheNonSecureDbName, &TheNonSecureDbName2); 
 	
 	__UHEAP_MARK;
 	
@@ -740,12 +653,13 @@
 	TEST2(err, KErrNone);
 	
 	__UHEAP_MARKEND;
+
+	User::Heap().Check();
 	
 	TheTest.End();
 	TheTest.Close();
 	
 	delete tc;
 
-	User::Heap().Check();
 	return KErrNone;
 	}
--- a/persistentstorage/dbms/tdbms/t_dbperf1.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbperf1.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -23,7 +23,7 @@
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 SOURCEPATH		.
-SOURCE			t_dbperf1.cpp
+SOURCE			t_dbperf1.cpp t_dbcmdlineutil.cpp
 
 LIBRARY			euser.lib 
 LIBRARY			efsrv.lib
--- a/persistentstorage/dbms/tdbms/t_dbperf2.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbperf2.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -152,6 +152,7 @@
 	{
 	if(!aValue)
 		{
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		CloseAll();
 		DeleteFile(TheDatabaseFileName);
 		DeleteFile(TheTestFileName);
--- a/persistentstorage/dbms/tdbms/t_dbperf3.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbperf3.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -156,6 +156,7 @@
 	{
 	if(!aValue)
 		{
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		CloseAll();
 		DeleteFile(TheDatabaseFileName);
 		TheTest(EFalse, aLine);
--- a/persistentstorage/dbms/tdbms/t_dbplatsec1.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbplatsec1.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -87,7 +87,7 @@
 	for(TInt i=0;i<dbNames->Count();++i)
 		{
 		const TDesC& dbName = (*dbNames)[i];
-		RDebug::Print(_L("--Database: %S\n"), &dbName);
+		TheTest.Printf(_L("--Database: %S\n"), &dbName);
 		TBuf<128> dbName2;
 		dbName2.Append(TChar('A' + EDriveC));
 		dbName2.Append(TChar(':'));
--- a/persistentstorage/dbms/tdbms/t_dbplatsecutl.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbplatsecutl.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -71,11 +71,11 @@
 // Delete secure shared database.
 TInt TDBSCUtils::DeleteDatabase(RDbs& aDbs, TUid aPolicyUid, const TDesC& aDbName)
 	{
-	RDebug::Print(_L("Deleting %X \"%S\" database.\n"), aPolicyUid.iUid, &aDbName);
+	TheDbscUtils.iTest.Printf(_L("Deleting %X \"%S\" database.\n"), aPolicyUid.iUid, &aDbName);
 	TInt err = aDbs.DeleteDatabase(aDbName, aPolicyUid);
 	if(err != KErrNone && err != KErrNotFound) 
 		{
-		RDebug::Print(_L("Error %d deleting \"%S\" database.\n"), err, &aDbName);
+		TheDbscUtils.iTest.Printf(_L("Error %d deleting \"%S\" database.\n"), err, &aDbName);
 		}
 	return err;
 	}
@@ -134,6 +134,7 @@
 	{
 	if(!aValue)
 		{
+		TheDbscUtils.iTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		if(TheDbscUtils.iFunc)
 			{
 			TheDbscUtils.iFunc();
@@ -148,7 +149,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheDbscUtils.iTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		if(TheDbscUtils.iFunc)
 			{
 			TheDbscUtils.iFunc();
--- a/persistentstorage/dbms/tdbms/t_dbscript.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbscript.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -213,23 +213,23 @@
         TEntry entry;
         if(fsSession.Entry(aFullName, entry) == KErrNone)
             {
-            RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+            TheTest.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
             err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
             if(err != KErrNone)
                 {
-                RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+            	TheTest.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
                 }
             err = fsSession.Delete(aFullName);
             if(err != KErrNone)
                 {
-                RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+            	TheTest.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
                 }
             }
         fsSession.Close();
         }
     else
         {
-        RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+    	TheTest.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
         }
     }
 
@@ -241,7 +241,7 @@
     {
     if(!aValue)
         {
-        RDebug::Print(_L("*** Expression evaluated to false\r\n"));
+    	TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
         DeleteDataFile(KTestDatabase);
         DeleteDataFile(KOutputFile);
         TheTest(EFalse, aLine);
@@ -252,7 +252,7 @@
     {
     if(aValue != aExpected)
         {
-        RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+    	TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
         DeleteDataFile(KTestDatabase);
         DeleteDataFile(KOutputFile);
         TheTest(EFalse, aLine);
--- a/persistentstorage/dbms/tdbms/t_dbsql.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbsql.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -66,23 +66,23 @@
 		TEntry entry;
 		if(fsSession.Entry(KTestDatabase, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &KTestDatabase);
+			TheTest.Printf(_L("Deleting \"%S\" file.\n"), &KTestDatabase);
 			err = fsSession.SetAtt(KTestDatabase, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &KTestDatabase);
+				TheTest.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &KTestDatabase);
 				}
 			err = fsSession.Delete(KTestDatabase);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &KTestDatabase);
+				TheTest.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &KTestDatabase);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &KTestDatabase);
+		TheTest.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &KTestDatabase);
 		}
 	}
 
@@ -105,7 +105,7 @@
 	{
 	if(!aValue)
 		{
-        RDebug::Print(_L("*** Expression evaluated to false\r\n"));
+        TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		::TestCleanup();
 		TheTest(EFalse, aLine);
 		}
@@ -115,7 +115,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		::TestCleanup();
 		TheTest(EFalse, aLine);
 		}
@@ -183,40 +183,40 @@
 	{
     if(aLog)
         {
-        TheTest.Printf(_L("TestPredicateBase::Test\r\n"));
+    	TheTest.Printf(_L("TestPredicateBase::Test\r\n"));
         }
 	TheTable.Close();
 	TInt r=TheDatabase.Commit();
 	if(aLog)
         {
-        TheTest.Printf(_L("Commit %d\r\n"), r);
+		TheTest.Printf(_L("Commit %d\r\n"), r);
         }
 	TEST2(r, KErrNone);
 	TRAPD(errCode, TestViewL(aTest,aCount,aRows, aLog));
 	if(aLog)
         {
-        TheTest.Printf(_L("TestViewL %d"), errCode);
+		TheTest.Printf(_L("TestViewL %d"), errCode);
         }
 
 	TEST2(errCode, KErrNone);
 	r=TheDatabase.Execute(_L("CREATE INDEX Key ON Compare (Test)"));
    if(aLog)
         {
-        TheTest.Printf(_L("Execute %d"), r);
+	   TheTest.Printf(_L("Execute %d"), r);
         }
 
 	TEST2(r, KErrNone);
 	TRAP(errCode,TestViewL(aTest,aCount,aRows, aLog));
 	if(aLog)
         {
-        TheTest.Printf(_L("TestViewL %d"), errCode);
+		TheTest.Printf(_L("TestViewL %d"), errCode);
 	    }
 
 	TEST2(errCode, KErrNone);
 	r=TheDatabase.Execute(_L("DROP TABLE Compare"));
     if(aLog)
         {
-        TheTest.Printf(_L("Execute %d"), r);
+    	TheTest.Printf(_L("Execute %d"), r);
         }
 
 	TEST2(r, KErrNone);
@@ -232,7 +232,7 @@
 		TInt r=TheView.Prepare(TheDatabase,TheSql,TheView.EReadOnly);
 		if(r!=KErrNone)
 		    {
-            TheTest.Printf(_L("Prepare r= %d aCount= %d  statement %S\r\n"), r, aCount, &TheSql);
+			TheTest.Printf(_L("Prepare r= %d aCount= %d  statement %S\r\n"), r, aCount, &TheSql);
 		    }
 		TEST2(r, KErrNone);
 		TBool ignoreRow0=TheView.Unevaluated();
@@ -264,7 +264,7 @@
 		{
         if(aLog)
             {
-            TheTest.Printf(_L("row = %d"), row);
+        	TheTest.Printf(_L("row = %d"), row);
             }
 		TheTable.InsertL();
 		TEST(TheTable.ColUint(1)==TUint(row));
@@ -788,7 +788,7 @@
 
 static void ReadDesc(TDes& aDes, const TDesC& aFilename, RFs& aFs)
 	{
-    TheTest.Printf(_L("---ReadDesc(), aFilename=%S\r\n"), &aFilename);
+	TheTest.Printf(_L("---ReadDesc(), aFilename=%S\r\n"), &aFilename);
 	RFile file;
 	TInt err = file.Open(aFs, aFilename, EFileRead);
 	TheTest.Printf(_L("Open file aFilename=%S err = %d\r\n"), &aFilename, err);
--- a/persistentstorage/dbms/tdbms/t_dbsrv.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbsrv.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -905,11 +905,11 @@
 	RDbUpdate update;
 	err = update.Execute(TheDatabase, DMLinsert, EDbCompareNormal );
 	if(err != KErrNone)
-		RDebug::Printf("Error on Execute %d",err);
+		test.Printf(_L("Error on Execute %d\r\n"), err);
 	test2(err, KErrNone);	
 	
 	TInt rows = update.RowCount();
-	RDebug::Printf("Afected rows %d",rows);
+	test.Printf(_L("Afected rows %d\r\n") ,rows);
 	test2(rows, 1);	
 	update.Close();
 	
@@ -937,13 +937,13 @@
 
 	RDbRow row;
 	row.CreateL(KRowSize);
-	RDebug::Printf("Rows %d %d",row.Size(), row.MaxSize() );
+	test.Printf(_L("Rows %d %d\r\n"), row.Size(), row.MaxSize());
 	test2(row.MaxSize(), KRealRowSize);
 	TAny* rptr = row.First();
 	
 	RDbRow row2;
 	row2.Open(rptr, KRowSize, 2*KRowSize);
-	RDebug::Printf("Row2s %d %d", KRowSize, row2.MaxSize());
+	test.Printf(_L("Row2s %d %d\r\n"), KRowSize, row2.MaxSize());
 	test2(row2.Size(), KRowSize);
 	test2(row2.MaxSize(), 2*KRowSize);
 	
@@ -1051,7 +1051,7 @@
 	ExecuteRemoteL(KCommand, commandParameter);
 	
 #else
-	RDebug::Print(_L("Testing SPConv - This test case cannot run on hardware"));
+	test.Printf(_L("Testing SPConv - This test case cannot run on hardware"));
 #endif	
 	
 	test.Next(_L("End"));
@@ -1277,7 +1277,7 @@
                 {
                 // If the found name is other valid application name
                 // starting with aProcessName string.
-                //RDebug::Print(_L(":: Process name: \"%S\".\n"), &name);
+                //test.Printf(_L(":: Process name: \"%S\".\n"), &name);
                 continue;
                 }
             }
@@ -1285,7 +1285,7 @@
         if (proc.Open(name) == KErrNone)
             {
             proc.Kill(0);
-            //RDebug::Print(_L("\"%S\" process killed.\n"), &name);
+            //test.Printf(_L("\"%S\" process killed.\n"), &name);
             }
         proc.Close();
         }
--- a/persistentstorage/dbms/tdbms/t_dbstrcmp.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbstrcmp.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -83,23 +83,23 @@
 		err = fsSession.Entry(aFullName, entry);
 		if(err == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			TheTest.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				TheTest.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				TheTest.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		TheTest.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	return err;
 	}
@@ -113,6 +113,7 @@
 	if(!aValue)
 		{
 		::DeleteDataFile(KTestDatabase);
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -121,7 +122,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		::DeleteDataFile(KTestDatabase);
 		TheTest(EFalse, aLine);
 		}
@@ -145,7 +146,7 @@
 //Leaves with info message printed out
 static void LeaveL(TInt aError, TInt aLine)
 	{
-	RDebug::Print(_L("*** Leave. Error: %d, Line: %d\r\n"), aError, aLine);
+	TheTest.Printf(_L("*** Leave. Error: %d, Line: %d\r\n"), aError, aLine);
 	User::Leave(aError);
 	}
 
@@ -166,7 +167,7 @@
 //Creates the test DBMS session
 static void CreateTestDbSession()
 	{
-	RDebug::Print(_L("Create DBMS session\n"));
+	TheTest.Printf(_L("Create DBMS session\n"));
 	TInt err = TheDbSession.Connect();
 	TEST2(err, KErrNone);
 	}
@@ -177,7 +178,7 @@
 //TheFs.Connect() has to be called already.
 static void CreateTestDatabase(RDbs& aDbs, RDbNamedDatabase& aDb)
 	{
-	RDebug::Print(_L("Create test database\n"));
+	TheTest.Printf(_L("Create test database\n"));
 	TInt err = aDb.Replace(TheFs, KTestDatabase);
 	TEST2(err, KErrNone);
 	TheDb.Close();
@@ -202,7 +203,7 @@
 //Creates test tables
 static void CreateTestTablesL(RDbNamedDatabase& aDb)
 	{
-	RDebug::Print(_L("Create test tables\n"));
+	TheTest.Printf(_L("Create test tables\n"));
 	::DoCreateTestTableL(aDb, KTestTableName1, KColDefs1);
 	::DoCreateTestTableL(aDb, KTestTableName2, KColDefs2);
 	}
@@ -226,7 +227,7 @@
 //Prints all table records
 static TInt PrintRecordsL(RDbRowSet& aTbl, const TDesC& aTblName)
 	{
-	RDebug::Print(_L("Table: %S\n"), &aTblName);
+	TheTest.Printf(_L("Table: %S\n"), &aTblName);
     aTbl.FirstL();
 	TInt rec = 0;
     while(aTbl.AtRow())
@@ -235,7 +236,7 @@
 		TNameBuf strFldVal;
 		GetStrFieldValueL(aTbl, aTblName, strFldVal);
 		TUint32 v = aTbl.ColUint32(2);
-		RDebug::Print(_L("   Record %d, Str: %S, Val: %d\n"), ++rec, &strFldVal, v);
+		TheTest.Printf(_L("   Record %d, Str: %S, Val: %d\n"), ++rec, &strFldVal, v);
         aTbl.NextL();
         }
 	return rec;
@@ -280,7 +281,7 @@
 //Adds the test data to test tables
 static void AddTestDataL(RDbNamedDatabase& aDb)
 	{
-	RDebug::Print(_L("Add data to test tables\n"));
+	TheTest.Printf(_L("Add data to test tables\n"));
 	::AddTestDataL(aDb, KTestTableName1);
 	::AddTestDataL(aDb, KTestTableName2);
 	}
@@ -312,7 +313,7 @@
 
 static void CreateIndexL(RDbNamedDatabase& aDb, const TDesC& aTblName, const TDesC& aColumnName)
 	{
-	RDebug::Print(_L("Create index. Table: %S, column: %S\n"), &aTblName, &aColumnName);
+	TheTest.Printf(_L("Create index. Table: %S, column: %S\n"), &aTblName, &aColumnName);
 	CDbKey* key = CDbKey::NewLC();
 	key->AddL(aColumnName);
 	key->MakeUnique();
--- a/persistentstorage/dbms/tdbms/t_dbstress.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbstress.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -608,12 +608,12 @@
 	TInt err2 = TheFs.Delete(KTestDatabase);
 	if(err2 != KErrNone)
 		{
-		RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err2, &KTestDatabase);
+		TheTest.Printf(_L("Error %d deleting \"%S\" file.\n"), err2, &KTestDatabase);
 		}
 	err2 = TheFs.Delete(KLogFile);
 	if(err2 != KErrNone)
 		{
-		RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err2, &KLogFile);
+		TheTest.Printf(_L("Error %d deleting \"%S\" file.\n"), err2, &KLogFile);
 		}
 	TEST2(err, KErrNone);
 //
--- a/persistentstorage/dbms/tdbms/t_dbthrd.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbthrd.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -103,7 +103,7 @@
 	TInt err = iFs.Delete(KLogFile);
 	if(err != KErrNone)
 		{
-		RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &KLogFile);
+		TheTest.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &KLogFile);
 		}
 	iFs.Close();
 	}
--- a/persistentstorage/dbms/tdbms/t_dbtrans.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbtrans.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -91,7 +91,7 @@
 	{
 	if(!aValue)
 		{
-		TheTest.Printf(_L("*** Boolean expression evaluated to false!\r\n"));
+		TheTest.Printf(_L("*** Expression evaluated to false!\r\n"));
 		DestroyTestEnv();
 		TheTest(EFalse, aLine);
 		}
--- a/persistentstorage/dbms/tdbms/t_dbwindow.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/tdbms/t_dbwindow.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -470,23 +470,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/dbms/udbms/UD_CACHE.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/udbms/UD_CACHE.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -99,7 +99,10 @@
 	User::LeaveIfError( UserHal::TickPeriod( cache->iTickPeriod ) );
 	User::LeaveIfError( UserSvr::DllSetTls( TlsHandle(), cache ) );
 	if (aUseTimer)
+		{
+		// coverity[negative_returns]
 		cache->iTimer = CPeriodic::NewL( ETimerPriority );
+		}
 	CleanupStack::Pop();
 	return cache;
 	}
--- a/persistentstorage/dbms/udbms/UD_CURS.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/udbms/UD_CURS.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -1195,6 +1195,9 @@
 	return AttachContext(this,OpenConstraintL(aQuery));
 	}
 
+#pragma BullseyeCoverage off
+#pragma CTC SKIP
+
 //
 // Reserved for future development
 //
@@ -1208,3 +1211,6 @@
 EXPORT_C void CDbCursor::Reserved_2()
 	{
 	}
+
+#pragma CTC ENDSKIP
+#pragma BullseyeCoverage on
--- a/persistentstorage/dbms/udbms/UD_DBS.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/udbms/UD_DBS.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -558,6 +558,9 @@
 	return AttachContext(this,OpenTableL(aName,anAccess));
 	}
 
+#pragma BullseyeCoverage off
+#pragma CTC SKIP
+
 //
 // Reserved for future development
 //
@@ -571,3 +574,6 @@
 EXPORT_C void CDbDatabase::Reserved_2()
 	{
 	}
+
+#pragma CTC ENDSKIP
+#pragma BullseyeCoverage on
--- a/persistentstorage/dbms/ustor/US_DBS.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/ustor/US_DBS.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -535,6 +535,9 @@
 	return alter;
 	}
 
+#pragma BullseyeCoverage off
+#pragma CTC SKIP
+
 EXPORT_C void CDbStoreDatabase::Reserved_1()
 	{
 	}
@@ -543,3 +546,5 @@
 	{
 	}
 
+#pragma CTC ENDSKIP
+#pragma BullseyeCoverage on
--- a/persistentstorage/dbms/ustor/US_FILE.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/ustor/US_FILE.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -68,7 +68,7 @@
 	case CDbDatabase::ESize:
 	case CDbDatabase::EUsage:
 		{
-		TInt size;
+		TInt size = -1;
 		TInt r=STATIC_CAST(CFileStore&,Store()).File().Size(size);
 		if (r<0)
 			return r;
--- a/persistentstorage/dbms/utable/UT_DBS.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/dbms/utable/UT_DBS.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -553,6 +553,9 @@
 	return CAlterTable::NewL(Transaction(),tDef,aNewDef,aStep);
 	}
 
+#pragma BullseyeCoverage off
+#pragma CTC SKIP
+
 //
 // Reserved for future development
 //
@@ -566,3 +569,6 @@
 EXPORT_C void CDbTableDatabase::Reserved_2()
 	{
     }
+
+#pragma CTC ENDSKIP
+#pragma BullseyeCoverage on
--- a/persistentstorage/sql/GROUP/t_sqlcorrupt.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/GROUP/t_sqlcorrupt.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -36,6 +36,7 @@
 LIBRARY			bafl.lib 
 LIBRARY 		estor.lib 
 LIBRARY			estlib.lib 
+LIBRARY			hal.lib 
 STATICLIBRARY	sqlite.lib 
 
 UID				0 0x08770000
--- a/persistentstorage/sql/GROUP/t_sqlperformance2.mmp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/GROUP/t_sqlperformance2.mmp	Tue Oct 19 16:26:13 2010 +0100
@@ -29,6 +29,7 @@
 LIBRARY			sqldb.lib 
 LIBRARY			bafl.lib 
 LIBRARY			estor.lib 
+LIBRARY			hal.lib 
 
 VENDORID		0x70000001
 
--- a/persistentstorage/sql/SRC/Client/SqlResourceProfiler.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/SRC/Client/SqlResourceProfiler.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -19,6 +19,7 @@
 
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 /**
 Initializes TSqlResourceProfiler data members with their default values.
@@ -157,4 +158,5 @@
 
 #endif//_SQLPROFILER
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
--- a/persistentstorage/sql/SRC/Client/SqlResourceTest.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/SRC/Client/SqlResourceTest.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -24,6 +24,7 @@
 ///////////////////////////////////////////////////////////////////////////////////////////////////////
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 #ifdef _DEBUG
 
@@ -277,4 +278,5 @@
 
 #endif//_DEBUG
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
--- a/persistentstorage/sql/SRC/Server/SqlBur.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/SRC/Server/SqlBur.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -106,7 +106,7 @@
 
 /** 
 RunL() is called when the value of the {KUidSystemCategory, KUidBackupRestoreKey} gets changed.
-That indicates: a backup or a restore is about to begin.
+That indicates: a backup or a restore is about to begin or about to end.
 
 How the function works:
  - When a backup or restore notification is received, the function will subscribe again for notifications from
@@ -251,7 +251,7 @@
 	}
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////   CSqlBackupClient    /////////////////////////////////////////////////////////////
+///////////////////////////////   CSqlBurCallback    //////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 
@@ -468,7 +468,7 @@
 					fileSize,					// %16lx
 					fname.Length(),				// %8x
 					&fname);					// %S
-				SQL_TRACE_BUR(OstTraceExt4(TRACE_INTERNALS, CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL5, "0x%X;CSqlBackupClient::GetBackupDataSectionL;fileName=%S;hdrPtr=|%S|;fileSize=%lld", (TUint)this, __SQLPRNSTR(fname), __SQLPRNSTR(iBuffer), fileSize));
+				SQL_TRACE_BUR(OstTraceExt4(TRACE_INTERNALS, CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL5, "0x%X;CSqlBurCallback::GetBackupDataSectionL;fileName=%S;hdrPtr=|%S|;fileSize=%lld", (TUint)this, __SQLPRNSTR(fname), __SQLPRNSTR(iBuffer), fileSize));
 				
 				// we need it to look like an 8bit buffer
 				TPtr8 hdrPtr8((TUint8*)iBuffer.Ptr(), iBuffer.Size(), iBuffer.Size());
@@ -838,7 +838,7 @@
 				__SQLLEAVE_IF_ERROR(iParse.Set(fileNameMask, &iRestoreDir, 0));
 				CDir* dir = NULL;
 				TPtrC searchPattern(iParse.FullName());
-				SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL55, "0x%X;CSqlBurCallback::RestoreBaseDataSectionL;search pattern=%S", (TUint)this, __SQLPRNSTR(searchPattern)));
+				SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL5A, "0x%X;CSqlBurCallback::RestoreBaseDataSectionL;search pattern=%S", (TUint)this, __SQLPRNSTR(searchPattern)));
 				restoreErr = iInterface.Fs().GetDir(searchPattern, KEntryAttNormal, ESortNone, dir);
 				if(restoreErr == KErrNone)
 					{
--- a/persistentstorage/sql/SRC/Server/SqlSrvConfig.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/SRC/Server/SqlSrvConfig.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -465,12 +465,10 @@
 	for(TInt i = aDirEntries.Count() - 1; i >= 0; --i)
 		{
 		const TEntry& entry = aDirEntries[i];
-		if(!entry.IsDir())
-			{
-			HBufC* filename = entry.iName.AllocLC();
-			iConfigFileNames.AppendL(filename);
-			CleanupStack::Pop(); // filename
-			}
+		__ASSERT_DEBUG(!entry.IsDir(), __SQLPANIC(ESqlPanicInternalError));
+		HBufC* filename = entry.iName.AllocLC();
+		iConfigFileNames.AppendL(filename);
+		CleanupStack::Pop(); // filename
 		}
 	}
 	
--- a/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -638,6 +638,7 @@
 	__SQLLEAVE_IF_ERROR(file.Read(bufPtr));
 
 	//Convert buffer to Unicode for processing (the configuration file is expected to be ASCII or UTF-8)
+	// coverity[size_error]
 	HBufC16* buf16 = CnvUtfConverter::ConvertToUnicodeFromUtf8L(bufPtr);
 	CleanupStack::PushL(buf16);			
 	TPtrC16 ptr16 = buf16->Des();
--- a/persistentstorage/sql/SRC/Server/SqlSrvMain.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/SRC/Server/SqlSrvMain.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -338,12 +338,9 @@
 		
 	//Set the soft heap limit (iFileData.ConfigParams() returns now a reference to the config file params, including the soft heap limit, if set)
 	const TSqlSrvConfigParams& configParams = iFileData.ConfigParams();
-	if(configParams.iSoftHeapLimitKb > 0)
-		{
-		__ASSERT_DEBUG(configParams.iSoftHeapLimitKb >= TSqlSrvConfigParams::KMinSoftHeapLimitKb &&
-		            configParams.iSoftHeapLimitKb <= TSqlSrvConfigParams::KMaxSoftHeapLimitKb, __SQLPANIC(ESqlPanicInternalError));
-		sqlite3_soft_heap_limit(configParams.iSoftHeapLimitKb * 1024);
-		}
+	__ASSERT_DEBUG(configParams.iSoftHeapLimitKb >= TSqlSrvConfigParams::KMinSoftHeapLimitKb &&
+				configParams.iSoftHeapLimitKb <= TSqlSrvConfigParams::KMaxSoftHeapLimitKb, __SQLPANIC(ESqlPanicInternalError));
+	sqlite3_soft_heap_limit(configParams.iSoftHeapLimitKb * 1024);
 	//Enable shared cache
 	(void)sqlite3SymbianLastOsError();//clear last OS error
 	TInt err = sqlite3_enable_shared_cache(static_cast <TInt> (EEnableSharedCache));
--- a/persistentstorage/sql/SRC/Server/SqlSrvSession.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/SRC/Server/SqlSrvSession.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -34,6 +34,7 @@
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 #ifdef _DEBUG
 
@@ -147,6 +148,7 @@
 
 #endif//_DEBUG
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -486,6 +488,7 @@
 ///////////////////////////////////////////////////////////////////////////////////////////////////////
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 /**
 Retrieves the counter values for the specified profiling counter.
@@ -523,6 +526,7 @@
 		}				
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1655,6 +1659,9 @@
 	return dbPolicy;
 	}
 
+#pragma BullseyeCoverage off
+#pragma CTC SKIP
+
 /**
 Reports how many objects are allocated by the client.
 If the database connection is not in a test mode, the allocated memory cells count will be ignored.
@@ -1664,6 +1671,9 @@
 	return iStatements.Count() + iIpcStreams.Count() + (iDbResourceTestMode ? User::CountAllocCells() : 0);
 	}
 
+#pragma CTC ENDSKIP
+#pragma BullseyeCoverage on
+
 /**
 Extracts from aMessage:
 - function code;
--- a/persistentstorage/sql/SRC/Server/SqlSrvStatement.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/SRC/Server/SqlSrvStatement.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -336,6 +336,7 @@
 		const TUint8* name8 = reinterpret_cast <const TUint8*> (sqlite3_bind_parameter_name(iStmtHandle, prmIdx));
 		if(name8)
 			{
+			// coverity[size_error]
 			HBufC* name = CnvUtfConverter::ConvertToUnicodeFromUtf8L(TPtrC8(name8, User::StringLength(name8)));
 			TInt err = it.SetText(name->Des());
 			delete name;
@@ -677,14 +678,14 @@
 	if(colType == SQLITE_TEXT)
 		{
 		TInt charLength = (TUint)sqlite3_column_bytes16(iStmtHandle, aColIdx) / sizeof(TUint16);
-        //"charLength == 0" - this might be an indication of an "out of memory" problem, if the column text is in UTF8 format. 
-        //(sqlite3_column_bytes16() may allocate memory for UTF8->UTF16 conversion)
+        // If charLength is 0 then this might be an indication of an "out of memory" problem, if the column text is in UTF8 format. 
+        // sqlite3_column_bytes16() may allocate memory for UTF8->UTF16 conversion.
         if(charLength == 0 && sqlite3_errcode(sqlite3_db_handle(iStmtHandle)) == SQLITE_NOMEM)
             {
             __SQLLEAVE(KErrNoMemory);
             }
-        //sqlite3_column_bytes16() already allocated the needed memory if a UTF8->UTF16 conversion
-        //had to be performed. The sqlite3_column_text16() on the next line is guaranteed to succeed.
+        // sqlite3_column_bytes16() already allocated the needed memory if a UTF8->UTF16 conversion
+        // had to be performed. The sqlite3_column_text16() on the next line is guaranteed to succeed.
         const TUint16* text = reinterpret_cast <const TUint16*> (sqlite3_column_text16(iStmtHandle, aColIdx));
         __ASSERT_DEBUG(text != NULL, __SQLPANIC(ESqlPanicInternalError));
  		res.Set(text, charLength);
--- a/persistentstorage/sql/SRC/Server/SqlSrvStatementUtil.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/SRC/Server/SqlSrvStatementUtil.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -113,9 +113,9 @@
     // - negative value - the sql statement (parameter #2) is zero-terminated;
 	TInt err = sqlite3_prepare16_v2(aDbHandle, aSql.Ptr(), aSql.Length() * sizeof(TUint16) - sizeof(TUint16), &stmtHandle, &stmtTail);
 	__ASSERT_DEBUG(err == SQLITE_OK ? !stmtTail || User::StringLength((const TUint16*)stmtTail) == 0 : !stmtHandle, __SQLPANIC2(ESqlPanicInternalError));
-	if(stmtHandle)	//stmtHandle can be NULL for statements like this: ";".
+	if(err == SQLITE_OK)
 		{
-		if(err == SQLITE_OK)
+		if(stmtHandle)	//stmtHandle can be NULL for statements like this: ";".
 			{
 			while((err = sqlite3_step(stmtHandle)) == SQLITE_ROW)
 				{
@@ -125,8 +125,8 @@
 				err = sqlite3_reset(stmtHandle);
 				__ASSERT_DEBUG(err != SQLITE_OK, __SQLPANIC2(ESqlPanicInternalError));
 				}
+			(void)sqlite3_finalize(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
 			}
-		(void)sqlite3_finalize(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
 		}
 	return err;
 	}
--- a/persistentstorage/sql/TEST/t_sqlapi.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlapi.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -77,6 +77,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -85,7 +86,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -121,7 +122,7 @@
 	if(rc < 0 && SqlRetCodeClass(rc) == ESqlDbError)
 		{
 		TPtrC msg = aDb.LastErrorMessage();
-		RDebug::Print(_L("Execute SQL error - '%S'\r\n"), &msg);
+		TheTest.Printf(_L("Execute SQL error - '%S'\r\n"), &msg);
 		}
 	if(aExpectedError < 0)
 		{
@@ -144,7 +145,7 @@
 	if(rc != KErrNone && SqlRetCodeClass(rc) == ESqlDbError)
 		{
 		TPtrC msg = aDb.LastErrorMessage();
-		RDebug::Print(_L("Execute SQL error - '%S'\r\n"), &msg);
+		TheTest.Printf(_L("Execute SQL error - '%S'\r\n"), &msg);
 		}
 	TEST2(rc, aExpectedError);
 	return stmt;
@@ -156,7 +157,7 @@
 	if(rc < 0 && SqlRetCodeClass(rc) == ESqlDbError)
 		{
 		TPtrC msg = aDb.LastErrorMessage();
-		RDebug::Print(_L("Execute SQL error - '%S'\r\n"), &msg);
+		TheTest.Printf(_L("Execute SQL error - '%S'\r\n"), &msg);
 		}
 	if(aExpectedError < 0)
 		{
@@ -287,7 +288,7 @@
 	fs.FileSystemName(filesysname,(TInt) EDriveC);
     fs.Close();
 
-	RDebug::Print(_L("file system name = %S"), &filesysname);
+    TheTest.Printf(_L("file system name = %S"), &filesysname);
 	TInt maxFileName = KMaxFileName -40;//"-40" because the SQLITE engine creates a journal file if begins
 	                                                 //a transaction. The name of the journal file is 
 	                                                 //"<dbFileName>-journal.<ext>". It is obvious that if the 
--- a/persistentstorage/sql/TEST/t_sqlapi2.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlapi2.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -56,6 +56,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
+		TheTest.Printf(_L("*** Expresssion evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -64,7 +65,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlattach.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlattach.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -81,6 +81,7 @@
 	if(!aValue)
 		{
 		DeleteDatabases();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -89,7 +90,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteDatabases();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlattach2.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlattach2.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -46,7 +46,7 @@
 	{
 	if(!aValue)
 		{
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -54,7 +54,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlauthorizer.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlauthorizer.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -184,7 +184,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -193,7 +193,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -306,7 +306,10 @@
 					
 			RSqlStatement stmt;
 			TInt err = stmt.Prepare(TheDb, TheSql);
-			RDebug::Printf("Testing the following pragma command - %s",TheSql.Ptr());
+			TBuf<100> sqlBuf;
+			sqlBuf.Copy(TheSql);
+			sqlBuf.SetLength(sqlBuf.Length() - 1);//remove the terminating zero.
+			TheTest.Printf(_L("Tested pragma command: %S\r\n"), &sqlBuf);
 			switch (KResultsTable[i][index])
 				{
 				case EOk:
--- a/persistentstorage/sql/TEST/t_sqlbadclient.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlbadclient.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -31,7 +31,7 @@
 #if defined __WINS__ || defined __WINSCW__
 const TInt KTestIterCount = 5000;
 #else
-const TInt KTestIterCount = 4000;
+const TInt KTestIterCount = 2000;
 #endif
 const TInt KMaxDesArgLen = 1000;
 enum TArgType 
@@ -67,6 +67,9 @@
 
 _LIT(KPanicCategory, "SrvTerm");
 _LIT(KPanicCategory2, "InvArg");
+_LIT(KPanicCategory3, "SessConn");
+_LIT(KPanicCategory4, "TcNull");
+_LIT(KPanicCategory5, "ThrDNull");
 const TInt KPanicCode = 1111;
 const TInt KPanicCode2 = 2222;
 
@@ -81,46 +84,26 @@
 ///////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////////
 //Test macros and functions
-void Check1(TInt aValue, TInt aLine, TBool aPrintThreadName = EFalse)
+void Check1(TInt aValue, TInt aLine)
 	{
 	if(!aValue)
 		{
 		DeleteTestFiles();
-		if(aPrintThreadName)
-			{
-			RThread th;
-			TName name = th.Name();
-			RDebug::Print(_L("*** Thread %S, Line %d\r\n"), &name, aLine);
-			}
-		else
-			{
-			RDebug::Print(_L("*** Line %d\r\n"), aLine);
-			}
+		TheTest.Printf(_L("*** Line %d. Expression evaluated to false.\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
-void Check2(TInt aValue, TInt aExpected, TInt aLine, TBool aPrintThreadName = EFalse)
+void Check2(TInt aValue, TInt aExpected, TInt aLine)
 	{
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		if(aPrintThreadName)
-			{
-			RThread th;
-			TName name = th.Name();
-			RDebug::Print(_L("*** Thread %S, Line %d Expected error: %d, got: %d\r\n"), &name, aLine, aExpected, aValue);
-			}
-		else
-			{
-			RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
-			}
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
 #define TEST(arg) ::Check1((arg), __LINE__)
 #define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__)
-#define TTEST(arg) ::Check1((arg), __LINE__, ETrue)
-#define TTEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__, ETrue)
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
@@ -255,14 +238,16 @@
 
 void PrintIterationCount(TInt aIteration)
 	{
-	if((aIteration % 100) == 0)
+	static TInt lastIteration = 0;
+	if((aIteration - lastIteration) >= 100)
 		{
+		lastIteration = aIteration;
 		TTime time;
 		time.HomeTime();
 		TDateTime dt = time.DateTime();
 		TBuf<16> tbuf;
 		tbuf.Format(_L("%02d:%02d:%02d.%06d"), dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond());
-		RDebug::Print(_L("-----[%S] Test iterations: %d\r\n"), &tbuf, aIteration);
+		TheTest.Printf(_L("-----[%S] Test iterations: %d\r\n"), &tbuf, aIteration);
 		}
 	}
 
@@ -277,20 +262,28 @@
 	__UHEAP_MARK;
 	
 	CTrapCleanup* tc = CTrapCleanup::New();
-	TTEST(tc != NULL);
+	if(!tc)
+		{
+		User::Panic(KPanicCategory4, KErrNoMemory);
+		}
 
 	TThreadData* p = static_cast <TThreadData*> (aData);
-	TTEST(p != NULL);
+	if(!p)
+		{
+		User::Panic(KPanicCategory5, KErrArgument);
+		}
 	TThreadData& data = *p;
 
 	TVersion sqlSoftwareVersion(KSqlMajorVer, KSqlMinorVer, KSqlBuildVer);
 	RTestSqlDbSession sess;
 	TInt err = sess.Connect(sqlSoftwareVersion);
-	TTEST2(err, KErrNone);
+	if(err != KErrNone)
+		{
+		User::Panic(KPanicCategory3, err);
+		}
 
 	while(++data.iIteration <= KTestIterCount)
 		{
-		PrintIterationCount(data.iIteration);
 		TIpcArgs args;
 		do
 			{
--- a/persistentstorage/sql/TEST/t_sqlblob.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlblob.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -58,6 +58,7 @@
 	if(!aValue)
 		{
 		DeleteTestDbs();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -66,7 +67,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestDbs();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlbur.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlbur.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -126,6 +126,7 @@
 	if(!aValue)
 		{
 		TestEnvDestroy();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -135,7 +136,7 @@
 	if(aValue != aExpected)
 		{
 		TestEnvDestroy();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlbur2.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlbur2.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -71,7 +71,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Boolean expression evaluated to false.\r\n"));
+		TheTest.Printf(_L("*** Boolean expression evaluated to false.\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -80,7 +80,7 @@
 	if(aValue != aExpected)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Expected error: %d, got: %d.\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d.\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlcmdlineutil.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlcmdlineutil.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -21,7 +21,7 @@
 	aCmdLine.TrimAll();
 	if(aCmdLine.Length() == 0)
 		{
-		aTest.Printf(_L("Usage: %S [ [/enc=<16/8>] /drv=<drive letter>:] [/page=<512/1024/2048/4096/8192/16384/32768>] ] [/cache=<number>] [/hlimit=<Kb>]\r\n"), &aTestName);
+		aTest.Printf(_L("Usage: %S [ [/enc=<16/8>] /drv=<drive letter>:] [/page=<512/1024/2048/4096/8192/16384/32768>] ] [/cache=<number>] [/hlimit=<Kb>] [/logfile=<log file name>]\r\n"), &aTestName);
 		return;
 		}
 	aCmdLine.Append(TChar('/'));
@@ -149,6 +149,10 @@
 				aCmdLineParams.iSoftHeapLimitKb = softHeapLimit;
 				}
 			}
+		else if(aPrmNames[i].CompareF(_L("logfile")) == 0)
+			{
+			aCmdLineParams.iLogFileName.Copy(aPrmValues[i]);
+			}
 		}
 	}
 
@@ -187,6 +191,15 @@
 		{
 		aTest.Printf(_L("--PRM--Soft heap limit: default\r\n"));
 		}
+	
+	if(aCmdLineParams.iLogFileName.Length() > 0)
+		{
+		aTest.Printf(_L("--PRM--Log file name: %S\r\n"), &aCmdLineParams.iLogFileName);
+		}
+	else
+		{
+		aTest.Printf(_L("--PRM--Test output: to screen only\r\n"));
+		}
 	}
 
 #ifdef SQL_SOFT_HEAP_LIMIT_TEST	
@@ -286,7 +299,7 @@
 	aDbName.Copy(dbFilePath);
 	}
 
-void SetSoftHeapLimit(TInt aSoftHeapLimit)
+void SetSoftHeapLimit(RTest& aTest, TInt aSoftHeapLimit)
 	{
 	if(aSoftHeapLimit > 0)
 		{
@@ -295,12 +308,12 @@
 		configBuf.Format(_L("soft_heap_limit_kb=%d"), aSoftHeapLimit);
 		ReplaceConfigFile(configBuf);
 #else
-		RDebug::Print(_L("The soft heap limit cannot be set if \"SQL_SOFT_HEAP_LIMIT_TEST\" macro is not defined!\r\n"));
+		aTest.Printf(_L("The soft heap limit cannot be set if \"SQL_SOFT_HEAP_LIMIT_TEST\" macro is not defined!\r\n"));
 #endif
 		}
 	else if(aSoftHeapLimit < 0)
 		{
-		RDebug::Print(_L("Soft heap limit of %d Kb cannot be set!\r\n"), aSoftHeapLimit);
+		aTest.Printf(_L("Soft heap limit of %d Kb cannot be set!\r\n"), aSoftHeapLimit);
 		}
 	}
 
@@ -311,3 +324,37 @@
 #endif
 	}
 
+void LogConfig(RFile& aLogFile, const TCmdLineParams& aCmdLineParams)
+	{
+	TBuf8<100> buf;
+	if(aCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf8)
+		{
+		buf.Copy(_L8("Database Encoding:UTF8\r\n"));
+		}
+	else
+		{
+		buf.Copy(_L8("Database Encoding:UTF16\r\n"));
+		}
+	(void)aLogFile.Write(buf);
+	
+	buf.Format(_L8("Database page size:%d\r\n"), aCmdLineParams.iPageSize);
+	(void)aLogFile.Write(buf);
+	
+	buf.Format(_L8("Database cache size:%d\r\n"), aCmdLineParams.iCacheSize);
+	(void)aLogFile.Write(buf);
+	
+	buf.Format(_L8("Database drive:%S\r\n"), &aCmdLineParams.iDriveName);
+	(void)aLogFile.Write(buf);
+
+	if(aCmdLineParams.iSoftHeapLimitKb > 0)
+		{
+		buf.Format(_L8("Soft heap limit:%d Kb\r\n"), aCmdLineParams.iSoftHeapLimitKb);
+		}
+	else
+		{
+		buf.Format(_L8("Soft heap limit: default\r\n"));
+		}
+	(void)aLogFile.Write(buf);
+	buf.Format(_L8("\r\n\r\n"));
+	(void)aLogFile.Write(buf);
+	}
--- a/persistentstorage/sql/TEST/t_sqlcmdlineutil.h	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlcmdlineutil.h	Tue Oct 19 16:26:13 2010 +0100
@@ -45,6 +45,7 @@
 		iCacheSize = iDefaultCacheSize;
 		iDriveName.Copy(_L("c:"));
 		iSoftHeapLimitKb = 0;
+		iLogFileName.Zero();
 		}
 	
 	const TDbEncoding	iDefaultEncoding;
@@ -56,11 +57,13 @@
 	TInt 		iCacheSize;
 	TDriveName	iDriveName;
 	TInt		iSoftHeapLimitKb;
+	TFileName	iLogFileName;
 	};
 
 void GetCmdLineParamsAndSqlConfigString(RTest& aTest, const TDesC& aTestName, TCmdLineParams& aCmdLineParams, TDes8& aConfigStr);
 void PrepareDbName(const TDesC& aDeafultDbName, const TDriveName& aDriveName, TDes& aDbName);
-void SetSoftHeapLimit(TInt aSoftHeapLimit);
+void SetSoftHeapLimit(RTest& aTest, TInt aSoftHeapLimit);
 void ResetSoftHeapLimit();
+void LogConfig(RFile& aLogFile, const TCmdLineParams& aCmdLineParams);
 
 #endif//T_SQLCMDLINEUTIL_H
--- a/persistentstorage/sql/TEST/t_sqlcollate.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlcollate.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -39,6 +39,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -47,7 +48,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -103,14 +104,14 @@
 	TEST2(err, KErrNone);
 
 	//Create test database
-	RDebug::Print(_L("###Create test database\r\n"));
+	TheTest.Printf(_L("###Create test database\r\n"));
 	_LIT(KCreateSql, "CREATE TABLE A(Name VARCHAR(100) COLLATE CompareF); CREATE INDEX AIdx ON A(Name COLLATE CompareF);");
 	err = db.Exec(KCreateSql);
 	TEST(err >= 0);
 
 	//Insert some records. The column "Name" of each record contains the same name but the name characters are
 	//variation of upper/lower case letters.
-	RDebug::Print(_L("###Insert some records\r\n"));
+	TheTest.Printf(_L("###Insert some records\r\n"));
 	_LIT(KInsertSql, "INSERT INTO A(Name) VALUES(");
 	//Collation sort order:    KNames[1] KNames[3] KNames[0] KNames[2]
 	//Long "aaaa..." added to the end of each column value because SQLITE may use non-aligned strings
@@ -138,7 +139,7 @@
 		}
 	
 	//The next "SELECT" statement must return a set containing all table records
-	RDebug::Print(_L("###Select all records\r\n"));
+	TheTest.Printf(_L("###Select all records\r\n"));
 	_LIT(KSelectSql1, "SELECT * FROM A WHERE NAME = 'alex-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'");
 	RSqlStatement stmt;
 	err = stmt.Prepare(db, KSelectSql1);
@@ -148,14 +149,14 @@
 		{
 		++recCount;
 		TPtrC name = stmt.ColumnTextL(0);
-		RDebug::Print(_L("%S\r\n"), &name);
+		TheTest.Printf(_L("%S\r\n"), &name);
 		}
 	stmt.Close();
 	TEST(recCount == KInsertSqlStmtCnt);
 
 	//The next "SELECT" statement must return a set containing all table records
 	// this tests a LIKE clause with a bound parameter (with wildcards)	
-	RDebug::Print(_L("###Select all records (LIKE with wildcard)\r\n"));
+	TheTest.Printf(_L("###Select all records (LIKE with wildcard)\r\n"));
 	_LIT(KSelectSql1a, "SELECT * FROM A WHERE NAME LIKE :Val");
 	_LIT(KSearchString,"alex-aaaa%");
 	err = stmt.Prepare(db, KSelectSql1a);
@@ -168,14 +169,14 @@
 		{
 		++recCount;
 		TPtrC name = stmt.ColumnTextL(0);
-		RDebug::Print(_L("%S\r\n"), &name);
+		TheTest.Printf(_L("%S\r\n"), &name);
 		}
 	stmt.Close();
 	TEST(recCount == KInsertSqlStmtCnt);
 
 	//The next "SELECT" statement must return a set containing all table records
 	// this tests a LIKE clause with a bound parameter (with no wildcards)
-	RDebug::Print(_L("###Select all records (LIKE with no wildcard)\r\n"));
+	TheTest.Printf(_L("###Select all records (LIKE with no wildcard)\r\n"));
 	_LIT(KSelectSql1b, "SELECT * FROM A WHERE NAME LIKE :Val");
 	_LIT(KSearchStringA,
 "alex-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
@@ -188,14 +189,14 @@
 		{
 		++recCount;
 		TPtrC name = stmt.ColumnTextL(0);
-		RDebug::Print(_L("%S\r\n"), &name);
+		TheTest.Printf(_L("%S\r\n"), &name);
 		}
 	stmt.Close();
 	TEST(recCount == KInsertSqlStmtCnt);
 
 	//The next "SELECT" statement must return a row 
 	// this tests a LIKE clause with a bound parameter and funny characters
-	RDebug::Print(_L("###Select one records (LIKE with bound param with URL chars)\r\n"));
+	TheTest.Printf(_L("###Select one records (LIKE with bound param with URL chars)\r\n"));
 	err=db.Exec(_L("INSERT INTO A(Name) VALUES('http://a.b.c#d')"));
 	TEST2(err,1);
 	_LIT(KSelectSql1c, "SELECT * FROM A WHERE NAME LIKE :Val");
@@ -209,14 +210,14 @@
 		{
 		++recCount;
 		TPtrC name = stmt.ColumnTextL(0);
-		RDebug::Print(_L("%S\r\n"), &name);
+		TheTest.Printf(_L("%S\r\n"), &name);
 		}
 	stmt.Close();
 	TEST(recCount == 1);
 
 	
 	//The next "SELECT" statement must return a set containing all table records, folded comparison used for sorting
-	RDebug::Print(_L("###Select all records, folded string comparison\r\n"));
+	TheTest.Printf(_L("###Select all records, folded string comparison\r\n"));
 	_LIT(KSelectSql2, "SELECT * FROM A WHERE NAME = 'alex-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ORDER BY NAME COLLATE CompareF");
 	err = stmt.Prepare(db, KSelectSql2);
 	TEST2(err, KErrNone);
@@ -228,14 +229,14 @@
 		TEST2(err, KSqlAtRow);
 		++recCount;
 		TPtrC name = stmt.ColumnTextL(0);
-		RDebug::Print(_L("%S\r\n"), &name);
+		TheTest.Printf(_L("%S\r\n"), &name);
 		TEST(name == KNames[j]);
 		}
 	stmt.Close();
 	TEST(recCount == KInsertSqlStmtCnt);
 
 	//The next "SELECT" statement must return a set containing all table records, collated comparison used for sorting
-	RDebug::Print(_L("###Select all records, collated string comparison\r\n"));
+	TheTest.Printf(_L("###Select all records, collated string comparison\r\n"));
 	_LIT(KSelectSql3, "SELECT * FROM A ORDER BY NAME COLLATE CompareC3");
 	err = stmt.Prepare(db, KSelectSql3);
 	TEST2(err, KErrNone);
@@ -245,7 +246,7 @@
 		err = stmt.Next();
 		TEST2(err, KSqlAtRow);
 		TPtrC name = stmt.ColumnTextL(0);
-		RDebug::Print(_L("%S\r\n"), &name);
+		TheTest.Printf(_L("%S\r\n"), &name);
 		TEST(name == sortedNames[k]);
 		}
 		
@@ -260,7 +261,7 @@
 	TEST2(err, KErrNone);
 	db.Close();
 	
-	RDebug::Print(_L("###Delete test database\r\n"));
+	TheTest.Printf(_L("###Delete test database\r\n"));
 	(void)RSqlDatabase::Delete(KTestDbName1);
 	}
 
@@ -281,13 +282,13 @@
 	TEST2(err, KErrNone);
 
 	//Create test database
-	RDebug::Print(_L("###Create test database\r\n"));
+	TheTest.Printf(_L("###Create test database\r\n"));
 	_LIT(KCreateSql, "CREATE TABLE A(Name VARCHAR(100) COLLATE CompareC3)");
 	err = db.Exec(KCreateSql);
 	TEST(err >= 0);
 
 	//Insert some records.
-	RDebug::Print(_L("###Insert some records\r\n"));
+	TheTest.Printf(_L("###Insert some records\r\n"));
 	_LIT(KInsertSql, "INSERT INTO A(Name) VALUES(");
 	TPtrC KNames[] = {
 		_L("aAaA"), 
@@ -310,7 +311,7 @@
 	
 	//The next "SELECT" statement must return a set containing all table 
 	//records which Name column value is bigger than "aaAA"
-	RDebug::Print(_L("###Select all records, which Name column value is bigger than 'aaAA'\r\n"));
+	TheTest.Printf(_L("###Select all records, which Name column value is bigger than 'aaAA'\r\n"));
 	_LIT(KSelectSql2, "SELECT * FROM A WHERE NAME > 'aaAA'");
 	err = stmt.Prepare(db, KSelectSql2);
 	TEST2(err, KErrNone);
@@ -318,7 +319,7 @@
 	while((err = stmt.Next()) == KSqlAtRow)
 		{
 		TPtrC name = stmt.ColumnTextL(0);
-		RDebug::Print(_L("%S\r\n"), &name);
+		TheTest.Printf(_L("%S\r\n"), &name);
 		TInt res = name.CompareC(KNames[2], 3, NULL); 
 		TEST(res > 0);
 		}
@@ -327,7 +328,7 @@
 
 	//Cleanup	
 	db.Close();
-	RDebug::Print(_L("###Delete test database\r\n"));
+	TheTest.Printf(_L("###Delete test database\r\n"));
 	(void)RSqlDatabase::Delete(KTestDbName1);
 	}
 
@@ -350,14 +351,14 @@
 	TEST2(err, KErrNone);
 
 	//Create test database
-	RDebug::Print(_L("###Create test database\r\n"));
+	TheTest.Printf(_L("###Create test database\r\n"));
 	_LIT(KCreateSql, "CREATE TABLE A(Name VARCHAR(100) COLLATE CompareC0)");
 	err = db.Exec(KCreateSql);
 	TEST(err >= 0);
 
 	//Insert some records. Some of the inserted names have accented letters.
 	//But all names are equal if compared at collation level 0.
-	RDebug::Print(_L("###Insert some records\r\n"));
+	TheTest.Printf(_L("###Insert some records\r\n"));
 	_LIT(KInsertSql, "INSERT INTO A(Name) VALUES(");
 	TBuf<10> name1(_L("Dvorak"));
 	TBuf<10> name2;
@@ -395,7 +396,7 @@
 		}
 
 	//The next "SELECT" statement must return a set, which record count must be matchNameCnt.
-	RDebug::Print(_L("###Select all records, collated string comparison, level 0\r\n"));
+	TheTest.Printf(_L("###Select all records, collated string comparison, level 0\r\n"));
 	_LIT(KSelectSql2, "SELECT * FROM A WHERE NAME = 'dvorak'");
 	RSqlStatement stmt;
 	err = stmt.Prepare(db, KSelectSql2);
@@ -405,7 +406,7 @@
 	while((err = stmt.Next()) == KSqlAtRow)
 		{
 		TPtrC name = stmt.ColumnTextL(0);
-		RDebug::Print(_L("%S\r\n"), &name);
+		TheTest.Printf(_L("%S\r\n"), &name);
 		TEST(name == KNames[recCount]);
 		++recCount;
 		}
@@ -413,7 +414,7 @@
 	TEST(recCount == matchNameCnt);
 
 	//The next "SELECT" statement must return an ordered set containing all table records.
-	RDebug::Print(_L("###Select all records, collated string comparison, level 1\r\n"));
+	TheTest.Printf(_L("###Select all records, collated string comparison, level 1\r\n"));
 	_LIT(KSelectSql3, "SELECT * FROM A WHERE NAME = 'dvorak' ORDER BY NAME COLLATE CompareC1 DESC");
 	err = stmt.Prepare(db, KSelectSql3);
 	TEST2(err, KErrNone);
@@ -423,7 +424,7 @@
 		err = stmt.Next();
 		TEST2(err, KSqlAtRow);
 		TPtrC name = stmt.ColumnTextL(0);
-		RDebug::Print(_L("%S %S\r\n"), &name, &sortedNames[k]);
+		TheTest.Printf(_L("%S %S\r\n"), &name, &sortedNames[k]);
 		TEST(name == sortedNames[KInsertSqlStmtCnt - k - 1]);//descending order
 		}
 	stmt.Close();
@@ -442,7 +443,7 @@
 	//Cleanup	
 	sortedNames.Close();
 	db.Close();
-	RDebug::Print(_L("###Delete test database\r\n"));
+	TheTest.Printf(_L("###Delete test database\r\n"));
 	(void)RSqlDatabase::Delete(KTestDbName1);
 	}
 
@@ -513,7 +514,7 @@
 	TEST(err != KErrNone);
 	TEST2(::SqlRetCodeClass(err), ESqlDbError);
 	TPtrC errMsg = db.LastErrorMessage();
-	RDebug::Print(_L("!! error=\"%S\"\r\n"), &errMsg);
+	TheTest.Printf(_L("!! error=\"%S\"\r\n"), &errMsg);
 	stmt.Close();
 	//Test case 6 = wild card character used in the search pattern + LIKE + ESCAPE with more than one escape characters
 	err = stmt.Prepare(db, _L("SELECT COUNT(*) FROM A WHERE Name LIKE 't/_sqltest' ESCAPE '1234'"));
@@ -522,7 +523,7 @@
 	TEST(err != KErrNone);
 	TEST2(::SqlRetCodeClass(err), ESqlDbError);
 	errMsg.Set(db.LastErrorMessage());
-	RDebug::Print(_L("!! error=\"%S\"\r\n"), &errMsg);
+	TheTest.Printf(_L("!! error=\"%S\"\r\n"), &errMsg);
 	stmt.Close();
 	//Test case 7 = blank pattern string
 	err = stmt.Prepare(db, _L("SELECT COUNT(*) FROM A WHERE Name LIKE ''"));
@@ -535,7 +536,7 @@
 	
 	//Cleanup	
 	db.Close();
-	RDebug::Print(_L("###Delete test database\r\n"));
+	TheTest.Printf(_L("###Delete test database\r\n"));
 	(void)RSqlDatabase::Delete(KTestDbName1);
 	}
 
@@ -769,7 +770,7 @@
 	stmt.Close();
 	//Cleanup	
 	db.Close();
-	RDebug::Print(_L("###Delete test database\r\n"));
+	TheTest.Printf(_L("###Delete test database\r\n"));
 	(void)RSqlDatabase::Delete(KTestDbName1);
 	}
 
--- a/persistentstorage/sql/TEST/t_sqlcompact1.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlcompact1.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -59,7 +59,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Test failure. Boolean expression evaluates to false.\r\n"));
+		TheTest.Printf(_L("*** Test failure. Expression evaluated to false.\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -68,7 +68,7 @@
 	if(aValue != aExpected)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlcompact2.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlcompact2.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -81,6 +81,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -89,7 +90,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlcompact3.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlcompact3.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -69,6 +69,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -77,7 +78,7 @@
 	if(aValue != aExpected)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlcompact4.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlcompact4.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -93,7 +93,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Test failure. Boolean expression evaluates to false.\r\n"));
+		TheTest.Printf(_L("*** Test failure. Boolean expression evaluates to false.\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -102,7 +102,7 @@
 	if(aValue != aExpected)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlconfig.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlconfig.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -60,6 +60,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -68,7 +69,7 @@
 	if(aValue != aExpected)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlconfigfile.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlconfigfile.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -51,7 +51,6 @@
 TInt KillProcess(const TDesC& aProcessName)
 	{
 	TFullName name;
-	//RDebug::Print(_L("Find and kill \"%S\" process.\n"), &aProcessName);
 	TBuf<64> pattern(aProcessName);
 	TInt length = pattern.Length();
 	pattern += _L("*");
@@ -68,7 +67,6 @@
 				{
 				// If the found name is other valid application name
 				// starting with aProcessName string.
-				//RDebug::Print(_L(":: Process name: \"%S\".\n"), &name);
 				continue;
 				}
 			}
@@ -76,7 +74,6 @@
 		if (proc.Open(name) == KErrNone)
 			{
 			proc.Kill(0);
-			//RDebug::Print(_L("\"%S\" process killed.\n"), &name);
 			}
 		proc.Close();
 		}
@@ -100,6 +97,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -108,7 +106,7 @@
 	if(aValue != aExpected)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlcorrupt.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlcorrupt.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -22,6 +22,14 @@
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
+//In order to be able to compile the test, the following variables are defined (used inside the OS porting layer, when _SQLPROFILER macro is defined)
+#ifdef _SQLPROFILER
+TInt TheSqlSrvProfilerFileRead = 0;
+TInt TheSqlSrvProfilerFileWrite = 0;
+TInt TheSqlSrvProfilerFileSync = 0;
+TInt TheSqlSrvProfilerFileSetSize = 0;
+#endif
+
 RSqlDatabase TheDb;
 RTest TheTest(_L("t_sqlcorrupt test"));
 
@@ -52,7 +60,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Boolean expression evaluated to false. Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Expression evaluated to false. Line %d\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -61,7 +69,7 @@
 	if(aValue != aExpected)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -442,7 +450,7 @@
 TInt E32Main()
 	{
 	TheTest.Title();
-	
+
 	CTrapCleanup* tc = CTrapCleanup::New();
 	TheTest(tc != NULL);
 	
--- a/persistentstorage/sql/TEST/t_sqldb64.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqldb64.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -61,6 +61,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -69,7 +70,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqldbconfigfile.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqldbconfigfile.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -104,7 +104,6 @@
 	{
 	_LIT(KSqlSrvName, "sqlsrv.exe");
 	TFullName name;
-	//RDebug::Print(_L("Find and kill \"%S\" process.\n"), &aProcessName);
 	TBuf<64> pattern(KSqlSrvName);
 	TInt length = pattern.Length();
 	pattern += _L("*");
@@ -121,7 +120,6 @@
 				{
 				// If the found name is other valid application name
 				// starting with aProcessName string.
-				//RDebug::Print(_L(":: Process name: \"%S\".\n"), &name);
 				continue;
 				}
 			}
@@ -129,7 +127,6 @@
 		if (proc.Open(name) == KErrNone)
 			{
 			proc.Kill(0);
-			//RDebug::Print(_L("\"%S\" process killed.\n"), &name);
 			}
 		proc.Close();
 		}
--- a/persistentstorage/sql/TEST/t_sqldefect.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqldefect.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -69,7 +69,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -78,7 +78,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -144,7 +144,7 @@
 	err = TheDb.Detach(_L("Db2"));
 	TEST(err != KErrNone);
 	TPtrC errMsg = TheDb.LastErrorMessage();
-	RDebug::Print(_L("Detach err: %S\r\n"), &errMsg);
+	TheTest.Printf(_L("Detach err: %S\r\n"), &errMsg);
 
 	err = stmt.Next();
 	TEST2(err, KSqlAtRow);
@@ -1059,7 +1059,7 @@
 	err = stmt.Prepare(TheDb, _L("DELETE FROM A WHERE Id1 IN (SELECT Id1 FROM B WHERE Id IN (1,11) UNION SELECT * FROM B WHERE Id1=2 ORDER BY Id ASC LIMIT 1)"));
 	TEST(err != KErrDied);
 	TPtrC errDescr = TheDb.LastErrorMessage();
-	RDebug::Print(_L("\"Stmt prepare\" %d error. Message:\"%S\"\r\n"), err, &errDescr);
+	TheTest.Printf(_L("\"Stmt prepare\" %d error. Message:\"%S\"\r\n"), err, &errDescr);
 	stmt.Close();
 	
 	TheDb.Close();
@@ -1559,7 +1559,7 @@
     //Test "library routine called out of sequence" error message 
     //If the defect is not fixed then it will panic here   
     TPtrC errMsg = db.LastErrorMessage();
-    RDebug::Print(_L("errMsg=%S\r\n"), &errMsg);
+    TheTest.Printf(_L("errMsg=%S\r\n"), &errMsg);
 
     stmt.Close();
     db.Close();
@@ -1579,7 +1579,7 @@
         TheTest.Printf(_L("%d    \r"), allocationNo);
         //Test "out of memory" error message, if the defect is not fixed then it will panic here   
         TPtrC errMsg = db.LastErrorMessage();
-        RDebug::Print(_L("errMsg=%S\r\n"), &errMsg);
+        TheTest.Printf(_L("errMsg=%S\r\n"), &errMsg);
         db.Close();
         }
     while (err == KErrNoMemory);
--- a/persistentstorage/sql/TEST/t_sqldefect2.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqldefect2.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -48,7 +48,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -57,7 +57,7 @@
 	if(aValue != aExpected)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlenvcreate.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlenvcreate.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -68,7 +68,7 @@
 	{
 	if(!aValue)
 		{
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d. Expresssion evaluated to false\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -76,7 +76,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlenvdestroy.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlenvdestroy.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -47,7 +47,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlfilebuf64.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlfilebuf64.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -80,7 +80,7 @@
 	if(!aValue)
 		{
 		TestEnvDestroy();
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -89,7 +89,7 @@
 	if(aValue != aExpected)
 		{
 		TestEnvDestroy();
-		RDebug::Print(_L("*** Line %d, Expected result: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected result: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlfilesrvcrash1.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlfilesrvcrash1.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -59,7 +59,7 @@
     if(!aValue)
         {
         DeleteTestFiles();
-        RDebug::Print(_L("*** Line %d\r\n"), aLine);
+        TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
         TheTest(EFalse, aLine);
         }
     }
@@ -68,7 +68,7 @@
     if(aValue != aExpected)
         {
         DeleteTestFiles();
-        RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+        TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
         TheTest(EFalse, aLine);
         }
     }
@@ -124,7 +124,6 @@
 TInt KillProcess(const TDesC& aProcessName)
     {
     TFullName name;
-    //RDebug::Print(_L("Find and kill \"%S\" process.\n"), &aProcessName);
     TBuf<64> pattern(aProcessName);
     TInt length = pattern.Length();
     pattern += _L("*");
@@ -139,16 +138,13 @@
                 c == TChar('_') ||
                 c == TChar('-'))
                 {
-                //RDebug::Print(_L(":: Process name: \"%S\".\n"), &name);
                 continue;
                 }
             }
         RProcess proc;
         if (proc.Open(name) == KErrNone)
             {
-            RDebug::Print(_L("About to kill process \"%S\", This will force a reboot\n"), &name);
             proc.Kill(0);
-            
             }
         proc.Close();
         }
--- a/persistentstorage/sql/TEST/t_sqlfilesrvcrash2.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlfilesrvcrash2.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -50,7 +50,7 @@
     {
     if(!aValue)
         {
-        RDebug::Print(_L("*** Line %d\r\n"), aLine);
+    	TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
         TheTest(EFalse, aLine);
         }
     }
@@ -58,7 +58,7 @@
     {
     if(aValue != aExpected)
         {
-        RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+    	TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
         TheTest(EFalse, aLine);
         }
     }
--- a/persistentstorage/sql/TEST/t_sqlfserr.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlfserr.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -75,6 +75,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -83,7 +84,7 @@
 	if(aValue != aExpected)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -94,14 +95,14 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** SQLITE: Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** SQLITE: Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		if(aDbHandle)
 			{
 			const char* errMsg = sqlite3_errmsg(aDbHandle);
 			TPtrC8 ptr8((const TUint8*)errMsg, strlen(errMsg));
 			TBuf<200> buf;
 			buf.Copy(ptr8);
-			RDebug::Print(_L("*** SQLITE error message: \"%S\"\r\n"), &buf);
+			TheTest.Printf(_L("*** SQLITE error message: \"%S\"\r\n"), &buf);
 			}
 		DestroyTestEnv();
 		TheTest(EFalse, aLine);
--- a/persistentstorage/sql/TEST/t_sqlgetfirststmt.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlgetfirststmt.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -53,7 +53,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -62,7 +62,7 @@
 	if(aValue != aExpected)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlite.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlite.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -105,6 +105,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
+		TheTest.Printf(_L("*** Expresssion evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -113,7 +114,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -137,19 +138,19 @@
 
 static void PrintConfig(const TDesC& aDbFilePath)
 	{
-	RDebug::Print(_L("================= Configuration ================\r\n"));	
-	RDebug::Print(_L("Cache page size %dK, pages %d, total %dK\r\n"), SQLITE_DEFAULT_PAGE_SIZE/1024, SQLITE_DEFAULT_CACHE_SIZE, SQLITE_DEFAULT_PAGE_SIZE * SQLITE_DEFAULT_CACHE_SIZE/1024);	
-	RDebug::Print(_L("Temp cache page size %dK, pages %d, total %dK\r\n"), SQLITE_DEFAULT_PAGE_SIZE/1024, SQLITE_DEFAULT_TEMP_CACHE_SIZE, SQLITE_DEFAULT_PAGE_SIZE * SQLITE_DEFAULT_TEMP_CACHE_SIZE/1024);	
+	TheTest.Printf(_L("================= Configuration ================\r\n"));	
+	TheTest.Printf(_L("Cache page size %dK, pages %d, total %dK\r\n"), SQLITE_DEFAULT_PAGE_SIZE/1024, SQLITE_DEFAULT_CACHE_SIZE, SQLITE_DEFAULT_PAGE_SIZE * SQLITE_DEFAULT_CACHE_SIZE/1024);	
+	TheTest.Printf(_L("Temp cache page size %dK, pages %d, total %dK\r\n"), SQLITE_DEFAULT_PAGE_SIZE/1024, SQLITE_DEFAULT_TEMP_CACHE_SIZE, SQLITE_DEFAULT_PAGE_SIZE * SQLITE_DEFAULT_TEMP_CACHE_SIZE/1024);	
 	_LIT(K1, "On");
 	_LIT(K2, "Off");
-	RDebug::Print(_L("Autovacuum: %S\r\n"), SQLITE_DEFAULT_AUTOVACUUM ? &K1 : &K2);	
+	TheTest.Printf(_L("Autovacuum: %S\r\n"), SQLITE_DEFAULT_AUTOVACUUM ? &K1 : &K2);	
 	#ifdef SQLITE_DEBUG
-		RDebug::Print(_L("Debug: On\r\n"));	
+	TheTest.Printf(_L("Debug: On\r\n"));	
 	#else
-		RDebug::Print(_L("Debug: Off\r\n"));	
+	TheTest.Printf(_L("Debug: Off\r\n"));	
 	#endif
-	RDebug::Print(_L("Db file: %S\r\n"), &aDbFilePath);
-	RDebug::Print(_L("================================================\r\n"));	
+	TheTest.Printf(_L("Db file: %S\r\n"), &aDbFilePath);
+	TheTest.Printf(_L("================================================\r\n"));	
 	}
 	
 ///////////////////////////////////////////////////////////////////////////////////////
@@ -165,9 +166,9 @@
 		TheBuf2.Append(_L(" = "));
 		TheBuf1.Copy(colVal);
 		TheBuf2.Append(TheBuf1);
-    	RDebug::Print(_L("%S\r\n"), &TheBuf2);
+		TheTest.Printf(_L("%S\r\n"), &TheBuf2);
 		}
-  	RDebug::Print(_L("\n"));
+	TheTest.Printf(_L("\r\n"));
   	return 0;
 	}
 
@@ -213,7 +214,7 @@
   	if(rc)
   		{
   		TPtrC p = ConvertToUtf16(sqlite3_errmsg(TheDb1));
-  		RDebug::Print(_L("Can't open database, err %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("Can't open database, err %d, msg: %S\r\n"), rc, &p);
     	TEST(0);
   		}
 
@@ -221,7 +222,7 @@
   	if(rc)
   		{
   		TPtrC p = ConvertToUtf16(sqlite3_errmsg(TheDb1));
-  		RDebug::Print(_L("Can't create collation, err %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("Can't create collation, err %d, msg: %S\r\n"), rc, &p);
     	TEST(0);
   		}
 
@@ -229,7 +230,7 @@
   	if(rc)
   		{
   		TPtrC p = ConvertToUtf16(sqlite3_errmsg(TheDb1));
-  		RDebug::Print(_L("Can't create collation, err %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("Can't create collation, err %d, msg: %S\r\n"), rc, &p);
     	TEST(0);
   		}
 
@@ -237,7 +238,7 @@
   	if(rc)
   		{
   		TPtrC p = ConvertToUtf16(sqlite3_errmsg(TheDb1));
-  		RDebug::Print(_L("Can't create UDF, err %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("Can't create UDF, err %d, msg: %S\r\n"), rc, &p);
     	TEST(0);
   		}
 
@@ -272,7 +273,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
     	TEST(0);
 		}
@@ -298,7 +299,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
     	TEST(0);
 		}
@@ -307,7 +308,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
     	TEST(0);
 		}
@@ -320,7 +321,7 @@
 		if(rc != SQLITE_OK)
 			{
 	  		TPtrC p = ConvertToUtf16(zErrMsg);
-	  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+	  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
 	    	sqlite3_free(zErrMsg);
     		TEST(0);
 			}
@@ -331,7 +332,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -341,7 +342,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -353,7 +354,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -362,7 +363,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -371,7 +372,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -380,7 +381,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -389,7 +390,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -398,7 +399,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -419,7 +420,7 @@
   	if(rc != SQLITE_OK)
   		{
   		TPtrC p = ConvertToUtf16(sqlite3_errmsg(TheDb1));
-  		RDebug::Print(_L("Can't open database, err %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("Can't open database, err %d, msg: %S\r\n"), rc, &p);
     	TEST(0);
   		}
   		
@@ -427,7 +428,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -440,7 +441,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -449,7 +450,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -462,7 +463,7 @@
 		if(rc != SQLITE_OK)
 			{
 	  		TPtrC p = ConvertToUtf16(zErrMsg);
-	  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+	  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
 	    	sqlite3_free(zErrMsg);
 	   		TEST(0);
 			}
@@ -472,7 +473,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -481,7 +482,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -490,7 +491,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -499,7 +500,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -508,7 +509,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -517,7 +518,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\r\n"), rc, &p);
     	sqlite3_free(zErrMsg);
    		TEST(0);
 		}
@@ -539,7 +540,7 @@
   	if(rc != SQLITE_OK)
   		{
   		TPtrC p = ConvertToUtf16(sqlite3_errmsg(TheDb1));
-  		RDebug::Print(_L("Can't open database, err %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("Can't open database, err %d, msg: %S\r\n"), rc, &p);
     	TEST(0);
   		}
 	
@@ -555,7 +556,7 @@
 		{
 		const void* errMsgZ = sqlite3_errmsg16(TheDb1);
 		TPtrC msg(reinterpret_cast <const TText16*> (errMsgZ), wcslen(reinterpret_cast <const wchar_t*> (errMsgZ)));
-		RDebug::Print(_L("'sqlite3_prepare16_v2()' failed, err %d, error msg: \"%S\"\r\n"), rc, &msg);
+		TheTest.Printf(_L("'sqlite3_prepare16_v2()' failed, err %d, error msg: \"%S\"\r\n"), rc, &msg);
     	TEST(0);
 		}
 	rc = sqlite3_step(stmtHandle);
@@ -571,7 +572,7 @@
 		{
 		const void* errMsgZ = sqlite3_errmsg16(TheDb1);
 		TPtrC msg(reinterpret_cast <const TText16*> (errMsgZ), wcslen(reinterpret_cast <const wchar_t*> (errMsgZ)));
-		RDebug::Print(_L("'sqlite3_prepare16_v2()' failed, err %d, error msg: \"%S\"\r\n"), rc, &msg);
+		TheTest.Printf(_L("'sqlite3_prepare16_v2()' failed, err %d, error msg: \"%S\"\r\n"), rc, &msg);
     	TEST(0);
 		}
 
@@ -698,7 +699,7 @@
 	TInt size = 0;
 	TEST2(file.Size(size), KErrNone);
 	file.Close();
-	RDebug::Print(_L("File \"%S\", size: %d\r\n"), &aPath, size);
+	TheTest.Printf(_L("File \"%S\", size: %d\r\n"), &aPath, size);
 	}
 
 //Executes 8-bit SQL statement	
@@ -715,14 +716,14 @@
 		{
 		TPtrC8 ptr8((const TUint8*)errMsg, strlen(errMsg));
 		TheBuf1.Copy(ptr8);
-		RDebug::Print(_L("'sqlite3_exec()' failed, err %d, error msg: \"%S\"\t\n"), rc, &TheBuf1);
+		TheTest.Printf(_L("'sqlite3_exec()' failed, err %d, error msg: \"%S\"\t\n"), rc, &TheBuf1);
 		TEST(0);
 		}
 	TTime t2;
 	t2.UniversalTime();
 	TTimeIntervalMicroSeconds diffTime = t2.MicroSecondsFrom(t1); 
 	diffTime = diffTime.Int64() / 1000;
-	RDebug::Print(_L("%S, time: %d ms\r\n"), &aMsg, (TInt)diffTime.Int64());
+	TheTest.Printf(_L("%S, time: %d ms\r\n"), &aMsg, (TInt)diffTime.Int64());
 	}
 
 //This function searches aString argument for ';' occurences.
@@ -796,7 +797,7 @@
 			{
 			const void* errMsgZ = sqlite3_errmsg16(aDbHandle);
 			TPtrC msg(reinterpret_cast <const TText16*> (errMsgZ), wcslen(reinterpret_cast <const wchar_t*> (errMsgZ)));
-			RDebug::Print(_L("'sqlite3_exec16()' failed, err %d, error msg: \"%S\"\t\n"), err, &msg);
+			TheTest.Printf(_L("'sqlite3_exec16()' failed, err %d, error msg: \"%S\"\t\n"), err, &msg);
 			TEST(0);
 			}
 		}
@@ -804,7 +805,7 @@
 	t2.UniversalTime();
 	TTimeIntervalMicroSeconds diffTime = t2.MicroSecondsFrom(t1); 
 	diffTime = diffTime.Int64() / 1000;
-	RDebug::Print(_L("%S, time: %d ms\r\n"), &aMsg, (TInt)diffTime.Int64());
+	TheTest.Printf(_L("%S, time: %d ms\r\n"), &aMsg, (TInt)diffTime.Int64());
 	}
 
 //////////////////////////////////////////////////////////////////////////////////////////////////
@@ -962,71 +963,71 @@
 	TBuf<KMaxFileName + 1> fname;
 	fname.Copy(aDbFilePath);
 	//Open database
-	RDebug::Print(_L("Open database\r\n"));
+	TheTest.Printf(_L("Open database\r\n"));
 	sqlite3 *dbHandle = NULL;
 	TInt rc = sqlite3_open16(fname.PtrZ(), &dbHandle);//!!!!16-bit encoding!!!!!
 	if(rc != SQLITE_OK)
 		{
 		const void* errMsgZ = sqlite3_errmsg16(dbHandle);
 		TPtrC msg(reinterpret_cast <const TText16*> (errMsgZ), wcslen(reinterpret_cast <const wchar_t*> (errMsgZ)));
-		RDebug::Print(_L("'sqlite3_open()' failed, file %S, err %d, error msg: \"%S\"\t\n"), &aDbFilePath, rc, &msg);
+		TheTest.Printf(_L("'sqlite3_open()' failed, file %S, err %d, error msg: \"%S\"\t\n"), &aDbFilePath, rc, &msg);
 		TEST(0);
 		}
 	TEST(dbHandle != NULL);
 	//Create "CompareF" collation	
-	RDebug::Print(_L("Create \"CompareF\" collation\r\n"));
+	TheTest.Printf(_L("Create \"CompareF\" collation\r\n"));
 	_LIT(KCmpF, "CmpF16\x0");
 	rc = sqlite3_create_collation16(dbHandle, (const char*)(KCmpF().Ptr()), SQLITE_UTF16 | SQLITE_UTF16_ALIGNED, NULL, &CmpF16);
   	if(rc)
   		{
 		const void* errMsgZ = sqlite3_errmsg16(dbHandle);
 		TPtrC msg(reinterpret_cast <const TText16*> (errMsgZ), wcslen(reinterpret_cast <const wchar_t*> (errMsgZ)));
-		RDebug::Print(_L("Err=%S\r\n"), &msg);
+		TheTest.Printf(_L("Err=%S\r\n"), &msg);
 		TEST(0);
   		}
 	//Create "CompareC" collation	
-	RDebug::Print(_L("Create \"CompareC\" collation\r\n"));
+  	TheTest.Printf(_L("Create \"CompareC\" collation\r\n"));
 	_LIT(KCmpC, "CmpC16\x0");
 	rc = sqlite3_create_collation16(dbHandle, (const char*)(KCmpC().Ptr()), SQLITE_UTF16 | SQLITE_UTF16_ALIGNED, NULL, &CmpC16);
   	if(rc)
   		{
 		const void* errMsgZ = sqlite3_errmsg16(dbHandle);
 		TPtrC msg(reinterpret_cast <const TText16*> (errMsgZ), wcslen(reinterpret_cast <const wchar_t*> (errMsgZ)));
-		RDebug::Print(_L("Err=%S\r\n"), &msg);
+		TheTest.Printf(_L("Err=%S\r\n"), &msg);
 		TEST(0);
   		}
 	//Create database schema
 	TheCmpFCallCnt = TheCmpCCallCnt = 0;
-	RDebug::Print(_L("Create database schema\r\n"));
+	TheTest.Printf(_L("Create database schema\r\n"));
 	HBufC16* createSqlZ = ReadSQL16(_L("z:\\test\\contacts_schema_to_vendors.sql"));
 	TPtr sql = createSqlZ->Des();
 	ExecSql16(dbHandle, sql, _L("Create schema"));
 	delete createSqlZ;
-	RDebug::Print(_L("CmpF() call cnt %d, CmpC() call cnt %d\r\n"), TheCmpFCallCnt, TheCmpCCallCnt);
+	TheTest.Printf(_L("CmpF() call cnt %d, CmpC() call cnt %d\r\n"), TheCmpFCallCnt, TheCmpCCallCnt);
 	//Add 1001 "simple" contacts
 	TheCmpFCallCnt = TheCmpCCallCnt = 0;
-	RDebug::Print(_L("Add 1001 \"simple\" contacts\r\n"));
+	TheTest.Printf(_L("Add 1001 \"simple\" contacts\r\n"));
 	HBufC16* addSqlZ = ReadSQL16(KSimpleContactsSqlFile);
-	RDebug::Print(_L("--\r\n"));
+	TheTest.Printf(_L("--\r\n"));
 	sql.Set(addSqlZ->Des());
 	ExecSql16(dbHandle, sql, _L("Add simple contacts"));
 	delete addSqlZ;
-	RDebug::Print(_L("CmpF() call cnt %d, CmpC() call cnt %d\r\n"), TheCmpFCallCnt, TheCmpCCallCnt);
+	TheTest.Printf(_L("CmpF() call cnt %d, CmpC() call cnt %d\r\n"), TheCmpFCallCnt, TheCmpCCallCnt);
 	//Print the number of records
-	RDebug::Print(_L("Print the number of records\r\n"));
+	TheTest.Printf(_L("Print the number of records\r\n"));
 	TBuf<40> testSql(_L("SELECT COUNT(*) FROM CONTACTS"));
 	testSql.Append(TChar(0));
 	ExecSql16(dbHandle, testSql, _L("--"));
 	
 	//Create index: "First name, Last name"
 	TheCmpFCallCnt = TheCmpCCallCnt = 0;
-	RDebug::Print(_L("Create index: \"First name, Last name\"\r\n"));
+	TheTest.Printf(_L("Create index: \"First name, Last name\"\r\n"));
 	TBuf<100> createIndexStmt(_L("CREATE INDEX Idx1 ON identitytable(cm_firstname COLLATE CmpC16, cm_lastname COLLATE CmpC16)"));
 	createIndexStmt.Append(TChar(0));
 	ExecSql16(dbHandle, createIndexStmt, _L("Create index"));
-	RDebug::Print(_L("CmpF() call cnt %d, CmpC() call cnt %d\r\n"), TheCmpFCallCnt, TheCmpCCallCnt);
+	TheTest.Printf(_L("CmpF() call cnt %d, CmpC() call cnt %d\r\n"), TheCmpFCallCnt, TheCmpCCallCnt);
 
-	RDebug::Print(_L("Close database\r\n"));
+	TheTest.Printf(_L("Close database\r\n"));
    	sqlite3_close(dbHandle);
 
 	PrintFileSize(aDbFilePath);
@@ -1061,63 +1062,63 @@
 	TBuf8<KMaxFileName + 1> fname;
 	fname.Copy(aDbFilePath);
 	
-	RDebug::Print(_L("%S\r\n"), &aMsg);
-	RDebug::Print(_L("Open database\r\n"));
+	TheTest.Printf(_L("%S\r\n"), &aMsg);
+	TheTest.Printf(_L("Open database\r\n"));
 	sqlite3 *dbHandle = NULL;
 	TInt rc = sqlite3_open((const char*)fname.PtrZ(), &dbHandle);
 	if(rc != SQLITE_OK)
 		{
 		const void* errMsgZ = sqlite3_errmsg16(dbHandle);
 		TPtrC msg(reinterpret_cast <const TText16*> (errMsgZ), wcslen(reinterpret_cast <const wchar_t*> (errMsgZ)));
-		RDebug::Print(_L("'sqlite3_open()' failed, file %S, err %d, error msg: \"%S\"\r\n"), &aDbFilePath, rc, &msg);
+		TheTest.Printf(_L("'sqlite3_open()' failed, file %S, err %d, error msg: \"%S\"\r\n"), &aDbFilePath, rc, &msg);
 		TEST(0);
 		}
 	TEST(dbHandle != NULL);
 	
-	RDebug::Print(_L("Create 'CompareF' collation\r\n"));
+	TheTest.Printf(_L("Create 'CompareF' collation\r\n"));
 	_LIT8(KCmpF, "CmpF8\x0");
 	rc = sqlite3_create_collation(dbHandle, (const char*)(KCmpF().Ptr()), SQLITE_UTF8, NULL, &CmpF8);
   	if(rc)
   		{
 		const void* errMsgZ = sqlite3_errmsg16(dbHandle);
 		TPtrC msg(reinterpret_cast <const TText16*> (errMsgZ), wcslen(reinterpret_cast <const wchar_t*> (errMsgZ)));
-		RDebug::Print(_L("'sqlite3_create_collation()' failed, file %S, err %d, error msg: \"%S\"\r\n"), &aDbFilePath, rc, &msg);
+		TheTest.Printf(_L("'sqlite3_create_collation()' failed, file %S, err %d, error msg: \"%S\"\r\n"), &aDbFilePath, rc, &msg);
 		TEST(0);
   		}
 
-	RDebug::Print(_L("Create 'CompareC' collation\r\n"));
+  	TheTest.Printf(_L("Create 'CompareC' collation\r\n"));
 	_LIT8(KCmpC, "CmpC8\x0");
 	rc = sqlite3_create_collation(dbHandle, (const char*)(KCmpC().Ptr()), SQLITE_UTF8, NULL, &CmpC8);
   	if(rc)
   		{
 		const void* errMsgZ = sqlite3_errmsg16(dbHandle);
 		TPtrC msg(reinterpret_cast <const TText16*> (errMsgZ), wcslen(reinterpret_cast <const wchar_t*> (errMsgZ)));
-		RDebug::Print(_L("'sqlite3_create_collation()' failed, file %S, err %d, error msg: \"%S\"\r\n"), &aDbFilePath, rc, &msg);
+		TheTest.Printf(_L("'sqlite3_create_collation()' failed, file %S, err %d, error msg: \"%S\"\r\n"), &aDbFilePath, rc, &msg);
 		TEST(0);
   		}
 
-	RDebug::Print(_L("Create database schema\r\n"));
+  	TheTest.Printf(_L("Create database schema\r\n"));
 	char* createSqlZ = ReadSQL2(_L("z:\\test\\contacts_schema_to_vendors.sql"));
 	ExecSql(dbHandle, createSqlZ, _L("Create schema"));
 	delete [] createSqlZ;
 
-	RDebug::Print(_L("Add 1001 contacts\r\n"));
+	TheTest.Printf(_L("Add 1001 contacts\r\n"));
 	char* addSqlZ = ReadSQL2(aAddContactsFile);
 	ExecSql(dbHandle, addSqlZ, _L("Add contacts"));
 	delete [] addSqlZ;
 
-	RDebug::Print(_L("Print the number of records\r\n"));
+	TheTest.Printf(_L("Print the number of records\r\n"));
 	const char testSql[] = {"SELECT COUNT(*) FROM CONTACTS"};
 	ExecSql(dbHandle, testSql, _L("SELECT COUNT(*)"));
 	
-	RDebug::Print(_L("Create index (using 'CompareF' collation): 'FirstName, Surname'\r\n"));
+	TheTest.Printf(_L("Create index (using 'CompareF' collation): 'FirstName, Surname'\r\n"));
 	_LIT8(KCreateIndexStmt, "CREATE INDEX Idx1 ON identitytable(cm_firstname COLLATE CmpF8, cm_lastname COLLATE CmpF8)\x0");
 	ExecSql(dbHandle, (const char*)(KCreateIndexStmt().Ptr()), _L("Create index"));
-	RDebug::Print(_L("CompareF() called %d times\r\n"), TheCmpFCallCnt);
+	TheTest.Printf(_L("CompareF() called %d times\r\n"), TheCmpFCallCnt);
 
 /* BEGIN OF - TEST CASE 1 "Select all contacts which first name begins with 'a' " */	
 
-	RDebug::Print(_L("Prepare 'Select all contacts where the first name begins with 'A'' SQL string\r\n"));
+	TheTest.Printf(_L("Prepare 'Select all contacts where the first name begins with 'A'' SQL string\r\n"));
 	_LIT8(KSearchStmt, "SELECT cm_firstname, cm_lastname FROM identitytable WHERE cm_firstname LIKE 'A%'\x0");
 	sqlite3_stmt* stmtHandle = NULL;
 	const char* stmtTailZ = NULL;
@@ -1132,9 +1133,9 @@
 	TTimeIntervalMicroSeconds diffTime = t2.MicroSecondsFrom(t1); 
 	diffTime = diffTime.Int64() / 1000;
 	TInt t = (TInt)diffTime.Int64();
-	RDebug::Print(_L("'Prepare SQL statement' time: %d ms\r\n"), t);
+	TheTest.Printf(_L("'Prepare SQL statement' time: %d ms\r\n"), t);
 
-	RDebug::Print(_L("Step the prepared SQL statement\r\n"));
+	TheTest.Printf(_L("Step the prepared SQL statement\r\n"));
 	TInt totalCmpFCnt = 0;
 	t1.UniversalTime();
 	TheCmpFCallCnt = 0;
@@ -1147,7 +1148,7 @@
 		//const TUint8* surname = sqlite3_column_text(stmtHandle, 1);
 		//p.Set(surname, strlen((const char*)surname));
 		//TBuf<100> p2; p2.Copy(p);
-		//RDebug::Print(_L("Found rec: %S, %S\r\n"), &p1, &p2);
+		//TheTest.Printf(_L("Found rec: %S, %S\r\n"), &p1, &p2);
 		++recordCnt;
 		}
 	totalCmpFCnt += TheCmpFCallCnt;
@@ -1156,8 +1157,8 @@
 	diffTime = t2.MicroSecondsFrom(t1); 
 	diffTime = diffTime.Int64() / 1000;
 	t = (TInt)diffTime.Int64();
-	RDebug::Print(_L("'Stepping' time: %d ms, found records: %d\r\n"), t, recordCnt);
-	RDebug::Print(_L("Total 'search' ('CompareF' used) operations=%d\r\n"), totalCmpFCnt);
+	TheTest.Printf(_L("'Stepping' time: %d ms, found records: %d\r\n"), t, recordCnt);
+	TheTest.Printf(_L("Total 'search' ('CompareF' used) operations=%d\r\n"), totalCmpFCnt);
 
 	sqlite3_finalize(stmtHandle);
 	stmtHandle = NULL;
@@ -1166,7 +1167,7 @@
 
 /*	BEGIN OF - TEST CASE 2 "Do 100 searches in 1001 contacts" */
 
-	RDebug::Print(_L("Prepare 'SELECT FirstName, Surname...' SQL string\r\n"));
+	TheTest.Printf(_L("Prepare 'SELECT FirstName, Surname...' SQL string\r\n"));
 	_LIT8(KSearchStmt2, "SELECT cm_firstname, cm_lastname FROM identitytable WHERE cm_firstname = :Prm1 AND cm_lastname = :Prm2\x0");
 	stmtHandle = NULL;
 	stmtTailZ = NULL;
@@ -1179,14 +1180,14 @@
 	diffTime = t2.MicroSecondsFrom(t1); 
 	diffTime = diffTime.Int64() / 1000;
 	t = (TInt)diffTime.Int64();
-	RDebug::Print(_L("'Prepare SQL statement' time: %d ms\r\n"), t);
+	TheTest.Printf(_L("'Prepare SQL statement' time: %d ms\r\n"), t);
 	
 	TInt idxPrm1 = sqlite3_bind_parameter_index(stmtHandle, ":Prm1");
 	TEST(idxPrm1 > 0);
 	TInt idxPrm2 = sqlite3_bind_parameter_index(stmtHandle, ":Prm2");
 	TEST(idxPrm2 > 0);
 	
-	RDebug::Print(_L("Do %d searches using the prepared SQL statement\r\n"), KNamesCnt);
+	TheTest.Printf(_L("Do %d searches using the prepared SQL statement\r\n"), KNamesCnt);
 	totalCmpFCnt = 0;
 	t1.UniversalTime();
 	for(TInt i=0;i<KNamesCnt;++i)
@@ -1214,8 +1215,8 @@
 	diffTime = t2.MicroSecondsFrom(t1); 
 	diffTime = diffTime.Int64() / 1000;
 	t = (TInt)diffTime.Int64();
-	RDebug::Print(_L("'Search' time: %d ms\r\n"), t);
-	RDebug::Print(_L("Total 'search' ('CompareF' used) operations=%d, average_per_iter=%d\r\n"), totalCmpFCnt, totalCmpFCnt/KNamesCnt);
+	TheTest.Printf(_L("'Search' time: %d ms\r\n"), t);
+	TheTest.Printf(_L("Total 'search' ('CompareF' used) operations=%d, average_per_iter=%d\r\n"), totalCmpFCnt, totalCmpFCnt/KNamesCnt);
 
 	sqlite3_finalize(stmtHandle);
 	stmtHandle = NULL;
@@ -1228,7 +1229,7 @@
 	diffTime = t2.MicroSecondsFrom(t1); 
 	diffTime = diffTime.Int64() / 1000;
 	t = (TInt)diffTime.Int64();
-	RDebug::Print(_L("'Finalize SQL statement' time: %d ms\r\n"), t);
+	TheTest.Printf(_L("'Finalize SQL statement' time: %d ms\r\n"), t);
 
    	sqlite3_close(dbHandle);
 	PrintFileSize(aDbFilePath);
@@ -1322,7 +1323,7 @@
 		{
 		const void* errMsgZ = sqlite3_errmsg16(dbHandle);
 		TPtrC msg(reinterpret_cast <const TText16*> (errMsgZ), wcslen(reinterpret_cast <const wchar_t*> (errMsgZ)));
-		RDebug::Print(_L("'sqlite3_open()' failed, err %d, error msg: \"%S\"\r\n"), rc, &msg);
+		TheTest.Printf(_L("'sqlite3_open()' failed, err %d, error msg: \"%S\"\r\n"), rc, &msg);
 		TEST(0);
 		}
 	TEST(dbHandle != NULL);
@@ -1334,7 +1335,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\n"), rc, &p);
     	sqlite3_free(zErrMsg);
     	TEST(0);
 		}
@@ -1344,7 +1345,7 @@
 	if(rc != SQLITE_OK)
 		{
   		TPtrC p = ConvertToUtf16(zErrMsg);
-  		RDebug::Print(_L("SQL error %d, msg: %S\n"), rc, &p);
+  		TheTest.Printf(_L("SQL error %d, msg: %S\n"), rc, &p);
     	sqlite3_free(zErrMsg);
     	TEST(0);
 		}
--- a/persistentstorage/sql/TEST/t_sqllang.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqllang.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -44,6 +44,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -52,7 +53,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -61,7 +62,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %ld, got: %ld\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %ld, got: %ld\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -90,7 +91,7 @@
 	if(aErr < 0 && SqlRetCodeClass(aErr) == ESqlDbError)
 		{
 		const TPtrC& msg = TheDb.LastErrorMessage();
-		RDebug::Print(_L("Last error msg: \"%S\"\r\n"), &msg);	
+		TheTest.Printf(_L("Last error msg: \"%S\"\r\n"), &msg);	
 		}
 	}
 
@@ -319,7 +320,7 @@
 	err = stmt.Next();
 	TEST2(err, KSqlAtRow);
 	TInt64 colVal64 = stmt.ColumnInt64(0);
-	RDebug::Print(_L("Last insert row id=%d\r\n"), (TInt)colVal64);
+	TheTest.Printf(_L("Last insert row id=%d\r\n"), (TInt)colVal64);
 	stmt.Close();
 
 	//length() test --------------------------------------------------------
@@ -442,7 +443,7 @@
 	TEST2(err, KSqlAtRow);
 	err = stmt.ColumnText(0, colVal);
 	TEST2(err, KErrNone);
-	RDebug::Print(_L("Database engine version: \"%S\"\r\n"), &colVal);
+	TheTest.Printf(_L("Database engine version: \"%S\"\r\n"), &colVal);
 	stmt.Close();
 
 	//substr() test --------------------------------------------------------
--- a/persistentstorage/sql/TEST/t_sqlload.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlload.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -98,11 +98,11 @@
 			{
 			RThread th;
 			TName name = th.Name();
-			RDebug::Print(_L("*** Thread %S, Line %d\r\n"), &name, aLine);
+			RDebug::Print(_L("*** Thread %S, Line %d. Expression evaluated to false\r\n"), &name, aLine);
 			}
 		else
 			{
-			RDebug::Print(_L("*** Line %d\r\n"), aLine);
+			TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 			}
 		TheTest(EFalse, aLine);
 		}
@@ -120,7 +120,7 @@
 			}
 		else
 			{
-			RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+			TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 			}
 		TheTest(EFalse, aLine);
 		}
--- a/persistentstorage/sql/TEST/t_sqlmulti.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlmulti.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -43,11 +43,11 @@
 			{
 			RThread th;
 			TName name = th.Name();
-			RDebug::Print(_L("*** Thread %S, Line %d\r\n"), &name, aLine);
+			RDebug::Print(_L("*** Thread %S, Line %d. Expression evaluated to false\r\n"), &name, aLine);
 			}
 		else
 			{
-			RDebug::Print(_L("*** Line %d\r\n"), aLine);
+			TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 			}
 		TheTest(EFalse, aLine);
 		}
@@ -65,7 +65,7 @@
 			}
 		else
 			{
-			RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+			TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 			}
 		TheTest(EFalse, aLine);
 		}
@@ -111,7 +111,7 @@
 	TEST2(err, KErrNone);
 
 	//Create test database
-	RDebug::Print(_L("###Create test database\r\n"));
+	TheTest.Printf(_L("###Create test database\r\n"));
 	_LIT8(KCreateSql, "CREATE TABLE A(Id INTEGER PRIMARY KEY AUTOINCREMENT, Data INTEGER)");
 	err = db1.Exec(KCreateSql);
 	TEST(err >= 0);
@@ -122,7 +122,7 @@
 	TEST2(err, KErrNone);
 	
 	//Insert some records using both connections
-	RDebug::Print(_L("###Insert some records\r\n"));
+	TheTest.Printf(_L("###Insert some records\r\n"));
 	const TInt KRecNum = 100;
 	_LIT8(KInsertSql, "INSERT INTO A(Data) VALUES(");
 	for(TInt i=0;i<KRecNum;++i)
@@ -134,13 +134,13 @@
 		if(err < 0)
 			{
 			TPtrC msg = (i%2) ? db1.LastErrorMessage() : db2.LastErrorMessage();
-			RDebug::Print(_L("##Db Error msg: \"%S\"\n\r"), &msg);
+			TheTest.Printf(_L("##Db Error msg: \"%S\"\n\r"), &msg);
 			}
 		TEST2(err, 1);
 		}
 		
 	//Check the database content
-	RDebug::Print(_L("###Check the database content\r\n"));
+	TheTest.Printf(_L("###Check the database content\r\n"));
 	_LIT8(KSelectSql, "SELECT * FROM A");
 	RSqlStatement stmt;
 	err = stmt.Prepare(db1, KSelectSql);
@@ -161,7 +161,7 @@
 	//Cleanup	
 	db2.Close();
 	db1.Close();
-	RDebug::Print(_L("###Delete the test database\r\n"));
+	TheTest.Printf(_L("###Delete the test database\r\n"));
 	(void)RSqlDatabase::Delete(KTestDbName1);
 	}
 
@@ -251,13 +251,13 @@
 void TestMultiConnDiffThread()
 	{
 	//Create a test database
-	RDebug::Print(_L("+++:MainThread: Create test database\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Create test database\r\n"));
 	RSqlDatabase db;
 	TInt err = db.Create(KTestDbName1);
 	TEST2(err, KErrNone);
 	
 	//Create a test table
-	RDebug::Print(_L("+++:MainThread: Create a table in the test database\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Create a table in the test database\r\n"));
 	_LIT8(KCreateSql, "CREATE TABLE A(Id INTEGER PRIMARY KEY)");
 	err = db.Exec(KCreateSql);
 	TEST(err >= 0);
@@ -283,7 +283,7 @@
 			TInt low = 1;
 			TInt high = KRange;
 			
-			RDebug::Print(_L("+++:MainThread: Test: thread count %d, records %d, trans type %d, isolation level: %S\r\n"), 
+			TheTest.Printf(_L("+++:MainThread: Test: thread count %d, records %d, trans type %d, isolation level: %S\r\n"), 
 									KThreadCnt, KRange, transType, &KIsolationLevelName[isolLevel]);
 									
 			RThread thread[KThreadCnt];
@@ -320,7 +320,7 @@
 				}
 
 			//Check that all records which are esupposed to be in the database, are there.
-			RDebug::Print(_L("+++:MainThread: Check that all records have been written\r\n"));
+			TheTest.Printf(_L("+++:MainThread: Check that all records have been written\r\n"));
 			_LIT8(KSelectSql1, "SELECT COUNT(*) FROM A;");
 			RSqlStatement stmt;
 			err = stmt.Prepare(db, KSelectSql1);
@@ -332,7 +332,7 @@
 			stmt.Close();
 			
 			//Check that all records have expected column values.
-			RDebug::Print(_L("+++:MainThread: Check that all records have expected column values\r\n"));
+			TheTest.Printf(_L("+++:MainThread: Check that all records have expected column values\r\n"));
 			_LIT8(KSelectSql2, "SELECT * FROM A;");
 			err = stmt.Prepare(db, KSelectSql2);
 			TEST2(err, KErrNone);
@@ -346,7 +346,7 @@
 			stmt.Close();
 
 			//Prepare for the next test run - delete all records.
-			RDebug::Print(_L("+++:MainThread: Delete all records\r\n"));
+			TheTest.Printf(_L("+++:MainThread: Delete all records\r\n"));
 			_LIT8(KDeleteSql, "DELETE FROM A");
 			err = db.Exec(KDeleteSql);
 			TEST(err >= 0);
@@ -354,7 +354,7 @@
 		}//end of "for(TInt transType=0;transType<KTransTypeCnt;++transType)"
 		
 	db.Close();
-	RDebug::Print(_L("+++:MainThread: Delete the test database\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Delete the test database\r\n"));
 	(void)RSqlDatabase::Delete(KTestDbName1);
 	}
 
@@ -428,27 +428,27 @@
 */	
 void TestIsolationLevel()
 	{
-	RDebug::Print(_L("+++:MainThread: Create critical sections\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Create critical sections\r\n"));
 	TEST2(UpdateThreadCrS.CreateLocal(), KErrNone);
 	UpdateThreadCrS.Wait();
 	TEST2(MainThreadCrS.CreateLocal(), KErrNone);
 	MainThreadCrS.Wait();
 	
-	RDebug::Print(_L("+++:MainThread: Create test database\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Create test database\r\n"));
 	RSqlDatabase db;
 	TInt err = db.Create(KTestDbName1);
 	TEST2(err, KErrNone);
 
-	RDebug::Print(_L("+++:MainThread: Set the isolation level to \"Read uncommitted\"\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Set the isolation level to \"Read uncommitted\"\r\n"));
 	err = db.SetIsolationLevel(RSqlDatabase::EReadUncommitted);
 	TEST2(err, KErrNone);
 	
-	RDebug::Print(_L("+++:MainThread: Create a table in the test database\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Create a table in the test database\r\n"));
 	_LIT8(KCreateSql, "CREATE TABLE A(Id INTEGER)");
 	err = db.Exec(KCreateSql);
 	TEST(err >= 0);
 
-	RDebug::Print(_L("+++:MainThread: Insert one record in the table\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Insert one record in the table\r\n"));
 	_LIT8(KInsertSql, "INSERT INTO A(Id) VALUES(");
 	TBuf8<64> sql(KInsertSql);
 	sql.AppendNum((TInt64)KInitialValue);
@@ -456,7 +456,7 @@
 	err = db.Exec(sql);
 	TEST2(err, 1);
 
-	RDebug::Print(_L("+++:MainThread: Create the \"update\" thread\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Create the \"update\" thread\r\n"));
 	_LIT(KThreadName, "UpdTh");
 	RThread thread;
 	TEST2(thread.Create(KThreadName, &UpdateThreadFunc, 0x2000, 0x1000, 0x10000, NULL, EOwnerThread), KErrNone);
@@ -465,10 +465,10 @@
 	TEST2(status.Int(), KRequestPending);
 	thread.Resume();
 
-	RDebug::Print(_L("+++:MainThread: Wait for record update completion...\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Wait for record update completion...\r\n"));
 	MainThreadCrS.Wait();
 
-	RDebug::Print(_L("+++:MainThread: Read the record and check the data...\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Read the record and check the data...\r\n"));
 	_LIT8(KSelectSql, "SELECT * FROM A");
 	RSqlStatement stmt;
 	err = stmt.Prepare(db, KSelectSql);
@@ -479,13 +479,13 @@
 	TEST(val == KUpdatedValue);
 	stmt.Close();
 
-	RDebug::Print(_L("+++:MainThread: Notify the update thread that it can rollback\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Notify the update thread that it can rollback\r\n"));
 	UpdateThreadCrS.Signal();
 
-	RDebug::Print(_L("+++:MainThread: Wait for  rollback  completion...\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Wait for  rollback  completion...\r\n"));
 	MainThreadCrS.Wait();
 
-	RDebug::Print(_L("+++:MainThread: Read the record and check the data...\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Read the record and check the data...\r\n"));
 	err = stmt.Prepare(db, KSelectSql);
 	TEST2(err, KErrNone);
 	err = stmt.Next();
@@ -498,10 +498,10 @@
 	thread.Close();
 
 	db.Close();
-	RDebug::Print(_L("+++:MainThread: Delete the test database\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Delete the test database\r\n"));
 	(void)RSqlDatabase::Delete(KTestDbName1);
 
-	RDebug::Print(_L("+++:MainThread: Close critical sections\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Close critical sections\r\n"));
 	MainThreadCrS.Close();
 	UpdateThreadCrS.Close();
 	}
--- a/persistentstorage/sql/TEST/t_sqlood.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlood.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -65,9 +65,21 @@
 
 _LIT8(KDatabasePageSizeConfig, "page_size=1024");
 
+//The drive that will be used in case if the original drive, where KTestDir is supposed to be created, is not present.
+const TInt KTestDrive2 = EDriveC;
+_LIT(KTestDir2, "c:\\test\\");
+_LIT(KTestDatabase2, "c:\\test\\t_sql_ood.db");
+_LIT(KLargeFileName2, "c:\\test\\DeleteMe");
+
 const TInt KMaxTestRecordsCount = 350;
 TInt TestRecordsCount = 0;
 
+
+TInt TheTestDrive = -1;
+TFileName TheTestDir;
+TFileName TheTestDatabase;
+TFileName TheLargeFileName;
+
 ///////////////////////////////////////////////////////////////////////////////////////
 
 //Assemblesd a file name from "aFileName" and "aFileNumber" parameters and places the resulting string in "aResultPath".
@@ -85,7 +97,7 @@
 	while(err == KErrNone)
 		{
 		TBuf<KMaxFileName> filePath;
-		::AssembleLargeFileName(KLargeFileName, ++i, filePath);
+		::AssembleLargeFileName(TheLargeFileName, ++i, filePath);
 		err = TheFs.Delete(filePath);
 		}
 	}
@@ -94,7 +106,7 @@
 void DeleteTestFiles()
 	{
 	DeleteLargeDataFiles();
-	(void)RSqlDatabase::Delete(KTestDatabase);
+	(void)RSqlDatabase::Delete(TheTestDatabase);
 	}
 
 ///////////////////////////////////////////////////////////////////////////////////////
@@ -105,7 +117,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -114,7 +126,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -129,11 +141,17 @@
 	TInt err = TheFs.Connect();
 	TEST2(err, KErrNone);
 
-	err = TheFs.MkDir(KTestDir);
-	if(err != KErrNone)
+	err = TheFs.MkDir(TheTestDir);
+	if(err != KErrNone && err != KErrAlreadyExists)
 	    {
-	    RDebug::Print(_L("*** CreateTestEnv(), RFs::MkDir(), err=%d\r\n"), err);
+		TheTest.Printf(_L("*** CreateTestEnv(), RFs::MkDir(), dir=%S, err=%d.\r\nNext attempt with %S.\r\n"), &TheTestDir, err, &KTestDir2);
+	    TheTestDrive = KTestDrive2;
+		TheTestDir.Copy(KTestDir2);
+		TheTestDatabase.Copy(KTestDatabase2);
+		TheLargeFileName.Copy(KLargeFileName2);
+		err = TheFs.MkDir(TheTestDir);
 	    }
+	TheTest.Printf(_L("*** CreateTestEnv(), RFs::MkDir(), dir=%S, err=%d."), &TheTestDir, err);
 	TEST(err == KErrNone || err == KErrAlreadyExists);
 	}
 
@@ -142,9 +160,11 @@
 void FillLargeDataFile(RFile& aFile, TInt aSize)
 	{
 	TInt err = KErrDiskFull;
+	TheTest.Printf(_L("FillLargeDataFile-1\r\n"));
 	while(err == KErrDiskFull)
 		{
 		err = aFile.SetSize(aSize);
+		TheTest.Printf(_L("FillLargeDataFile-2 err=%d aSize=%d\r\n"), err, aSize);
 		aSize -= 100;
 		if(aSize <= 0)
 			{
@@ -158,7 +178,7 @@
 TInt64 FreeDiskSpace()
 	{
 	TVolumeInfo volInfoBefore;
-	TInt err = TheFs.Volume(volInfoBefore, KTestDrive);
+	TInt err = TheFs.Volume(volInfoBefore, TheTestDrive);
 	TEST2(err, KErrNone);
 	return volInfoBefore.iFree;
 	}
@@ -166,13 +186,17 @@
 //Creates a large data file with aSize size (in bytes).
 void DoCreateLargeFile(const TDesC& aPath, TInt aSize)
 	{
+	TheTest.Printf(_L("DoCreateLargeFile, aPath=%S, aSize=%d\r\n"), &aPath, aSize/1000);
 	RFile file;
 	TInt err = file.Replace(TheFs, aPath, EFileRead | EFileWrite);
+	TheTest.Printf(_L("DoCreateLargeFile, err=%d\r\n"), err);
 	TEST2(err, KErrNone);
 	FillLargeDataFile(file, aSize);
 	err = file.Flush();
+	TheTest.Printf(_L("DoCreateLargeFile, flush err=%d\r\n"), err);
 	TEST2(err, KErrNone);
 	file.Close();
+	TheTest.Printf(_L("DoCreateLargeFile, close\r\n"));
 	}
 
 //Creates enough number of large data files to fill the available disk space.
@@ -181,28 +205,28 @@
 	TInt fileNo = 0;
 	const TInt KLargeFileSize = 1000000000;
 	TInt64 diskSpace = ::FreeDiskSpace();
-	RDebug::Print(_L("CreateLargeFile: free space before = %ld\r\n"), diskSpace);
+	TheTest.Printf(_L("CreateLargeFile: free space before = %ld\r\n"), diskSpace);
 	TBuf<KMaxFileName> filePath;
 	while(diskSpace > KLargeFileSize)
 		{
-		AssembleLargeFileName(KLargeFileName, fileNo++, filePath);
+		AssembleLargeFileName(TheLargeFileName, fileNo++, filePath);
 		DoCreateLargeFile(filePath, KLargeFileSize);
 		diskSpace = ::FreeDiskSpace();
-		RDebug::Print(_L("----CreateLargeFile, step %d, free space = %ld\r\n"), fileNo, diskSpace);
+		TheTest.Printf(_L("----CreateLargeFile, step %d, free space = %ld\r\n"), fileNo, diskSpace);
 		}
 	//Reserve almost all disk space, except a small amount - 200 bytes.
 	if(diskSpace > 0)
 		{
-		::AssembleLargeFileName(KLargeFileName, fileNo++, filePath);
+		::AssembleLargeFileName(TheLargeFileName, fileNo++, filePath);
 		const TInt64 KSpaceLeft = 200;
 		TInt64 lastFileSize = diskSpace - KSpaceLeft;
         TInt lastFileSize32 = I64LOW(lastFileSize);
-		RDebug::Print(_L("----file size32 = %d\r\n"), lastFileSize32);
+        TheTest.Printf(_L("----file size32 = %d\r\n"), lastFileSize32);
 		::DoCreateLargeFile(filePath, lastFileSize32);
-		RDebug::Print(_L("----CreateLargeFile, last step (%d), file size = %ld\r\n"), fileNo, lastFileSize);
+		TheTest.Printf(_L("----CreateLargeFile, last step (%d), file size = %ld\r\n"), fileNo, lastFileSize);
 		}
 	diskSpace = ::FreeDiskSpace();
-	RDebug::Print(_L("CreateLargeFile: free space after = %ld\r\n"), diskSpace);
+	TheTest.Printf(_L("CreateLargeFile: free space after = %ld\r\n"), diskSpace);
 	}
 
 
@@ -218,7 +242,7 @@
 //Creates and fills with some records a test database
 void CreateAndFillTestDatabase(RSqlDatabase& aDb)
 	{
-	TInt err = aDb.Create(KTestDatabase, &KDatabasePageSizeConfig);
+	TInt err = aDb.Create(TheTestDatabase, &KDatabasePageSizeConfig);
 	TEST2(err, KErrNone);
 	err = aDb.Exec(_L("CREATE TABLE A(Id INTEGER, Data TEXT)"));
 	TEST(err >= 0);
@@ -231,25 +255,25 @@
 	TSqlScalarFullSelectQuery q(aDb);
 	TInt pageSize = 0;
 	TRAP(err, pageSize = q.SelectIntL(sql););
-	//RDebug::Print(_L("Error %d Page Size %d"),err,pageSize);
+	//TheTest.Printf(_L("Error %d Page Size %d"),err,pageSize);
 	TEST2(err, KErrNone);
 	TEST(pageSize > 0);
-	//RDebug::Print(_L("Page Size %d"),pageSize);
+	//TheTest.Printf(_L("Page Size %d"),pageSize);
 	
 	//
 	// Find the sector size of this media
 	//
 	TDriveInfo driveInfo;
-	err = TheFs.Drive(driveInfo, KTestDrive);
+	err = TheFs.Drive(driveInfo, TheTestDrive);
 	TEST2(err, KErrNone);
 	TVolumeIOParamInfo volumeInfo;
-	err = TheFs.VolumeIOParam(KTestDrive, volumeInfo);
+	err = TheFs.VolumeIOParam(TheTestDrive, volumeInfo);
 	TEST2(err, KErrNone);
 	TInt sectorSize = volumeInfo.iBlockSize;
-	//RDebug::Print(_L("Sector Size %d"),sectorSize);	
+	//TheTest.Printf(_L("Sector Size %d"),sectorSize);	
 
 	TInt journalHeaderSize = Max(sectorSize, KJournalHeaderSize);
-	//RDebug::Print(_L("Journal Header Size %d"),journalHeaderSize);
+	//TheTest.Printf(_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. 
@@ -265,7 +289,7 @@
 		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);
+		//TheTest.Printf(_L("Size %d, Pages %d, predictedJournalSize %d"),size, numberOfPages, predictedJournalSize);
 		
 		// Will another page take us over the limit ?
 		if ((predictedJournalSize + (pageSize + KJournalPageOverhead)) >= (KReserveDriveSpaceAmount))
@@ -275,7 +299,7 @@
 		}
 	TestRecordsCount = i + 1;
 	
-	//RDebug::Print(_L("TestRecordsCount %d"),TestRecordsCount);
+	//TheTest.Printf(_L("TestRecordsCount %d"),TestRecordsCount);
 	
 	}
 
@@ -307,10 +331,10 @@
 void SimpleCallsTest()
 	{
 	RSqlDatabase db, db2;
-	TInt err = db.Create(KTestDatabase, &KDatabasePageSizeConfig);
+	TInt err = db.Create(TheTestDatabase, &KDatabasePageSizeConfig);
 	TEST2(err, KErrNone);
 
-	err = db2.Open(KTestDatabase);
+	err = db2.Open(TheTestDatabase);
 	TEST2(err, KErrNone);
 	
 	//An attempt to get an access to the reserved space (which is not reserved yet).
@@ -357,7 +381,7 @@
 
 	db2.Close();
 	db.Close();
-	(void)RSqlDatabase::Delete(KTestDatabase);
+	(void)RSqlDatabase::Delete(TheTestDatabase);
 	}
 
 /**
@@ -378,32 +402,32 @@
 void DeleteTransactionTest()
 	{
 	TVolumeIOParamInfo volIoPrm;
-	TInt err = TheFs.VolumeIOParam(KTestDrive, volIoPrm);
+	TInt err = TheFs.VolumeIOParam(TheTestDrive, volIoPrm);
     TEST2(err, KErrNone);
-    RDebug::Print(_L("--Drive %d. BlockSize=%d, ClusterSize=%d, RecReadBufSize=%d, RecWriteBufSize=%d\r\n"), KTestDrive, volIoPrm.iBlockSize, volIoPrm.iClusterSize, volIoPrm.iRecReadBufSize, volIoPrm.iRecWriteBufSize);
+    TheTest.Printf(_L("--Drive %d. BlockSize=%d, ClusterSize=%d, RecReadBufSize=%d, RecWriteBufSize=%d\r\n"), TheTestDrive, volIoPrm.iBlockSize, volIoPrm.iClusterSize, volIoPrm.iRecReadBufSize, volIoPrm.iRecWriteBufSize);
 	/////////////////////////////////////////////////////////
-    RDebug::Print(_L("--Create and fill database \"%S\".\r\n"), &KTestDatabase);
+    TheTest.Printf(_L("--Create and fill database \"%S\".\r\n"), &TheTestDatabase);
 	RSqlDatabase db;
 	CreateAndFillTestDatabase(db);
 	db.Close();//When the database gets closed, the persisted journal file will be deleted.
-    RDebug::Print(_L("--Close and reopen database \"%S\" (in order to get the persisted journal file deleted).\r\n"), &KTestDatabase);
-    err = db.Open(KTestDatabase);
+	TheTest.Printf(_L("--Close and reopen database \"%S\" (in order to get the persisted journal file deleted).\r\n"), &TheTestDatabase);
+    err = db.Open(TheTestDatabase);
     TEST2(err, KErrNone);
-    RDebug::Print(_L("--Reserve disk space for database \"%S\".\r\n"), &KTestDatabase);
+    TheTest.Printf(_L("--Reserve disk space for database \"%S\".\r\n"), &TheTestDatabase);
     err = db.ReserveDriveSpace(0);
 	TEST2(err, KErrNone);
-    RDebug::Print(_L("--Simulate an \"out of disk space\" situation with creating a very large data file, which occupies almost the all the available disk space.\r\n"));
+	TheTest.Printf(_L("--Simulate an \"out of disk space\" situation with creating a very large data file, which occupies almost the all the available disk space.\r\n"));
 	CreateLargeFile();
-	RDebug::Print(_L("--Attempt to delete test data records. The transaction must fail, because of \"out of disk space\".\r\n"));
+	TheTest.Printf(_L("--Attempt to delete test data records. The transaction must fail, because of \"out of disk space\".\r\n"));
 	err = DeleteTestRecords(db);
 	TEST2(err, KErrDiskFull);
-    RDebug::Print(_L("--Get an access to the reserved disk space.\r\n"));
+	TheTest.Printf(_L("--Get an access to the reserved disk space.\r\n"));
 	err = db.GetReserveAccess();
 	TEST2(err, KErrNone);
     TInt64 diskSpace = ::FreeDiskSpace();
-    RDebug::Print(_L("After GetReserveAccess(), free disk space = %ld. Try again \"Delete records\" transaction. The transaction must not fail.\r\n"), diskSpace);
+    TheTest.Printf(_L("After GetReserveAccess(), free disk space = %ld. Try again \"Delete records\" transaction. The transaction must not fail.\r\n"), diskSpace);
 	err = DeleteTestRecords(db);
-	RDebug::Print(_L("--DeleteTestRecords() returned %d error.\r\n"), err);
+	TheTest.Printf(_L("--DeleteTestRecords() returned %d error.\r\n"), err);
 	TEST(err >= 0);
 	//Releases the access to the reserved disk space
 	db.ReleaseReserveAccess();
@@ -421,7 +445,7 @@
 	TEST2(recCount, 0);
 	stmt.Close();
 	db.Close();
-	(void)RSqlDatabase::Delete(KTestDatabase);
+	(void)RSqlDatabase::Delete(TheTestDatabase);
 	}
 
 //OOD API tests with more than one connection to the same SQL database.
@@ -434,7 +458,7 @@
 	CreateAndFillTestDatabase(db1);
 
     RSqlDatabase db2;
-    TInt err = db2.Open(KTestDatabase);
+    TInt err = db2.Open(TheTestDatabase);
     TEST2(err, KErrNone);
 
     //Play with "ReserveDriveSpace" on both sessions
@@ -455,7 +479,7 @@
     TEST2(err, KErrNone);
 
     RSqlDatabase db4;
-    err = db4.Open(KTestDatabase);
+    err = db4.Open(TheTestDatabase);
     TEST2(err, KErrNone);
 
     //Try to reserve space for db4.
@@ -463,7 +487,7 @@
     TEST2(err, KErrNone);
 
     RSqlDatabase db3;
-    err = db3.Open(KTestDatabase);
+    err = db3.Open(TheTestDatabase);
     TEST2(err, KErrNone);
 
     //Try to reserve space for session db3.
@@ -506,7 +530,7 @@
 	db2.Close();
 	db1.Close();
 
-	(void)RSqlDatabase::Delete(KTestDatabase);
+	(void)RSqlDatabase::Delete(TheTestDatabase);
     }
 
 void DoTests()
@@ -529,6 +553,11 @@
 
 	__UHEAP_MARK;
 
+	TheTestDrive = KTestDrive;
+	TheTestDir.Copy(KTestDir);
+	TheTestDatabase.Copy(KTestDatabase);
+	TheLargeFileName.Copy(KLargeFileName);
+	
 	CreateTestEnv();
 	DeleteTestFiles();
 	DoTests();
--- a/persistentstorage/sql/TEST/t_sqloom5.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqloom5.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -69,7 +69,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Expresssion evaluated to false\r\n"));
+		TheTest.Printf(_L("*** Expresssion evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -78,7 +78,7 @@
 	if(aValue != aExpected)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqloom6.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqloom6.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -65,7 +65,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Expresssion evaluated to false\r\n"));
+		TheTest.Printf(_L("*** Expresssion evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -74,7 +74,7 @@
 	if(aValue != aExpected)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -199,6 +199,7 @@
     TInt err = TheDb.Open(KDbFile);
     TEST2(err, KErrNone);
     
+    TPtrC name;
     TInt failingAllocationNo = 0;
     err = KErrNoMemory;
     while(err == KErrNoMemory)
@@ -212,7 +213,6 @@
             goto LabelOomPostStep;
             }
         
-        TPtrC name;
         err = TheStmt.ColumnName(0, name);
         if(err != KErrNone)
             {
@@ -282,6 +282,7 @@
     TInt err = TheDb.Open(KDbFile);
     TEST2(err, KErrNone);
     
+    TPtrC name;
     TInt failingAllocationNo = 0;
     err = KErrNoMemory;
     while(err == KErrNoMemory)
@@ -295,7 +296,6 @@
             goto LabelOomPostStep;
             }
         
-        TPtrC name;
         err = TheStmt.ParameterName(0, name);
         if(err != KErrNone)
             {
@@ -365,6 +365,7 @@
     TInt err = TheDb.Open(KDbFile);
     TEST2(err, KErrNone);
     
+    TPtrC data;
     TInt failingAllocationNo = 0;
     err = KErrNoMemory;
     while(err == KErrNoMemory)
@@ -383,7 +384,6 @@
             goto LabelStmtClose;
             }
         
-        TPtrC data;
         err = TheStmt.ColumnText(0, data);
         if(err != KErrNone)
             {
@@ -453,8 +453,11 @@
     TInt err = TheDb.Open(KDbFile);
     TEST2(err, KErrNone);
     
+    TBuf<50> data;
+    RSqlColumnReadStream strm;
     TInt failingAllocationNo = 0;
     err = KErrNoMemory;
+    TInt len = -1;
     while(err == KErrNoMemory)
         {
         TheTest.Printf(_L(" %d"), ++failingAllocationNo);
@@ -471,13 +474,11 @@
             goto LabelCloseStmt;
             }
         
-        RSqlColumnReadStream strm;
         err = strm.ColumnText(TheStmt, 0);
         if(err != KErrNone)
             {
             goto LabelCloseStmt;
             }
-        TBuf<50> data;
         TRAP(err, strm.ReadL(data, 11));
         strm.Close();
         if(err != KErrNone)
@@ -504,7 +505,6 @@
             {
             goto LabelCloseStmt;
             }
-        TInt len = -1;
         TRAP(err, len = strm.Source()->SizeL());//The column value is with 0 length
         strm.Close();
         if(err != KErrNone)
@@ -636,6 +636,7 @@
     TInt err = TheDb.Open(KDbFile);
     TEST2(err, KErrNone);
     
+    TSqlColumnType colType = ESqlNull;
     TInt failingAllocationNo = 0;
     err = KErrNoMemory;
     while(err == KErrNoMemory)
@@ -649,7 +650,6 @@
             goto LabelOomPostStep;
             }
         
-        TSqlColumnType colType = ESqlNull;
         err = TheStmt.DeclaredColumnType(0, colType);
         if(err != KErrNone)
             {
--- a/persistentstorage/sql/TEST/t_sqloomutil.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqloomutil.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -42,6 +42,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -51,7 +52,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %ld, got: %ld\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %ld, got: %ld\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -120,7 +121,7 @@
 	{
 	_LIT(KClientSide, "Client side");
 	_LIT(KServerSide, "Server side");
-	RDebug::Print(_L("=== %S OOM Test succeeded at heap failure rate of %d ===\r\n"),
+	TheTest.Printf(_L("=== %S OOM Test succeeded at heap failure rate of %d ===\r\n"),
 						aOomTestType == EClientSideTest ? &KClientSide() : &KServerSide(),
 						aFailingAllocationNo);
 	}
--- a/persistentstorage/sql/TEST/t_sqloslayer.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqloslayer.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -81,7 +81,7 @@
 	if(!aValue)
 		{
 		TestEnvDestroy();
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -90,7 +90,7 @@
 	if(aValue != aExpected)
 		{
 		TestEnvDestroy();
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlpanic.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlpanic.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -44,6 +44,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -52,7 +53,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlperformance.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlperformance.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -29,6 +29,8 @@
 RTest TheTest(_L("t_sqlperformance test"));
 RFs   TheFs;
 TBuf<200> TheTestTitle;
+TBuf<250> TheLogLine;
+TBuf8<250> TheLogLine8;
 TCmdLineParams TheCmdLineParams;
 TBuf8<200> TheSqlConfigString;
 
@@ -41,7 +43,7 @@
 TFileName TheNonSecureTmpDbName;
 TFileName TheSglRecDbFileName;
 
-_LIT(KSqlServerPrivateDir, "\\private\\10281e17\\");
+//_LIT(KSqlServerPrivateDir, "\\private\\10281e17\\");
 
 _LIT(KCreateDbScript, "z:\\test\\contacts_schema_to_vendors.sql");
 _LIT(KFillDbScript, "z:\\test\\add_simple_contacts.sql");
@@ -83,10 +85,17 @@
 
 const TInt KTestTecordCount = 1000;
 	
+RFile TheLogFile; 
+
 ///////////////////////////////////////////////////////////////////////////////////////
 
 void TestEnvDestroy()
 	{
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		(void)TheLogFile.Flush();
+		TheLogFile.Close();
+		}
 	(void)RSqlDatabase::Delete(TheNonSecureTmpDbName);
 	(void)RSqlDatabase::Delete(TheNonSecureDbName2);
 	(void)RSqlDatabase::Delete(TheNonSecureDbName);
@@ -127,6 +136,13 @@
 
 	err = TheFs.MkDir(TheNonSecureDbName);
 	TEST(err == KErrNone || err == KErrAlreadyExists);
+	
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		err = TheLogFile.Replace(TheFs, TheCmdLineParams.iLogFileName, EFileRead | EFileWrite);
+		TEST2(err, KErrNone);
+		LogConfig(TheLogFile, TheCmdLineParams);
+		}
 	}
 
 //Reads a SQL file and returns the file content as HBUFC string.
@@ -177,7 +193,7 @@
 template TPtrC8 GetNextTrans<TPtrC8, TDesC8>(TPtrC8&, const TDesC8&);
 template TPtrC16 GetNextTrans<TPtrC16, TDesC16>(TPtrC16&, const TDesC16&);
 
-//Prints aTicks parameter (converted to ms)
+//Prints the test case title and execution time in microseconds
 void PrintStats(TUint32 aStartTicks, TUint32 aEndTicks)
 	{
 	static TInt freq = 0;
@@ -192,9 +208,16 @@
 		}
 	const TInt KMicroSecIn1Sec = 1000000;
 	TInt32 us = (diffTicks * KMicroSecIn1Sec) / freq;
-	TheTest.Printf(_L("####Execution time: %d ms\r\n"), us / 1000);
+	TheTest.Printf(_L("%S: %d us\r\n"), &TheTestTitle, us);
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		TheLogLine.Format(_L("%S¬%d¬us\r\n"), &TheTestTitle, us);
+		TheLogLine8.Copy(TheLogLine);
+		(void)TheLogFile.Write(TheLogLine8);
+		}
 	}
-	
+
+/*
 void PrintFileSize(const TDesC& aFileName)
 	{
 	TParse parse;
@@ -208,6 +231,7 @@
 	TheTest.Printf(_L("####FileSize: %d\r\n"), size);
 	file.Close();
 	}
+*/
 
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 ///////     SQL SERVER performance tests
@@ -314,7 +338,6 @@
 //"INSERT" test function
 template <class HBUFC, class PTRC, class DESC, TDbType TYPE> void InsertTest(const TDesC& aDbFileName, const DESC& aCommitStr)
 	{
-	TheTest.Printf(_L("\"Insert\" test\r\n"));
 	RSqlDatabase db = TDbHelper<TYPE>::Open(aDbFileName);
 	ExecuteSqlScript<HBUFC, PTRC, DESC>(db, KFillDbScript, aCommitStr);
 	db.Close();	
@@ -328,7 +351,6 @@
 //"UPDATE" test function (parametrized update)
 template <class DESC, TDbType TYPE> void UpdateTest(const TDesC& aDbFileName, const DESC& aUpdateSql)
 	{
-	TheTest.Printf(_L("\"Update (parametrized)\" test\r\n"));
 	RSqlDatabase db = TDbHelper<TYPE>::Open(aDbFileName);
 	RSqlStatement stmt;
 	TInt err = stmt.Prepare(db, aUpdateSql);
@@ -380,7 +402,6 @@
 //"UPDATE" test function (without parameters) - SQL server
 template <class BUF, class DESC, TDbType TYPE> void UpdateWPTest(const TDesC& aDbFileName, const DESC& aUpdateSql)
 	{
-	TheTest.Printf(_L("\"Update (without parameters)\" test\r\n"));
 	RSqlDatabase db = TDbHelper<TYPE>::Open(aDbFileName);
 	TBuf<200> fmtstr;
 	fmtstr.Copy(aUpdateSql);
@@ -398,7 +419,7 @@
 	TUint32 end = User::FastCounter();
 	PrintStats(start, end);
 	db.Close();
-	PrintFileSize(aDbFileName);
+	//PrintFileSize(aDbFileName);
 	}
 //Explicit UpdateWPTest() template instantiations.
 template void UpdateWPTest<TBuf8<200>, TDesC8, ENonSecureDb>(const TDesC&, const TDesC8&);
@@ -409,7 +430,6 @@
 //"SELECT" test function
 template <class DESC, TDbType TYPE> void SelectTest(const TDesC& aDbFileName, const DESC& aSelectSql)
 	{
-	TheTest.Printf(_L("\"Select\" test\r\n"));
 	RSqlDatabase db = TDbHelper<TYPE>::Open(aDbFileName);
 	RSqlStatement stmt;
 	TInt err = stmt.Prepare(db, aSelectSql);
@@ -443,7 +463,6 @@
 //"DELETE" test function
 template <class DESC, TDbType TYPE> void DeleteTest(const TDesC& aDbFileName, const DESC& aDeleteSql)
 	{
-	TheTest.Printf(_L("\"Delete\" test\r\n"));
 	RSqlDatabase db = TDbHelper<TYPE>::Open(aDbFileName);
 	TUint32 start = User::FastCounter();
 	TInt err = db.Exec(aDeleteSql);
@@ -470,16 +489,20 @@
 	TEST2(err, KErrNone);
 	
 	TDbHelper<TYPE>::Create(aDbFileName);
+	TInt titleLen = TheTestTitle.Length(); 
+	TheTestTitle.Append(_L(", insert"));
 	InsertTest<HBUFC, PTRC, DESC, TYPE>(aDbFileName, aCommitStr);
-	PrintFileSize(aDbFileName);
+	//PrintFileSize(aDbFileName);
 	(void)fm->Copy(aDbFileName, TheNonSecureTmpDbName);
 	
+	TheTestTitle.Replace(titleLen, 8, _L(", update"));
 	UpdateTest<DESC, TYPE>(aDbFileName, aUpdateSql);
-	PrintFileSize(aDbFileName);
+	//PrintFileSize(aDbFileName);
 	SelectTest<DESC, TYPE>(aDbFileName, aSelectSql);
 	
+	TheTestTitle.Replace(titleLen, 8, _L(", delete"));
 	DeleteTest<DESC, TYPE>(aDbFileName, aDeleteSql);
-	PrintFileSize(aDbFileName);
+	//PrintFileSize(aDbFileName);
 	
 	(void)fm->Copy(TheNonSecureTmpDbName, aDbFileName);
 	(void)fm->Delete(TheNonSecureTmpDbName);
@@ -614,7 +637,6 @@
 //Explicit InsertTest2() template specialization for UTF8 encoded SQL strings
 template <> void InsertTest2<HBufC8, TPtrC8, TDesC8>(sqlite3* aDbHandle, const TDesC& aScriptFileName, const TDesC8& aCommitStr)
 	{
-	TheTest.Printf(_L("\"Insert\" test\r\n"));
 	HBufC8* fillDbScript = ReadSqlScript<HBufC8>(aScriptFileName);
 	TUint32 start = User::FastCounter();
 	TPtrC8 ptr(fillDbScript->Des());
@@ -635,7 +657,6 @@
 //Explicit InsertTest2() template specialization for UTF16 encoded SQL strings
 template <> void InsertTest2<HBufC16, TPtrC16, TDesC16>(sqlite3* aDbHandle, const TDesC& aScriptFileName, const TDesC16& aCommitStr)
 	{
-	TheTest.Printf(_L("\"Insert\" test\r\n"));
 	HBufC16* fillDbScript = ReadSqlScript<HBufC16>(aScriptFileName);
 	TUint32 start = User::FastCounter();
 	TPtrC16 ptr(fillDbScript->Des());
@@ -679,7 +700,6 @@
 //Explicit UpdateTest2() template specialization for UTF8 encoded SQL strings
 template <> void UpdateTest2<HBufC8, TDesC8>(sqlite3* aDbHandle, const TDesC8& aUpdateSql)
 	{
-	TheTest.Printf(_L("\"Update\" test\r\n"));
 	HBufC8* sql = HBufC8::New(aUpdateSql.Length() + 1);
 	TEST(sql != NULL);
 	sql->Des().Copy(aUpdateSql);
@@ -738,7 +758,6 @@
 //Explicit UpdateTest2() template specialization for UTF16 encoded SQL strings
 template <> void UpdateTest2<HBufC16, TDesC16>(sqlite3* aDbHandle, const TDesC16& aUpdateSql)
 	{
-	TheTest.Printf(_L("\"Update\" test\r\n"));
 	HBufC16* sql = HBufC16::New(aUpdateSql.Length() + 1);
 	TEST(sql != NULL);
 	sql->Des().Copy(aUpdateSql);
@@ -800,7 +819,6 @@
 //Explicit UpdateWPTest2() template specialization for UTF8 encoded SQL strings
 template <> void UpdateWPTest2<TDesC8>(const TDesC& aDbName, const TDesC8& aUpdateSql)
 	{
-	TheTest.Printf(_L("\"Update (without parameters)\" test\r\n"));
 	TBuf<200> fmtstr;
 	fmtstr.Copy(aUpdateSql);
 
@@ -830,8 +848,6 @@
 //Explicit UpdateWPTest2() template specialization for UTF16 encoded SQL strings
 template <> void UpdateWPTest2<TDesC16>(const TDesC& aDbName, const TDesC16& aUpdateSql)
 	{
-	TheTest.Printf(_L("\"Update (without parameters)\" test\r\n"));
-
 	sqlite3SymbianLibInit();
 	sqlite3* dbHandle = TDbHelper2<TCmdLineParams::EDbUtf16>::Open(aDbName);
 	
@@ -872,7 +888,6 @@
 //Explicit SelectTest2() template specialization for UTF8 encoded SQL strings
 template <> void SelectTest2<HBufC8, TDesC8>(sqlite3* aDbHandle, const TDesC8& aSelectSql)
 	{
-	TheTest.Printf(_L("\"Select\" test\r\n"));
 	HBufC8* sql = HBufC8::New(aSelectSql.Length() + 1);
 	TEST(sql != NULL);
 	sql->Des().Copy(aSelectSql);
@@ -908,7 +923,6 @@
 //Explicit SelectTest2() template specialization for UTF16 encoded SQL strings
 template <> void SelectTest2<HBufC16, TDesC16>(sqlite3* aDbHandle, const TDesC16& aSelectSql)
 	{
-	TheTest.Printf(_L("\"Select\" test\r\n"));
 	HBufC16* sql = HBufC16::New(aSelectSql.Length() + 1);
 	TEST(sql != NULL);
 	sql->Des().Copy(aSelectSql);
@@ -946,7 +960,6 @@
 //Explicit DeleteTest2() template specialization for UTF8 encoded SQL strings
 template <> void DeleteTest2<HBufC8, TDesC8>(sqlite3* aDbHandle, const TDesC8& aDeleteSql)
 	{
-	TheTest.Printf(_L("\"Delete\" test\r\n"));
 	HBufC8* sql = HBufC8::New(aDeleteSql.Length() + 1);
 	TEST(sql != NULL);
 	sql->Des().Copy(aDeleteSql);
@@ -962,7 +975,6 @@
 //Explicit DeleteTest2() template specialization for UTF16 encoded SQL strings
 template <> void DeleteTest2<HBufC16, TDesC16>(sqlite3* aDbHandle, const TDesC16& aDeleteSql)
 	{
-	TheTest.Printf(_L("\"Delete\" test\r\n"));
 	HBufC16* sql = HBufC16::New(aDeleteSql.Length() + 1);
 	TEST(sql != NULL);
 	sql->Des().Copy(aDeleteSql);
@@ -1004,24 +1016,29 @@
 	TDbHelper2<TYPE>::Create(aDbFileName);
 	
 	sqlite3* dbHandle = TDbHelper2<TYPE>::Open(aDbFileName);
+	TInt titleLen = TheTestTitle.Length(); 
+	TheTestTitle.Append(_L(", insert"));
 	InsertTest2<HBUFC, PTRC, DESC>(dbHandle, KFillDbScript(), aCommitStr);
 	(void)sqlite3_close(dbHandle); dbHandle = NULL;
-	PrintFileSize(aDbFileName);
+	//PrintFileSize(aDbFileName);
 
 	dbHandle = TDbHelper2<TYPE>::Open(aDbFileName);
+	TheTestTitle.Replace(titleLen, 8, _L(", update"));
 	UpdateTest2<HBUFC, DESC>(dbHandle, aUpdateSql);
 	(void)sqlite3_close(dbHandle); dbHandle = NULL;
 
 	dbHandle = TDbHelper2<TYPE>::Open(aDbFileName);
+	TheTestTitle.Replace(titleLen, 8, _L(", select"));
 	SelectTest2<HBUFC, DESC>(dbHandle, aSelectSql);
 	(void)sqlite3_close(dbHandle); dbHandle = NULL;
 
 	(void)fm->Copy(aDbFileName, TheNonSecureTmpDbName);
 	
 	dbHandle = TDbHelper2<TYPE>::Open(aDbFileName);
+	TheTestTitle.Replace(titleLen, 8, _L(", delete"));
 	DeleteTest2<HBUFC, DESC>(dbHandle, aDeleteSql);
 	(void)sqlite3_close(dbHandle); dbHandle = NULL;
-	PrintFileSize(aDbFileName);
+	//PrintFileSize(aDbFileName);
 	
 	sqlite3SymbianLibFinalize();
 	CloseSTDLIB();
@@ -1240,67 +1257,61 @@
 	{
 	TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-1648 SQL performance tests"));
 	
-	TheTest.Printf(_L("Single \"update\" test\r\n"));
+	TheTestTitle.Copy(_L("Single update"));
 	SingleUpdateTest();
 	
-	TheTest.Printf(_L("Single \"insert\" test\r\n"));
+	TheTestTitle.Copy(_L("Single insert"));
 	SingleInsertTest();
 	
-	TheTest.Printf(_L("Single \"delete\" test\r\n"));
+	TheTestTitle.Copy(_L("Single delete"));
 	SingleDeleteTest();
 	
-	TheTestTitle.Format(_L("SERVER, UTF8 SQL strings, non-secure, encoding: \"%S\", page size: %d\r\n"), 
-			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
-	TheTest.Printf(TheTestTitle);
+	TheTestTitle.Format(_L("SERVER, sql:UTF8, dbencoding:%S, non-secure"),
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8);
 	PerformanceTest<HBufC8, TPtrC8, TDesC8, ENonSecureDb>(TheNonSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
 
-	TheTestTitle.Format(_L("SERVER, UTF8 SQL strings, non-secure, update test (without parameters), encoding: \"%S\", page size: %d\r\n"), 
-			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
-	TheTest.Printf(TheTestTitle);
+	TheTestTitle.Format(_L("SERVER, sql:UTF8, dbencoding:%S, non-secure, update without parameters"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8);
 	UpdateWPTest<TBuf8<200>, TDesC8, ENonSecureDb>(TheNonSecureDbName, KUpdateSql2_8());
 
-	TheTestTitle.Format(_L("SERVER, UTF8 SQL strings, secure, encoding: \"%S\", page size: %d\r\n"), 
-			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
-	TheTest.Printf(TheTestTitle);
+	TheTestTitle.Format(_L("SERVER, sql:UTF8, dbencoding:%S, secure"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8);
 	PerformanceTest<HBufC8, TPtrC8, TDesC8, ESecureDb>(TheSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
 
-	TheTest.Printf(_L("SQLITE, UTF8 encoded database, UTF8 SQL strings\r\n"));
+	TheTestTitle.Copy(_L("SQLITE, sql:UTF8, dbencoding:UTF8"));
 	PerformanceTest2<TCmdLineParams::EDbUtf8, HBufC8, TPtrC8, TDesC8>(TheNonSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
 
-	TheTest.Printf(_L("SQLITE, UTF8 encoded database, UTF8 SQL strings, update test (without parameters)\r\n"));
+	TheTestTitle.Copy(_L("SQLITE, sql:UTF8, dbencoding:UTF8, update without parameters"));
 	UpdateWPTest2<TDesC8>(TheNonSecureDbName, KUpdateSql2_8());
 
-	TheTest.Printf(_L("SQLITE, UTF16 encoded database, UTF8 SQL strings\r\n"));
+	TheTestTitle.Copy(_L("SQLITE, sql:UTF8, dbencoding:UTF16"));
 	PerformanceTest2<TCmdLineParams::EDbUtf16, HBufC8, TPtrC8, TDesC8>(TheNonSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
 
-	TheTestTitle.Format(_L("SERVER, UTF16 SQL strings, non-secure, encoding: \"%S\", page size: %d\r\n"), 
-			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
-	TheTest.Printf(TheTestTitle);
+	TheTestTitle.Format(_L("SERVER, sql:UTF16, dbencoding:%S, non-secure"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8);
 	PerformanceTest<HBufC16, TPtrC16, TDesC16, ENonSecureDb>(TheNonSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
 	
-	TheTestTitle.Format(_L("SERVER, UTF16 SQL strings, non-secure, update test (without parameters), encoding: \"%S\", page size: %d\r\n"), 
-			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
-	TheTest.Printf(TheTestTitle);
+	TheTestTitle.Format(_L("SERVER, sql:UTF16, dbencoding:%S, non-secure, update without parameters"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8);
 	UpdateWPTest<TBuf16<200>, TDesC16, ENonSecureDb>(TheNonSecureDbName, KUpdateSql2_16());
 
-	TheTestTitle.Format(_L("SERVER, UTF16 SQL strings, secure, encoding: \"%S\", page size: %d\r\n"), 
-			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
-	TheTest.Printf(TheTestTitle);
+	TheTestTitle.Format(_L("SERVER, sql:UTF16, dbencoding:%S, secure"), 
+			TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8);
 	PerformanceTest<HBufC16, TPtrC16, TDesC16, ESecureDb>(TheSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
 
-	TheTest.Printf(_L("SQLITE, UTF8 encoded database, UTF16 SQL strings\r\n"));
+	TheTestTitle.Copy(_L("SQLITE, sql:UTF16, dbencoding:UTF8"));
 	PerformanceTest2<TCmdLineParams::EDbUtf8, HBufC16, TPtrC16, TDesC16>(TheNonSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
 
-	TheTest.Printf(_L("SQLITE, UTF16 encoded database, UTF16 SQL strings\r\n"));
+	TheTestTitle.Copy(_L("SQLITE, sql:UTF16, dbencoding:UTF16"));
 	PerformanceTest2<TCmdLineParams::EDbUtf16, HBufC16, TPtrC16, TDesC16>(TheNonSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
 
-	TheTest.Printf(_L("SQLITE, UTF16 encoded database, UTF16 SQL strings, update test (without parameters)\r\n"));
+	TheTestTitle.Copy(_L("SQLITE, sql:UTF16, dbencoding:UTF16, update without parameters"));
 	UpdateWPTest2<TDesC16>(TheNonSecureDbName, KUpdateSql2_16());
 
-	TheTest.Printf(_L("Accessing column value by index or by name\r\n"));
+	TheTestTitle.Copy(_L("Accessing column value by index or by name"));
 	ColumnValueAccessTest();
 	
-	TheTest.Printf(_L("Retrieving data from UTF8 Database using SELECT LIKE statements\r\n"));
+	TheTestTitle.Copy(_L("Retrieving data from UTF8 Database using SELECT LIKE statements"));
 	SelectLikeQueryPerfTest();
 
 	}
--- a/persistentstorage/sql/TEST/t_sqlperformance2.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlperformance2.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -16,6 +16,7 @@
 #include <e32test.h>
 #include <bautils.h>
 #include <sqldb.h>
+#include <hal.h>
 #include "t_sqlcmdlineutil.h"
 
 ///////////////////////////////////////////////////////////////////////////////////////
@@ -29,15 +30,26 @@
 TCmdLineParams 	TheCmdLineParams;
 TBuf8<200> 		TheSqlConfigString;
 
+TBuf<250> 		TheLogLine;
+TBuf8<250> 		TheLogLine8;
+RFile 			TheLogFile; 
+
 _LIT(KUtf8,  "UTF8 ");
 _LIT(KUtf16, "UTF16");
 
 TInt TheBlobSize = 1024 * 256;
+TInt TheDbSize1, TheDbSize2;
+TUint32 TheStartTicks, TheEndTicks;
 
 ///////////////////////////////////////////////////////////////////////////////////////
 
 void TestEnvDestroy()
 	{
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		(void)TheLogFile.Flush();
+		TheLogFile.Close();
+		}
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
 	TheFs.Close();
@@ -98,33 +110,65 @@
 	_LIT(KType11,"Rotating media");
 	TPtrC KMediaTypeNames[] = {KType1(), KType2(), KType3(), KType4(), KType5(), KType6(), KType7(), KType8(), KType9(), KType10(), KType11()};
 	TheTest.Printf(_L("Drive %C: %S. File: \"%S\"\r\n"), 'A' + driveNo, &KMediaTypeNames[driveInfo.iType], &TheDbFileName);
-	}
+	
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		err = TheLogFile.Replace(TheFs, TheCmdLineParams.iLogFileName, EFileRead | EFileWrite);
+		TEST2(err, KErrNone);
+		LogConfig(TheLogFile, TheCmdLineParams);
+		}
+    }
 	
-void PrintWriteTime(TTimeIntervalMicroSeconds aTime, TTimeIntervalMicroSeconds aWriteTime, TTimeIntervalMicroSeconds aCommitTime)
+//Prints the test case title and execution time in microseconds
+void PrintWriteStats()
 	{
-	TheTest.Printf(_L("####Execution time: %d ms, Write: %d ms, Commit: %d ms\r\n"), 
-		(TInt)(aTime.Int64() / 1000), (TInt)(aWriteTime.Int64() / 1000), (TInt)(aCommitTime.Int64() / 1000));
+	static TInt freq = 0;
+	if(freq == 0)
+		{
+		TEST2(HAL::Get(HAL::EFastCounterFrequency, freq), KErrNone);
+		}
+	TInt64 diffTicks = (TInt64)TheEndTicks - (TInt64)TheStartTicks;
+	if(diffTicks < 0)
+		{
+		diffTicks = KMaxTUint32 + diffTicks + 1;
+		}
+	const TInt KMicroSecIn1Sec = 1000000;
+	TInt32 us = (diffTicks * KMicroSecIn1Sec) / freq;
+	TheTest.Printf(_L("%S, blob: %d Kb, db size before: %d Kb, db size after: %d Kb, %d us\r\n"), 
+		&TheTestTitle, TheBlobSize / 1024, TheDbSize1 / 1024, TheDbSize2 / 1024, us);
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		TheLogLine.Format(_L("%S, blob: %d Kb, db size before: %d Kb, db size after: %d Kb¬%d¬us\r\n"), 
+			&TheTestTitle, TheBlobSize / 1024, TheDbSize1 / 1024, TheDbSize2 / 1024, us);
+		TheLogLine8.Copy(TheLogLine);
+		(void)TheLogFile.Write(TheLogLine8);
+		}
 	}
 
-void PrintReadTime(TTimeIntervalMicroSeconds aPrepareTime, TTimeIntervalMicroSeconds aNextTime, TTimeIntervalMicroSeconds aReadTime)
+//Prints the test case title and execution time in microseconds
+void PrintReadStats()
 	{
-	TInt executionTime = (TInt)(aPrepareTime.Int64() / 1000) + (TInt)(aNextTime.Int64() / 1000) + (TInt)(aReadTime.Int64() / 1000);
-	TheTest.Printf(_L("####Execution time: %d ms, Prepare: %d ms, Next: %d ms, Read: %d ms\r\n"), 
-		executionTime, (TInt)(aPrepareTime.Int64() / 1000), (TInt)(aNextTime.Int64() / 1000), (TInt)(aReadTime.Int64() / 1000));
+	static TInt freq = 0;
+	if(freq == 0)
+		{
+		TEST2(HAL::Get(HAL::EFastCounterFrequency, freq), KErrNone);
+		}
+	TInt64 diffTicks = (TInt64)TheEndTicks - (TInt64)TheStartTicks;
+	if(diffTicks < 0)
+		{
+		diffTicks = KMaxTUint32 + diffTicks + 1;
+		}
+	const TInt KMicroSecIn1Sec = 1000000;
+	TInt32 us = (diffTicks * KMicroSecIn1Sec) / freq;
+	TheTest.Printf(_L("%S, blob: %d Kb, %d us\r\n"), &TheTestTitle, TheBlobSize / 1024, us);
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		TheLogLine.Format(_L("%S, blob: %d Kb¬%d¬us\r\n"), &TheTestTitle, TheBlobSize / 1024, us);
+		TheLogLine8.Copy(TheLogLine);
+		(void)TheLogFile.Write(TheLogLine8);
+		}
 	}
 
-void PrintReadTime(TTimeIntervalMicroSeconds aOpenTime, TTimeIntervalMicroSeconds aReadTime)
-	{
-	TInt executionTime = (TInt)(aOpenTime.Int64() / 1000) + (TInt)(aReadTime.Int64() / 1000);
-	TheTest.Printf(_L("####Execution time: %d ms, Open: %d ms, Read: %d ms\r\n"), 
-		executionTime, (TInt)(aOpenTime.Int64() / 1000), (TInt)(aReadTime.Int64() / 1000));
-	}
-	
-void PrintFileSize(RSqlDatabase& aDb)
-	{
-	TheTest.Printf(_L("####FileSize: %d\r\n"), aDb.Size());
-	}
-		
 ///////////////////////////////////////////////////////////////////////////////////////
 	
 void CreateTestDb()
@@ -136,44 +180,29 @@
 	TEST2(err, 1);
 	}
 
-void DoWriteBlobIncrL(const TDesC8& aData, 
-					  TTime& aT1, 
-					  TTime& aT2,
-					  TTime& aT3,
-					  TTime& aT4)
+void DoWriteBlobIncrL(const TDesC8& aData)
 	{
-	
 	RSqlBlobWriteStream strm;
 	CleanupClosePushL(strm);
 	
-	aT1.HomeTime();
 	strm.OpenL(TheDb, _L("A"), _L("B"));	
 	strm.WriteL(aData);
-	aT2.HomeTime();
 	
-	aT3.HomeTime();
 	strm.CommitL();
-	aT4.HomeTime();
 	
 	CleanupStack::PopAndDestroy(&strm);
 	}
 	
-void InsertZeroBlob(TBool aDoPrintTime = EFalse)
+void InsertZeroBlob()
 	{
 	TBuf<100> sql;
 	sql.Format(_L("INSERT INTO A VALUES(zeroblob(%d))"), TheBlobSize);
 	
-	TTime t1, t2;
-	t1.HomeTime();
+	TheStartTicks = User::FastCounter();
 	TInt err = TheDb.Exec(sql);
-	t2.HomeTime();
+	TheEndTicks = User::FastCounter();
+	
 	TEST2(err, 1);
-	TTimeIntervalMicroSeconds insertTime = t2.MicroSecondsFrom(t1);
-	
-	if(aDoPrintTime)
-		{
-		PrintWriteTime(insertTime, TTimeIntervalMicroSeconds(0), TTimeIntervalMicroSeconds(0));
-		}
 	}
 	
 void InsertRealBlob()
@@ -213,13 +242,10 @@
 	dataptr.SetLength(TheBlobSize);
 	dataptr.Fill(TChar('B'));
 	
-	TTimeIntervalMicroSeconds totalTime, writeTime, commitTime;
-
 	TBuf<100> sql;
 	sql.Format(_L("INSERT INTO A VALUES(zeroblob(%d))"), TheBlobSize);
 
-	TTime t1, t2, subt1, subt2, subt3, subt4;
-	t1.HomeTime();
+	TheStartTicks = User::FastCounter();
 	
 	TInt err = TheDb.Exec(_L8("BEGIN"));
 	TEST(err >= 0);
@@ -227,19 +253,13 @@
 	err = TheDb.Exec(sql);
 	TEST2(err, 1);
 	
-	TRAP(err, DoWriteBlobIncrL(dataptr, subt1, subt2, subt3, subt4));
+	TRAP(err, DoWriteBlobIncrL(dataptr));
 	TEST2(err, KErrNone);
 	
 	err = TheDb.Exec(_L8("COMMIT"));
 	TEST(err >= 0);
 		
-	t2.HomeTime();
-	totalTime = t2.MicroSecondsFrom(t1);
-	
-	writeTime = subt2.MicroSecondsFrom(subt1);
-	commitTime = subt4.MicroSecondsFrom(subt3);
-	
-	PrintWriteTime(totalTime, writeTime, commitTime);
+	TheEndTicks = User::FastCounter();
 	
 	delete data;
 	}
@@ -255,16 +275,12 @@
 	sql.Replace(0, KStr().Length(), KStr);
 	sql.Append(_L8("')"));
 
-	TTime t1, t2;
+	TheStartTicks = User::FastCounter();
 	
-	t1.HomeTime();		
 	TInt err = TheDb.Exec(sql);
-	t2.HomeTime();
 	TEST2(err, 1);
 
-	TTimeIntervalMicroSeconds totalTime = t2.MicroSecondsFrom(t1);
-	
-	PrintWriteTime(totalTime, TTimeIntervalMicroSeconds(0), TTimeIntervalMicroSeconds(0));
+	TheEndTicks = User::FastCounter();
 	
 	delete buf;	
 	}
@@ -277,10 +293,7 @@
 	dataptr.SetLength(TheBlobSize);
 	dataptr.Fill(TChar('A'));
 	
-	TTimeIntervalMicroSeconds totalTime, writeTime, commitTime;
-
-	TTime t1, t2, t3, t4, t5, t6;
-	t1.HomeTime();
+	TheStartTicks = User::FastCounter();
 				
 	RSqlStatement stmt;
 	TInt err = stmt.Prepare(TheDb, _L8("INSERT INTO A VALUES(:Prm)"));
@@ -290,31 +303,20 @@
 	err = strm.BindBinary(stmt, 0);
 	TEST2(err, KErrNone);
 	
-	t3.HomeTime();
 	TRAP(err, strm.WriteL(dataptr));
-	t4.HomeTime();
 	TEST2(err, KErrNone);
 	
-	t5.HomeTime();
 	TRAP(err, strm.CommitL());
-	t6.HomeTime();
 	TEST2(err, KErrNone);
 	
 	err = stmt.Exec();	
+	TEST2(err, 1);
 	
 	strm.Close();
 	stmt.Close();	
 	
-	t2.HomeTime();
-	TEST2(err, 1);
+	TheEndTicks = User::FastCounter();
 					
-	totalTime = t2.MicroSecondsFrom(t1);
-	
-	writeTime = t4.MicroSecondsFrom(t3);
-	commitTime = t6.MicroSecondsFrom(t5);
-	
-	PrintWriteTime(totalTime, writeTime, commitTime);
-			
 	delete data;	
 	}
 	
@@ -326,27 +328,18 @@
 	dataptr.SetLength(TheBlobSize);
 	dataptr.Fill(TChar('A'));
 	
-	TTimeIntervalMicroSeconds totalTime, writeTime, commitTime;
-
-	TTime t1, t2, subt1, subt2, subt3, subt4;
-	t1.HomeTime();
+	TheStartTicks = User::FastCounter();
 	
 	TInt err = TheDb.Exec(_L8("BEGIN"));
 	TEST(err >= 0);
 		
-	TRAP(err, DoWriteBlobIncrL(dataptr, subt1, subt2, subt3, subt4));
+	TRAP(err, DoWriteBlobIncrL(dataptr));
 	TEST2(err, KErrNone);
 	
 	err = TheDb.Exec(_L8("COMMIT"));
 	TEST(err >= 0);
-		
-	t2.HomeTime();
-	totalTime = t2.MicroSecondsFrom(t1);
-	
-	writeTime = subt2.MicroSecondsFrom(subt1);
-	commitTime = subt4.MicroSecondsFrom(subt3);
-	
-	PrintWriteTime(totalTime, writeTime, commitTime);
+			
+	TheEndTicks = User::FastCounter();
 	
 	delete data;
 	}
@@ -362,16 +355,11 @@
 	sql.Replace(0, KStr().Length(), KStr);
 	sql.Append(_L8("'"));
 
-	TTime t1, t2;
-	t1.HomeTime();			
+	TheStartTicks = User::FastCounter();
 	TInt err = TheDb.Exec(sql);	
-	t2.HomeTime();
 	TEST2(err, 1);
+	TheEndTicks = User::FastCounter();
 
-	TTimeIntervalMicroSeconds totalTime = t2.MicroSecondsFrom(t1);
-	
-	PrintWriteTime(totalTime, TTimeIntervalMicroSeconds(0), TTimeIntervalMicroSeconds(0));
-	
 	delete buf;	
 	}
 
@@ -383,10 +371,7 @@
 	dataptr.SetLength(TheBlobSize);
 	dataptr.Fill(TChar('B'));
 	
-	TTimeIntervalMicroSeconds totalTime, writeTime, commitTime;
-
-	TTime t1, t2, t3, t4, t5, t6;
-	t1.HomeTime();
+	TheStartTicks = User::FastCounter();
 				
 	RSqlStatement stmt;
 	TInt err = stmt.Prepare(TheDb, _L8("UPDATE A SET B=(:Prm)"));
@@ -396,31 +381,20 @@
 	err = strm.BindBinary(stmt, 0);
 	TEST2(err, KErrNone);
 	
-	t3.HomeTime();;
 	TRAP(err, strm.WriteL(dataptr));
-	t4.HomeTime();
 	TEST2(err, KErrNone);
 	
-	t5.HomeTime();
 	TRAP(err, strm.CommitL());
-	t6.HomeTime();
 	TEST2(err, KErrNone);
 	
 	err = stmt.Exec();	
+	TEST2(err, 1);
 
 	strm.Close();		
 	stmt.Close();	
 
-	t2.HomeTime();
-	TEST2(err, 1);
-	
-	totalTime = t2.MicroSecondsFrom(t1);
+	TheEndTicks = User::FastCounter();
 	
-	writeTime = t4.MicroSecondsFrom(t3);
-	commitTime = t6.MicroSecondsFrom(t5);
-	
-	PrintWriteTime(totalTime, writeTime, commitTime);
-			
 	delete data;	
 	}
 
@@ -436,125 +410,118 @@
 */
 void BlobWriteTest()
 	{	
-	TheTest.Printf(_L("Blob size=%d Kb\r\n"), TheBlobSize / 1024);
-	
 	//Insert a blob
-	TheTest.Printf(_L("==================================================================\r\n"));
 	
 	CreateTestDb();
-	TheTest.Printf(_L("INSERT zeroblob - RSqlDatabase::Exec()\r\n"));
-	PrintFileSize(TheDb);
-	InsertZeroBlob(ETrue);
-	PrintFileSize(TheDb);
+	TheTestTitle.Copy(_L("INSERT zeroblob - RSqlDatabase::Exec()"));
+	TheDbSize1 = TheDb.Size();
+	InsertZeroBlob();
+	TheDbSize2 = TheDb.Size();
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
+	PrintWriteStats();
 				
 	CreateTestDb();
-	TheTest.Printf(_L("INSERT blob - RSqlParamWriteStream\r\n"));
-	PrintFileSize(TheDb);
+	TheTestTitle.Copy(_L("INSERT blob - RSqlParamWriteStream"));
+	TheDbSize1 = TheDb.Size();
 	InsertBlobBindStreamPrm();
-	PrintFileSize(TheDb);
+	TheDbSize2 = TheDb.Size();
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
+	PrintWriteStats();
 	
 	CreateTestDb();
-	TheTest.Printf(_L("INSERT blob - RSqlDatabase::Exec()\r\n"));
-	PrintFileSize(TheDb);
+	TheTestTitle.Copy(_L("INSERT blob - RSqlDatabase::Exec()"));
+	TheDbSize1 = TheDb.Size();
 	InsertBlobExec();
-	PrintFileSize(TheDb);
+	TheDbSize2 = TheDb.Size();
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
+	PrintWriteStats();
 	
 	CreateTestDb();
-	TheTest.Printf(_L("INSERT blob - RSqlBlobWriteStream + transaction\r\n"));
-	PrintFileSize(TheDb);
+	TheTestTitle.Copy(_L("INSERT blob - RSqlBlobWriteStream + transaction"));
+	TheDbSize1 = TheDb.Size();
 	InsertBlobIncr();
-	PrintFileSize(TheDb);
+	TheDbSize2 = TheDb.Size();
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
+	PrintWriteStats();
 						
 	// Update a blob 
-	TheTest.Printf(_L("==================================================================\r\n"));
 		
 	CreateTestDb();
-	TheTest.Printf(_L("UPDATE zeroblob - RSqlParamWriteStream\r\n"));
-	PrintFileSize(TheDb);
+	TheTestTitle.Copy(_L("UPDATE zeroblob - RSqlParamWriteStream"));
+	TheDbSize1 = TheDb.Size();
 	InsertZeroBlob();
 	UpdateBlobBindStreamPrm();
-	PrintFileSize(TheDb);
+	TheDbSize2 = TheDb.Size();
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
+	PrintWriteStats();
 		
 	CreateTestDb();
-	TheTest.Printf(_L("UPDATE blob - RSqlParamWriteStream\r\n"));
-	PrintFileSize(TheDb);
+	TheTestTitle.Copy(_L("UPDATE blob - RSqlParamWriteStream"));
+	TheDbSize1 = TheDb.Size();
 	InsertRealBlob();
 	UpdateBlobBindStreamPrm();
-	PrintFileSize(TheDb);
+	TheDbSize2 = TheDb.Size();
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
+	PrintWriteStats();
 			
 	CreateTestDb();
-	TheTest.Printf(_L("UPDATE zeroblob - RSqlDatabase::Exec()\r\n"));
-	PrintFileSize(TheDb);
+	TheTestTitle.Copy(_L("UPDATE zeroblob - RSqlDatabase::Exec()"));
+	TheDbSize1 = TheDb.Size();
 	InsertZeroBlob();
 	UpdateBlobExec();
-	PrintFileSize(TheDb);
+	TheDbSize2 = TheDb.Size();
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
+	PrintWriteStats();
 		
 	CreateTestDb();
-	TheTest.Printf(_L("UPDATE blob - RSqlDatabase::Exec()\r\n"));
-	PrintFileSize(TheDb);
+	TheTestTitle.Copy(_L("UPDATE blob - RSqlDatabase::Exec()"));
+	TheDbSize1 = TheDb.Size();
 	InsertRealBlob();
 	UpdateBlobExec();
-	PrintFileSize(TheDb);
+	TheDbSize2 = TheDb.Size();
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
+	PrintWriteStats();
 		
 	CreateTestDb();
-	TheTest.Printf(_L("UPDATE zeroblob - RSqlBlobWriteStream + transaction\r\n"));
-	PrintFileSize(TheDb);
+	TheTestTitle.Copy(_L("UPDATE zeroblob - RSqlBlobWriteStream + transaction"));
+	TheDbSize1 = TheDb.Size();
 	InsertZeroBlob();
 	UpdateBlobIncr();
-	PrintFileSize(TheDb);
+	TheDbSize2 = TheDb.Size();
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
+	PrintWriteStats();
 		
 	CreateTestDb();
-	TheTest.Printf(_L("UPDATE blob - RSqlBlobWriteStream + transaction\r\n"));
-	PrintFileSize(TheDb);
+	TheTestTitle.Copy(_L("UPDATE blob - RSqlBlobWriteStream + transaction"));
+	TheDbSize1 = TheDb.Size();
 	InsertRealBlob();
 	UpdateBlobIncr();
-	PrintFileSize(TheDb);
+	TheDbSize2 = TheDb.Size();
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);	
+	PrintWriteStats();
 	}
 
 void DoReadBlobIncrL(TDes8& aDes, TInt aMaxLength)
 	{
-	TTime t1, t2, t3, t4;
-	
-	TTimeIntervalMicroSeconds openTime, readTime; 
+	TheStartTicks = User::FastCounter();
 	
 	RSqlBlobReadStream strm;
 	CleanupClosePushL(strm);
-	
-	t1.HomeTime();
 	strm.OpenL(TheDb, _L("A"), _L("B"), 1);
-	t2.HomeTime();
-	
-	openTime = t2.MicroSecondsFrom(t1);
-		
-	t3.HomeTime();
 	strm.ReadL(aDes, aMaxLength);
-	t4.HomeTime();
+	CleanupStack::PopAndDestroy(&strm);
 
-	readTime = t4.MicroSecondsFrom(t3);
-	
-	PrintReadTime(openTime, readTime);
-
-	CleanupStack::PopAndDestroy(&strm);
+	TheEndTicks = User::FastCounter();
 	}
 
 void ReadBlobIncr()
@@ -576,63 +543,44 @@
 	TEST(data != NULL);
 	TPtr8 dataptr = data->Des();
 	
-	TTime t1, t2, t3, t4, t5, t6;
-	TTimeIntervalMicroSeconds prepareTime, nextTime, readTime;
+	TheStartTicks = User::FastCounter();
 	
 	RSqlStatement stmt;
-	t1.HomeTime();
 	TInt err = stmt.Prepare(TheDb, _L8("SELECT B FROM A WHERE ROWID=1"));
-	t2.HomeTime();
 	TEST2(err, KErrNone);
-	prepareTime = t2.MicroSecondsFrom(t1);
 
-	t3.HomeTime();
 	err = stmt.Next();
-	t4.HomeTime();
 	TEST2(err, KSqlAtRow);
-	nextTime = t4.MicroSecondsFrom(t3);
 	
-	t5.HomeTime();
 	err = stmt.ColumnBinary(0, dataptr);
-	t6.HomeTime();
 	TEST2(err, KErrNone);
 	TEST2(dataptr.Length(), TheBlobSize);
-	readTime = t6.MicroSecondsFrom(t5);
-		
-	PrintReadTime(prepareTime, nextTime, readTime);
 	stmt.Close();
+
+	TheEndTicks = User::FastCounter();
 	
 	delete data;
 	}
 
 void ReadBlobColPtr()
 	{
-	TTime t1, t2, t3, t4, t5, t6;
-	TTimeIntervalMicroSeconds prepareTime, nextTime, readTime;
+	TheStartTicks = User::FastCounter();
 	
 	RSqlStatement stmt;
-	t1.HomeTime();
 	TInt err = stmt.Prepare(TheDb, _L8("SELECT B FROM A WHERE ROWID=1"));
-	t2.HomeTime();
 	TEST2(err, KErrNone);
-	prepareTime = t2.MicroSecondsFrom(t1);
 	
-	t3.HomeTime();
 	err = stmt.Next();
-	t4.HomeTime();
 	TEST2(err, KSqlAtRow);
-	nextTime = t4.MicroSecondsFrom(t3);
 	
 	TPtrC8 data;
-	t5.HomeTime();
 	err = stmt.ColumnBinary(0, data);
-	t6.HomeTime();
 	TEST2(err, KErrNone);
 	TEST2(data.Length(), TheBlobSize);
-	readTime = t6.MicroSecondsFrom(t5);
 
-	PrintReadTime(prepareTime, nextTime, readTime);
 	stmt.Close();
+
+	TheEndTicks = User::FastCounter();
 	}
 
 void ReadBlobStreamCol()
@@ -641,36 +589,26 @@
 	TEST(data != NULL);
 	TPtr8 dataptr = data->Des();
 	
-	TTime t1, t2, t3, t4, t5, t6;
-	TTimeIntervalMicroSeconds prepareTime, nextTime, readTime;
+	TheStartTicks = User::FastCounter();
 	
 	RSqlStatement stmt;
-	t1.HomeTime();
 	TInt err = stmt.Prepare(TheDb, _L8("SELECT B FROM A WHERE ROWID=1"));
-	t2.HomeTime();
 	TEST2(err, KErrNone);
-	prepareTime = t2.MicroSecondsFrom(t1);
 
-	t3.HomeTime();
 	err = stmt.Next();
-	t4.HomeTime();
 	TEST2(err, KSqlAtRow);
-	nextTime = t4.MicroSecondsFrom(t3);
 
 	RSqlColumnReadStream strm;
-	t5.HomeTime();
 	err = strm.ColumnBinary(stmt, 0);
 	TEST2(err, KErrNone);
 	TRAP(err, strm.ReadL(dataptr, TheBlobSize));
-	t6.HomeTime();
 	TEST2(err, KErrNone);
 	TEST2(dataptr.Length(), TheBlobSize);
-	readTime = t6.MicroSecondsFrom(t5);
 
 	strm.Close();
 	stmt.Close();
 	
-	PrintReadTime(prepareTime, nextTime, readTime);
+	TheEndTicks = User::FastCounter();
 		
 	delete data;
 	}
@@ -687,44 +625,40 @@
 */
 void BlobReadTest()
 	{
-	TheTest.Printf(_L("Blob size=%d Kb\r\n"), TheBlobSize / 1024);
-	
 	// Insert a blob
-	TheTest.Printf(_L("==================================================================\r\n"));
-	TheTest.Printf(_L("Insert blob\r\n"));
-		
 	CreateTestDb();
-	PrintFileSize(TheDb);
 	InsertBlobExec();
-	PrintFileSize(TheDb);
 	TheDb.Close();
 		
 	// Read the blob
-	TheTest.Printf(_L("==================================================================\r\n"));
 		
-	TheTest.Printf(_L("Read blob - RSqlBlobReadStream\r\n"));	
+	TheTestTitle.Copy(_L("Read blob - RSqlBlobReadStream"));
 	TInt err = TheDb.Open(TheDbFileName);
 	TEST2(err, KErrNone);
 	ReadBlobIncr();
 	TheDb.Close();
+	PrintReadStats();
 
-	TheTest.Printf(_L("Read blob - RSqlStatement::ColumnBinary(TInt, TDes8&)\r\n"));	
+	TheTestTitle.Copy(_L("Read blob - RSqlStatement::ColumnBinary(TInt, TDes8&)"));
 	err = TheDb.Open(TheDbFileName);
 	TEST2(err, KErrNone);
 	ReadBlobColDes();
 	TheDb.Close();
+	PrintReadStats();
 		
-	TheTest.Printf(_L("Read blob - RSqlStatement::ColumnBinary(TInt, TPtrC8&)\r\n"));	
+	TheTestTitle.Copy(_L("Read blob - RSqlStatement::ColumnBinary(TInt, TPtrC8&)"));
 	err = TheDb.Open(TheDbFileName);
 	TEST2(err, KErrNone);
 	ReadBlobColPtr();
 	TheDb.Close();
+	PrintReadStats();
 		
-	TheTest.Printf(_L("Read blob - RSqlColumnReadStream\r\n"));	
+	TheTestTitle.Copy(_L("Read blob - RSqlColumnReadStream"));
 	err = TheDb.Open(TheDbFileName);
 	TEST2(err, KErrNone);
 	ReadBlobStreamCol();
 	TheDb.Close();
+	PrintReadStats();
 		
 	(void)RSqlDatabase::Delete(TheDbFileName);
 	}
@@ -749,9 +683,14 @@
 	dataPtr.SetLength(KBufLen);
 	dataPtr.Fill('A', KBufLen);	
 	
+	TheTestTitle.Copy(_L("Sequential BLOB writes"));
+	
 	CreateTestDb();
 	InsertZeroBlob(); // insert zeroblob of "TheBlobSize" size
 		
+	TheDbSize1 = TheDb.Size();
+	TheStartTicks = User::FastCounter();
+	
 	RSqlBlobWriteStream strm;
 	strm.OpenL(TheDb, _L("A"), _L("B"));	
 								
@@ -761,36 +700,18 @@
 	const TInt KItCount = TheBlobSize / KBufLen - 1;
 	for(TInt i = 1; i <= KItCount; ++i)
 		{
-		TheTest.Printf(_L("***Iteration %d\r\n"), i);
-		
-		PrintFileSize(TheDb);
+		strm.WriteL(dataPtr);
+		}	
+	strm.CommitL();
+	strm.Close();
 	
-		TTimeIntervalMicroSeconds writeTime;
-		TTime t1, t2;
-
-		t1.HomeTime();
-		strm.WriteL(dataPtr);
-		t2.HomeTime();		
-
-		writeTime = t2.MicroSecondsFrom(t1);
-							
-		PrintWriteTime(TTimeIntervalMicroSeconds(0), writeTime, TTimeIntervalMicroSeconds(0));		
-		PrintFileSize(TheDb);		
-		}	
-			
-	TTimeIntervalMicroSeconds commitTime;
-	TTime t3, t4;
-	t3.HomeTime();
-	strm.CommitL();
-	t4.HomeTime();	
-	commitTime = t4.MicroSecondsFrom(t3);
-		
-	PrintWriteTime(TTimeIntervalMicroSeconds(0), TTimeIntervalMicroSeconds(0), commitTime);		
-	PrintFileSize(TheDb);		
-			
-	strm.Close();		
+	TheEndTicks = User::FastCounter();
+	TheDbSize2 = TheDb.Size();
+	
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
+	
+	PrintWriteStats();
 		
 	delete buf;
 	}
@@ -815,10 +736,15 @@
 	TPtr8 dataPtr =	buf->Des();
 	dataPtr.SetLength(KBufLen);
 	dataPtr.Fill('A', KBufLen);	
+
+	TheTestTitle.Copy(_L("Sequential BLOB writes in transaction"));
 	
 	CreateTestDb();
 	InsertZeroBlob(); // insert zeroblob of "TheBlobSize" size
 		
+	TheDbSize1 = TheDb.Size();
+	TheStartTicks = User::FastCounter();
+	
 	RSqlBlobWriteStream strm;
 	strm.OpenL(TheDb, _L("A"), _L("B"));
 	
@@ -831,48 +757,21 @@
 	const TInt KItCount = TheBlobSize / KBufLen - 1;
 	for(TInt i = 1; i <= KItCount; ++i)
 		{
-		TheTest.Printf(_L("***Iteration %d\r\n"), i);
-		
-		PrintFileSize(TheDb);
-	
-		TTimeIntervalMicroSeconds writeTime;
-		TTime t1, t2;
-		
-		t1.HomeTime();
 		strm.WriteL(dataPtr);
-		t2.HomeTime();	
+		}	
+	strm.CommitL();
+	err = TheDb.Exec(_L8("COMMIT"));
+	TEST(err >= 0);
+	strm.Close();
 
-		writeTime = t2.MicroSecondsFrom(t1);
-							
-		PrintWriteTime(TTimeIntervalMicroSeconds(0), writeTime, TTimeIntervalMicroSeconds(0));		
-		PrintFileSize(TheDb);		
-		}	
-		
-	TTimeIntervalMicroSeconds commitTime;
-	TTime t3, t4;
+	TheEndTicks = User::FastCounter();
+	TheDbSize2 = TheDb.Size();
 	
-	t3.HomeTime();
-	strm.CommitL();
-	t4.HomeTime();	
-	commitTime = t4.MicroSecondsFrom(t3);
-
-	PrintWriteTime(TTimeIntervalMicroSeconds(0), TTimeIntervalMicroSeconds(0), commitTime);		
-	PrintFileSize(TheDb);		
-		
-	TTime t5, t6;
-	t5.HomeTime();	
-	err = TheDb.Exec(_L8("COMMIT"));
-	t6.HomeTime();	
-	TEST(err >= 0);
-	
-	TTimeIntervalMicroSeconds transCommitTime = t6.MicroSecondsFrom(t5);		
-	PrintWriteTime(TTimeIntervalMicroSeconds(0), TTimeIntervalMicroSeconds(0), transCommitTime);		
-	PrintFileSize(TheDb);	
-			
-	strm.Close();		
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
-		
+
+	PrintWriteStats();
+	
 	delete buf;
 	}
 
@@ -893,46 +792,44 @@
 	TPtr8 dataPtr =	buf->Des();
 	dataPtr.SetLength(bufLen);
 	dataPtr.Fill('Z', bufLen);	
+
+	TheTestTitle.Copy(_L("Whole BLOB write - TSqlBlob::Set()"));
 	
 	CreateTestDb();
 	InsertRealBlob(); // insert blob of "TheBlobSize" size
 			
-	TheTest.Printf(_L("***WholeWriteTestL - %dKb blob \r\n"), TheBlobSize / 1024);		
-	PrintFileSize(TheDb);
+	TheDbSize1 = TheDb.Size();
+	TheStartTicks = User::FastCounter();
 	
-	// TSqlBlob::Set
-	TTimeIntervalMicroSeconds writeTime;
-	TTime t1, t2, t3, t4;
-
-	t1.HomeTime();
 	TSqlBlob::SetL(TheDb, _L("A"), _L("B"), dataPtr);	
-	t2.HomeTime();	
 		
-	writeTime = t2.MicroSecondsFrom(t1);
-								
-	PrintWriteTime(TTimeIntervalMicroSeconds(0), writeTime, TTimeIntervalMicroSeconds(0));		
-	PrintFileSize(TheDb);
+	TheEndTicks = User::FastCounter();
+	TheDbSize2 = TheDb.Size();
+
+	PrintWriteStats();
 	
-	// to avoid caching issues, close and re-create the database for the next part
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);		
+
+	// to avoid caching issues, close and re-create the database for the next part
+	
+	TheTestTitle.Copy(_L("Whole BLOB write - RSqlBlobWriteStream::WriteL()"));
+	
 	CreateTestDb();
 	InsertRealBlob(); // insert blob of "TheBlobSize" size
-	PrintFileSize(TheDb);
 
-	// RSqlBlobWriteStream::WriteL
-	t3.HomeTime();
+	TheDbSize1 = TheDb.Size();
+	TheStartTicks = User::FastCounter();
+	
 	RSqlBlobWriteStream strm;
 	CleanupClosePushL(strm);
 	strm.OpenL(TheDb, _L("A"), _L("B"));	
 	strm.WriteL(dataPtr);
 	CleanupStack::PopAndDestroy(&strm);
-	t4.HomeTime();	
 		
-	writeTime = t4.MicroSecondsFrom(t3);
-							
-	PrintWriteTime(TTimeIntervalMicroSeconds(0), writeTime, TTimeIntervalMicroSeconds(0));		
-	PrintFileSize(TheDb);				
+	TheEndTicks = User::FastCounter();
+	TheDbSize2 = TheDb.Size();
+	PrintWriteStats();
 				
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
@@ -959,38 +856,38 @@
 	dataPtr.SetLength(bufLen);
 	dataPtr.Fill('Z', bufLen);	
 	
+	TheTestTitle.Copy(_L("Whole BLOB write - TSqlBlob::Set() in transaction"));
+	
 	CreateTestDb();
 	InsertRealBlob(); // insert blob of "TheBlobSize" size
 	
-	TheTest.Printf(_L("***TransWholeWriteTestL - %dKb blob\r\n"), TheBlobSize / 1024);	
-	PrintFileSize(TheDb);
+	TheDbSize1 = TheDb.Size();
+	TheStartTicks = User::FastCounter();
 		
-	// TSqlBlob::Set
-	TTimeIntervalMicroSeconds writeTime;
-	TTime t1, t2, t3, t4;
-
-	t1.HomeTime();
 	TInt err = TheDb.Exec(_L8("BEGIN"));
 	TEST(err >= 0);		
 	TSqlBlob::SetL(TheDb, _L("A"), _L("B"), dataPtr);			
 	err = TheDb.Exec(_L8("COMMIT"));
-	t2.HomeTime();	
 	TEST(err >= 0);	
 
-	writeTime = t2.MicroSecondsFrom(t1);
-							
-	PrintWriteTime(TTimeIntervalMicroSeconds(0), writeTime, TTimeIntervalMicroSeconds(0));		
-	PrintFileSize(TheDb);	
+	TheEndTicks = User::FastCounter();
+	TheDbSize2 = TheDb.Size();
+
+	PrintWriteStats();
 	
-	// to avoid caching issues, close and re-create the database for the next part
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
+
+	// to avoid caching issues, close and re-create the database for the next part
+	
+	TheTestTitle.Copy(_L("Whole BLOB write - RSqlBlobWriteStream::WriteL() in transaction"));
+	
 	CreateTestDb();
 	InsertRealBlob(); // insert blob of "TheBlobSize" size
-	PrintFileSize(TheDb);
 	
-	// RSqlBlobWriteStream::WriteL
-	t3.HomeTime();
+	TheDbSize1 = TheDb.Size();
+	TheStartTicks = User::FastCounter();
+	
 	err = TheDb.Exec(_L8("BEGIN"));
 	TEST(err >= 0);	
 	RSqlBlobWriteStream strm;
@@ -999,13 +896,12 @@
 	strm.WriteL(dataPtr);
 	CleanupStack::PopAndDestroy(&strm);
 	err = TheDb.Exec(_L8("COMMIT"));
-	t4.HomeTime();
 	TEST(err >= 0);	
 
-	writeTime = t4.MicroSecondsFrom(t3);
-							
-	PrintWriteTime(TTimeIntervalMicroSeconds(0), writeTime, TTimeIntervalMicroSeconds(0));		
-	PrintFileSize(TheDb);				
+	TheEndTicks = User::FastCounter();
+	TheDbSize2 = TheDb.Size();
+
+	PrintWriteStats();
 				
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
@@ -1031,74 +927,78 @@
 	dataPtr.SetLength(bufLen);
 	dataPtr.Fill('A', bufLen);	
 	
+	TheTestTitle.Copy(_L("Whole BLOB read - TSqlBlob::GetLC()"));
+	
+	CreateTestDb();
+	InsertRealBlob(); // insert blob of "TheBlobSize" size
+
+	TheDbSize1 = TheDb.Size();
+	TheStartTicks = User::FastCounter();
+	
+	HBufC8* readBuf = TSqlBlob::GetLC(TheDb, _L("A"), _L("B"));
+	TheEndTicks = User::FastCounter();
+	TheDbSize2 = TheDb.Size();
+	
+	TEST(readBuf->Des().Compare(buf->Des()) == 0);
+	CleanupStack::PopAndDestroy(readBuf);
+	
+	PrintReadStats();
+	
+	TheDb.Close();
+	(void)RSqlDatabase::Delete(TheDbFileName);
+	
+	// to avoid caching issues, close and re-create the database for the next part
+	TheTestTitle.Copy(_L("Whole BLOB read - TSqlBlob::Get()"));
+	
 	CreateTestDb();
 	InsertRealBlob(); // insert blob of "TheBlobSize" size
 	
-	TheTest.Printf(_L("***WholeReadTestL - %dKb blob \r\n"), TheBlobSize / 1024);
-	PrintFileSize(TheDb);
+	HBufC8* preBuf = HBufC8::NewLC(bufLen);
+	TPtr8 preBufPtr(preBuf->Des());
+	
+	TheDbSize1 = TheDb.Size();
+	TheStartTicks = User::FastCounter();
+	
+	TInt err = TSqlBlob::Get(TheDb, _L("A"), _L("B"), preBufPtr);	
+	TEST2(err, KErrNone);
 	
-	// TSqlBlob::GetLC
-	TTimeIntervalMicroSeconds readTime;
-	TTime t1, t2, t3, t4, t5, t6;
-
-	t1.HomeTime();
-	HBufC8* readBuf = TSqlBlob::GetLC(TheDb, _L("A"), _L("B"));
-	t2.HomeTime();
-	TEST(readBuf->Des().Compare(buf->Des()) == 0);
+	TheEndTicks = User::FastCounter();
+	TheDbSize2 = TheDb.Size();
 	
-	readTime = t2.MicroSecondsFrom(t1);
-							
-	PrintReadTime(TTimeIntervalMicroSeconds(0), readTime);
-	PrintFileSize(TheDb);				
-	CleanupStack::PopAndDestroy(readBuf);
+	TEST(preBufPtr.Compare(buf->Des()) == 0);
+	CleanupStack::PopAndDestroy(preBuf);
+	
+	PrintReadStats();
+	
+	TheDb.Close();
+	(void)RSqlDatabase::Delete(TheDbFileName);
 	
 	// to avoid caching issues, close and re-create the database for the next part
-	TheDb.Close();
-	(void)RSqlDatabase::Delete(TheDbFileName);
+	TheTestTitle.Copy(_L("Whole BLOB read - RSqlBlobReadStream::ReadL()"));
+	
 	CreateTestDb();
 	InsertRealBlob(); // insert blob of "TheBlobSize" size
-	PrintFileSize(TheDb);
 	
-	// TSqlBlob::Get
-	HBufC8* preBuf = HBufC8::NewLC(bufLen);
-	TPtr8 preBufPtr(preBuf->Des());
-	t3.HomeTime();
-	TInt err = TSqlBlob::Get(TheDb, _L("A"), _L("B"), preBufPtr);	
-	t4.HomeTime();
-	TEST2(err, KErrNone);
-	TEST(preBufPtr.Compare(buf->Des()) == 0);
-
-	readTime = t4.MicroSecondsFrom(t3);
-							
-	PrintReadTime(TTimeIntervalMicroSeconds(0), readTime);
-	PrintFileSize(TheDb);				
-	CleanupStack::PopAndDestroy(preBuf);
-	
-	// to avoid caching issues, close and re-create the database for the next part
-	TheDb.Close();
-	(void)RSqlDatabase::Delete(TheDbFileName);
-	CreateTestDb();
-	InsertRealBlob(); // insert blob of "TheBlobSize" size
-	PrintFileSize(TheDb);
-	
-	// RSqlBlobReadStream::ReadL
 	preBuf = HBufC8::NewLC(bufLen);	
 	TPtr8 preBufP(preBuf->Des());
-	t5.HomeTime();
+	
+	TheDbSize1 = TheDb.Size();
+	TheStartTicks = User::FastCounter();
+	
 	RSqlBlobReadStream strm;
 	CleanupClosePushL(strm);
 	strm.OpenL(TheDb, _L("A"), _L("B"));
 	strm.ReadL(preBufP, bufLen);
 	CleanupStack::PopAndDestroy(&strm);
-	t6.HomeTime();
+
+	TheEndTicks = User::FastCounter();
+	TheDbSize2 = TheDb.Size();
+	
 	TEST(preBufP.Compare(buf->Des()) == 0);
-		
-	readTime = t6.MicroSecondsFrom(t5);
-							
-	PrintReadTime(TTimeIntervalMicroSeconds(0), readTime);
-	PrintFileSize(TheDb);	
 	CleanupStack::PopAndDestroy(preBuf);
-			
+
+	PrintReadStats();
+	
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
 		
@@ -1119,11 +1019,6 @@
 	TheTest.Next(TheTestTitle);
 	BlobReadTest();
 
-	TheTest.Printf(_L("==================================================================\r\n"));
-	
-	// Bigger blob tests - only on hardware, release mode
-#if !defined __WINS__ && !defined __WINSCW__ && !defined _DEBUG
-	
 	TheBlobSize = 1024 * 1024 + 128 * 1024;//1.125Mb 
 
 	TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4115 SQL, sequential BLOB writes, performance tests, encoding: \"%S\", page size: %d\r\n"), 
@@ -1157,8 +1052,6 @@
 	TheTest.Next(TheTestTitle);
 	TRAP(err, WholeReadTestL());
 	TEST2(err, KErrNone);
-	
-#endif//!defined __WINS__ && !defined __WINSCW__ && !defined _DEBUG
 	}
 
 TInt E32Main()
--- a/persistentstorage/sql/TEST/t_sqlperformance3.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlperformance3.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -21,6 +21,8 @@
 
 RTest 			TheTest(_L("t_sqlperformance3 test"));
 RSqlDatabase 	TheDb;
+RFile 			TheLogFile; 
+RFs				TheFs;
 
 _LIT(KDbName, 	"c:\\test\\t_sqlperformance3.db");
 
@@ -63,8 +65,14 @@
 
 void TestEnvDestroy()
 	{
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		(void)TheLogFile.Flush();
+		TheLogFile.Close();
+		}
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
+	TheFs.Close();
 	}
 
 ///////////////////////////////////////////////////////////////////////////////////////
@@ -101,12 +109,16 @@
 
 void TestEnvInit()
 	{
-	RFs fs;
-	TInt err = fs.Connect();
+	TInt err = TheFs.Connect();
 	TEST2(err, KErrNone);
-	err = fs.MkDirAll(TheDbFileName);
+	err = TheFs.MkDirAll(TheDbFileName);
 	TEST(err == KErrNone || err == KErrAlreadyExists);
-	fs.Close();
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		err = TheLogFile.Replace(TheFs, TheCmdLineParams.iLogFileName, EFileRead | EFileWrite);
+		TEST2(err, KErrNone);
+		LogConfig(TheLogFile, TheCmdLineParams);
+		}
 	}
 
 TInt TimeDiffUs(TUint32 aStartTicks, TUint32 aEndTicks)
@@ -1077,6 +1089,61 @@
 	TheTest.Printf(_L("==HarvestUpdateObjImage, time=%d us\r\n"), TheHarvestUpdateObjImageTime);
 	TheTest.Printf(_L("==HarvestUpdateObj, time=%d us\r\n"), TheHarvestUpdateObjTime);
 	TheTest.Printf(_L("==Harvest, time=%d us\r\n"), TheHarvestTime);
+	
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		TBuf8<200> buf;
+		buf.Format(_L8("Fast counter frequency¬%d¬Hz\r\n"), TheFastCounterFreq);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("Create database¬%d¬us\r\n"), TheCreateDbCreateConnTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("Open database¬%d¬us\r\n"), TheCreateDbOpenConnTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("'SELECT max(seq) FROM SQLITE_SEQUENCE'¬%d¬us\r\n"), TheLastItemIdTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("'SELECT COUNT(*) FROM MdE_Preferences'¬%d¬us\r\n"), TheTableExistsTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("MDE tables creation¬%d¬us\r\n"), TheMdeTablesCreationTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("'SELECT last_insert_rowid()'¬%d¬us\r\n"), TheLastInsertedRowIdTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("1.Create tables¬%d¬us\r\n"), TheCreateTables1Time);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("2.Create tables¬%d¬us\r\n"), TheCreateTables2Time);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("3.Create tables¬%d¬us\r\n"), TheCreateTables3Time);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("InsertEventRelation¬%d¬us\r\n"), TheInsertEventRelationTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("Create triggers¬%d¬us\r\n"), TheCreateTriggersTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("DeleteObjectProperty¬%d¬us\r\n"), TheDeleteObjPropertyTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("InsertCol2Property¬%d¬us\r\n"), TheInsertCol2PropTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("The create transaction¬%d¬us\r\n"), TheTransactionTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("Database create schema¬%d¬us\r\n"), TheDbCreateTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("HarvestSelect¬%d¬us\r\n"), TheHarvestSelectTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("HarvestInsertObjImage¬%d¬us\r\n"), TheHarvestInsertObjImageTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("HarvestSelect2¬%d¬us\r\n"), TheHarvestSelect2Time);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("HarvestSelect3¬%d¬us\r\n"), TheHarvestSelect3Time);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("HarvestSelect4¬%d¬us\r\n"), TheHarvestSelect4Time);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("HarvestInsertEvent¬%d¬us\r\n"), TheHarvestInsertEventTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("HarvestUpdateObjImage¬%d¬us\r\n"), TheHarvestUpdateObjImageTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("HarvestUpdateObj¬%d¬us\r\n"), TheHarvestUpdateObjTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("Harvest¬%d¬us\r\n"), TheHarvestTime);
+		(void)TheLogFile.Write(buf);
+		}
 	}
 
 void DoTestsL()
@@ -1110,7 +1177,6 @@
 
 	TheTest.Printf(_L("==Databases: %S\r\n"), &TheDbFileName); 
 	
-	TestEnvDestroy();
 	TestEnvInit();
 	TRAPD(err, DoTestsL());
 	TestEnvDestroy();
--- a/persistentstorage/sql/TEST/t_sqlperformance4.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlperformance4.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -25,6 +25,7 @@
 RTest			TheTest(_L("t_sqlperformance4 test"));
 RSqlDatabase 	TheDbC;
 RFs				TheFs;
+RFile 			TheLogFile; 
 
 _LIT(KCDriveDatabase, "c:[a000017f]t_sqlperformance4.db");
 
@@ -129,6 +130,11 @@
 
 void TestEnvDestroy()
 	{
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		(void)TheLogFile.Flush();
+		TheLogFile.Close();
+		}
 	TheDbC.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
 	TheFs.Close();
@@ -239,6 +245,12 @@
 	TRAP(err,CreateDatabaseL(TheDbFileName));
 	TEST2(err, KErrNone);
 	
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		err = TheLogFile.Replace(TheFs, TheCmdLineParams.iLogFileName, EFileRead | EFileWrite);
+		TEST2(err, KErrNone);
+		LogConfig(TheLogFile, TheCmdLineParams);
+		}
 	}
 	
 		
@@ -364,9 +376,25 @@
 	
 	TheDbC.Close();
 	
-	TheTest.Printf(_L("Total time to process Songs: %d us\n"), totalTime);
-	TheTest.Printf(_L("Transactions count: %d, \"INSERT\" count: %d, \"UPDATE\" count: %d, \"SELECT\" count: %d\n"), 
-			               trnCnt, insertCnt, updateCnt, selectCnt);
+	TheTest.Printf(_L("Total time to process Songs: %d us\r\n"), totalTime);
+	TheTest.Printf(_L("Transactions count: %d\r\n"), trnCnt);
+	TheTest.Printf(_L("\"INSERT\" count: %d\r\n"), insertCnt);
+	TheTest.Printf(_L("\"UPDATE\" count: %d\r\n"), updateCnt);
+	TheTest.Printf(_L("\"SELECT\" count: %d\r\n"), selectCnt);
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		TBuf8<200> buf;
+		buf.Format(_L8("Total time to process Songs¬%d¬us\r\n"), totalTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("Transactions count¬%d\r\n"), trnCnt);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("\"INSERT\" count¬%d\r\n"), insertCnt);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("\"UPDATE\" count¬%d\r\n"), updateCnt);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("\"SELECT\" count¬%d\r\n"), selectCnt);
+		(void)TheLogFile.Write(buf);
+		}
 	TEST2(recordCount, KRecordCount);
 	}
 ///////////////////////////////////////////////////////////////////////////////////
--- a/persistentstorage/sql/TEST/t_sqlperformance5.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlperformance5.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -21,6 +21,8 @@
 
 RTest 			TheTest(_L("t_sqlperformance5 test"));
 RSqlDatabase 	TheDb;
+RFs				TheFs;
+RFile 			TheLogFile; 
 
 _LIT(KDbName, 	"c:\\test\\t_sqlperformance5.db");
 
@@ -60,6 +62,11 @@
 
 void TestEnvDestroy()
 	{
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		(void)TheLogFile.Flush();
+		TheLogFile.Close();
+		}
 	TheDb.Close();
 	(void)RSqlDatabase::Delete(TheDbFileName);
 	ResetSoftHeapLimit();
@@ -99,12 +106,16 @@
 
 void TestEnvInit()
 	{
-	RFs fs;
-	TInt err = fs.Connect();
+	TInt err = TheFs.Connect();
 	TEST2(err, KErrNone);
-	err = fs.MkDirAll(TheDbFileName);
+	err = TheFs.MkDirAll(TheDbFileName);
 	TEST(err == KErrNone || err == KErrAlreadyExists);
-	fs.Close();
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		err = TheLogFile.Replace(TheFs, TheCmdLineParams.iLogFileName, EFileRead | EFileWrite);
+		TEST2(err, KErrNone);
+		LogConfig(TheLogFile, TheCmdLineParams);
+		}
 	}
 
 TInt TimeDiffUs(TUint32 aStartTicks, TUint32 aEndTicks)
@@ -364,13 +375,31 @@
 	stmt1.Close();
 	TheDb.Close();
 
-	TheTest.Printf(_L("==Create database, time=%d microseconds\r\n"), TheCreateDbTime);
-	TheTest.Printf(_L("==Create tables, time=%d microseconds\r\n"), TheCreateTablesTime);
-	TheTest.Printf(_L("==Bind parameters time, time=%d microseconds\r\n"), TheBindParamsTime);
-	TheTest.Printf(_L("==Temp tables, statement exec, time=%d microseconds\r\n"), TheStmtExecTime);
-	TheTest.Printf(_L("==Temp tables, statement reset, time=%d microseconds\r\n"), TheStmtResetTime);
-	TheTest.Printf(_L("==Populate temp tables, time=%d microseconds\r\n"), ThePopulateTempTableTime);
-	TheTest.Printf(_L("==Copy temp tables to main tables, time=%d microseconds\r\n"), TheFlushTime);
+	TheTest.Printf(_L("==Create database: %d us\r\n"), TheCreateDbTime);
+	TheTest.Printf(_L("==Create tables: %d us\r\n"), TheCreateTablesTime);
+	TheTest.Printf(_L("==Bind parameters time: %d us\r\n"), TheBindParamsTime);
+	TheTest.Printf(_L("==Temp tables, statement exec: %d us\r\n"), TheStmtExecTime);
+	TheTest.Printf(_L("==Temp tables, statement reset: %d us\r\n"), TheStmtResetTime);
+	TheTest.Printf(_L("==Populate temp tables: %d us\r\n"), ThePopulateTempTableTime);
+	TheTest.Printf(_L("==Copy temp tables to main tables: %d us\r\n"), TheFlushTime);
+	if(TheCmdLineParams.iLogFileName.Length() > 0)
+		{
+		TBuf8<200> buf;
+		buf.Format(_L8("Create database¬%d¬us\r\n"), TheCreateDbTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("Create tables¬%d¬us\r\n"), TheCreateTablesTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("Bind parameters¬%d¬us\r\n"), TheBindParamsTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("Temp tables,statement exec¬%d¬us\r\n"), TheStmtExecTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("Temp tables,statement reset¬%d¬us\r\n"), TheStmtResetTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("Populate temp tables¬%d¬us\r\n"), ThePopulateTempTableTime);
+		(void)TheLogFile.Write(buf);
+		buf.Format(_L8("Copy temp tables to main tables¬%d¬us\r\n"), TheFlushTime);
+		(void)TheLogFile.Write(buf);
+		}
 	}
 
 void DoTestsL()
@@ -399,11 +428,10 @@
 
 	GetCmdLineParamsAndSqlConfigString(TheTest, _L("t_sqlperformance5"), TheCmdLineParams, TheSqlConfigString);
 	PrepareDbName(KDbName, TheCmdLineParams.iDriveName, TheDbFileName);
-	SetSoftHeapLimit(TheCmdLineParams.iSoftHeapLimitKb);
+	SetSoftHeapLimit(TheTest, TheCmdLineParams.iSoftHeapLimitKb);
 	
 	TheTest.Printf(_L("==Databases: %S\r\n"), &TheDbFileName); 
 	
-	TestEnvDestroy();
 	TestEnvInit();
 	TRAPD(err, DoTestsL());
 	TestEnvDestroy();
--- a/persistentstorage/sql/TEST/t_sqlprivcage.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlprivcage.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -64,7 +64,7 @@
 			}
 		else
 			{
-			RDebug::Print(_L("*** Line %d\r\n"), aLine);
+			TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 			}
 		TheTest(EFalse, aLine);
 		}
@@ -82,7 +82,7 @@
 			}
 		else
 			{
-			RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+			TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 			}
 		TheTest(EFalse, aLine);
 		}
@@ -533,7 +533,7 @@
 	ThreadCritSect.Wait();
 	TEST2(MainCritSect.CreateLocal(), KErrNone);
 	MainCritSect.Wait();
-	RDebug::Print(_L("+++:MainThread: Create the worker thread\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Create the worker thread\r\n"));
 	_LIT(KThreadName, "WorkThrd");
 	RThread thread;
 	TEST2(thread.Create(KThreadName, &ThreadFunc1, 0x2000, 0x1000, 0x10000, NULL, EOwnerProcess), KErrNone);
@@ -541,9 +541,9 @@
 	thread.Logon(status);
 	TEST2(status.Int(), KRequestPending);
 	thread.Resume();
-	RDebug::Print(_L("+++:MainThread: Wait SQL statement(s) to be executed...\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Wait SQL statement(s) to be executed...\r\n"));
 	MainCritSect.Wait();
-	RDebug::Print(_L("+++:MainThread: Notify the worker thread to simulate a crash...\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Notify the worker thread to simulate a crash...\r\n"));
 	ThreadCritSect.Signal();
 	User::WaitForRequest(status);
 	User::SetJustInTime(ETrue);	// enable debugger panic handling
--- a/persistentstorage/sql/TEST/t_sqlscalarfullselect.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlscalarfullselect.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -43,7 +43,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -52,7 +52,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlsecurity1.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlsecurity1.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -76,11 +76,11 @@
 			{
 			RThread th;
 			TName name = th.Name();
-			RDebug::Print(_L("*** Thread %S, Line %d\r\n"), &name, aLine);
+			RDebug::Print(_L("*** Thread %S, Line %d. Expression evaluated to false\r\n"), &name, aLine);
 			}
 		else
 			{
-			RDebug::Print(_L("*** Line %d\r\n"), aLine);
+			TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 			}
 		TheTest(EFalse, aLine);
 		}
@@ -98,7 +98,7 @@
 			}
 		else
 			{
-			RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+			TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 			}
 		TheTest(EFalse, aLine);
 		}
--- a/persistentstorage/sql/TEST/t_sqlsecurity2.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlsecurity2.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -59,7 +59,7 @@
 	if(!aValue)
 		{
 		DeleteTestDb();
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -68,7 +68,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestDb();
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -127,10 +127,10 @@
 	TEST2(colType, ESqlInt);
 	err = stmt.Next();
 	TEST2(err, KSqlAtRow);
-	RDebug::Print(_L("Value=%d\r\n"), stmt.ColumnInt(0));
+	TheTest.Printf(_L("Value=%d\r\n"), stmt.ColumnInt(0));
 	err = stmt.Next();
 	TEST2(err, KSqlAtRow);
-	RDebug::Print(_L("Value=%d\r\n"), stmt.ColumnInt(0));
+	TheTest.Printf(_L("Value=%d\r\n"), stmt.ColumnInt(0));
 	stmt.Close();
 	//Attempt to read the system data
 	err = stmt.Prepare(TheDb, _L("SELECT * FROM SQLITE_MASTER"));
@@ -140,7 +140,7 @@
 	TPtrC p;
 	err = stmt.ColumnText(0, p);
 	TEST2(err, KErrNone);
-	RDebug::Print(_L("Value=%S\r\n"), &p);
+	TheTest.Printf(_L("Value=%S\r\n"), &p);
 	stmt.Close();
 
 	//Attempt to execute PRAGMA statement directly
--- a/persistentstorage/sql/TEST/t_sqlsecurity3.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlsecurity3.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -67,7 +67,7 @@
 	if(!aValue)
 		{
 		RestoreOriginalDb();
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -76,7 +76,7 @@
 	if(aValue != aExpected)
 		{
 		RestoreOriginalDb();
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -149,7 +149,7 @@
 	TPtrC p;
 	err = stmt.ColumnText(0, p);
 	TEST2(err, KErrNone);
-	RDebug::Print(_L("Value=%S\r\n"), &p);
+	TheTest.Printf(_L("Value=%S\r\n"), &p);
 	stmt.Close();
 	
 	TheDb.Close();
--- a/persistentstorage/sql/TEST/t_sqlsecurity4.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlsecurity4.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -68,7 +68,7 @@
 	if(!aValue)
 		{
 		RestoreOriginalDb();
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -77,7 +77,7 @@
 	if(aValue != aExpected)
 		{
 		RestoreOriginalDb();
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -220,10 +220,10 @@
 	TEST2(colType, ESqlInt);
 	err = stmt.Next();
 	TEST2(err, KSqlAtRow);
-	RDebug::Print(_L("Value=%d\r\n"), stmt.ColumnInt(0));
+	TheTest.Printf(_L("Value=%d\r\n"), stmt.ColumnInt(0));
 	err = stmt.Next();
 	TEST2(err, KSqlAtRow);
-	RDebug::Print(_L("Value=%d\r\n"), stmt.ColumnInt(0));
+	TheTest.Printf(_L("Value=%d\r\n"), stmt.ColumnInt(0));
 	stmt.Close();
 	//Attempt to read the system data
 	err = stmt.Prepare(TheDb, _L("SELECT * FROM SQLITE_MASTER"));
@@ -233,7 +233,7 @@
 	TPtrC p;
 	err = stmt.ColumnText(0, p);
 	TEST2(err, KErrNone);
-	RDebug::Print(_L("Value=%S\r\n"), &p);
+	TheTest.Printf(_L("Value=%S\r\n"), &p);
 	stmt.Close();
 	
 	NonSecureDbTest();
--- a/persistentstorage/sql/TEST/t_sqlsecurity5.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlsecurity5.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -77,7 +77,7 @@
 		{
 		DeleteTestDb2();
 		RestoreOriginalDb();
-		RDebug::Print(_L("*** Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -87,7 +87,7 @@
 		{
 		DeleteTestDb2();
 		RestoreOriginalDb();
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -189,10 +189,10 @@
 	TEST2(colType, ESqlInt);
 	err = stmt.Next();
 	TEST2(err, KSqlAtRow);
-	RDebug::Print(_L("Value=%d\r\n"), stmt.ColumnInt(0));
+	TheTest.Printf(_L("Value=%d\r\n"), stmt.ColumnInt(0));
 	err = stmt.Next();
 	TEST2(err, KSqlAtRow);
-	RDebug::Print(_L("Value=%d\r\n"), stmt.ColumnInt(0));
+	TheTest.Printf(_L("Value=%d\r\n"), stmt.ColumnInt(0));
 	stmt.Close();
 	//Attempt to read the system data
 	err = stmt.Prepare(TheDb, _L("SELECT * FROM SQLITE_MASTER"));
@@ -202,7 +202,7 @@
 	TPtrC p;
 	err = stmt.ColumnText(0, p);
 	TEST2(err, KErrNone);
-	RDebug::Print(_L("Value=%S\r\n"), &p);
+	TheTest.Printf(_L("Value=%S\r\n"), &p);
 	//
 	stmt.Close();
 	TheDb.Close();
--- a/persistentstorage/sql/TEST/t_sqlsecurity6.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlsecurity6.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -37,7 +37,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Boolean expression evaluated to false. Line %d\r\n"), aLine);
+		TheTest.Printf(_L("*** Expression evaluated to false. Line %d\r\n"), aLine);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -46,7 +46,7 @@
 	if(aValue != aExpected)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqlstartup.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlstartup.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -56,7 +56,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expresssion evaluated to false\r\n"));
+		TheTest.Printf(_L("*** Expresssion evaluated to false\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -65,7 +65,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
--- a/persistentstorage/sql/TEST/t_sqltrans.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqltrans.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -49,7 +49,7 @@
 			}
 		else
 			{
-			RDebug::Print(_L("*** Line %d\r\n"), aLine);
+			TheTest.Printf(_L("*** Line %d. Expresssion evaluated to false\r\n"), aLine);
 			}
 		TheTest(EFalse, aLine);
 		}
@@ -67,7 +67,7 @@
 			}
 		else
 			{
-			RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+			TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
 			}
 		TheTest(EFalse, aLine);
 		}
@@ -168,26 +168,26 @@
 */	
 void TransactionTest1()
 	{
-	RDebug::Print(_L("+++:MainThread: Create critical sections\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Create critical sections\r\n"));
 	TEST2(ThreadCritSect.CreateLocal(), KErrNone);
 	ThreadCritSect.Wait();
 	TEST2(MainCritSect.CreateLocal(), KErrNone);
 	MainCritSect.Wait();
 	
-	RDebug::Print(_L("+++:MainThread: Create test database\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Create test database\r\n"));
 	(void)RSqlDatabase::Delete(KTestDbName);
 	RSqlDatabase db;
 	TInt err = db.Create(KTestDbName);
 	TEST2(err, KErrNone);
 
-	RDebug::Print(_L("+++:MainThread: Create a table in the test database\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Create a table in the test database\r\n"));
 	_LIT8(KCreateSql, "CREATE TABLE A(Id INTEGER)");
 	err = db.Exec(KCreateSql);
 	TEST(err >= 0);	
 	
 	db.Close();
 
-	RDebug::Print(_L("+++:MainThread: Create the worker thread\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Create the worker thread\r\n"));
 	_LIT(KThreadName, "WorkThrd");
 	RThread thread;
 	TheSqlIdx = 0;
@@ -197,10 +197,10 @@
 	TEST2(status.Int(), KRequestPending);
 	thread.Resume();
 
-	RDebug::Print(_L("+++:MainThread: Wait SQL statement(s) to be executed...\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Wait SQL statement(s) to be executed...\r\n"));
 	MainCritSect.Wait();
 
-	RDebug::Print(_L("+++:MainThread: Notify the worker thread to panic...\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Notify the worker thread to panic...\r\n"));
 	ThreadCritSect.Signal();
 	
 	User::WaitForRequest(status);
@@ -211,7 +211,7 @@
 	
 	thread.Close();
 
-	RDebug::Print(_L("+++:MainThread: Check the database content...\r\n"));
+	TheTest.Printf(_L("+++:MainThread: Check the database content...\r\n"));
 	err = db.Open(KTestDbName);
 	TEST2(err, KErrNone);
 	_LIT8(KSelectSql, "SELECT COUNT(*) AS CNT FROM A");
--- a/persistentstorage/sql/traces_SqlSrv/fixed_id.definitions	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sql/traces_SqlSrv/fixed_id.definitions	Tue Oct 19 16:26:13 2010 +0100
@@ -1,3 +1,20 @@
+##
+# This is Default Licence added by TraceCompiler
+# 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: 
+#
+##
 #Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
 [GROUP]TRACE_ERROR=0x82
 [GROUP]TRACE_FATAL=0x81
@@ -25,6 +42,7 @@
 [TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL3=0x2c
 [TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL4=0x2d
 [TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL5=0x2e
+[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL5A=0xad
 [TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL6=0x2f
 [TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL7=0x30
 [TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL8=0x31
--- a/persistentstorage/sqlite3api/TEST/sqliteTestUtl.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sqlite3api/TEST/sqliteTestUtl.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -96,28 +96,28 @@
 	{
 	TPtrC8 p((const unsigned char*)msg);
 	TheBuf16.Copy(p);
-	RDebug::Print(TheBuf16);
+	TheTest->Printf(TheBuf16);
 	}
 
 extern "C" void PrintI(const char* fmt, int a1)
 	{
 	TPtrC8 p((const unsigned char*)fmt);
 	TheBuf16.Copy(p);
-	RDebug::Print(TheBuf16, a1);
+	TheTest->Printf(TheBuf16, a1);
 	}
 
 extern "C" void PrintIII(const char* fmt, int a1, int a2, int a3)
 	{
 	TPtrC8 p((const unsigned char*)fmt);
 	TheBuf16.Copy(p);
-	RDebug::Print(TheBuf16, a1, a2, a3);
+	TheTest->Printf(TheBuf16, a1, a2, a3);
 	}
 
 extern "C" void PrintII64I64(const char* fmt, int a1, __int64 a2, __int64 a3)
 	{
 	TPtrC8 p((const unsigned char*)fmt);
 	TheBuf16.Copy(p);
-	RDebug::Print(TheBuf16, a1, a2, a3);
+	TheTest->Printf(TheBuf16, a1, a2, a3);
 	}
 
 extern "C" void PrintSI(const char* fmt, const char* s, int a1)
@@ -125,10 +125,54 @@
 	TPtrC8 p((const unsigned char*)fmt);
 	TheBuf8.Format(TPtrC8((const TUint8*)fmt), s, a1);
 	TheBuf16.Copy(TheBuf8);
+	TheTest->Printf(TheBuf16);
+	}
+
+extern "C" void PrintS(const char* fmt, const char* s)
+	{
+	TPtrC8 p((const unsigned char*)fmt);
+	TheBuf8.Format(TPtrC8((const TUint8*)fmt), s);
+	TheBuf16.Copy(TheBuf8);
+	TheTest->Printf(TheBuf16);
+	}
+
+extern "C" void ThreadPrint(const char* msg)
+	{
+	TPtrC8 p((const unsigned char*)msg);
+	TheBuf16.Copy(p);
 	RDebug::Print(TheBuf16);
 	}
 
-extern "C" void PrintS(const char* fmt, const char* s)
+extern "C" void ThreadPrintI(const char* fmt, int a1)
+	{
+	TPtrC8 p((const unsigned char*)fmt);
+	TheBuf16.Copy(p);
+	RDebug::Print(TheBuf16, a1);
+	}
+
+extern "C" void ThreadPrintIII(const char* fmt, int a1, int a2, int a3)
+	{
+	TPtrC8 p((const unsigned char*)fmt);
+	TheBuf16.Copy(p);
+	RDebug::Print(TheBuf16, a1, a2, a3);
+	}
+
+extern "C" void ThreadPrintII64I64(const char* fmt, int a1, __int64 a2, __int64 a3)
+	{
+	TPtrC8 p((const unsigned char*)fmt);
+	TheBuf16.Copy(p);
+	RDebug::Print(TheBuf16, a1, a2, a3);
+	}
+
+extern "C" void ThreadPrintSI(const char* fmt, const char* s, int a1)
+	{
+	TPtrC8 p((const unsigned char*)fmt);
+	TheBuf8.Format(TPtrC8((const TUint8*)fmt), s, a1);
+	TheBuf16.Copy(TheBuf8);
+	RDebug::Print(TheBuf16);
+	}
+
+extern "C" void ThreadPrintS(const char* fmt, const char* s)
 	{
 	TPtrC8 p((const unsigned char*)fmt);
 	TheBuf8.Format(TPtrC8((const TUint8*)fmt), s);
--- a/persistentstorage/sqlite3api/TEST/sqliteTestUtl.h	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sqlite3api/TEST/sqliteTestUtl.h	Tue Oct 19 16:26:13 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* 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"
@@ -45,6 +45,13 @@
 void PrintSI(const char* fmt, const char* s, int a1);
 void PrintS(const char* fmt, const char* s);
 
+void ThreadPrint(const char* msg);
+void ThreadPrintI(const char* fmt, int a1);
+void ThreadPrintIII(const char* fmt, int a1, int a2, int a3);
+void ThreadPrintII64I64(const char* fmt, int a1, __int64 a2, __int64 a3);
+void ThreadPrintSI(const char* fmt, const char* s, int a1);
+void ThreadPrintS(const char* fmt, const char* s);
+
 void CreatePrivateDir(void);
 
 #ifdef __cplusplus
--- a/persistentstorage/sqlite3api/TEST/t_sqliteapi.c	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sqlite3api/TEST/t_sqliteapi.c	Tue Oct 19 16:26:13 2010 +0100
@@ -944,7 +944,7 @@
 	
 	srand((unsigned)&ThreadFunc);
 	
-	PrintS("Thread \"%s\" - begin\r\n", (char*)pname);
+	ThreadPrintS("Thread \"%s\" - begin\r\n", (char*)pname);
 	err = sqlite3_open(TheTestDbName, &db);
 	TEST2(err, SQLITE_OK);
 	TEST(db != 0);
@@ -953,7 +953,7 @@
 		{
         if((records % 10) == 0)
             {
-            PrintSI("Thread \"%s\", %d records.\r\n", (char*)pname, records);
+            ThreadPrintSI("Thread \"%s\", %d records.\r\n", (char*)pname, records);
             }
 		err = sqlite3_exec(db, "BEGIN", 0, 0, &errmsg);
 		if(err == SQLITE_OK)
@@ -984,7 +984,7 @@
                 strcpy(fmt, "Thread \"");
                 strcat(fmt, (char*)pname);
                 strcat(fmt, "\". Err msg: %s. Err: %d.\r\n");
-				PrintSI(fmt, errmsg, err);
+				ThreadPrintSI(fmt, errmsg, err);
 				sqlite3_free(errmsg);
 				errmsg = 0;
 				}
@@ -995,7 +995,7 @@
 	err = sqlite3_close(db);
 	TEST2(err, SQLITE_OK);
 	
-	PrintS("Thread \"%s\" - end\r\n", (char*)pname);
+	ThreadPrintS("Thread \"%s\" - end\r\n", (char*)pname);
 	return &TheInsertRecCnt[threadIdx];
 	}
 
@@ -1057,7 +1057,7 @@
 	sqlite3* db;
 
 	UNUSED_ARG(parg);
-	PrintS("Thread \"%s\" - begin\r\n", KThreadNames[0]);
+	ThreadPrintS("Thread \"%s\" - begin\r\n", KThreadNames[0]);
 	
 	err = sqlite3_open(TheTestDbName, &db);
 	TEST2(err, SQLITE_OK);
@@ -1082,7 +1082,7 @@
 	err = sqlite3_close(db);
 	TEST2(err, SQLITE_OK);
 	
-	PrintS("Thread \"%s\" - end\r\n", KThreadNames[0]);
+	ThreadPrintS("Thread \"%s\" - end\r\n", KThreadNames[0]);
 	return 0;
 	}
 
@@ -1092,7 +1092,7 @@
 	sqlite3* db;
 	
 	UNUSED_ARG(parg);
-	PrintS("Thread \"%s\" - begin\r\n", KThreadNames[1]);
+	ThreadPrintS("Thread \"%s\" - begin\r\n", KThreadNames[1]);
 	
 	err = sqlite3_open(TheTestDbName, &db);
 	TEST2(err, SQLITE_OK);
@@ -1112,7 +1112,7 @@
 	err = sqlite3_close(db);
 	TEST2(err, SQLITE_OK);
 	
-	PrintS("Thread \"%s\" - end\r\n", KThreadNames[1]);
+	ThreadPrintS("Thread \"%s\" - end\r\n", KThreadNames[1]);
 	return 0;
 	}
 
--- a/persistentstorage/sqlite3api/TEST/t_sqlitedb64.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sqlite3api/TEST/t_sqlitedb64.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-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"
@@ -83,6 +83,7 @@
 	{
 	if(!aValue)
 		{
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		DeleteTestFiles();
 		PrintSqliteErrMsg();
 		TheTest(EFalse, aLine);
@@ -93,7 +94,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		PrintSqliteErrMsg();
 		TheTest(EFalse, aLine);
 		}
--- a/persistentstorage/sqlite3api/TEST/t_sqlitedef.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sqlite3api/TEST/t_sqlitedef.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -89,18 +89,15 @@
 
 static void PrintErrMsg()
 	{
-	TBuf<256> buf;
 	if(TheDb)
 		{
 		const char* msg = sqlite3_errmsg(TheDb);	
-		buf.Copy(TPtrC8((const TUint8*)msg));
-		RDebug::Print(_L("*** Db1 err msg: \"%S\"\r\n"), &buf);
+		PrintS("*** Db1 err msg: \"%s\"\r\n", msg);
 		}
 	if(TheDb2)
 		{
 		const char* msg = sqlite3_errmsg(TheDb2);	
-		buf.Copy(TPtrC8((const TUint8*)msg));
-		RDebug::Print(_L("*** Db2 err msg: \"%S\"\r\n"), &buf);
+		PrintS("*** Db2 err msg: \"%s\"\r\n", msg);
 		}
 	}
 
@@ -110,6 +107,7 @@
 		{
 		PrintErrMsg();
 		DestroyTestEnv();
+		Print("*** Expression evaluated to false!\r\n");
 		TestTestLine(EFalse, aLine);
 		}
 	}
@@ -119,7 +117,7 @@
 		{
 		PrintErrMsg();
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		PrintIII("*** Expected error: %d, got: %d. Ignore: %d\r\n", aExpected, aValue, 0);
 		TestTestLine(EFalse, aLine);
 		}
 	}
@@ -181,7 +179,7 @@
 	// shared page cache mode only if the threads share the same heap.
 	// The database file handle will be shared between threads.
 	////////////////////////////////////////////////////////////
-	RDebug::Print(_L("*** Shared heap\r\n"));	
+	Print("*** Shared heap\r\n");	
 	RThread thr;
     err = thr.Create(_L("TestThr"), &ThreadFunc, KDefaultStackSize, NULL, NULL);
 	TEST2(err, KErrNone);
@@ -226,10 +224,10 @@
 */
 void DEF121506()
 	{
-	RDebug::Print(_L("Iteration: \r\n"));
+	Print("Iteration: \r\n");
 	for (TInt it = 1;  ; ++it)
 		{
-		RDebug::Print(_L("%d "), it);
+		PrintI("%d ", it);
 		TInt c1 = User::CountAllocCells();
  		__UHEAP_SETFAIL(RHeap::EDeterministic, it);
 		
@@ -252,12 +250,12 @@
  		TInt c2 = User::CountAllocCells();
  		if (c1 != c2)
 			{	
-			RDebug::Print(_L("\r\n*** OOM Test failed\r\n"));
+			Print("\r\n*** OOM Test failed\r\n");
 			TEST(EFalse);
 			} 		
  		else if (err == SQLITE_OK) 
  			{
- 			RDebug::Print(_L("\r\n*** OOM Test passed\r\n"));
+ 			Print("\r\n*** OOM Test passed\r\n");
  			break; 			
  			}
  		TEST2(err, SQLITE_NOMEM);
--- a/persistentstorage/sqlite3api/TEST/t_sqliteperf.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sqlite3api/TEST/t_sqliteperf.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -85,6 +85,7 @@
 	if(!aValue)
 		{
 		DeleteTestFiles();
+		Print("*** Expression evaluated to false\r\n");
 		TestTestLine(EFalse, aLine);
 		}
 	}
@@ -93,7 +94,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		PrintIII("*** Expected error: %d, got: %d. Ignore: %d\r\n", aExpected, aValue, 0);
 		TestTestLine(EFalse, aLine);
 		}
 	}
@@ -105,7 +106,6 @@
 static TInt KillProcess(const TDesC& aProcessName)
 	{
 	TFullName name;
-	//RDebug::Print(_L("Find and kill \"%S\" process.\n"), &aProcessName);
 	TBuf<64> pattern(aProcessName);
 	TInt length = pattern.Length();
 	pattern += _L("*");
@@ -122,7 +122,6 @@
 				{
 				// If the found name is other valid application name
 				// starting with aProcessName string.
-				//RDebug::Print(_L(":: Process name: \"%S\".\n"), &name);
 				continue;
 				}
 			}
@@ -130,7 +129,6 @@
 		if (proc.Open(name) == KErrNone)
 			{
 			proc.Kill(0);
-			//RDebug::Print(_L("\"%S\" process killed.\n"), &name);
 			}
 		proc.Close();
 		}
--- a/persistentstorage/sqlite3api/TEST/t_sqliteperf2.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sqlite3api/TEST/t_sqliteperf2.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -186,6 +186,7 @@
 		{
 		DeleteTestFiles();
 		PrintSqliteErrMsg();
+		Print("*** Expression evaluated to false\r\n");
 		TestTestLine(EFalse, aLine);
 		}
 	}
@@ -194,7 +195,7 @@
 	if(aValue != aExpected)
 		{
 		DeleteTestFiles();
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		PrintIII("*** Expected error: %d, got: %d. Ignore: %d\r\n", aExpected, aValue, 0);
 		PrintSqliteErrMsg();
 		TestTestLine(EFalse, aLine);
 		}
--- a/persistentstorage/sqlite3api/TEST/t_sqlitewsd.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sqlite3api/TEST/t_sqlitewsd.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -71,13 +71,11 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		PrintIII("*** Expected error: %d, got: %d. Ignore: %d\r\n", aExpected, aValue, 0);
 		const char* errMsg = sqlite3_errmsg(TheDb);
 		if(errMsg)
 			{
-			TBuf<200> msgBuf;
-			msgBuf.Copy(TPtrC8((const TUint8*)errMsg));
-			RDebug::Print(_L("*** SQLITE error msg: \"%S\".\r\n"), &msgBuf);
+			PrintS("*** SQLITE error msg: \"%s\".\r\n", errMsg);
 			}
 		DestroyTestEnv();
 		TestTestLine(EFalse, aLine);
--- a/persistentstorage/sqlite3api/TEST/t_sqlitewsd2.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/sqlite3api/TEST/t_sqlitewsd2.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -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"
@@ -49,7 +49,7 @@
 	TBuf<64> buf;
 	_LIT(KFormat,"*** Panic %d, at line t_sqlitewsd2.cpp(%d)\r\n");
 	buf.Format(KFormat, aPanicCode, aLine);
-	RDebug::Print(buf);
+	TheTest.Printf(buf);
 	User::Panic(KPanicCategory, aPanicCode);
 	}
 
@@ -59,7 +59,7 @@
 	if(!aValue)
 		{
 		DestroyTestEnv();
-		RDebug::Print(_L("*** Expression evaluates to false.\r\n"));
+		TheTest.Printf(_L("*** Expression evaluated to false.\r\n"));
 		Panic(aLine, KExprEvalFailed1);
 		}
 	}
@@ -68,13 +68,13 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d.\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d.\r\n"), aExpected, aValue);
 		const char* errMsg = sqlite3_errmsg(TheDb);
 		if(errMsg)
 			{
 			TBuf<200> msgBuf;
 			msgBuf.Copy(TPtrC8((const TUint8*)errMsg));
-			RDebug::Print(_L("*** SQLITE error msg: \"%S\".\r\n"), &msgBuf);
+			TheTest.Printf(_L("*** SQLITE error msg: \"%S\".\r\n"), &msgBuf);
 			}
 		DestroyTestEnv();
 		Panic(aLine, KExprEvalFailed2);
--- a/persistentstorage/store/TCONT/t_storset.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TCONT/t_storset.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -19,10 +19,40 @@
 #include <e32test.h>
 #include "U32STD.H"
 
-const TInt KTestCleanupStack=0x20;
+LOCAL_D RTest TheTest(_L("t_storset"));
 
-LOCAL_D CTrapCleanup* TheTrapCleanup;
-LOCAL_D RTest test(_L("t_storset"));
+///////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////
+//Test macros and functions
+void Check1(TInt aValue, TInt aLine)
+	{
+	if(!aValue)
+		{
+		TheTest.Printf(_L("*** Expression  evaluated to false. Line %d\r\n"), aLine);
+		TheTest(EFalse, aLine);
+		}
+	}
+void Check2(TInt aValue, TInt aExpected, TInt aLine)
+	{
+	if(aValue != aExpected)
+		{
+		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+		TheTest(EFalse, aLine);
+		}
+	}
+void Check3(TUint aValue, TUint aExpected, TInt aLine)
+	{
+	if(aValue != aExpected)
+		{
+		TheTest.Printf(_L("*** Line %d, Expected value: %u, got: %u\r\n"), aLine, aExpected, aValue);
+		TheTest(EFalse, aLine);
+		}
+	}
+#define TEST(arg) ::Check1((arg), __LINE__)
+#define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__)
+#define TEST3(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__)
+
+///////////////////////////////////////////////////////////////////////////////////////
 
 /**
 @SYMTestCaseID          SYSLIB-STORE-CT-1121
@@ -35,89 +65,93 @@
 */
 LOCAL_C void test1L()
 	{
-	test.Start(_L(" @SYMTestCaseID:SYSLIB-STORE-CT-1121 Insertion & Deletion "));
+	TheTest.Printf(_L("Basic operations\r\n"));
 	
 	const TInt KEntryCount=200;
 	TPagedSet<TInt32> set;
 	set.Connect(CMemPagePool::NewLC());
 	//IsIntact() and IsDirty() test
+	TheTest.Printf(_L("IsIntact() and IsDirty() test\r\n"));
 	TBool rc = set.IsIntact();
-	test(rc);
+	TEST(rc);
 	rc = set.IsDirty();
-	test(!rc);
+	TEST(!rc);
 	set.MarkDirty();
 	rc = set.IsDirty();
-	test(rc);
+	TEST(rc);
 	//IsBroken() test
+	TheTest.Printf(_L("IsBroken() test\r\n"));
 	rc = set.IsBroken();
-	test(!rc);
+	TEST(!rc);
 	set.MarkBroken();
 	rc = set.IsBroken();
-	test(!rc);//Empty tree - cannot be marked as broken
+	TEST(!rc);//Empty tree - cannot be marked as broken
 	TInt yy = 10;
 	set.InsertL(yy);
 	set.MarkBroken();
 	rc = set.IsBroken();
-	test(rc);
+	TEST(rc);
+	TheTest.Printf(_L("RepairL()test\r\n"));
 	set.RepairL();
 	rc = set.IsBroken();
-	test(!rc);
+	TEST(!rc);
+	TheTest.Printf(_L("ClearL() test\r\n"));
 	set.ClearL();
 	rc = set.IsBroken();
-	test(!rc);
+	TEST(!rc);
 
+	TheTest.Printf(_L("InsertL() and DeleteL() test\r\n"));
 	TInt32 it=0;
-//*	test(set.InsertL(it));
+//*	TEST(set.InsertL(it));
 	set.InsertL(it);
-	test(set.Count()==1);
-//*	test(!set.InsertL(it));
-	test(set.Count()==1);
-	test(set.ContainsL(it));
-//*	test(set.DeleteL(it));
+	TEST2(set.Count(), 1);
+//*	TEST(!set.InsertL(it));
+	TEST2(set.Count(), 1);
+	TEST(set.ContainsL(it));
+//*	TEST(set.DeleteL(it));
 	set.DeleteL(it);
-	test(set.Count()==0);
-//*	test(!set.DeleteL(it));
-//*	test(set.Count()==0);
-	test(!set.ContainsL(it));
+	TEST2(set.Count(), 0);
+//*	TEST(!set.DeleteL(it));
+//*	TEST(set.Count()==0);
+	TEST(!set.ContainsL(it));
 
-//*	test.Next(_L("Duplicates"));
+//*	TheTest.Printf(_L("Duplicates"));
 	TInt ii;
 //*	for (ii=0;ii<KEntryCount;++ii)
-//*		test(set.InsertL(it,EAllowDuplicates));
-//*	test(set.Count()==KEntryCount);
-//*	test(set.ContainsL(it));
-//*	test(!set.InsertL(it));
+//*		TEST(set.InsertL(it,EAllowDuplicates));
+//*	TEST2(set.Count(), KEntryCount);
+//*	TEST(set.ContainsL(it));
+//*	TEST(!set.InsertL(it));
 //*	for (ii=0;ii<KEntryCount;++ii)
-//*		test(set.DeleteL(it));
-//*	test(!set.ContainsL(it));
-//*	test(!set.DeleteL(it));
-//*	test(set.Count()==0);
+//*		TEST(set.DeleteL(it));
+//*	TEST(!set.ContainsL(it));
+//*	TEST(!set.DeleteL(it));
+//*	TEST2(set.Count(), 0);
 
-	test.Next(_L("No duplicates"));
+	TheTest.Printf(_L("No duplicates\r\n"));
 	for (ii=0;ii<KEntryCount;++ii)
 		{
 		it=ii;
-//*		test(set.InsertL(it));
+//*		TEST(set.InsertL(it));
 		set.InsertL(it);
 		}
 	for (ii=0;ii<KEntryCount;++ii)
 		{
 		it=ii;
-//*		test(!set.InsertL(it));
-		test(set.ContainsL(it));
+//*		TEST(!set.InsertL(it));
+		TEST(set.ContainsL(it));
 		}
-	test(set.Count()==KEntryCount);
+	TEST2(set.Count(), KEntryCount);
 
-	test.Next(_L("Empty the set"));
+	TheTest.Printf(_L("Empty the set\r\n"));
 	set.ClearL();
-	test(set.Count()==0);
+	TEST2(set.Count(), 0);
 	for (ii=0;ii<KEntryCount;++ii)
 		{
 		it=ii;
-		test(!set.ContainsL(it));
+		TEST(!set.ContainsL(it));
 		}
 
-	test.End();
 	CleanupStack::PopAndDestroy();
 	}
 /**
@@ -136,22 +170,22 @@
 //*	set.Connect(CMemPagePool::NewLC(),TBtree::EQosFastest);
 	set.Connect(CMemPagePool::NewLC());
 
-	test.Start(_L(" @SYMTestCaseID:SYSLIB-STORE-CT-1122 Add items "));
+	TheTest.Printf(_L("Add items\r\n"));
 	TUint32 jj=0;
 	TInt32 ii;
 	for (ii=KEntryCount;ii>0;--ii)
 		{
 		jj=(jj+17)%KEntryCount;
-//*		test(set.InsertL(jj));
+//*		TEST(set.InsertL(jj));
 		set.InsertL(jj);
 		}
-	test(set.Count()==KEntryCount);
+	TEST2(set.Count(), KEntryCount);
 
-	test.Next(_L("Check contents"));
+	TheTest.Printf(_L("Check contents\r\n"));
 	for (ii=0;ii<KEntryCount;++ii)
-		test(set.ContainsL(ii));
+		TEST(set.ContainsL(ii));
 
-	test.Next(_L("Iterate over items"));
+	TheTest.Printf(_L("Iterate over items\r\n"));
 	TUint8 *checkMap=(TUint8*)User::AllocLC(KEntryCount);
 	Mem::FillZ(checkMap,KEntryCount);
 	TPagedSetIter<TUint32> iter(set);
@@ -163,70 +197,68 @@
 			++checkMap[data1];
 			TUint32 data2;
 			iter.ExtractAtL(data2);
-			test(data1 == data2);
+			TEST3(data1, data2);
 			}while(iter.NextL());
 		}
 	for (ii=0;ii<KEntryCount;++ii)
-		test(checkMap[ii]==1);
+		TEST2(checkMap[ii], 1);
 	CleanupStack::PopAndDestroy();
 
-	test.Next(_L("Delete items"));
+	TheTest.Printf(_L("Delete items\r\n"));
 	jj=0;
 	for (ii=KEntryCount;ii>KEntryCount/2;--ii)
 		{
 		jj=(jj+17)%KEntryCount;
-//*		test(set.DeleteL(jj));
+//*		TEST(set.DeleteL(jj));
 		set.DeleteL(jj);
 		}
-	test(set.Count()==KEntryCount/2);
+	TEST2(set.Count(), KEntryCount/2);
 
-	test.Next(_L("Check contents"));
+	TheTest.Printf(_L("Check contents\r\n"));
 	for (;ii>0;--ii)
 		{
 		jj=(jj+17)%KEntryCount;
-		test(set.ContainsL(jj));
+		TEST(set.ContainsL(jj));
 		}
 	jj=0;
 	for (ii=KEntryCount;ii>KEntryCount/2;--ii)
 		{
 		jj=(jj+17)%KEntryCount;
-		test(!set.ContainsL(jj));
+		TEST(!set.ContainsL(jj));
 		}
 
-	test.Next(_L("Delete items"));
+	TheTest.Printf(_L("Delete items\r\n"));
 	for (;ii>1;--ii)
 		{
 		jj=(jj+17)%KEntryCount;
-//*		test(set.DeleteL(jj));
+//*		TEST(set.DeleteL(jj));
 		set.DeleteL(jj);
 		}
-	test(set.Count()==1);
+	TEST2(set.Count(), 1);
 
-	test.Next(_L("Check contents"));
+	TheTest.Printf(_L("Check contents\r\n"));
 	jj=(jj+17)%KEntryCount;
 	TPagedSetBiIter<TUint32> biter(set);
-	test(biter.FirstL());
-	test(biter.AtL()==jj);
+	TEST(biter.FirstL());
+	TEST3(biter.AtL(), jj);
 	TUint32 data; 
 	biter.ExtractAtL(data);
-	test(data == jj);
-	test(!biter.NextL());
-	test(biter.LastL());
-	test(biter.AtL()==jj);
-	test(!biter.PreviousL());
+	TEST3(data, jj);
+	TEST(!biter.NextL());
+	TEST(biter.LastL());
+	TEST3(biter.AtL(), jj);
+	TEST(!biter.PreviousL());
 	TPagedSetRIter<TUint32> riter(set);
-	test(riter.ResetL());
-	test(riter.AtL()==jj);
+	TEST(riter.ResetL());
+	TEST3(riter.AtL(), jj);
 	riter.ExtractAtL(data);
-	test(data == jj);
-	test(!riter.NextL());
+	TEST3(data, jj);
+	TEST(!riter.NextL());
 
-//*	test(set.DeleteL(jj));
+//*	TEST(set.DeleteL(jj));
 	set.DeleteL(jj);
-	test(!iter.ResetL());
-	test(set.Count()==0);
-
-	test.End();
+	TEST(!iter.ResetL());
+	TEST2(set.Count(), 0);
 
 	CleanupStack::PopAndDestroy();
 	}
@@ -240,7 +272,7 @@
 */
 LOCAL_C void test3aL(RWriteStream& aStream,MPagePool *aPool,TInt aCount)
 	{
-	test.Next(_L(" @SYMTestCaseID:SYSLIB-STORE-CT-1123 "));
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-STORE-CT-1123"));
 	TPagedSet<TInt32> set;
 //*	set.Connect(aPool,TBtree::EQosFastest);
 	set.Connect(aPool);
@@ -263,21 +295,21 @@
 */
 LOCAL_C void test3bL(RReadStream& aStream,MPagePool *aPool,TInt aCount)
 	{
-	test.Next(_L(" @SYMTestCaseID:SYSLIB-STORE-CT-1124 "));
+	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-STORE-CT-1124"));
 	TPagedSetToken token;
 	aStream>>token;
 	TPagedSet<TInt32> set(token);
 //*	set.Connect(aPool,TBtree::EQosFastest);
 	set.Connect(aPool);
 
-	test(set.Count()==aCount);
+	TEST2(set.Count(), aCount);
 	for (TInt ii=0;ii<aCount;ii++)
 		{
 		TInt32 it=ii;
-//*		test(set.DeleteL(it));
+//*		TEST(set.DeleteL(it));
 		set.DeleteL(it);
 		}
-	test(set.Count()==0);
+	TEST2(set.Count(), 0);
 	}
 
 /**
@@ -293,32 +325,102 @@
 	const TInt KEntryCount=1000;
 	MPagePool *pool=CMemPagePool::NewLC();
 	TUint8 stream[0x40];
-	test.Start(_L(" @SYMTestCaseID:SYSLIB-STORE-CT-1125 Build set and stream out "));
+	TheTest.Printf(_L("Build set and stream out\r\n"));
 	RMemWriteStream out(stream,sizeof(stream));
 	test3aL(out,pool,KEntryCount);
-	test.Next(_L("Stream in and test set "));
+	TheTest.Printf(_L("Stream in and test set\r\n"));
 	RMemReadStream in(stream,sizeof(stream));
 	test3bL(in,pool,KEntryCount);
-	test.End();
 	CleanupStack::PopAndDestroy();
 	}
 
 class CPersistentStoreHelper: public CPersistentStore
 	{
-	virtual MStreamBuf* DoReadL(TStreamId /*anId*/) const
+private:
+	virtual MStreamBuf* DoReadL(TStreamId) const
+		{
+		return NULL;
+		}
+	virtual MStreamBuf* DoCreateL(TStreamId&)
 		{
 		return NULL;
 		}
-	virtual MStreamBuf* DoCreateL(TStreamId& /*anId*/)
+	};
+
+void DoBiITerMultiSetTestL(TPagedSetBiIter<TInt32>& aIter, TInt aCount)
+	{
+	TInt count = 0;
+	TBool rc = aIter.FirstL();
+	TEST(rc);
+	++count;
+	while(aIter.NextL())
 		{
-		return NULL;
+		++count;
+		}
+	TEST2(count, aCount);
+	
+	count = 0;
+	rc = aIter.LastL();
+	TEST(rc);
+	++count;
+	while(aIter.PreviousL())
+		{
+		++count;
+		}
+	TEST2(count, aCount);
+	}
+
+void DoRIterMultiSetTestL(TPagedSetRIter<TInt32> aIter, TInt aCount)
+	{
+	TInt count = 0;
+	TBool rc = aIter.ResetL();
+	TEST(rc);
+	++count;
+	while(aIter.NextL())
+		{
+		++count;
 		}
-	void Help()
+	TEST2(count, aCount);
+	}
+
+void DoRIterAnyMultiSetTestL(TPagedSetRIter<TAny> aIter, TInt aCount)
+	{
+	TInt count = 0;
+	TBool rc = aIter.ResetL();
+	TEST(rc);
+	++count;
+	while(aIter.NextL())
 		{
-		//just do nothing
-		return;
+		++count;
+		}
+	TEST2(count, aCount);
+	}
+
+void DoIterMultiSetTestL(TPagedSetIter<TInt32> aIter, TInt aCount)
+	{
+	TInt count = 0;
+	TBool rc = aIter.ResetL();
+	TEST(rc);
+	++count;
+	while(aIter.NextL())
+		{
+		++count;
 		}
-	};
+	TEST2(count, aCount);
+	}
+
+void DoIterAnyMultiSetTestL(TPagedSetIter<TAny> aIter, TInt aCount)
+	{
+	TInt count = 0;
+	TBool rc = aIter.ResetL();
+	TEST(rc);
+	++count;
+	while(aIter.NextL())
+		{
+		++count;
+		}
+	TEST2(count, aCount);
+	}
 
 /**
 @SYMTestCaseID          PDS-STORE-CT-4015
@@ -335,57 +437,87 @@
 	{
 	const TInt KEntryCount=200;
 
-	test.Start(_L(" @SYMTestCaseID:PDS-STORE-CT-4015 Test untested APIs "));
+	TheTest.Printf(_L("Test untested APIs\r\n"));
 
 	TInt32 it=0;
 	TPagedMultiset<TInt32> set;
 	set.Connect(CMemPagePool::NewLC());
-	test.Next(_L("Duplicates"));
+	TheTest.Printf(_L("Duplicates\r\n"));
 	TInt ii, err;
 	for (ii=0;ii<KEntryCount;++ii)
 		{
 		TRAP(err, set.InsertL(it));
-		test(err==KErrNone);
+		TEST2(err, KErrNone);
 		}
-	test(set.Count()==KEntryCount);
+	TEST2(set.Count(), KEntryCount);
 	TBool rc = set.IsEmpty();
-	test(!rc);
+	TEST(!rc);
+
+	TPagedSetBiIter<TInt32> biIter(set);
+	DoBiITerMultiSetTestL(biIter, set.Count());
+
+	TPagedSetRIter<TInt32> rIter(set);
+	DoRIterMultiSetTestL(rIter, set.Count());
+	TPagedSetRIter<TAny> rIter2(set);
+	DoRIterAnyMultiSetTestL(rIter2, set.Count());
+
+	TPagedSetIter<TInt32> iter(set);
+	DoIterMultiSetTestL(iter, set.Count());
+	TPagedSetIter<TAny> iter2(set);
+	DoIterAnyMultiSetTestL(iter2, set.Count());
+	
+	TPagedSetToken token = set.Token();
+	TPagedMultiset<TInt32> multiSet2(token);
+	TEST2(multiSet2.Count(), set.Count());
+	TPagedMultiset<TAny> multiSet3(token, sizeof(TInt32));
+	TEST2(multiSet3.Count(), set.Count());
+	TPagedMultiset<TAny> multiSet4(sizeof(TInt32));
+	TEST2(multiSet4.Count(), 0);
+	TPagedSet<TAny> set5(token, sizeof(TInt32));
+	TEST2(set5.Count(), set.Count());
+	TPagedSet<TAny> set6(sizeof(TInt32));
+	TEST2(set6.Count(), 0);
+	
 	set.MarkDirty();
 	set.MarkCurrent();
 	TRAP(err, set.ContainsL(it));
-	test(err==KErrNone);
+	TEST2(err, KErrNone);
 	TRAP(err, set.InsertL(it));
-	test(err==KErrNone);
+	TEST2(err, KErrNone);
 		
 	for (ii=0;ii<KEntryCount;++ii)
 		{
 		TRAP(err, set.DeleteL(it));
-		test(err==KErrNone);
+		TEST2(err, KErrNone);
 		}
 		
 	TRAP(err, set.ContainsL(it));
-	test(err==KErrNone);
+	TEST2(err, KErrNone);
 	TRAP(err, set.DeleteL(it));
-	test(err==KErrNone);
-	test(set.Count()==0);
+	TEST2(err, KErrNone);
+	TEST2(set.Count(), 0);
 	
-	test.Next(_L("Calling MPagePool::Delete"));
+	TheTest.Printf(_L("Calling MPagePool::Delete\r\n"));
 	CMemPagePool* mpp = CMemPagePool::NewLC();
 	const TPageAbandonFunction& nopFunc = mpp->AcquireL();
-	test(&nopFunc != NULL);
+	TEST(&nopFunc != NULL);
 	TAny* any = mpp->AllocL();
 	TPageRef pref;
 	pref = mpp->AssignL(any, EPageReclaimable);
 	mpp->MPagePool::Delete(pref);
 	CleanupStack::PopAndDestroy();
 	
-	test.Next(_L("CPersistentStore DoSetRootL"));
+	TheTest.Printf(_L("CPersistentStore::DoSetRootL\r\n"));
 	CPersistentStoreHelper* ps = new (ELeave) CPersistentStoreHelper();
 	CleanupStack::PushL(ps);
 	ps->SetRootL(KNullStreamId);
-	CleanupStack::PopAndDestroy();
+	TRAP(err, ps->ExtendL());
+	TEST2(err, KErrNotSupported);
+	TRAP(err, ps->DeleteL(TStreamId(1u)));
+	TEST2(err, KErrNotSupported);
+	CleanupStack::PopAndDestroy(ps);
 	
-	test.Next(_L("HDirectStoreBuf::DoSeekL calls"));
+	TheTest.Printf(_L("HDirectStoreBuf::DoSeekL calls\r\n"));
 	HBufC8* buf = HBufC8::NewLC(1024);
 	RDesWriteStream wts;
 	
@@ -404,21 +536,20 @@
 	RStoreReadStream rstream;
 	rstream.OpenL(*estor, id);
 	TStreamPos pos = rstream.Source()->SeekL(MStreamBuf::ERead, 5);
-	test(pos.Offset() == 5);
+	TEST2(pos.Offset(), 5);
 	rts.Close();
 	rstream.Close();
 	CleanupStack::PopAndDestroy(2);
 	
-	test.Next(_L("Calling TEmpty Constructor"));
-	TPagedSetToken set2(TBtreeToken::EEmpty);
-	test( set2.Count() == 0);
+	TheTest.Printf(_L("Calling TEmpty Constructor\r\n"));
+	TPagedSetToken set3(TBtreeToken::EEmpty);
+	TEST2( set3.Count(), 0);
 	
-	test.Next(_L("Set function"));
-	set.Set(set2);
+	TheTest.Printf(_L("Set function\r\n"));
+	set.Set(set3);
 	const TPagedSetToken& pst = set.Token();
-	test(pst.Count() == set2.Count());
+	TEST2(pst.Count(), set3.Count());
 	
-	test.End();
 	CleanupStack::PopAndDestroy();
 	}
 
@@ -434,20 +565,20 @@
 	TStreamPos pos1;
 	TStreamPos pos2(5);
 	pos1 = pos2;
-	test(pos1 == pos2);
+	TEST(pos1 == pos2);
 	
 	pos1 = 5 + pos2;
-	test(pos1 > pos2);
-	test(pos2 < pos1);
-	test(pos2 <= pos1);
-	test(pos1 != pos2);
+	TEST(pos1 > pos2);
+	TEST(pos2 < pos1);
+	TEST(pos2 <= pos1);
+	TEST(pos1 != pos2);
 	pos1 = pos1 - 5;
-	test(pos1 == pos2);
+	TEST(pos1 == pos2);
 	
 	pos2 += 0;
-	test(pos1 == pos2);
+	TEST(pos1 == pos2);
 	pos2 -= 0;
-	test(pos1 == pos2);
+	TEST(pos1 == pos2);
 	}
 
 struct TTestEntry
@@ -479,9 +610,9 @@
 		
 	TBtreeToken token(TBtreeToken::EEmpty);
 	TBool rc = token.IsEmpty();
-	test(rc);
+	TEST(rc);
 	rc = token.IsIntact();
-	test(rc);
+	TEST(rc);
 	
 	TBtreeFix<TTestEntry, TInt> bentry(token, EBtreeSecure);
 	TBtreeKey bkey(sizeof(TInt));
@@ -489,33 +620,33 @@
 	
 	TBtreePos bpos;
 	rc = bentry.FindL(bpos, 1);
-	test(!rc);
+	TEST(!rc);
 	rc = bentry.InsertL(bpos, TTestEntry(1, 101));
-	test(rc);
+	TEST(rc);
 	rc = bentry.FindL(bpos, 1);
-	test(rc);
+	TEST(rc);
 	TTestEntry entry1 = bentry.AtL(bpos);
-	test(entry1.iKey == 1 && entry1.iData == 101);
+	TEST(entry1.iKey == 1 && entry1.iData == 101);
 	const void* key = bkey.Key(&entry1);
 	TInt keyVal = *((const TInt*)key);
-	test.Printf(_L("keyVal=%d\n"), keyVal);
+	TheTest.Printf(_L("keyVal=%d\r\n"), keyVal);
 	
 	rc = bentry.InsertL(bpos, TTestEntry(3, 103));
-	test(rc);
+	TEST(rc);
 	rc = bentry.InsertL(bpos, TTestEntry(2, 102));
-	test(rc);
+	TEST(rc);
 	
 	rc = bentry.FindL(bpos, 2);
-	test(rc);
+	TEST(rc);
 	TTestEntry entry2;
 	bentry.ExtractAtL(bpos, entry2);
-	test(entry2.iKey == 2 && entry2.iData == 102);
+	TEST(entry2.iKey == 2 && entry2.iData == 102);
 
 	rc = bentry.FindL(bpos, 3);
-	test(rc);
+	TEST(rc);
 	TTestEntry entry3;
 	bentry.ExtractAtL(bpos, entry3);
-	test(entry3.iKey == 3 && entry3.iData == 103);
+	TEST(entry3.iKey == 3 && entry3.iData == 103);
 
 	//==============================================
 	
@@ -525,85 +656,76 @@
 		do
 			{
 			TTestEntry entry = bentry.AtL(bmark);
-			test.Printf(_L("AtL(): entry.iKey=%d, entry.iData=%d\n"), entry.iKey, entry.iData);
+			TheTest.Printf(_L("AtL(): entry.iKey=%d, entry.iData=%d\r\n"), entry.iKey, entry.iData);
 			bentry.ExtractAtL(bmark, entry);
-			test.Printf(_L("ExtractAtL(): entry.iKey=%d, entry.iData=%d\n"), entry.iKey, entry.iData);
+			TheTest.Printf(_L("ExtractAtL(): entry.iKey=%d, entry.iData=%d\r\n"), entry.iKey, entry.iData);
 			}while(bentry.NextL(bmark));
 		}
 
 	rc = bentry.NextL(bmark);
-	test(!rc);
+	TEST(!rc);
 
 	//==============================================
 
 	rc = bentry.DeleteL(2);
-	test(rc);
+	TEST(rc);
 	rc = bentry.FindL(bpos, 2);
-	test(!rc);
+	TEST(!rc);
 	rc = bentry.FindL(bpos, 3);
-	test(rc);
+	TEST(rc);
 	TRAPD(err, bentry.DeleteAtL(bpos));
-	test(err == KErrNone);
+	TEST(err == KErrNone);
 	rc = bentry.FindL(bpos, 3);
-	test(!rc);
+	TEST(!rc);
 	
 	bentry.MarkDirty();
 	rc = bentry.IsDirty();
-	test(rc);
+	TEST(rc);
 	bentry.MarkCurrent();
 	rc = bentry.IsDirty();
-	test(!rc);
+	TEST(!rc);
 	
 	bentry.ClearL();
 	CleanupStack::PopAndDestroy(pool);
 	}
 
-LOCAL_C void doMainL()
+LOCAL_C void DoTestsL()
 	{
-	test.Start(_L("Basic operations"));
+	TheTest.Start(_L("@SYMTestCaseID:SYSLIB-STORE-CT-1121 Basic operations"));
 	test1L();
-	test.Next(_L("Large set TUint32"));
+	TheTest.Next(_L("@SYMTestCaseID:SYSLIB-STORE-CT-1122 Large set TUint32"));
 	test2L();
-	test.Next(_L("Tokens and streaming"));
+	TheTest.Next(_L("@SYMTestCaseID:SYSLIB-STORE-CT-1125 Tokens and streaming"));
 	test3L();
-	test.Next(_L("Forgotten API"));
+	TheTest.Next(_L("@SYMTestCaseID:PDS-STORE-CT-4015 Forgotten API"));
 	test4L();
-	test.Next(_L("@SYMTestCaseID:PDS-STORE-CT-4065: TStreamPos test"));
+	TheTest.Next(_L("@SYMTestCaseID:PDS-STORE-CT-4065: TStreamPos test"));
 	StreamPosTest();
-	test.Next(_L("@SYMTestCaseID:PDS-STORE-CT-4066: TBtreeFix test"));
+	TheTest.Next(_L("@SYMTestCaseID:PDS-STORE-CT-4066: TBtreeFix test"));
 	BTreeFixTestL();
-	test.End();
 	}
 
-LOCAL_C void setupCleanup()
-//
-// Initialise the cleanup stack.
-//
-    {
-	TheTrapCleanup=CTrapCleanup::New();
-	test(TheTrapCleanup!=NULL);
-	TRAPD(r,\
-		{\
-		for (TInt i=KTestCleanupStack;i>0;i--)\
-			CleanupStack::PushL((TAny*)1);\
-		test(r==KErrNone);\
-		CleanupStack::Pop(KTestCleanupStack);\
-		});
-	test(r==KErrNone);
+TInt E32Main()
+	{
+    TheTest.Title();
+    
+    CTrapCleanup* tc = CTrapCleanup::New();
+    TheTest(tc != NULL);
+    
+    __UHEAP_MARK;
+    
+    TRAPD(err, DoTestsL());
+    TEST2(err, KErrNone);
+
+    __UHEAP_MARKEND;
+
+    User::Heap().Check();
+    
+    TheTest.End();
+    TheTest.Close();
+    
+    delete tc;
+
+    return KErrNone;
 	}
 
-GLDEF_C TInt E32Main()
-	{
-	test.Title();
-	setupCleanup();
-	__UHEAP_MARK;
-//
-	TRAPD(r,doMainL());
-	test(r==KErrNone);
-//
-	__UHEAP_MARKEND;
-	delete TheTrapCleanup;
-	test.Close();
-	return 0;
-	}
-
--- a/persistentstorage/store/TCRYPT/t_storcrypt.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TCRYPT/t_storcrypt.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -716,23 +716,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/store/TFILE/t_storcorrupt.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TFILE/t_storcorrupt.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -41,7 +41,7 @@
 	{
 	if(!aValue)
 		{
-		TheTest.Printf(_L("*** Boolean expression evaluated to false!\r\n"));
+		TheTest.Printf(_L("*** Expression evaluated to false!\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -280,7 +280,7 @@
 	TInt err = TheFs.Delete(KFileName);
 	if(err != KErrNone)
 		{
-		RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &KFileName);
+		TheTest.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &KFileName);
 		}
 	}
 
--- a/persistentstorage/store/TFILE/t_storfbuf.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TFILE/t_storfbuf.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -620,23 +620,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/store/TFILE/t_storfcomp.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TFILE/t_storfcomp.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -494,23 +494,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/store/TFILE/t_storfdir.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TFILE/t_storfdir.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -321,23 +321,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/store/TFILE/t_storfperm.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TFILE/t_storfperm.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -556,23 +556,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/store/TFILE/t_storfrecl.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TFILE/t_storfrecl.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -41,23 +41,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			TheTest.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				TheTest.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				TheTest.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		TheTest.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
@@ -67,7 +67,7 @@
 	{
 	if(!aValue)
 		{
-		TheTest.Printf(_L("*** Boolean expression evaluated to false\r\n"));
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		DeleteDataFile(TheFileName);
 		TheTest(EFalse, aLine);
 		}
--- a/persistentstorage/store/TFILE/t_storfstrm.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TFILE/t_storfstrm.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -348,23 +348,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/store/TPAGE/t_storpage.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TPAGE/t_storpage.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -40,7 +40,7 @@
 	{
 	if(!aValue)
 		{
-		TheTest.Printf(_L("*** Boolean expression evaluated to false!\r\n"));
+		TheTest.Printf(_L("*** Expression evaluated to false!\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -594,22 +594,22 @@
 			err = fs.Delete( tf );
 			if (err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting file \"%S\".\n"), err, &(rdir[i].iName));
+				TheTest.Printf(_L("Error %d deleting file \"%S\".\n"), err, &(rdir[i].iName));
 				}
 			else
-				RDebug::Print(_L("File \"%S\" removed.\n"), &(rdir[i].iName));
+				TheTest.Printf(_L("File \"%S\" removed.\n"), &(rdir[i].iName));
 			}
 		delete dir;
 		err = fs.RmDir(KPageFilePathOnly);
 		if (err != KErrNone)
 			{
-			RDebug::Print(_L("Error %d deleting folder \"%S\".\n"), err, &KPageFilePathOnly);
+			TheTest.Printf(_L("Error %d deleting folder \"%S\".\n"), err, &KPageFilePathOnly);
 			}
 		fs.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session.\n"), err);
+		TheTest.Printf(_L("Error %d connecting file session.\n"), err);
 		}
 	}
 
@@ -622,23 +622,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			TheTest.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				TheTest.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				TheTest.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		TheTest.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/store/TSTOR/t_storbench.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TSTOR/t_storbench.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -56,6 +56,7 @@
 	{
 	if(!aValue)
 		{
+		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
 		DeleteDataFiles();
 		TheTest(EFalse, aLine);
 		}
@@ -65,7 +66,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
 		DeleteDataFiles();
 		TheTest(EFalse, aLine);
 		}
@@ -129,23 +130,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			TheTest.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				TheTest.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				TheTest.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		TheTest.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 static void DeleteDataFiles()
--- a/persistentstorage/store/TSTOR/t_stordelim.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TSTOR/t_stordelim.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -237,23 +237,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/store/TSTOR/t_stordict.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TSTOR/t_stordict.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -91,6 +91,7 @@
     {
     if(!aValue)
         {
+        TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
         DeleteDataFiles();
         TheTest(EFalse, aLine);
         }
@@ -100,7 +101,7 @@
     {
     if(aValue != aExpected)
         {
-        RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
+        TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
         DeleteDataFiles();
         TheTest(EFalse, aLine);
         }
--- a/persistentstorage/store/TSTOR/t_storembed.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TSTOR/t_storembed.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -346,23 +346,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/store/TSTOR/t_storshape.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TSTOR/t_storshape.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -241,23 +241,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/store/TSTOR/t_storstrm.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TSTOR/t_storstrm.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -317,23 +317,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/store/TSTOR/t_storverify.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TSTOR/t_storverify.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -174,23 +174,23 @@
 		TEntry entry;
 		if(fsSession.Entry(aFullName, entry) == KErrNone)
 			{
-			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
+			Test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
+				Test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
 				}
 			err = fsSession.Delete(aFullName);
 			if(err != KErrNone)
 				{
-				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
+				Test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
 				}
 			}
 		fsSession.Close();
 		}
 	else
 		{
-		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
+		Test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
 		}
 	}
 
--- a/persistentstorage/store/TSTRM/t_storconv.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TSTRM/t_storconv.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -966,7 +966,7 @@
 	TStreamMark sm3(0);
 	TPtr8 des = buf->Des();
 	bytesprocessed = sm3.ReadL(se, des, des.MaxLength(), rstatus);
-	RDebug::Printf("Written: %d, Length: %d",bytesprocessed,des.MaxLength());
+	test.Printf(_L("Written: %d, Length: %d\r\n"),bytesprocessed,des.MaxLength());
 	test (bytesprocessed == des.MaxLength());
 	User::WaitForRequest(rstatus);
 	test(rstatus == KErrNone);
@@ -975,7 +975,7 @@
 	buf->Des().Zero();
 	des.Set(buf->Des());
 	bytesprocessed = sm4.ReadL(se, des, rstatus);
-	RDebug::Printf("Written: %d, Length: %d",bytesprocessed,des.MaxLength());
+	test.Printf(_L("Written: %d, Length: %d\r\n"),bytesprocessed,des.MaxLength());
 	test (bytesprocessed == des.MaxLength());
 	sm4.ExtractL(se);
 	User::WaitForRequest(rstatus);
@@ -983,7 +983,7 @@
 	
 	TStreamMark sm5(0);
 	bytesprocessed = sm5.WriteL(se, KTestString(), rstatus);
-	RDebug::Printf("Written: %d, Length: %d",bytesprocessed,KTestString().Length());
+	test.Printf(_L("Written: %d, Length: %d\r\n"),bytesprocessed,KTestString().Length());
 	test (bytesprocessed == KTestString().Length());
 	User::WaitForRequest(rstatus);
 	test(rstatus == KErrNone);
@@ -1085,7 +1085,7 @@
 		User::SetJustInTime(ETrue);	// enable debugger panic handling
 		test(thread.ExitType() == EExitPanic);
 		test(thread.ExitReason() == EInvalidKeyComparison );
-		RDebug::Printf("Thread %d paniced as design with correct panic code", i);
+		test.Printf(_L("Thread %d paniced as design with correct panic code\r\n"), i);
 		}
 	
 	test.Next(_L("MBtreeKey Comparators"));
--- a/persistentstorage/store/TSTRM/t_storswizzle.cpp	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/TSTRM/t_storswizzle.cpp	Tue Oct 19 16:26:13 2010 +0100
@@ -26,7 +26,7 @@
 	{
 	if(!aValue)
 		{
-		RDebug::Print(_L("*** Boolean expression evaluated to false.\r\n"));
+		TheTest.Printf(_L("*** Expression evaluated to false.\r\n"));
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -34,7 +34,7 @@
 	{
 	if(aValue != aExpected)
 		{
-		RDebug::Print(_L("*** Expected error: %d, got: %d.\r\n"), aExpected, aValue);
+		TheTest.Printf(_L("*** Expected error: %d, got: %d.\r\n"), aExpected, aValue);
 		TheTest(EFalse, aLine);
 		}
 	}
@@ -89,6 +89,46 @@
 	iHeight = a;
 	}
 
+class TRectangleExternalizer : public MExternalizer<TRectangle>
+	{
+public:
+	virtual void ExternalizeL(const TRectangle& aObject, RWriteStream& aStream) const;
+	};
+
+void TRectangleExternalizer::ExternalizeL(const TRectangle& aObject, RWriteStream& aStream) const
+	{
+	aStream << aObject;
+	}
+
+class TRectangleInternalizer : public MInternalizer<TRectangle>
+	{
+public:
+	virtual void InternalizeL(TRectangle& aObject, RReadStream& aStream) const;
+	};
+
+void TRectangleInternalizer::InternalizeL(TRectangle& aObject, RReadStream& aStream) const
+	{
+	aStream >> aObject;
+	}
+
+void RectangleExternalizeL(const TAny* aPtr, RWriteStream& aStream)
+	{
+	TRectangle* rcPtr = (TRectangle*)aPtr;
+	rcPtr->ExternalizeL(aStream);
+	}
+
+class TStreamRefExternalizer : public MExternalizer<TStreamRef>
+	{
+public:
+	virtual void ExternalizeL(const TStreamRef& aObject, RWriteStream& aStream) const;
+	};
+
+void TStreamRefExternalizer::ExternalizeL(const TStreamRef& aObject, RWriteStream& aStream) const
+	{
+	TExternalizeFunction func = aObject.Function();
+	(*func)(aObject.Ptr(), aStream);
+	}
+
 ///////////////////////////////////////////////////////////////////////////////////////
 
 /**
@@ -105,6 +145,20 @@
 	const TInt KWidth = 10;
 	const TInt KHeight = 20;
 	TRectangle r1(KWidth, KHeight);
+
+	const TInt KWidth2 = 6;
+	const TInt KHeight2 = 17;
+	TRectangle r2(KWidth2, KHeight2);
+	
+	const TInt KWidth3 = 19;
+	const TInt KHeight3 = 5;
+	TRectangle r3(KWidth3, KHeight3);
+
+	const TInt KWidth4 = 22;
+	const TInt KHeight4 = 19;
+	TRectangle r4(KWidth4, KHeight4);
+	
+	//Externalize r1 using RStoreWriteStream directly 
 	RStoreWriteStream wstrm1;
 	TStreamId strmId1 = wstrm1.CreateLC(*bufStore);
 	TSwizzleC<TRectangle> swizzle1(&r1);
@@ -112,28 +166,91 @@
 	wstrm1 << *swizzle1;
 	wstrm1.CommitL();
 	CleanupStack::PopAndDestroy(&wstrm1);
+
+	//Externalize r2 using TRectangleExternalizer 
+	RStoreWriteStream wstrm2;
+	TStreamId strmId2 = wstrm2.CreateLC(*bufStore);
+	TSwizzleC<TRectangle> swizzle2(&r2);
+	TEST((const void*)swizzle2 == (const void*)&r2);
+	TRectangleExternalizer rcExternalizer2;
+	rcExternalizer2(*swizzle2, wstrm2);
+	wstrm2.CommitL();
+	CleanupStack::PopAndDestroy(&wstrm2);
+
+	//Externalize r3 using TExternalizer<TRectangle> 
+	RStoreWriteStream wstrm3;
+	TStreamId strmId3 = wstrm3.CreateLC(*bufStore);
+	TSwizzleC<TRectangle> swizzle3(&r3);
+	TEST((const void*)swizzle3 == (const void*)&r3);
+	TExternalizer<TRectangle> rcExternalizer3;
+	rcExternalizer3(*swizzle3, wstrm3);
+	wstrm3.CommitL();
+	CleanupStack::PopAndDestroy(&wstrm3);
 	
-	TRectangle r2;
+	//Externalize r4 using TSwizzleC::ExternalizeL()
+	TStreamRefExternalizer rcExternalizer4;
+	RStoreWriteStream wstrm4(rcExternalizer4);
+	TStreamId strmId4 = wstrm4.CreateLC(*bufStore);
+	TSwizzleC<TRectangle> swizzle4(&r4);
+	TEST((const void*)swizzle4 == (const void*)&r4);
+	swizzle4.ExternalizeL(wstrm4);
+	wstrm4.CommitL();
+	CleanupStack::PopAndDestroy(&wstrm4);
+	
+	//Internalize r1 using RStoreReadStream directly 
+	TRectangle r1in;
 	RStoreReadStream rstrm1;
 	rstrm1.OpenLC(*bufStore, strmId1);
-	rstrm1 >> r2;
+	rstrm1 >> r1in;
 	CleanupStack::PopAndDestroy(&rstrm1);
-	
-	TEST(r1 == r2);
+	TEST(r1 == r1in);
+
+	//Internalize r2 using TRectangleInternalizer
+	TRectangle r2in;
+	TSwizzle<TRectangle> swizzle2in(&r2in);
+	RStoreReadStream rstrm2;
+	rstrm2.OpenLC(*bufStore, strmId2);
+	TRectangleInternalizer rcInternalizer2;
+	rcInternalizer2(*swizzle2in, rstrm2);
+	CleanupStack::PopAndDestroy(&rstrm2);
+	TEST(r2 == r2in);
+	TEST(*swizzle2 == *swizzle2in);
+
+	//Internalize r3 using TInternalizer<TRectangle>
+	TRectangle r3in;
+	TSwizzle<TRectangle> swizzle3in(&r3in);
+	RStoreReadStream rstrm3;
+	rstrm3.OpenLC(*bufStore, strmId3);
+	TInternalizer<TRectangle> rcInternalizer3;
+	rcInternalizer3(*swizzle3in, rstrm3);
+	CleanupStack::PopAndDestroy(&rstrm3);
+	TEST(r3 == r3in);
+	TEST(*swizzle3 == *swizzle3in);
+
+	//Internalize r4
+	TSwizzle<TRectangle> swizzle4in(strmId4);
+	TEST(swizzle4in.IsId());
+	RStoreReadStream rstrm4;
+	rstrm4.OpenLC(*bufStore, swizzle4in.AsId());
+	TRectangle r4in;
+	rstrm4 >> r4in;
+	CleanupStack::PopAndDestroy(&rstrm4);
+	TEST(r4 == r4in);
 	
 	CleanupStack::PopAndDestroy(bufStore);
-	
-	TSwizzleC<TRectangle> swizzle2(swizzle1);
-	TEST(swizzle1->iWidth == swizzle2->iWidth);
-	TEST(swizzle1->iHeight == swizzle2->iHeight);
-	TEST(swizzle1.AsPtr()->iHeight == swizzle2.AsPtr()->iHeight);
+
+	//TSwizzleC copy constructor test
+	TSwizzleC<TRectangle> swizzle1copy(swizzle1);
+	TEST(swizzle1->iWidth == swizzle1copy->iWidth);
+	TEST(swizzle1->iHeight == swizzle1copy->iHeight);
+	TEST(swizzle1.AsPtr()->iHeight == swizzle1copy.AsPtr()->iHeight);
 
-	
-	TSwizzleC<TRectangle> swizzle3;
-	swizzle3 = &r2;
-	TEST(swizzle1->iWidth == swizzle3->iWidth);
-	TEST(swizzle1->iHeight == swizzle3->iHeight);
-	TEST(swizzle1.AsPtr()->iHeight == swizzle3.AsPtr()->iHeight);
+	//TSwizzleC assignment operator test
+	TSwizzleC<TRectangle> swizzle1assign;
+	swizzle1assign = &r1in;
+	TEST(swizzle1->iWidth == swizzle1assign->iWidth);
+	TEST(swizzle1->iHeight == swizzle1assign->iHeight);
+	TEST(swizzle1.AsPtr()->iHeight == swizzle1assign.AsPtr()->iHeight);
 	}
 
 /**
--- a/persistentstorage/store/UBTREE/UB_UTL.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/UBTREE/UB_UTL.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -16,6 +16,7 @@
 #include "UB_STD.H"
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 //
 // Panic the process with STORE-B-tree as the category.
@@ -26,4 +27,5 @@
 	User::Panic(KCategory,aPanic);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
--- a/persistentstorage/store/UCONT/UC_UTL.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/UCONT/UC_UTL.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -16,6 +16,7 @@
 #include "UC_STD.H"
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 //
 // Panic the process with STORE-Container as the category.
@@ -26,4 +27,5 @@
 	User::Panic(KCategory,aPanic);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
--- a/persistentstorage/store/UCRYPT/UE_UTL.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/UCRYPT/UE_UTL.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -16,6 +16,7 @@
 #include "UE_STD.H"
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 //
 // Panic the process with STORE-Encryption as the category.
@@ -26,4 +27,5 @@
 	User::Panic(KCategory,aPanic);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
--- a/persistentstorage/store/UFILE/UF_DICT.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/UFILE/UF_DICT.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -163,8 +163,9 @@
 			{
 		case KErrNone:
 			{
-			TInt size;
-			if (file.Size(size)==KErrNone && size!=0)
+			TInt size = -1;
+			// coverity[negative_returns]
+			if (file.Size(size)==KErrNone && size>0)
 				{
 				CFileStore* store=NULL;
 				TRAP(r,store=CPermanentFileStore::FromL(file));
--- a/persistentstorage/store/UFILE/UF_UTL.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/UFILE/UF_UTL.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -16,6 +16,7 @@
 #include "UF_STD.H"
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 //
 // Panic the process with STORE-File as the category.
@@ -26,6 +27,7 @@
 	User::Panic(KCategory,aPanic);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 EXPORT_C CFileStore* FileStoreFactory::DirectLC(RFileBuf& aBuf,const TUidType& aType)
--- a/persistentstorage/store/ULIB/UL_UTL.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/ULIB/UL_UTL.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -19,6 +19,7 @@
 #if defined (_DEBUG)
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 //
 // Leave to the current control region.
@@ -64,6 +65,7 @@
 	return aPtr;
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 #endif
--- a/persistentstorage/store/UMEM/UM_UTL.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/UMEM/UM_UTL.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -16,6 +16,7 @@
 #include "UM_STD.H"
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 //
 // Panic the process with STORE-Memory as the category.
@@ -26,6 +27,7 @@
 	User::Panic(KCategory,aPanic);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 HBufBuf* HBufBuf::NewL(CBufBase& aBuf,TInt aPos,TInt aMode)
--- a/persistentstorage/store/UPAGE/UP_UTL.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/UPAGE/UP_UTL.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -16,6 +16,7 @@
 #include "UP_STD.H"
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 //
 // Panic the process with STORE-Page as the category.
@@ -26,4 +27,5 @@
 	User::Panic(KCategory,aPanic);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
--- a/persistentstorage/store/USTOR/UT_STOR.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/USTOR/UT_STOR.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1998-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"
@@ -166,6 +166,9 @@
 	__LEAVE(KErrNotSupported);
 	}
 
+#pragma BullseyeCoverage off
+#pragma CTC SKIP
+
 EXPORT_C MStreamBuf* CStreamStore::DoWriteL(TStreamId)
 //
 // Default implementation failing.
@@ -175,6 +178,9 @@
 	return NULL;
 	}
 
+#pragma CTC ENDSKIP
+#pragma BullseyeCoverage on
+
 EXPORT_C MStreamBuf* CStreamStore::DoReplaceL(TStreamId)
 //
 // Default implementation failing.
--- a/persistentstorage/store/USTOR/UT_UTL.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/USTOR/UT_UTL.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -16,6 +16,7 @@
 #include "UT_STD.H"
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 //
 // Panic the process with STORE-Store as the category.
@@ -26,6 +27,7 @@
 	User::Panic(KCategory,aPanic);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 EXPORT_C void TStreamId::InternalizeL(RReadStream& aStream)
--- a/persistentstorage/store/USTRM/US_BUF.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/USTRM/US_BUF.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -227,6 +227,7 @@
 	}
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 //
 // Cannot read from this stream buffer.
@@ -255,6 +256,7 @@
 	return streamPos;
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 /** Reads data from the stream buffer into the specified descriptor.
--- a/persistentstorage/store/USTRM/US_UCMP.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/USTRM/US_UCMP.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -153,12 +153,14 @@
 	}
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 void TUnicodeCompressionState::Panic(TPanic aPanic)
 	{
 	User::Panic(_L("ucmp"),aPanic);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 EXPORT_C TUnicodeCompressor::TUnicodeCompressor():
--- a/persistentstorage/store/USTRM/US_UTL.CPP	Mon Sep 27 11:59:56 2010 +0100
+++ b/persistentstorage/store/USTRM/US_UTL.CPP	Tue Oct 19 16:26:13 2010 +0100
@@ -17,6 +17,7 @@
 #include "US_STD.H"
 
 #pragma BullseyeCoverage off
+#pragma CTC SKIP
 
 //
 // Panic the process with STORE-Stream as the category.
@@ -27,6 +28,7 @@
 	User::Panic(KCategory,aPanic);
 	}
 
+#pragma CTC ENDSKIP
 #pragma BullseyeCoverage on
 
 EXPORT_C void TCardinality::ExternalizeL(RWriteStream& aStream) const