# HG changeset patch # User Pat Downey # Date 1283341198 -3600 # Node ID cc28652e0254d84c84761a20b2e6839820b544e6 # Parent 26645d81f48de6fce43d5e223ad0c92b5c406da3 Revert incorrect RCL_3 drop: Revision: 201035 Kit: 201035 diff -r 26645d81f48d -r cc28652e0254 build.config.xml --- a/build.config.xml Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,190 +0,0 @@ - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/engineering/File Specification/FeatDB_XMLDataModel.EAP Binary file featuremgmt/featuremgr/engineering/File Specification/FeatDB_XMLDataModel.EAP has changed diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/engineering/File Specification/FeatDB_example.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/featuremgmt/featuremgr/engineering/File Specification/FeatDB_example.xml Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,40 @@ + + + + + + + + // publicfeatureUID.h + // + // Copyright (c) Symbian Software Ltd 2007. All rights reserved. + //....................................................................................... + + + + + + /** + Feature = FAX, status = "Supported" this feature should go to SDK + */ + + + + + + /** + Feature = FAX, status = "Supported" this feature should go to SDK + */ + + + + + + + /** + The UID ranges are allocated for features that default to reporting "feature supported" + */ + + + + diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/engineering/File Specification/featuredatabase.dtd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/featuremgmt/featuremgr/engineering/File Specification/featuredatabase.dtd Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/engineering/reference_plugins/group/simple_feature_info_plugin.mmp --- a/featuremgmt/featuremgr/engineering/reference_plugins/group/simple_feature_info_plugin.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/engineering/reference_plugins/group/simple_feature_info_plugin.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -22,6 +22,8 @@ USERINCLUDE ../inc OS_LAYER_SYSTEMINCLUDE_SYMBIAN +//SYSTEMINCLUDE /epoc32/include +//SYSTEMINCLUDE /epoc32/include/ecom SOURCEPATH ../src SOURCE simple_feature_info_plugin.cpp diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/group/bld.inf --- a/featuremgmt/featuremgr/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -22,13 +22,13 @@ PRJ_EXPORTS -../inc/featmgr.h OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featmgr.h) -../inc/featurecontrol.h OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featurecontrol.h) -../inc/featurenotifier.h OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featurenotifier.h) -../inc/featurecmn.h OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featurecmn.h) -../inc/featdiscovery.h OS_LAYER_PUBLIC_EXPORT_PATH(featdiscovery.h) -../inc/featureinfoplugin.h OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featureinfoplugin.h) -../inc/featureinfoplugin.inl OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featureinfoplugin.inl) +../inc/featmgr.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featmgr.h) +../inc/featurecontrol.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featurecontrol.h) +../inc/featurenotifier.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featurenotifier.h) +../inc/featurecmn.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featurecmn.h) +../inc/featdiscovery.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(featdiscovery.h) +../inc/featureinfoplugin.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featureinfoplugin.h) +../inc/featureinfoplugin.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featmgr/featureinfoplugin.inl) #ifdef SYMBIAN_OLD_EXPORT_LOCATION ../inc/featurepanics.h /epoc32/include/featmgr/featurepanics.h #endif diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/group/featmgrserver.mmp --- a/featuremgmt/featuremgr/group/featmgrserver.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/group/featmgrserver.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -13,21 +13,21 @@ // Description: // -#ifdef __FEATMGR_TESTCFG__ -TARGET test_featmgrserver.exe -CAPABILITY AllFiles ProtServ ReadDeviceData -#else + +#ifndef __FEATMGR_TESTCFG__ TARGET featmgrserver.exe -CAPABILITY ProtServ ReadDeviceData -#endif // __FEATMGR_TESTCFG__ - // Since this is an exe with no alternate implementations, // just use same UID for both UID2 and UID3 UID 0x10205054 0x10205054 +#else +TARGET test_featmgrserver.exe +UID 0x102836E5 0x102836E5 +#endif // __FEATMGR_TESTCFG__ TARGETTYPE exe VENDORID 0x70000001 +CAPABILITY ProtServ ReadDeviceData //CodeWarrior compilation options - disable the "illegal pragma" warning OPTION CW -w noillpragmas diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/src/inc/featmgrconfiguration.h --- a/featuremgmt/featuremgr/src/inc/featmgrconfiguration.h Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/src/inc/featmgrconfiguration.h Wed Sep 01 12:39:58 2010 +0100 @@ -32,7 +32,7 @@ const TInt KDefaultFeatMgrTimer = (10*1000*1000); #ifdef EXTENDED_FEATURE_MANAGER_TEST const TInt KShutdownTimeout = 500000; -const TInt KServerUid2Int = 0x10205054; +const TInt KServerUid2Int = 0x102836E5; #else const TInt KServerUid2Int = 0x10205054; #endif // EXTENDED_FEATURE_MANAGER_TEST diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/src/serverexe/featmgrfeatureregistry.cpp --- a/featuremgmt/featuremgr/src/serverexe/featmgrfeatureregistry.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/src/serverexe/featmgrfeatureregistry.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -163,11 +163,6 @@ } else { - TBitFlags32 flags = iFeatureList[index].FeatureFlags(); - flags.Assign( EFeatureSupported, KFeatureUnsupported ); - TUint32 data = iFeatureList[index].FeatureData(); - TFeatureServerEntry entry( aFeature.FeatureUid(), flags, data ); - aFeature = entry; err = KFeatureUnsupported; } @@ -281,19 +276,8 @@ { data = *aData; } - - TFeatureServerEntry entry( aFeature, flags, data ); - - // If aData is not null, we want to change the user data too - // otherwise only change the feature status. - if( aData ) - { - err = SWICacheCommand(ESWISetFeatAndData, entry); - } - else - { - err = SWICacheCommand(ESWISetFeat, entry); - } + TFeatureServerEntry entry( aFeature, flags, data ); + err = SWICacheCommand(ESWISetFeatAndData, entry); } else { @@ -1458,13 +1442,6 @@ EFeatureSupportUntouch,&data); } break; - case ESWISetFeat: - { - SetFeature( iSWICachedOperations[i].iFeatEntry.FeatureUid(), - iSWICachedOperations[i].iFeatEntry.FeatureFlags().Value(), - NULL); - } - break; default: break; }; diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/src/serverexe/featmgrfeatureregistry.h --- a/featuremgmt/featuremgr/src/serverexe/featmgrfeatureregistry.h Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/src/serverexe/featmgrfeatureregistry.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-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" @@ -69,8 +69,7 @@ ESWIAddFeat, ESWIDeleteFeat, ESWISetFeatAndData, - ESWISetFeatData, - ESWISetFeat + ESWISetFeatData }; /* diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/src/serverexe/featmgrserver.cpp --- a/featuremgmt/featuremgr/src/serverexe/featmgrserver.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/src/serverexe/featmgrserver.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -317,13 +317,9 @@ TBool ret( EFalse ); // Use ECom to read information about existing interface implementations -#ifndef EXTENDED_FEATURE_MANAGER_TEST - _LIT8( KResolverString, "" ); -#else - _LIT8( KResolverString, "efmtestplugin" ); //In test server we only want test plugins. -#endif + _LIT8( KEmptyString, "" ); TEComResolverParams resolverParams; - resolverParams.SetDataType (KResolverString); + resolverParams.SetDataType (KEmptyString); resolverParams.SetWildcardMatch (ETrue); TCleanupItem cleanupItem( ResetAndDestroyArray, &implInfoArray ); @@ -331,8 +327,9 @@ TIMESTAMP( "CFeatMgrServer::LoadPluginsL - ListImplementationsL start: " ) REComSession::ListImplementationsL( KFeatureInfoPluginInterfaceUid, +#ifndef EXTENDED_FEATURE_MANAGER_TEST resolverParams, -#ifndef EXTENDED_FEATURE_MANAGER_TEST + KRomOnlyResolverUid, #endif implInfoArray); diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/group/bld.inf --- a/featuremgmt/featuremgr/test/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -83,7 +83,6 @@ //iby files for the test components featmgr_techview_test.iby /epoc32/rom/include/featmgr_techview_test.iby -featmgr_techview_rtest.iby /epoc32/rom/include/featmgr_techview_rtest.iby featmgr_textshell_test.iby /epoc32/rom/include/featmgr_textshell_test.iby ../tef/tef_efm_configured/group/efm_configured_testserver.iby /epoc32/rom/include/efm_configured_testserver.iby ../tef/tef_efm_normal/group/efm_normal_testserver.iby /epoc32/rom/include/efm_normal_testserver.iby diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/group/featmgr_techview_rtest.iby --- a/featuremgmt/featuremgr/test/group/featmgr_techview_rtest.iby Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -// 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 __FEATMGR_TECHVIEW_RTEST_IBY__ -#define __FEATMGR_TECHVIEW_RTEST_IBY__ - -file=ABI_DIR\BUILD_DIR\t_fmgrbackupresponse.exe test\t_fmgrbackupresponse.exe -file=ABI_DIR\BUILD_DIR\t_fmgrrestoreresponse.exe test\t_fmgrrestoreresponse.exe - -#endif // __FEATMGR_TECHVIEW_RTEST_IBY__ diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/group/featmgr_techview_test.iby --- a/featuremgmt/featuremgr/test/group/featmgr_techview_test.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/group/featmgr_techview_test.iby Wed Sep 01 12:39:58 2010 +0100 @@ -12,7 +12,7 @@ // // Description: // For all Techview tests (TEF + RTest). -// +// #ifndef __FEATMGR_TEST_IBY__ #define __FEATMGR_TEST_IBY__ diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/helper/test_plugins/data/102836F3.rss --- a/featuremgmt/featuremgr/test/helper/test_plugins/data/102836F3.rss Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/helper/test_plugins/data/102836F3.rss Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -35,8 +35,8 @@ { implementation_uid = 0x102836F4; version_no = 1; - display_name = "efmtestplugin"; - default_data = "efmtestplugin"; + display_name = ""; + default_data = ""; opaque_data = ""; //rom-only resolving is disabled for test projects to allow run-time plugin addition and removal rom_only = 0; diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/helper/test_plugins/data/102836F5.rss --- a/featuremgmt/featuremgr/test/helper/test_plugins/data/102836F5.rss Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/helper/test_plugins/data/102836F5.rss Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -35,8 +35,8 @@ { implementation_uid = 0x102836F6; version_no = 1; - display_name = "efmtestplugin"; - default_data = "efmtestplugin"; + display_name = ""; + default_data = ""; opaque_data = ""; //rom-only resolving is disabled for test projects to allow run-time plugin addition and removal rom_only = 0; diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/helper/test_plugins/data/102836F7.rss --- a/featuremgmt/featuremgr/test/helper/test_plugins/data/102836F7.rss Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/helper/test_plugins/data/102836F7.rss Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -35,8 +35,8 @@ { implementation_uid = 0x102836F8; version_no = 1; - display_name = "efmtestplugin"; - default_data = "efmtestplugin"; + display_name = ""; + default_data = ""; opaque_data = ""; //rom-only resolving is disabled for test projects to allow run-time plugin addition and removal rom_only = 0; diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/helper/test_plugins/data/102836F9.rss --- a/featuremgmt/featuremgr/test/helper/test_plugins/data/102836F9.rss Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/helper/test_plugins/data/102836F9.rss Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -35,8 +35,8 @@ { implementation_uid = 0x102836FA; version_no = 1; - display_name = "efmtestplugin"; - default_data = "efmtestplugin"; + display_name = ""; + default_data = ""; opaque_data = ""; //rom-only resolving is disabled for test projects to allow run-time plugin addition and removal rom_only = 0; diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/helper/test_plugins/data/102836FB.rss --- a/featuremgmt/featuremgr/test/helper/test_plugins/data/102836FB.rss Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/helper/test_plugins/data/102836FB.rss Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -35,8 +35,8 @@ { implementation_uid = 0x102836FC; version_no = 1; - display_name = "efmtestplugin"; - default_data = "efmtestplugin"; + display_name = ""; + default_data = ""; opaque_data = ""; //rom-only resolving is disabled for test projects to allow run-time plugin addition and removal rom_only = 0; diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/helper/test_plugins/data/102836FD.rss --- a/featuremgmt/featuremgr/test/helper/test_plugins/data/102836FD.rss Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/helper/test_plugins/data/102836FD.rss Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -35,8 +35,8 @@ { implementation_uid = 0x102836FE; version_no = 1; - display_name = "efmtestplugin"; - default_data = "efmtestplugin"; + display_name = ""; + default_data = ""; opaque_data = ""; //rom-only resolving is disabled for test projects to allow run-time plugin addition and removal rom_only = 0; diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/helper/test_plugins/data/102836FF.rss --- a/featuremgmt/featuremgr/test/helper/test_plugins/data/102836FF.rss Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/helper/test_plugins/data/102836FF.rss Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -35,8 +35,8 @@ { implementation_uid = 0x10283700; version_no = 1; - display_name = "efmtestplugin"; - default_data = "efmtestplugin"; + display_name = ""; + default_data = ""; opaque_data = ""; //rom-only resolving is disabled for test projects to allow run-time plugin addition and removal rom_only = 0; diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/helper/test_plugins/data/10283707.rss --- a/featuremgmt/featuremgr/test/helper/test_plugins/data/10283707.rss Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/helper/test_plugins/data/10283707.rss Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -35,8 +35,8 @@ { implementation_uid = 0x10283708; version_no = 1; - display_name = "efmtestplugin"; - default_data = "efmtestplugin"; + display_name = ""; + default_data = ""; opaque_data = ""; //rom-only resolving is disabled for test projects to allow run-time plugin addition and removal rom_only = 0; diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/rtest/group/t_fmgrstartup.mmp --- a/featuremgmt/featuremgr/test/rtest/group/t_fmgrstartup.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/rtest/group/t_fmgrstartup.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -15,7 +15,6 @@ TARGET t_fmgrstartup.exe TARGETTYPE exe -UID 0x10205054 0x10205054 MACRO EXTENDED_FEATURE_MANAGER_TEST MACRO FEATURE_MANAGER_STARTUP_TEST diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/rtest/src/t_fmgrapi.cpp --- a/featuremgmt/featuremgr/test/rtest/src/t_fmgrapi.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/rtest/src/t_fmgrapi.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -28,8 +28,6 @@ /////////////////////////////////////////////////////////////////////////////////////// static RTest TheTest(_L("t_fmgrapi")); -TUid SupportedFeature = KConnectivity; //Defaulted to KConnectivity, but we will re-assign it in FeatureTestPreparation(). -TUid SupportedFeature2 = KSip; //Defaulted to KSip, but we will re-assign it in FeatureTestPreparation(). /////////////////////////////////////////////////////////////////////////////////////// @@ -286,24 +284,24 @@ { TBool rc = CFeatureDiscovery::IsFeatureSupportedL(KInvalidFeatureId1); TEST(!rc); - rc = CFeatureDiscovery::IsFeatureSupportedL(SupportedFeature.iUid); + rc = CFeatureDiscovery::IsFeatureSupportedL(KLocationManagement.iUid); TEST(rc); rc = CFeatureDiscovery::IsFeatureSupportedL(KInvalidFeatureUid1); TEST(!rc); - rc = CFeatureDiscovery::IsFeatureSupportedL(SupportedFeature); + rc = CFeatureDiscovery::IsFeatureSupportedL(KLocationManagement); TEST(rc); CFeatureDiscovery* fdiscovery = CFeatureDiscovery::NewLC(); rc = fdiscovery->IsSupported(KInvalidFeatureId1); TEST(!rc); - rc = fdiscovery->IsSupported(SupportedFeature.iUid); + rc = fdiscovery->IsSupported(KLocationManagement.iUid); TEST(rc); rc = fdiscovery->IsSupported(KInvalidFeatureUid1); TEST(!rc); - rc = fdiscovery->IsSupported(SupportedFeature); + rc = fdiscovery->IsSupported(KLocationManagement); TEST(rc); CleanupStack::PopAndDestroy(fdiscovery); @@ -319,11 +317,11 @@ ////////////////////////////////////////////////////////// //A test with a set: one valid and one invalid feature TFeatureSet fset; - TInt err = fset.Append(SupportedFeature); + TInt err = fset.Append(KConnectivity); TEST2(err, KErrNone); err = fset.Append(KInvalidFeatureUid1); TEST2(err, KErrNone); - TBool rc = fset.IsFeatureSupported(SupportedFeature); + TBool rc = fset.IsFeatureSupported(KConnectivity); TEST(!rc); rc = fset.IsFeatureSupported(KInvalidFeatureUid1); TEST(!rc); @@ -336,7 +334,7 @@ err = fdiscovery->FeaturesSupported(fset); } TEST2(err, KErrNone); - rc = fset.IsFeatureSupported(SupportedFeature); + rc = fset.IsFeatureSupported(KConnectivity); TEST(rc); rc = fset.IsFeatureSupported(KInvalidFeatureUid1); TEST(!rc); @@ -345,7 +343,7 @@ ////////////////////////////////////////////////////////// //A test with an empty set TFeatureSet fset2; - rc = fset2.IsFeatureSupported(SupportedFeature); + rc = fset2.IsFeatureSupported(KConnectivity); TEST(!rc); rc = fset2.IsFeatureSupported(KInvalidFeatureUid1); TEST(!rc); @@ -358,7 +356,7 @@ err = fdiscovery->FeaturesSupported(fset2); } TEST2(err, KErrArgument); - rc = fset2.IsFeatureSupported(SupportedFeature); + rc = fset2.IsFeatureSupported(KConnectivity); TEST(!rc); rc = fset2.IsFeatureSupported(KInvalidFeatureUid1); TEST(!rc); @@ -367,9 +365,9 @@ ////////////////////////////////////////////////////////// //A test with a set: two valid features TFeatureSet fset3; - err = fset3.Append(SupportedFeature); + err = fset3.Append(KConnectivity); TEST2(err, KErrNone); - err = fset3.Append(SupportedFeature2); + err = fset3.Append(KSip); TEST2(err, KErrNone); if(aStaticMethodsUsed) { @@ -380,9 +378,9 @@ err = fdiscovery->FeaturesSupported(fset3); } TEST2(err, KErrNone); - rc = fset3.IsFeatureSupported(SupportedFeature); + rc = fset3.IsFeatureSupported(KConnectivity); TEST(rc); - rc = fset3.IsFeatureSupported(SupportedFeature2); + rc = fset3.IsFeatureSupported(KSip); TEST(rc); rc = fset3.AreAllFeaturesSupported(); TEST(rc); @@ -404,31 +402,8 @@ DoFeatureDiscoveryTest2L(EFalse); } -void FeatureTestPreparation() - { - RFeatureControl ctrl; - TInt err = ctrl.Open(); - TEST2(err, KErrNone); - ///////////////////////////////////////////////////////////// - RFeatureUidArray farray; - TheTest.Printf(_L("Getting supported feature for CFeatureDiscovery test\r\n")); - err = ctrl.ListSupportedFeatures(farray); - if (err == KErrNone && farray.Count() > 1) - { - SupportedFeature = farray[0]; //Take the first supported value - SupportedFeature2 = farray[1]; //Take the first supported value - } - else - { - TheTest.Printf(_L("Warning: Failed to get supported feature for testing. CFeatureDiscovery tests are going to fail\r\n")); - } - farray.Close(); - ctrl.Close(); - } - void DoTestsL() { - FeatureTestPreparation(); //Preparation for the test. TheTest.Start(_L("@SYMTestCaseID:PDS-EFM-CT-4059 FeatureManager::FeatureSupported() test")); FeatureSupportedTestL(); TheTest.Next(_L("@SYMTestCaseID:PDS-EFM-CT-4060 RFeatureControl tests-1")); diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/rtest/src/t_fmgrbackupresponse.cpp --- a/featuremgmt/featuremgr/test/rtest/src/t_fmgrbackupresponse.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/rtest/src/t_fmgrbackupresponse.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -126,11 +126,6 @@ TRequestStatus testStatus; CleanupClosePushL( testThread ); - //Needs to ensure server is started before simulating backup operation - RFeatureControl rfc; - TTEST2( rfc.Connect(), KErrNone ); //This will start the server if not already started - rfc.Close(); - simulate->Simulate_CheckRegFileL(); // Simulate a backup diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/rtest/src/t_fmgrrestoreresponse.cpp --- a/featuremgmt/featuremgr/test/rtest/src/t_fmgrrestoreresponse.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/rtest/src/t_fmgrrestoreresponse.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -126,11 +126,6 @@ TRequestStatus testStatus; CleanupClosePushL( testThread ); - //Needs to ensure server is started before simulating backup operation - RFeatureControl rfc; - TTEST2( rfc.Connect(), KErrNone ); //This will start the server if not already started - rfc.Close(); - simulate->Simulate_CheckRegFileL(); // Simulate a restore diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/rtest/src/t_fmgrstartup.cpp --- a/featuremgmt/featuremgr/test/rtest/src/t_fmgrstartup.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/rtest/src/t_fmgrstartup.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -26,7 +26,6 @@ static const TInt KBurstRate = 20; #endif -void DestroyTestEnv(); /////////////////////////////////////////////////////////////////////////////////////// static RTest TheTest(_L("t_fmgrstartup")); @@ -38,6 +37,24 @@ #endif /////////////////////////////////////////////////////////////////////////////////////// + +//Deletes all created test files. +void DestroyTestEnv() + { + //KFeaturesDir is defined only if EXTENDED_FEATURE_MANAGER_TEST is defined +#ifdef EXTENDED_FEATURE_MANAGER_TEST + RFs fs; + TInt err = fs.Connect(); + if(err == KErrNone) + { + (void)fs.Delete(KFeaturesFile); + } + fs.Close(); +#endif + } + +/////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////// //Test macros and functions void Check1(TInt aValue, TInt aLine) { @@ -61,45 +78,6 @@ #define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__) /////////////////////////////////////////////////////////////////////////////////////// -void CreateTestEnv() - { - //KFeaturesDir is defined only if EXTENDED_FEATURE_MANAGER_TEST is defined -#ifdef EXTENDED_FEATURE_MANAGER_TEST - RFs fs; - TInt err = fs.Connect(); - TEST2(err, KErrNone); - - err = fs.MkDir(KFeaturesDir); - TEST (err == KErrNone || err == KErrAlreadyExists); - - (void)fs.Delete(KFeaturesFile); - err = BaflUtils::CopyFile(fs, KZOrgFeaturesFile, KFeaturesDir); - TEST2 (err, KErrNone); - err = fs.SetAtt(KFeaturesFile, KEntryAttNormal, KEntryAttReadOnly); - TEST2 (err, KErrNone); - fs.Close(); -#endif - } - -//Deletes all created test files. -void DestroyTestEnv() - { - //KFeaturesDir is defined only if EXTENDED_FEATURE_MANAGER_TEST is defined -#ifdef EXTENDED_FEATURE_MANAGER_TEST - RFs fs; - TInt err = fs.Connect(); - if(err == KErrNone) - { - err = fs.Delete(KFeaturesFile); - if (err != KErrNone) - { - RDebug::Print(_L("Warning: Clean test enviroment failed with error %d"), err); - } - } - fs.Close(); -#endif - } -/////////////////////////////////////////////////////////////////////////////////////// static void MarkHandles() { @@ -215,6 +193,24 @@ TheTest.Printf(_L("\r\n===File I/O error simulation test succeeded on iteration %d===\r\n"), cnt); } +void CreateTestEnv() + { + //KFeaturesDir is defined only if EXTENDED_FEATURE_MANAGER_TEST is defined +#ifdef EXTENDED_FEATURE_MANAGER_TEST + RFs fs; + TInt err = fs.Connect(); + TEST2(err, KErrNone); + + err = fs.MkDir(KFeaturesDir); + TEST (err == KErrNone || err == KErrAlreadyExists); + + (void)fs.Delete(KFeaturesFile); + err = BaflUtils::CopyFile(fs, KZOrgFeaturesFile, KFeaturesDir); + TEST2 (err, KErrNone); + + fs.Close(); +#endif + } void DoTestsL() { diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/tef/tef_efm_configured/src/characterisation_steps.cpp --- a/featuremgmt/featuremgr/test/tef/tef_efm_configured/src/characterisation_steps.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/tef/tef_efm_configured/src/characterisation_steps.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -27,16 +27,22 @@ #include "characterisation_steps.h" #include "efm_teststepbase.h" - -TBool SkipPerformanceTest = EFalse; -const TInt KPlatSimUid = 0x20029a73; //0x20029a73 will be changed soon once PlatSim get its own uid. - // This is the base class for some of our characterisation tests. // Creates an RFeatureControl object, finds out what the fast counter // frequency is and gets the timeout for this test. TVerdict CCharacteriseBaseStep :: doTestStepPreambleL() { + // First find out the granularity of the system clock.. + HAL::Get(HALData::EFastCounterFrequency, icountfreq); + INFO_PRINTF2(_L("Counts per sec=%d"), icountfreq); + icountperusec = icountfreq/1000000.0; + INFO_PRINTF2(_L("Counts per usec=%f"), icountperusec); + TInt err = icontrol.Open(); + TESTDIAGNOSTICERROR(err==KErrNone, + _L("RFeatureControl::Open failed: error = %d"), err); + if(err) { return TestStepResult(); } + CleanupClosePushL(icontrol); // Get the timeout from the .ini file. The name of the timeout entry // varies depending on what type of build we have. @@ -62,10 +68,6 @@ case HAL::EMachineUid_NE1_TB: timeoutini.Append(_L("_NE1")); break; - case KPlatSimUid: - ERR_PRINTF1(_L("Not running performance test in PlatSim")); - SkipPerformanceTest = ETrue; //Skip performance test on PlatSim - break; //add any new hardware IDs here default: break; @@ -76,37 +78,21 @@ #else timeoutini.Append(_L("_UREL")); #endif - if (!SkipPerformanceTest) - { - // First find out the granularity of the system clock.. - HAL::Get(HALData::EFastCounterFrequency, icountfreq); - INFO_PRINTF2(_L("Counts per sec=%d"), icountfreq); - icountperusec = icountfreq/1000000.0; - INFO_PRINTF2(_L("Counts per usec=%f"), icountperusec); - TInt err = icontrol.Open(); - TESTDIAGNOSTICERROR(err==KErrNone, - _L("RFeatureControl::Open failed: error = %d"), err); - if(err) { return TestStepResult(); } - CleanupClosePushL(icontrol); - // Get the timeout, which is measured in microseconds. - if( !GetIntFromConfig(ConfigSection(), timeoutini, itimeout ) ) - { - ERR_PRINTF2(_L("Can't find '%S' in .ini file"), - &timeoutini ); - CleanupStack::PopAndDestroy(&icontrol); - SetTestStepResult(EFail); - return TestStepResult(); - } - } + + // Get the timeout, which is measured in microseconds. + if( !GetIntFromConfig(ConfigSection(), timeoutini, itimeout ) ) + { + ERR_PRINTF2(_L("Can't find '%S' in .ini file"), + &timeoutini ); + CleanupStack::PopAndDestroy(&icontrol); + SetTestStepResult(EFail); + return TestStepResult(); + } return TestStepResult(); } TVerdict CCharacteriseBaseStep :: doTestStepPostambleL() { - if (SkipPerformanceTest) - { - return TestStepResult(); - } CleanupStack::PopAndDestroy(&icontrol); return TestStepResult(); } @@ -118,10 +104,6 @@ TVerdict CCharacteriseSupportedStep::doTestStepL() { - if (SkipPerformanceTest) - { - return TestStepResult(); - } // The base class 'CCharacteriseBaseStep' has already opened the // RFeatureControl object and read in the timeout number. @@ -189,10 +171,6 @@ TVerdict CCharacteriseSupportedArrayStep::doTestStepL() { - if (SkipPerformanceTest) - { - return TestStepResult(); - } // Find out how many features we're going to attempt to read.. TInt nfeats, minuid, expsup; if(!GetIntFromConfig(ConfigSection(), _L("NumFeaturesToRead"), nfeats) || diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/tef/tef_efm_normal/src/component_test_steps.cpp --- a/featuremgmt/featuremgr/test/tef/tef_efm_normal/src/component_test_steps.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/tef/tef_efm_normal/src/component_test_steps.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -161,8 +161,7 @@ { TThreadId id = RThread().Id(); TUid uid = {id.Id()}; - uid.iUid += 0x1001000; - + uid.iUid += 500; // Create the thread info instance that would hold the results for the tests below TThreadTestInfo info; info.iId = uid.iUid; @@ -510,7 +509,9 @@ */ // Locals for the test scenarios + RApaLsSession ls; RProcess process; + CApaCommandLine* cmdLine; TBitFlags32 flags( 0 ); flags.Set( EFeatureSupported); flags.Set( EFeatureModifiable ); @@ -533,7 +534,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // This delay is used to allow P&S to complete the initial setting of the // KSAUidSoftwareInstallKeyValue property to ESASwisInstall before we proceed with @@ -556,17 +564,17 @@ err = control.AddFeature(entry3); TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::AddFeature expects KErrNone for KNewUid3; returned value is = %d"),err); - + // Enable feature - err = control.EnableFeature(KNewUid1); - TESTDIAGNOSTICERROR(err==KErrNone, - _L("RFeatureControl::EnableFeature expects KErrNone for KNewUid1; returned value is = %d"),err); - - // Disable feature - err = control.DisableFeature(KNewUid1); - TESTDIAGNOSTICERROR(err==KErrNone, - _L("RFeatureControl::DisableFeature expects KErrNone for KNewUid1; returned value is = %d"),err); - + err = control.EnableFeature(KNewUid1); + TESTDIAGNOSTICERROR(err==KErrNone, + _L("RFeatureControl::EnableFeature expects KErrNone for KNewUid1; returned value is = %d"),err); + + // Disable feature + err = control.DisableFeature(KNewUid1); + TESTDIAGNOSTICERROR(err==KErrNone, + _L("RFeatureControl::DisableFeature expects KErrNone for KNewUid1; returned value is = %d"),err); + // Set features err = control.SetFeature(KNewUid1, ETrue, KChangeData); TESTDIAGNOSTICERROR(err==KErrNone, @@ -667,7 +675,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -717,7 +732,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -766,7 +788,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -825,7 +854,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -884,7 +920,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -927,7 +970,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -973,7 +1023,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -1093,7 +1150,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -1143,7 +1207,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -1177,7 +1248,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -1236,7 +1314,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -1300,7 +1385,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -1335,7 +1427,14 @@ // Starting helping exe _LIT(KHelpingExePath, "helping_exe.exe"); err = process.Create(KHelpingExePath, _L("1")); + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KHelpingExePath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Wait for helping_exe to finish User::After(600000); @@ -1419,7 +1518,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -1446,7 +1552,14 @@ // Starting helping exe which is going to call SWIEnd (passing 2 as a parameter to indicate this) _LIT(KHelpingExePath, "helping_exe.exe"); err = process.Create(KHelpingExePath, _L("2")); + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KHelpingExePath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; User::After(500000); @@ -1499,7 +1612,14 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(process); process.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; // Allow P&S to complete initialising User::After(200000); @@ -1616,63 +1736,6 @@ // Wait before starting the next test User::After(100000); - //////////////////////////////////////////////////////////////////////////////////////////// - // SCENARIO 18: Successful installation and features manipulation (Enable/Disable without modifying data) - // Add Feature with user data -> P&S install -> SWIStart -> Enable/Disable Feature -> - // -> SWIEnd -> P&S success -> No change to user data - //////////////////////////////////////////////////////////////////////////////////////////// - INFO_PRINTF1(_L("SCENARIO 18: Successful installation and Enable or Disable feature should not modify userdata")); - // Launching dummyswi.exe - err = process.Create(KDummySWIPath, _L("1")); // 1 = install success - TESTDIAGNOSTICERROR(err==KErrNone, - _L("RProcess::Create expects KErrNone, returned value is = %d"),err); - if( err==KErrNone ) - { - process.Resume(); - - // Allow P&S to complete initialising - User::After(200000); - - err = control.Open(); - TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::Open failed, returned value is = %d"),err); - - err = control.AddFeature(entry1); - TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::AddFeature expects KErrNone for KNewUid1; returned value is = %d"),err); - - err = control.SWIStart(); - TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::SWIStart expects KErrNone; returned value is = %d"),err); - - // Enable feature - err = control.EnableFeature(KNewUid1); - TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::EnableFeature expects KErrNone for KNewUid1; returned value is = %d"),err); - - // Disable feature - err = control.DisableFeature(KNewUid1); - TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::EnableFeature expects KErrNone for KNewUid1; returned value is = %d"),err); - - err = control.SWIEnd(); - TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::SWIEnd expects KErrNone; returned value is = %d"),err); - - // Delay until the P&S property is set to ESASwisStatusSuccess in dummyswi.exe to indicate successful installation - User::After(1500000); - - err = control.FeatureSupported(query1); - TESTDIAGNOSTICERROR(err==KErrNone, _L("TFeatureEntry::FeatureData expects 0 for KNewUid1; returned value is = %d"),err); - TESTDIAGNOSTICERROR(query1.FeatureData()==KDefaultData1, _L("TFeatureEntry::FeatureData expects non-zero for KNewUid1; returned value is = %d"), err); - - // Delete KNewUid1 - err = control.DeleteFeature(KNewUid1); - TESTDIAGNOSTICERROR(err==KErrNone, _L("RFeatureControl::DeleteFeature expects KErrNone for KNewUid1; returned value is = %d"),err); - - query1 = TFeatureEntry(KNewUid1); - - control.Close(); - - } - process.Close(); - // Wait before starting the next test - User::After(100000); - return TestStepResult(); } diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/tef/tef_efm_normal/src/featurecontrol_test_steps.cpp --- a/featuremgmt/featuremgr/test/tef/tef_efm_normal/src/featurecontrol_test_steps.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/tef/tef_efm_normal/src/featurecontrol_test_steps.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -174,7 +174,7 @@ _L("RFeatureControl::Open failed: error = %d"),err); // Fetch status for "unknown" feature - TFeatureEntry emptyEntry(TUid::Uid(0x1000005)); + TFeatureEntry emptyEntry; TInt supported = control.FeatureSupported( emptyEntry ); TESTDIAGNOSTICERROR(supported == KErrNotFound, _L("RFeatureControl::FeatureSupported - KErrNotFound expected for unknown feature; returned value is %d"),supported); diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featuremgr/test/tef/tef_efm_unit/src/efm_unit_teststeps.cpp --- a/featuremgmt/featuremgr/test/tef/tef_efm_unit/src/efm_unit_teststeps.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featuremgr/test/tef/tef_efm_unit/src/efm_unit_teststeps.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -435,7 +435,16 @@ _L("RProcess::Create expects KErrNone, returned value is = %d"),err); if( err==KErrNone ) { - iSWIProcess.Resume(); + RApaLsSession ls; + CApaCommandLine* cmdLine; + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(KDummySWIPath); + cmdLine->SetProcessEnvironmentL(iSWIProcess); + iSWIProcess.Resume(); + CleanupStack::PopAndDestroy(2); + cmdLine = NULL; } // Install the Active Scheduler. We need this for the SWIListener Active Object on the server to diff -r 26645d81f48d -r cc28652e0254 featuremgmt/featureregistry/group/bld.inf --- a/featuremgmt/featureregistry/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/featuremgmt/featureregistry/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -17,9 +17,9 @@ DEFAULT PRJ_EXPORTS -../inc/featreg.h OS_LAYER_PLATFORM_EXPORT_PATH(featreg.h) -../inc/featreg.inl OS_LAYER_PLATFORM_EXPORT_PATH(featreg.inl) -../inc/featregpan.h OS_LAYER_PLATFORM_EXPORT_PATH(featregpan.h) +../inc/featreg.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featreg.h) +../inc/featreg.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featreg.inl) +../inc/featregpan.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(featregpan.h) ./featreg.iby /epoc32/rom/include/featreg.iby PRJ_MMPFILES diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/LogServ/inc/LogServOperationBase.h --- a/loggingservices/eventlogger/LogServ/inc/LogServOperationBase.h Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/LogServ/inc/LogServOperationBase.h Wed Sep 01 12:39:58 2010 +0100 @@ -72,7 +72,6 @@ inline TLogOperationType Type() const; inline TLogServSessionId SessionId(); static TUint QueueOffset(); - inline void SetMessageCompletion(const TBool aMessageCompletion); protected: inline RMessage2& Message(); @@ -85,7 +84,6 @@ TLogClientServerData iClientServerData; TLogServSessionId iSessionId; TSglQueLink iServerLink; - TBool iMessageCompletion; }; diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/LogServ/inc/LogServOperationBase.inl --- a/loggingservices/eventlogger/LogServ/inc/LogServOperationBase.inl Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/LogServ/inc/LogServOperationBase.inl Wed Sep 01 12:39:58 2010 +0100 @@ -31,7 +31,7 @@ inline TBool CLogServOperationBase::HaveMessagePointer() const { - return (!iMessage.IsNull()); + return (iMessage != RMessage2()); } inline void CLogServOperationBase::ClearMessagePointer() @@ -74,9 +74,4 @@ return iClientServerData; } -inline void CLogServOperationBase::SetMessageCompletion(const TBool aMessageCompletion) - { - iMessageCompletion = aMessageCompletion; - } - #endif diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/LogServ/src/LOGADD.CPP --- a/loggingservices/eventlogger/LogServ/src/LOGADD.CPP Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/LogServ/src/LOGADD.CPP Wed Sep 01 12:39:58 2010 +0100 @@ -480,7 +480,7 @@ //Sometimes, after a sequence of OpenContactsL()/CloseContacts() calls the Contacts server crashes //and OpenContactsL() leaves with error -15. In order to avoid that the following delay has been added. //(something related to Contacts server state machine) - User::After(1000); + User::After(100); // Attempt to open DB TRAPD(err,iContactPlugin->OpenContactsL()); if(KErrNone!=err) diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/LogServ/src/LogServOperationBase.cpp --- a/loggingservices/eventlogger/LogServ/src/LogServOperationBase.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/LogServ/src/LogServOperationBase.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -29,8 +29,7 @@ iPackage(aPackage), iMessage(aMessage), iClientServerData(aClientServerData), - iSessionId(aSessionId), - iMessageCompletion(ETrue) + iSessionId(aSessionId) { // Queue this operations OperationManager().OMOperationQueueAdd(*this); @@ -64,12 +63,8 @@ // void CLogServOperationBase::Complete(TInt aCompletionCode) { - __ASSERT_ALWAYS(! iMessage.IsNull(), Panic(ELogNoOutstandingAsyncRequest)); - - if (iMessageCompletion) - { - iMessage.Complete(aCompletionCode); - } + __ASSERT_ALWAYS(iMessage != RMessage2(), Panic(ELogNoOutstandingAsyncRequest)); + iMessage.Complete(aCompletionCode); // Unnecessary? iMessage = RMessage2(); diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/LogServ/src/LogServOperationQueue.cpp --- a/loggingservices/eventlogger/LogServ/src/LogServOperationQueue.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/LogServ/src/LogServOperationQueue.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -133,14 +133,9 @@ // This should complete the request with KErrCancel causing RunL to leave // RunError completes the request and removes the operation from the pending queue iTaskInterface.TaskCancelCurrent(); - // - // Do not complete the message when the operation completes - // - if (!aCompleteRequest) - { - iCurrentOperation->SetMessageCompletion(aCompleteRequest); - } + if (!aCompleteRequest) + iCurrentOperation->ClearMessagePointer(); } else { diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/LogServ/src/LogServResourceInterpreter.cpp --- a/loggingservices/eventlogger/LogServ/src/LogServResourceInterpreter.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/LogServ/src/LogServResourceInterpreter.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -133,8 +133,7 @@ // Check the entry exists on this drive (e.g. if we are running the log server // from RAM, then default to the ROM if no RSC on the current drive exists). TEntry fsEntry; - TInt err = iFsSession.Entry(fileName, fsEntry); - if ( err == KErrNotFound || err == KErrPathNotFound ) + if (iFsSession.Entry(fileName, fsEntry) == KErrNotFound) { // Switch to ROM (we might already have been launching from the ROM, // in which case this will have no effect anyway). diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/LogServ/src/logservsession.cpp --- a/loggingservices/eventlogger/LogServ/src/logservsession.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/LogServ/src/logservsession.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -59,8 +59,7 @@ { LOGTEXT3("CLogServSession::~CLogServSession() - client logging off: %S, %d", &iClientThreadName, iSessionId); - // Set second parameter to not complete the message, otherwise if the client has died a KERN-EXEC 44 will be generated. - iOperationManager.OMCancel(iSessionId, EFalse); + iOperationManager.OMCancel(iSessionId, ETrue); delete iPackage; delete iNotify; diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/LogWrap/inc/LOGWRAPLIMITS.H --- a/loggingservices/eventlogger/LogWrap/inc/LOGWRAPLIMITS.H Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/LogWrap/inc/LOGWRAPLIMITS.H Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ /** String lengths -@publishedAll +@publishedPartner @released */ const TInt KLogMaxRemotePartyLength = 64; @@ -34,7 +34,7 @@ /** Limits -@publishedAll +@publishedPartner @released */ diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/Rom/logeng.iby --- a/loggingservices/eventlogger/Rom/logeng.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/Rom/logeng.iby Wed Sep 01 12:39:58 2010 +0100 @@ -23,16 +23,16 @@ REM The Log Engine #ifndef NO_LOG_ENGINE_IN_ROM -file=ABI_DIR\BUILD_DIR\logwrap.dll System\Libs\LogWrap.dll -file=ABI_DIR\BUILD_DIR\logcli.dll System\Libs\LogCli.dll -file=ABI_DIR\BUILD_DIR\logcntmodel.dll System\Libs\LogCntModel.dll -file=ABI_DIR\BUILD_DIR\logserv.exe System\Programs\LogServ.exe +file=ABI_DIR\BUILD_DIR\LogWrap.dll System\Libs\LogWrap.dll +file=ABI_DIR\BUILD_DIR\LogCli.dll System\Libs\LogCli.dll +file=ABI_DIR\BUILD_DIR\LogCntModel.dll System\Libs\LogCntModel.dll +file=ABI_DIR\BUILD_DIR\LogServ.exe System\Programs\LogServ.exe data=ZPRIVATE\101f401d\backup_registration.xml private\101f401d\backup_registration.xml #include "logeng.hby" #else -file=ABI_DIR\BUILD_DIR\logstub.dll System\Libs\LogWrap.dll +file=ABI_DIR\BUILD_DIR\LogStub.dll System\Libs\LogWrap.dll #endif #endif diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/group/BLD.INF --- a/loggingservices/eventlogger/group/BLD.INF Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/group/BLD.INF Wed Sep 01 12:39:58 2010 +0100 @@ -21,29 +21,29 @@ PRJ_EXPORTS -../LogWrap/inc/LOGWRAP.H OS_LAYER_PUBLIC_EXPORT_PATH(logwrap.h) -../LogWrap/inc/LOGWRAPCONST.H OS_LAYER_PUBLIC_EXPORT_PATH(logwrapconst.h) -../LogWrap/inc/LOGWRAPLIMITS.H OS_LAYER_PUBLIC_EXPORT_PATH(logwraplimits.h) -../LogWrap/inc/LOGWRAP.INL OS_LAYER_PUBLIC_EXPORT_PATH(logwrap.inl) -../LogWrap/inc/LOGWRAP.HRH OS_LAYER_PUBLIC_EXPORT_PATH(logwrap.hrh) -../LogWrap/inc/LOGFILTERANDEVENTCONSTANTS.HRH OS_LAYER_PUBLIC_EXPORT_PATH(logfilterandeventconstants.hrh) -../LogWrap/inc/LOGENG.H OS_LAYER_PUBLIC_EXPORT_PATH(logeng.h) -../LogWrap/inc/LOGENGDURATIONS.H OS_LAYER_PLATFORM_EXPORT_PATH(logengdurations.h) -../LogWrap/inc/LOGENGEVENTS.H OS_LAYER_PLATFORM_EXPORT_PATH(logengevents.h) -../LogWrap/inc/LOGSMSPDUDATA.H OS_LAYER_PUBLIC_EXPORT_PATH(logsmspdudata.h) -../LogCli/inc/LOGCLI.H OS_LAYER_PUBLIC_EXPORT_PATH(logcli.h) -../LogCli/inc/LOGCLI.INL OS_LAYER_PUBLIC_EXPORT_PATH(logcli.inl) -../LogCli/inc/LOGVIEW.H OS_LAYER_PUBLIC_EXPORT_PATH(logview.h) -../LogCli/inc/LOGVIEW.INL OS_LAYER_PUBLIC_EXPORT_PATH(logview.inl) -../LogCli/inc/LogViewChangeObserver.h OS_LAYER_PUBLIC_EXPORT_PATH(logviewchangeobserver.h) -../LogCli/inc/LogClientChangeObserver.h OS_LAYER_PUBLIC_EXPORT_PATH(logclientchangeobserver.h) +../LogWrap/inc/LOGWRAP.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logwrap.h) +../LogWrap/inc/LOGWRAPCONST.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logwrapconst.h) +../LogWrap/inc/LOGWRAPLIMITS.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(logwraplimits.h) +../LogWrap/inc/LOGWRAP.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logwrap.inl) +../LogWrap/inc/LOGWRAP.HRH /epoc32/include/logwrap.hrh +../LogWrap/inc/LOGFILTERANDEVENTCONSTANTS.HRH /epoc32/include/logfilterandeventconstants.hrh +../LogWrap/inc/LOGENG.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logeng.h) +../LogWrap/inc/LOGENGDURATIONS.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(logengdurations.h) +../LogWrap/inc/LOGENGEVENTS.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(logengevents.h) +../LogWrap/inc/LOGSMSPDUDATA.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logsmspdudata.h) +../LogCli/inc/LOGCLI.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logcli.h) +../LogCli/inc/LOGCLI.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logcli.inl) +../LogCli/inc/LOGVIEW.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logview.h) +../LogCli/inc/LOGVIEW.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logview.inl) +../LogCli/inc/LogViewChangeObserver.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logviewchangeobserver.h) +../LogCli/inc/LogClientChangeObserver.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(logclientchangeobserver.h) ../Rom/logeng.iby /epoc32/rom/include/logeng.iby ../Rom/logeng.hby /epoc32/rom/include/logeng.hby -../logcntmodel/inc/logcntmodel.h OS_LAYER_PLATFORM_EXPORT_PATH(logcntmodel.h) -../logcntmodel/inc/logcntdef.h OS_LAYER_PLATFORM_EXPORT_PATH(logcntdef.h) +../logcntmodel/inc/logcntmodel.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(logcntmodel.h) +../logcntmodel/inc/logcntdef.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(logcntdef.h) backup_registration.xml z:/private/101f401d/backup_registration.xml diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/logcntmodel/inc/logcntmodel.h --- a/loggingservices/eventlogger/logcntmodel/inc/logcntmodel.h Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/logcntmodel/inc/logcntmodel.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/test/inc/t_logutil.h --- a/loggingservices/eventlogger/test/inc/t_logutil.h Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/test/inc/t_logutil.h Wed Sep 01 12:39:58 2010 +0100 @@ -17,6 +17,9 @@ #include +//Define "TheTest" variable in the cpp test file +extern RTest TheTest; + void LogTestBoolExpr(TBool aRes, const TText* aFile, TInt aLine, TBool aPrintThreadName = EFalse); void LogCheck(TInt aValue, TInt aExpected, const TText* aFile, TInt aLine, TBool aPrintThreadName = EFalse); void LogCheckU(TUint aValue, TUint aExpected, const TText* aFile, TInt aLine, TBool aPrintThreadName = EFalse); diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/test/inc/t_logutil2.h --- a/loggingservices/eventlogger/test/inc/t_logutil2.h Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/test/inc/t_logutil2.h Wed Sep 01 12:39:58 2010 +0100 @@ -82,7 +82,7 @@ GLREF_D RFile theLog; GLREF_D RLogTestSession theLogServ; -#define __FILE_FAILNEXT(err, iteration) theFs.SetErrorCondition(err, iteration) +#define __FILE_FAILNEXT(X) theFs.SetErrorCondition(KErrGeneral, X) #define __FILE_RESET theFs.SetErrorCondition(KErrNone, 0) #if defined(_UNICODE) diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/test/src/t_logapi.cpp --- a/loggingservices/eventlogger/test/src/t_logapi.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/test/src/t_logapi.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -780,24 +780,17 @@ _LIT(KExecutableFileName, "t_logapi_helper.exe"); _LIT(KCommandParameters, "c:\\private\\10202be9\\;c:\\private\\10202be9\\101f401d.txt;3"); RProcess process; - TRequestStatus processWaitStatus; TInt r = process.Create(KExecutableFileName, KCommandParameters); - TEST(r == KErrNone); - process.Logon(processWaitStatus); process.Resume(); - User::WaitForRequest(processWaitStatus); - TEST(processWaitStatus.Int() == KErrNone); - process.Close(); + process.Close(); + User::After(1000); //copy the repository file to the folder 10202be9 _LIT(KCommandParameters1, "z:\\test\\101f401d_TEST.txt;c:\\private\\10202be9\\101f401d.txt;0"); r = process.Create(KExecutableFileName, KCommandParameters1); - TEST(r == KErrNone); - process.Logon(processWaitStatus); process.Resume(); - User::WaitForRequest(processWaitStatus); - TEST(processWaitStatus.Int() == KErrNone); - process.Close(); + process.Close(); + User::After(1000); TestUtils::DeleteDatabaseL(); @@ -837,13 +830,9 @@ //delete the repository file c:\\private\\10202be9\\101f401d.txt. _LIT(KCommandParameters2, "c:\\private\\10202be9\\101f401d.txt;private\\10202be9\101f401d.txt;2"); r = process.Create(KExecutableFileName, KCommandParameters2); - TEST(r == KErrNone); - process.Logon(processWaitStatus); process.Resume(); - User::WaitForRequest(processWaitStatus); - TEST(processWaitStatus.Int() == KErrNone); - process.Close(); - + process.Close(); + User::After(1000); theLog.Write(_L8("Deleting the Log engine database... \n")); TestUtils::DeleteDatabaseL(); TheTest.Next(_L("Delay of 2 min, the necessary time to central repository to unload its cache... ")); diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/test/src/t_logbadclient.cpp --- a/loggingservices/eventlogger/test/src/t_logbadclient.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/test/src/t_logbadclient.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -213,50 +213,6 @@ return KErrNone; } -////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// - -//Thread function to detect a crash in the server. -//The server should run for the duration of the test. -// return KErrAbort: If failure to start server -// return KErrServerTerminated: If server process is terminated - -TInt ServerWatcherFunc(TAny* /*aData*/) - { - __UHEAP_MARK; - - _LIT(KLogEngServerName,"LogServ*"); - - TInt err; - - // Start the server if not already running - RLogSession sess; - err = sess.Connect(); - if (err != KErrNone) - return KErrAbort; - sess.Close(); - - TFindProcess findProcess(KLogEngServerName); - TFullName result; - if ( findProcess.Next(result) != KErrNone ) - return KErrAbort; - - RProcess server; - if( server.Open(findProcess, EOwnerProcess) != KErrNone) - return KErrAbort; - - TRequestStatus status; - server.Logon(status); - User::WaitForRequest(status); - - server.Close(); - - __UHEAP_MARKEND; - - return KErrServerTerminated; - } - - /** @SYMTestCaseID PDS-LOGENG-UT-4045 @SYMTestCaseDesc In a loop, where the loop iterations are less than KTestIterCount (5000 at the moment), @@ -271,13 +227,6 @@ */ void BadClientTest() { - // Start a thread to watch the server process - RThread serverWatcher; - TInt err = serverWatcher.Create(_L("ServerWatcher"), &ServerWatcherFunc, 0x2000, 0x1000, 0x10000, NULL, EOwnerProcess); - TRequestStatus serverStatus; - serverWatcher.Logon(serverStatus); - serverWatcher.Resume(); - TThreadData* p = new TThreadData; TEST(p != NULL); TThreadData& data = *p; @@ -294,7 +243,7 @@ User::After(200000); _LIT(KTestThreadName, "TLBCThr"); RThread thread; - err = thread.Create(KTestThreadName, &ThreadFunc1, 0x2000, 0x1000, 0x10000, &data, EOwnerProcess); + TInt err = thread.Create(KTestThreadName, &ThreadFunc1, 0x2000, 0x1000, 0x10000, &data, EOwnerProcess); if(err == KErrAlreadyExists) { TheTest.Printf(_L("##Iteration %d. Function %d. Thread \"%S\" already exists!\r\n"), data.iIteration, data.iFunction, &KTestThreadName); @@ -325,15 +274,7 @@ thread.Logon(status); TEST2(status.Int(), KRequestPending); thread.Resume(); - User::WaitForRequest(status, serverStatus); - - // If the Server has crashed then we must fail - if (serverStatus != KRequestPending) - { - TheTest.Printf(_L("##Iteration=%d, Function=%d, Status1=%d, Status2=%d\r\n"), data.iIteration, data.iFunction, status.Int(), serverStatus.Int()); - break; - } - + User::WaitForRequest(status); TExitType exitType = thread.ExitType(); TInt exitReason = thread.ExitReason(); thread.Close(); @@ -369,13 +310,6 @@ } }//for delete p; - - - // Check to see if the server crashed and not detected by client - TEST(serverStatus.Int() == KRequestPending); - serverWatcher.Kill(KErrCancel); - serverWatcher.Close(); - } /** diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/test/src/t_logcompat.cpp --- a/loggingservices/eventlogger/test/src/t_logcompat.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/test/src/t_logcompat.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -684,7 +684,6 @@ void doTestsL() { - TestUtils::Initialize(_L("t_logcompat")); TheTest.Start(_L("The LogEng compatibility test cases are compiled only when SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM macro is defined!")); } diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/test/src/t_logfile.cpp --- a/loggingservices/eventlogger/test/src/t_logfile.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/test/src/t_logfile.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -198,9 +198,7 @@ while(!finished) { - TheTest.Printf(_L("%d\r\n"), failCount); - - if(failCount > 8) + if(failCount == 4) { TRAP(error, client = CLogClient::NewL(theFs)); TEST2(error, KErrNone); @@ -208,8 +206,8 @@ finished = ETrue; continue; } - - __FILE_FAILNEXT(KErrNoMemory, failCount++); + + __FILE_FAILNEXT(++failCount); TRAP(error, client = CLogClient::NewL(theFs)); @@ -222,13 +220,13 @@ } else { - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); TestUtils::DeleteDatabaseL(); } } delete client; - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount); } /** @@ -260,7 +258,8 @@ while(!finished) { error = KErrNone; - if(failCount == 8) + + if(failCount == 4) { aClient.AddEventType(*type, active->iStatus); active->StartL(); @@ -269,11 +268,9 @@ finished = ETrue; continue; } + + __FILE_FAILNEXT(++failCount); - TheTest.Printf(_L("%d \r"), failCount); - - __FILE_FAILNEXT(KErrNoMemory, failCount++); - aClient.AddEventType(*type, active->iStatus); active->StartL(); @@ -286,7 +283,7 @@ __FILE_RESET; - if (error == KErrNoMemory) + if (error == KErrGeneral) { active->StartL(); aClient.GetEventType(*type, active->iStatus); @@ -304,7 +301,7 @@ TEST2(active->iStatus.Int(), KErrAlreadyExists); CleanupStack::PopAndDestroy(2); // active, type - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount); } /** @@ -332,8 +329,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); aClient.GetEventType(*type, active->iStatus); @@ -344,7 +340,7 @@ finished = ETrue; else { - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); TEST(type->Description() == KNullDesC); } @@ -356,7 +352,7 @@ TEST(type->LoggingEnabled()); CleanupStack::PopAndDestroy(2); // active, type - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount); } /** @@ -390,7 +386,7 @@ type->SetDescription(KTestEventDesc2); type->SetLoggingEnabled(EFalse); - if(failCount == 8) + if(failCount == 3) { aClient.ChangeEventType(*type, active->iStatus); active->StartL(); @@ -400,8 +396,7 @@ continue; } - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); aClient.ChangeEventType(*type, active->iStatus); @@ -415,7 +410,7 @@ __FILE_RESET; - if (error == KErrNoMemory) + if (error == KErrGeneral) { active->StartL(); aClient.GetEventType(*type, active->iStatus); @@ -441,7 +436,7 @@ TEST(type->LoggingEnabled() == EFalse); CleanupStack::PopAndDestroy(2); // type, active - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount); } /** @@ -472,7 +467,7 @@ { error = KErrNone; - if(failCount == 8) + if(failCount == 3) { aClient.DeleteEventType(KTestEventUid, active->iStatus); active->StartL(); @@ -482,8 +477,7 @@ continue; } - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); aClient.DeleteEventType(KTestEventUid, active->iStatus); @@ -497,7 +491,7 @@ __FILE_RESET; - if (error == KErrNoMemory) + if (error == KErrGeneral) { active->StartL(); aClient.GetEventType(*type, active->iStatus); @@ -514,7 +508,7 @@ TEST2(active->iStatus.Int(), KErrNotFound); CleanupStack::PopAndDestroy(2); // type, active - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount); } /** @@ -574,7 +568,7 @@ { error = KErrNone; - if(failCount == 8) + if(failCount == 3) { aClient.AddEvent(*event, active->iStatus); active->StartL(); @@ -584,8 +578,7 @@ continue; } - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); aClient.AddEvent(*event, active->iStatus); active->StartL(); @@ -598,8 +591,9 @@ __FILE_RESET; - if (error == KErrNoMemory) + if (error == KErrGeneral) { + TEST2(error, KErrGeneral); event->SetId(0); active->StartL(); @@ -623,7 +617,7 @@ TEST2(active->iStatus.Int(), KErrNone); CleanupStack::PopAndDestroy(3); // event, active, type - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount); } /** @@ -652,8 +646,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); aClient.GetEvent(*event, active->iStatus); active->StartL(); @@ -662,7 +655,7 @@ if (active->iStatus == KErrNone) finished = ETrue; else - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); __FILE_RESET; } @@ -683,7 +676,7 @@ TEST(event->Data() == KTestData1); CleanupStack::PopAndDestroy(2); // event, active - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount); } /** @@ -729,7 +722,7 @@ event->SetLink(KTestLink2); event->SetDataL(KTestData2); - if(failCount == 14) + if(failCount == 3) { aClient.ChangeEvent(*event, active->iStatus); active->StartL(); @@ -739,8 +732,7 @@ continue; } - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); aClient.ChangeEvent(*event, active->iStatus); @@ -753,13 +745,13 @@ __FILE_RESET; - if (error == KErrNoMemory) + if (error == KErrGeneral) { active->StartL(); aClient.GetEvent(*event, active->iStatus); CActiveScheduler::Start(); if (active->iStatus != KErrNone) - TheTest.Printf(_L("\nerror code:%d failcount:%d\n"),active->iStatus.Int(),failCount); + TheTest.Printf(_L("error code:%d failcount:%d\n"),active->iStatus.Int(),failCount); TEST2(active->iStatus.Int(), KErrNone); TEST(event->Id() == 0); @@ -802,7 +794,7 @@ TEST(event->Data() == KTestData2); CleanupStack::PopAndDestroy(2); // event, active - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount); } /** @@ -834,7 +826,7 @@ { error = KErrNone; - if(failCount == 10) + if(failCount == 6) { aClient.DeleteEvent(0, active->iStatus); active->StartL(); @@ -844,8 +836,7 @@ continue; } - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); aClient.DeleteEvent(0, active->iStatus); @@ -859,7 +850,7 @@ __FILE_RESET; - if (error == KErrNoMemory) + if (error == KErrGeneral) { active->StartL(); aClient.GetEvent(*event, active->iStatus); @@ -876,7 +867,7 @@ TEST2(active->iStatus.Int(), KErrNotFound); CleanupStack::PopAndDestroy(2); // event, active - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount); } /** @@ -906,8 +897,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); aClient.GetConfig(config, active->iStatus); active->StartL(); @@ -916,7 +906,7 @@ if (active->iStatus == KErrNone) finished = ETrue; else - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); __FILE_RESET; } @@ -926,7 +916,7 @@ TEST(config.iMaxRecentLogSize > 0); CleanupStack::PopAndDestroy(); // active - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount); } /** @@ -966,7 +956,7 @@ config.iMaxRecentLogSize = KTestMaxRecentLogSize; config.iMaxEventAge = KTestMaxEventAge; - if(failCount == 11) + if(failCount == 4) { aClient.ChangeConfig(config, active->iStatus); active->StartL(); @@ -976,8 +966,7 @@ continue; } - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); aClient.ChangeConfig(config, active->iStatus); @@ -991,7 +980,7 @@ __FILE_RESET; - if (error == KErrNoMemory) + if (error == KErrGeneral) { active->StartL(); aClient.GetConfig(config, active->iStatus); @@ -1011,7 +1000,7 @@ TEST(config.iMaxEventAge == KTestMaxEventAge); CleanupStack::PopAndDestroy(); // active - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount); } /** @@ -1035,8 +1024,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); error = aClient.GetString(str, R_LOG_DIR_IN); @@ -1049,11 +1037,11 @@ } else { - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); TEST(str.Length() == 0); } } - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount); } /** @@ -1156,8 +1144,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); #ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM if(aUseSimId) @@ -1178,7 +1165,7 @@ if (active->iStatus == KErrNone) finished = ETrue; else - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); } active->StartL(); @@ -1219,7 +1206,7 @@ TEST2(active->iStatus.Int(), KErrNotFound); CleanupStack::PopAndDestroy(5); // event4, event3, event2, event1, active - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount); } void doTestsL() @@ -1229,7 +1216,7 @@ TheTest.Start(_L("Construction + create db")); TestUtils::DeleteDatabaseL(); TestConstructionL(); // Creates database - TheTest.Next(_L("Construction + open db")); + TheTest.Next(_L("Construction + open db")); TestConstructionL(); // Opens existing database TestUtils::DeleteDatabaseL(); theLog.Write(_L8("Test 1 OK\n")); diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/test/src/t_logutil.cpp --- a/loggingservices/eventlogger/test/src/t_logutil.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/test/src/t_logutil.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -14,9 +14,6 @@ // #include "t_logutil.h" -//Define "TheTest" variable used in the test cpp files -extern RTest TheTest; - TPtrC FileName(const TText* aFile) { TPtrC p(aFile); diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/test/src/t_logutil2.cpp --- a/loggingservices/eventlogger/test/src/t_logutil2.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/test/src/t_logutil2.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -16,9 +16,6 @@ #include #include "t_logutil2.h" -//Define "TheTest" variable used in the test cpp files -extern RTest TheTest; - _LIT(KHelperExeName, "t_LogHiCapHelper.exe"); //====================================================================================================== @@ -892,6 +889,10 @@ static void Cleanup(void*) { TRAP_IGNORE(TestUtils::DeleteDatabaseL()); + _LIT(KCntModelFileName, "c:\\system\\data\\CntModel.ini"); + ::DeleteDataFile(KCntModelFileName); + _LIT(KContactsFileName, "c:\\system\\data\\Contacts.cdb"); + ::DeleteDataFile(KContactsFileName); ::DeleteDataFile(theLogName); } diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/test/src/t_logviewfail2.cpp --- a/loggingservices/eventlogger/test/src/t_logviewfail2.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/test/src/t_logviewfail2.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -65,8 +65,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); TBool result = EFalse; TRAP(error, result = view->SetFilterL(*filter, active->iStatus)); @@ -87,25 +86,25 @@ } else { - if(active->iStatus.Int() != KErrNoMemory) + if(active->iStatus.Int() != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); } } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } __FILE_RESET; } - TheTest.Printf(_L("\r\nTest-1 has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("Test-1 has succeeded at iteration %d\n"), failCount); list->AppendL(filter); CleanupStack::Pop(); // filter @@ -121,8 +120,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); TBool result = EFalse; TRAP(error, result = view->SetFilterL(*list, active->iStatus)); @@ -143,20 +141,20 @@ } else { - if(active->iStatus.Int() != KErrNoMemory) + if(active->iStatus.Int() != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); } } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } __FILE_RESET; @@ -165,7 +163,7 @@ list->ResetAndDestroy(); CleanupStack::PopAndDestroy(4); // list, view, event, active - TheTest.Printf(_L("\r\nTest-2 has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("Test-2 has succeeded at iteration %d\n"), failCount); } /** @@ -208,8 +206,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); TBool result = EFalse; TRAP(error, result = view->SetRecentListL(KLogRecentIncomingCalls, active->iStatus)); @@ -228,25 +225,25 @@ } else { - if(active->iStatus.Int() != KErrNoMemory) + if(active->iStatus.Int() != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); } } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } __FILE_RESET; } - TheTest.Printf(_L("\r\nTest-1 has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("Test-1 has succeeded at iteration %d\n"), failCount); CLogFilterList* list = new(ELeave)CLogFilterList; CleanupStack::PushL(list); @@ -260,8 +257,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); TBool result = EFalse; TRAP(error, result = view->SetRecentListL(KLogRecentIncomingCalls, *filter, active->iStatus)); @@ -280,25 +276,25 @@ } else { - if(active->iStatus.Int() != KErrNoMemory) + if(active->iStatus.Int() != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); } } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } __FILE_RESET; } - TheTest.Printf(_L("\r\nTest-2 has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("Test-2 has succeeded at iteration %d\n"), failCount); list->AppendL(filter); CleanupStack::Pop(); // filter @@ -314,8 +310,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); TBool result = EFalse; TRAP(error, result = view->SetRecentListL(KLogRecentIncomingCalls, *list, active->iStatus)); @@ -334,20 +329,20 @@ } else { - if(active->iStatus.Int() != KErrNoMemory) + if(active->iStatus.Int() != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); } } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } __FILE_RESET; @@ -356,7 +351,7 @@ list->ResetAndDestroy(); CleanupStack::PopAndDestroy(4); // list, view, event, active - TheTest.Printf(_L("\r\nTest-3 has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("Test-3 has succeeded at iteration %d\n"), failCount); } /** @@ -414,8 +409,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); TBool result = EFalse; TRAP(error, result = view->DuplicatesL(*duplicate, active->iStatus)); @@ -434,25 +428,25 @@ } else { - if(active->iStatus.Int() != KErrNoMemory) + if(active->iStatus.Int() != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); } } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } __FILE_RESET; } - TheTest.Printf(_L("\r\nTest-1 has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("Test-1 has succeeded at iteration %d\n"), failCount); CLogFilterList* list = new(ELeave)CLogFilterList; CleanupStack::PushL(list); @@ -466,8 +460,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); TBool result = EFalse; TRAP(error, result = view->DuplicatesL(*duplicate, *filter, active->iStatus)); @@ -486,25 +479,25 @@ } else { - if(active->iStatus.Int() != KErrNoMemory) + if(active->iStatus.Int() != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); } } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } __FILE_RESET; } - TheTest.Printf(_L("\r\nTest-2 has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("Test-2 has succeeded at iteration %d\n"), failCount); list->AppendL(filter); CleanupStack::Pop(); // filter @@ -520,8 +513,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); TBool result = EFalse; TRAP(error, result = view->DuplicatesL(*duplicate, *list, active->iStatus)); @@ -540,20 +532,20 @@ } else { - if(active->iStatus.Int() != KErrNoMemory) + if(active->iStatus.Int() != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); } } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } __FILE_RESET; @@ -562,7 +554,7 @@ list->ResetAndDestroy(); CleanupStack::PopAndDestroy(5); // list, duplicate, view, event, active - TheTest.Printf(_L("\r\nTest-3 has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("Test-3 has succeeded at iteration %d\n"), failCount); } /** @@ -609,8 +601,7 @@ TEST(view->CountL() > 1); event->CopyL(view->Event()); - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); TBool result = EFalse; TRAP(error, result = view->NextL(active->iStatus)); @@ -629,25 +620,25 @@ } else { - if(active->iStatus.Int() != KErrNoMemory) + if(active->iStatus.Int() != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); } } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } __FILE_RESET; } - TheTest.Printf(_L("\r\nTest-1 (\"View Next\") has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("Test-1 (\"View Next\") has succeeded at iteration %d\n"), failCount); failCount = 0; finished = EFalse; @@ -667,8 +658,7 @@ event->CopyL(view->Event()); - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); TBool result = EFalse; TRAP(error, result = view->PreviousL(active->iStatus)); @@ -687,25 +677,25 @@ } else { - if(active->iStatus.Int() != KErrNoMemory) + if(active->iStatus.Int() != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); } } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } __FILE_RESET; } - TheTest.Printf(_L("\r\nTest-2 (\"View Previous\") has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("Test-2 (\"View Previous\") has succeeded at iteration %d\n"), failCount); failCount = 0; finished = EFalse; @@ -725,8 +715,7 @@ event->CopyL(view->Event()); - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); TBool result = EFalse; TRAP(error, result = view->FirstL(active->iStatus)); @@ -745,25 +734,25 @@ } else { - if(active->iStatus.Int() != KErrNoMemory) + if(active->iStatus.Int() != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); } } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } __FILE_RESET; } - TheTest.Printf(_L("\r\nTest-3 (\"View First\") has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("Test-3 (\"View First\") has succeeded at iteration %d\n"), failCount); failCount = 0; finished = EFalse; @@ -783,8 +772,7 @@ event->CopyL(view->Event()); - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); TBool result = EFalse; TRAP(error, result = view->LastL(active->iStatus)); @@ -803,20 +791,20 @@ } else { - if(active->iStatus.Int() != KErrNoMemory) + if(active->iStatus.Int() != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } - TEST2(active->iStatus.Int(), KErrNoMemory); + TEST2(active->iStatus.Int(), KErrGeneral); } } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } __FILE_RESET; @@ -824,7 +812,7 @@ CleanupStack::PopAndDestroy(4); // filter, view, event, active - TheTest.Printf(_L("\r\nTest-4 (\"View Last\") has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("Test-4 (\"View Last\") has succeeded at iteration %d\n"), failCount); } /** @@ -868,8 +856,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); TInt result = 0; TRAP(error, result = view->CountL()); @@ -881,11 +868,11 @@ } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } __FILE_RESET; @@ -893,7 +880,7 @@ CleanupStack::PopAndDestroy(4); // filter, view, event, active - TheTest.Printf(_L("\r\nThe test (\"View Count\") has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test (\"View Count\") has succeeded at iteration %d\n"), failCount); } /** @@ -956,9 +943,14 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); - + // This failCount value causes DBMS to return KErrCorrupt. Apparently this + // can't actually occur in real life, so we skip this value. + if (failCount == 9) + { + failCount++; + } + __FILE_FAILNEXT(++failCount); + TRAP(error, view->RemoveL(view->Event().Id())); __FILE_RESET; @@ -972,7 +964,7 @@ CActiveScheduler::Start(); if(active->iStatus.Int() != KErrNone) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } TEST2(active->iStatus.Int(), KErrNone); @@ -980,24 +972,16 @@ } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); - } - // This failCount value causes DBMS to return KErrCorrupt. Apparently this - // can't actually occur in real life, so we skip this value. - if (failCount > 9) - { - finished = ETrue; - TRAP(error, view->RemoveL(view->Event().Id())); - TEST2(error, KErrNone); + TEST2(error, KErrGeneral); } } CleanupStack::PopAndDestroy(3); // view, event, active - TheTest.Printf(_L("\r\nThe test (\"View Remove\") has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test (\"View Remove\") has succeeded at iteration %d\n"), failCount); } /** @@ -1071,15 +1055,14 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(++failCount); - if(failCount == 17) + if(failCount == 7) { __FILE_RESET; break; } - + TRAP(error, duplicate->RemoveL(duplicate->Event().Id())); __FILE_RESET; @@ -1093,7 +1076,7 @@ CActiveScheduler::Start(); if(active->iStatus.Int() != KErrNone) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int()); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int()); } TEST2(active->iStatus.Int(), KErrNone); @@ -1101,16 +1084,16 @@ } else { - if(error != KErrNoMemory) + if(error != KErrGeneral) { - TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error); + TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error); } - TEST2(error, KErrNoMemory); + TEST2(error, KErrGeneral); } } CleanupStack::PopAndDestroy(4); // duplicate, view, event, active - TheTest.Printf(_L("\r\nThe test (\"View Remove Duplicates\") has succeeded at iteration %d\n"), failCount); + TheTest.Printf(_L("The test (\"View Remove Duplicates\") has succeeded at iteration %d\n"), failCount); } void doTestsL() diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/test/src/t_logwrap.cpp --- a/loggingservices/eventlogger/test/src/t_logwrap.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/test/src/t_logwrap.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -277,8 +277,7 @@ while(!finished) { - TheTest.Printf(_L("%d \r"), failCount); - __FILE_FAILNEXT(KErrNoMemory, failCount++); + __FILE_FAILNEXT(failCount++); TRAP(error, wrapper = CLogWrapper::NewL(theFs)); @@ -292,11 +291,8 @@ delete wrapper; } else - { - TEST2(error, KErrNoMemory); - } + TEST2(error, KErrGeneral); } - TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount); } /** diff -r 26645d81f48d -r cc28652e0254 loggingservices/eventlogger/test/tef/group/logengteftests.iby --- a/loggingservices/eventlogger/test/tef/group/logengteftests.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/eventlogger/test/tef/group/logengteftests.iby Wed Sep 01 12:39:58 2010 +0100 @@ -19,6 +19,14 @@ #include #include +#include +// the backup engine is dependant on all of these: +#include +#include +#include +#include +#include +#include file=ABI_DIR\BUILD_DIR\teflogengbur.exe sys\bin\teflogengbur.exe diff -r 26645d81f48d -r cc28652e0254 loggingservices/filelogger/TSRC/T_LOG.CPP --- a/loggingservices/filelogger/TSRC/T_LOG.CPP Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/filelogger/TSRC/T_LOG.CPP Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1997-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" @@ -64,15 +64,40 @@ LOCAL_C TInt DeleteFolder(const TDesC& aFolder) { - CFileMan* fileman=NULL; - TRAPD(ret,fileman=CFileMan::NewL(fs)); - ret=fileman->RmDir(aFolder); - delete fileman; - if (ret==KErrPathNotFound || ret==KErrNotFound) - { - return KErrNone; - } - return ret; + + TUint temp; + _LIT(KLogDir,"c:\\Logs\\"); + TInt ret=fs.Att(KLogDir,temp); + if (ret==KErrPathNotFound) + return KErrNone; + else + { + TInt exists=fs.Att(aFolder,temp); + if (exists==KErrPathNotFound) + return KErrNone; + + if (exists!=KErrNotFound) + { + TFileName file1=aFolder; + file1.Append(KTestLogFileName1); + ret=fs.Delete(file1); + if (ret!=KErrNone && ret!=KErrNotFound) + return ret; + TFileName file2=aFolder; + file2.Append(KTestLogFileName1); + ret=fs.Delete(file2); + if (ret!=KErrNone && ret!=KErrNotFound) + return ret; + } + + CFileMan* fileman=NULL; + TRAP(ret,fileman=CFileMan::NewL(fs)); + TFileName folder; + folder.Copy(aFolder.Left(aFolder.Length()-1)); + ret=fileman->RmDir(folder); + delete fileman; + return ret; + } } LOCAL_C void CreateFolderL(const TDesC& aFolder) diff -r 26645d81f48d -r cc28652e0254 loggingservices/filelogger/group/BLD.INF --- a/loggingservices/filelogger/group/BLD.INF Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/filelogger/group/BLD.INF Wed Sep 01 12:39:58 2010 +0100 @@ -23,8 +23,8 @@ PRJ_EXPORTS -../INC/FLOGGER.H OS_LAYER_PUBLIC_EXPORT_PATH(flogger.h) -../INC/FLOGGER.INL OS_LAYER_PUBLIC_EXPORT_PATH(flogger.inl) +../INC/FLOGGER.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(flogger.h) +../INC/FLOGGER.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(flogger.inl) ../group/flogger.iby /epoc32/rom/include/flogger.iby diff -r 26645d81f48d -r cc28652e0254 loggingservices/rfilelogger/Logger/Group/bld.inf --- a/loggingservices/rfilelogger/Logger/Group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/rfilelogger/Logger/Group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -16,10 +16,10 @@ #include "../te_RFileLogger/group/bld.inf" PRJ_EXPORTS -../inc/RFileLogger.h OS_LAYER_PLATFORM_EXPORT_PATH(test/rfilelogger.h) -../inc/RFileLoggermacro.h OS_LAYER_PLATFORM_EXPORT_PATH(test/rfileloggermacro.h) -RFilelogger.iby /epoc32/rom/include/rfilelogger.iby - +../inc/RFileLogger.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(test/rfilelogger.h) +../inc/RFileLoggermacro.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(test/rfileloggermacro.h) +../Group/RFilelogger.iby /epoc32/rom/include/rfilelogger.iby PRJ_MMPFILES RFileLoggerServer.mmp RFileloggerclient.mmp + diff -r 26645d81f48d -r cc28652e0254 loggingservices/rfilelogger/Logger/Src/Client.cpp --- a/loggingservices/rfilelogger/Logger/Src/Client.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/rfilelogger/Logger/Src/Client.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -288,8 +288,7 @@ } /*----------------- End of Maintaince warning section --------------------------*/ - TRAP_IGNORE(WriteL(ptr)); - + TRAPD(err,WriteL(ptr)); delete buffer; } @@ -306,7 +305,7 @@ TPtr8 ptr(buffer->Des()); AddTime(ptr); ptr.Append(aLogBuffer); - TRAP_IGNORE(WriteL(ptr)); + TRAPD(err,WriteL(ptr)); CleanupStack::PopAndDestroy(buffer); } diff -r 26645d81f48d -r cc28652e0254 loggingservices/rfilelogger/Logger/Src/Main.cpp --- a/loggingservices/rfilelogger/Logger/Src/Main.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/rfilelogger/Logger/Src/Main.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -69,7 +69,7 @@ { return KErrNoMemory; } - TRAP_IGNORE(MainL()); + TRAPD(err,MainL()); delete cleanup; __UHEAP_MARKEND; return KErrNone; diff -r 26645d81f48d -r cc28652e0254 loggingservices/rfilelogger/Logger/Src/Server.Cpp --- a/loggingservices/rfilelogger/Logger/Src/Server.Cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/rfilelogger/Logger/Src/Server.Cpp Wed Sep 01 12:39:58 2010 +0100 @@ -382,28 +382,27 @@ aCount[0]=0; TInt posI(0); - // retrive log message: +// retrive log message: // Retrive common part of log message: - TInt i=0; - for(i=1; i<6; i++) + for(TInt i = 1; i<6; i++) { SearchBuf.Set(aPtr.Mid(posI)); aCount[i]=SearchBuf.Find(KSeperation8)+posI; posI=aCount[i]+3; if(aCount[i]" - //It shoud happened once at the beginning of the file - // such as overwrite mode - { - afileSize=12; // used for lock position - alogbuf.Copy(KxmlHeader); - } - alogbuf.Append(_L8("\r\n\r\n")); - for(TInt i=0; i<6; i++) - { - alogbuf.Append(_L8(" <")); - alogbuf.Append(alogField[i].iLogTag8); - alogbuf.Append(_L8(">")); - alogbuf.Append(alogField[i].iLogValue8); - alogbuf.Append(_L8("\r\n")); - } - for(TInt i=0; i")); - alogbuf.Append(extralogField[i].iLogValue8); - alogbuf.Append(_L8("\r\n")); - } - - alogbuf.Append(_L8("")); - alogbuf.Append(_L8("\r\n")); - - iLogFile.Write(afileSize-12, alogbuf,iStatus); - - if(!r) - { - mutex.Signal(); - mutex.Close(); - } - - if(extralogField) - delete[] extralogField; - + } + + // Start to organize an XML format: + TInt afileSize; + _LIT(KLogMutex, "LoggingServerMutex"); + RMutex mutex; + TInt r = mutex.CreateGlobal(KLogMutex); + if(r==KErrAlreadyExists) + r = mutex.OpenGlobal(KLogMutex); + + if(!r) mutex.Wait(); // if still failed, let logging go + //without bother the mutex + + iLogFile.Size(afileSize); + if(afileSize<12) // 12 is from charters of "\r\n" + //It shoud happened once at the beginning of the file + // such as overwrite mode + { + afileSize=12; // used for lock position + alogbuf.Copy(KxmlHeader); + } + alogbuf.Append(_L8("\r\n\r\n")); + for(TInt i=0; i<6; i++) + { + alogbuf.Append(_L8(" <")); + alogbuf.Append(alogField[i].iLogTag8); + alogbuf.Append(_L8(">")); + alogbuf.Append(alogField[i].iLogValue8); + alogbuf.Append(_L8("\r\n")); + } + for(TInt i=0; i")); + alogbuf.Append(extralogField[i].iLogValue8); + alogbuf.Append(_L8("\r\n")); + } + + alogbuf.Append(_L8("")); + alogbuf.Append(_L8("\r\n")); + + iLogFile.Write(afileSize-12, alogbuf,iStatus); + + + if(!r) + { + mutex.Signal(); + mutex.Close(); + } + + if(extralogField) delete[] extralogField; delete[] alogField; delete pBuf1; + } void CLogFileControl::WriteTxt(const TDesC8 &aDes) diff -r 26645d81f48d -r cc28652e0254 loggingservices/rfilelogger/Logger/te_RFileLogger/group/Te_RFileLoggersuite.mmp --- a/loggingservices/rfilelogger/Logger/te_RFileLogger/group/Te_RFileLoggersuite.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/rfilelogger/Logger/te_RFileLogger/group/Te_RFileLoggersuite.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -13,22 +13,31 @@ // Description: // -TARGET te_rfileloggersuite.exe -TARGETTYPE exe -UID 0x1000007A 0x102089CD + TARGET Te_RFileLoggerSuite.exe + TARGETTYPE exe + UID 0x1000007A 0x102089CD + +//Please add any change under here +SOURCEPATH ..\src +SOURCE Te_RFileLoggerSuiteServer.cpp +SOURCE Te_RFileLoggerSuiteStepBase.cpp +SOURCE addfield_logStep.cpp +SOURCE conn_closeStep.cpp + -SOURCEPATH ../src -SOURCE Te_RFileLoggerSuiteServer.cpp -SOURCE Te_RFileLoggerSuiteStepBase.cpp -SOURCE addfield_logStep.cpp -SOURCE conn_closeStep.cpp +USERINCLUDE ..\src + +SYSTEMINCLUDE \epoc32\include +SYSTEMINCLUDE \epoc32\include\test + +//Please add your system include under here. -USERINCLUDE ../src -OS_LAYER_SYSTEMINCLUDE_SYMBIAN +LIBRARY euser.lib +LIBRARY testexecuteutils.lib +LIBRARY testexecutelogclient.lib -LIBRARY euser.lib -LIBRARY testexecuteutils.lib -LIBRARY testexecutelogclient.lib -LIBRARY rfileloggerclient.lib +//Please add your libraries under here. +LIBRARY RFileLoggerclient.lib + CAPABILITY ALL -Tcb diff -r 26645d81f48d -r cc28652e0254 loggingservices/rfilelogger/Logger/te_RFileLogger/group/bld.inf --- a/loggingservices/rfilelogger/Logger/te_RFileLogger/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/rfilelogger/Logger/te_RFileLogger/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -14,10 +14,19 @@ // PRJ_TESTEXPORTS -../scripts/te_RFileLoggerSuite.script z:/testdata/scripts/te_rfileloggersuite.script -../testdata/te_RFileLoggersuite.ini z:/testdata/configs/te_rfileloggersuite.ini +../scripts/te_RFileLoggerSuite.script /epoc32/release/wins/udeb/z/testdata/scripts/te_rfileloggersuite.script +../scripts/te_RFileLoggerSuite.script /epoc32/release/wins/urel/z/testdata/scripts/te_rfileloggersuite.script +../scripts/te_RFileLoggerSuite.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_rfileloggersuite.script +../scripts/te_RFileLoggerSuite.script /epoc32/release/winscw/urel/z/testdata/scripts/te_rfileloggersuite.script -te_RFileLoggersuite.iby /epoc32/rom/include/te_rfileloggersuite.iby +../testdata/te_RFileLoggersuite.ini /epoc32/release/wins/udeb/z/testdata/configs/te_rfileloggersuite.ini +../testdata/te_RFileLoggersuite.ini /epoc32/release/wins/urel/z/testdata/configs/te_rfileloggersuite.ini +../testdata/te_RFileLoggersuite.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_rfileloggersuite.ini +../testdata/te_RFileLoggersuite.ini /epoc32/release/winscw/urel/z/testdata/configs/te_rfileloggersuite.ini + + +./te_RFileLoggersuite.iby /epoc32/rom/include/te_rfileloggersuite.iby + PRJ_TESTMMPFILES -Te_RFileLoggersuite.mmp manual +Te_RFileLoggersuite.mmp diff -r 26645d81f48d -r cc28652e0254 loggingservices/rfilelogger/Logger/te_RFileLogger/group/te_RFileLoggersuite.iby --- a/loggingservices/rfilelogger/Logger/te_RFileLogger/group/te_RFileLoggersuite.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/rfilelogger/Logger/te_RFileLogger/group/te_RFileLoggersuite.iby Wed Sep 01 12:39:58 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -20,8 +20,8 @@ #include -file=ABI_DIR\DEBUG_DIR\te_rfileloggersuite.exe system\bin\te_rfileloggersuite.exe -data=DATAZ_\testdata\configs\te_rfileloggersuite.ini testdata\configs\te_rfileloggersuite.ini -data=DATAZ_\testdata\scripts\te_rfileloggersuite.script testdata\Scripts\te_rfileloggersuite.script +file=ABI_DIR\DEBUG_DIR\Te_RFileLoggerSuite.exe System\bin\te_RFileLoggerSuite.exe +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TestData\configs\te_RFileLoggerSuite.ini TestData\configs\te_RFileLoggerSuite.ini +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TestData\scripts\te_RFileLoggerSuite.script TestData\Scripts\te_RFileLoggerSuite.Script -#endif // __TE_RFILELOGGER_SUITE_IBY__ +#endif diff -r 26645d81f48d -r cc28652e0254 loggingservices/rfilelogger/Logger/te_RFileLogger/src/Te_RFileLoggerSuiteServer.cpp --- a/loggingservices/rfilelogger/Logger/te_RFileLogger/src/Te_RFileLoggerSuiteServer.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/rfilelogger/Logger/te_RFileLogger/src/Te_RFileLoggerSuiteServer.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -90,7 +90,7 @@ { return KErrNoMemory; } - TRAP_IGNORE(MainL()); + TRAPD(err,MainL()); delete cleanup; __UHEAP_MARKEND; return KErrNone; diff -r 26645d81f48d -r cc28652e0254 loggingservices/rfilelogger/Logger/te_RFileLogger/src/addfield_logStep.cpp --- a/loggingservices/rfilelogger/Logger/te_RFileLogger/src/addfield_logStep.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/loggingservices/rfilelogger/Logger/te_RFileLogger/src/addfield_logStep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -21,6 +21,7 @@ #include "addfield_logStep.h" #include "Te_RFileLoggerSuiteDefs.h" +_LIT(K16BitText,"This is a short line of 16 Bit Text"); _LIT(K16BitFormatText,"logger string int = %d, string = %S"); _LIT(K16BitString,"The String16"); diff -r 26645d81f48d -r cc28652e0254 package_definition.xml --- a/package_definition.xml Tue Aug 31 16:57:14 2010 +0300 +++ b/package_definition.xml Wed Sep 01 12:39:58 2010 +0100 @@ -13,7 +13,7 @@ - + diff -r 26645d81f48d -r cc28652e0254 package_map.xml --- a/package_map.xml Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ - diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/cenrepnotifierhandler/group/bld.inf --- a/persistentstorage/centralrepository/cenrepnotifierhandler/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/cenrepnotifierhandler/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -20,7 +20,7 @@ PRJ_EXPORTS -../inc/cenrepnotifyhandler.h OS_LAYER_PUBLIC_EXPORT_PATH(cenrepnotifyhandler.h) +../inc/cenrepnotifyhandler.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(cenrepnotifyhandler.h) ../rom/cenrepnotifierhandler.iby /epoc32/rom/include/cenrepnotifierhandler.iby PRJ_MMPFILES diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/cenrepnotifierhandler/rom/cenrepnotifierhandler.iby --- a/persistentstorage/centralrepository/cenrepnotifierhandler/rom/cenrepnotifierhandler.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/cenrepnotifierhandler/rom/cenrepnotifierhandler.iby Wed Sep 01 12:39:58 2010 +0100 @@ -18,7 +18,7 @@ #define __CENREPNOTIFHANDLER_IBY__ //file content -file=ABI_DIR\BUILD_DIR\cenrepnotifhandler.dll System\Libs\CENREPNOTIFHANDLER.DLL +file=ABI_DIR\BUILD_DIR\CENREPNOTIFHANDLER.DLL System\Libs\CENREPNOTIFHANDLER.DLL #endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/cenrepsrv/backup.cpp --- a/persistentstorage/centralrepository/cenrepsrv/backup.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/cenrepsrv/backup.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -385,15 +385,6 @@ } -void CRepositoryBackupClient::RestoreRepositoryAndListL(TUid repositoryUid, CDirectFileStore* store, TStreamId settingsStreamId, TStreamId deletedSettingsStreamId, TInt& repIndex) - { - // Add the restored repository to the restored repositories list. - // Pass its changed-keys list to further restoring functions to add entries for post-restoration notification. - repIndex = AddRestoredRepositoryL(repositoryUid); - iRepository->RestoreRepositoryContentsL(*store, settingsStreamId, deletedSettingsStreamId, *iRestoredRepositoriesArray[repIndex]); - iRepository->CommitChangesL(); - } - // // CRepositoryBackupClient::RestoreCompleteL @@ -429,6 +420,7 @@ } + // Get the root stream and attempt to read a backup file header from it TStreamId rootStreamId = store->Root() ; RStoreReadStream rootStream ; @@ -470,8 +462,8 @@ // Iterate through index and attempt restore of each repository stream // we find in it. - restoreStreamIndex->Reset(); - TUid repositoryUid; + restoreStreamIndex->Reset() ; + TUid repositoryUid ; TStreamId settingsStreamId(KNullStreamIdValue); TStreamId deletedSettingsStreamId(KNullStreamIdValue); TStreamId installedSettingsStreamId(KNullStreamIdValue); @@ -480,10 +472,12 @@ { iRepository->OpenL(repositoryUid, *iNotifier, EFalse); iRepository->FailAllTransactions(); - TInt repIndex; - TRAPD(err, RestoreRepositoryAndListL(repositoryUid, store, settingsStreamId, deletedSettingsStreamId, repIndex)); + // Add the restored repository to the restored repositories list. + // Pass its changed-keys list to further restoring functions to add entries for post-restoration notification. + TInt repIndex = AddRestoredRepositoryL(repositoryUid); + iRepository->RestoreRepositoryContentsL(*store, settingsStreamId, deletedSettingsStreamId, *iRestoredRepositoriesArray[repIndex]); + iRepository->CommitChangesL(); iRepository->Close(); - User::LeaveIfError(err); // If the backup contains an installed repository containing default values for the settings, read them in if (installedSettingsStreamId != KNullStreamId) { diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/cenrepsrv/backup.h --- a/persistentstorage/centralrepository/cenrepsrv/backup.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/cenrepsrv/backup.h Wed Sep 01 12:39:58 2010 +0100 @@ -170,8 +170,6 @@ TUint GetDataChecksum(TDriveNumber aDrive); void CompleteOwnerIdLookupTableL(); - void RestoreRepositoryAndListL(TUid repositoryUid, CDirectFileStore* store, TStreamId settingsStreamId, TStreamId deletedSettingsStreamId,TInt& repIndex); - private: // Usual active object stuff void RunL() ; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/cenrepsrv/install.cpp --- a/persistentstorage/centralrepository/cenrepsrv/install.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/cenrepsrv/install.cpp Wed Sep 01 12:39:58 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" @@ -227,116 +227,110 @@ // Find added or updated entries ReadInstallDirL(iCurrentInstallDirEntries); + TInt newCount=iCurrentInstallDirEntries.Count(); + TInt currentCount=iInstallEntryArray.Count(); + TInt i; + TInt r; + TInt operation; + + // If both counts are 0, we shouldn't have been notified, just return + if( (newCount==0) && (currentCount==0)) + return; + + if(aStartup) + { + operation=ESASwisNone; + } + else + { + operation=iSWIOperation; + } + // We don't want cache activity during SWI operations TServerResources::iCacheManager->DisableCache(); - TRAPD(err, HandleFileChangesL(aStartup)); + if( newCount==0) // currentCount > 0, newCount = 0 + { // All installed files have been deleted + // Handle deletes of all files + for(i=0;iHandleFileDeleteL(operation); + } + // Free memory of elements + iInstallEntryArray.ResetAndDestroy(); + } + else + { + if( currentCount==0) // currentCount = 0, newCount > 0 + { // All new files need to be handled + for(i=0;iHandleFileCreateL(operation); + } + } + else // currentCount > 0, newCount > 0 + { + // Find added and modified entries by going through new entries and + // looking for them in current array + for(i=0;i=KErrNone) + { + CInstallEntry* currentEntry=iInstallEntryArray[r]; + if( newEntry->Modified() > currentEntry->Modified()) + { + // Deal with newly installed file, note use newEntry + // so we use new timestamp + newEntry->HandleFileUpdateL(operation); + } + } + else if(r==KErrNotFound) // File has been added + { + // Handle add + newEntry->HandleFileCreateL(operation); + // Don't leave on KErrNotFound + r=KErrNone; + } + User::LeaveIfError(r); + } + + // Find deleted entries by going through current entries and looking for them + // in new array + for(i=0;iHandleFileDeleteL(operation); + // Don't leave on KErrNotFound + r=KErrNone; + } + User::LeaveIfError(r); + } + } + + // Clear out old list + iInstallEntryArray.ResetAndDestroy(); + + // Re-read directory - if any files were corrupt they have been deleted + // during the merge, so we need to re-read in case this has occurred + ReadInstallDirL(iInstallEntryArray); + } + + SaveInstallDirL(); + iCurrentInstallDirEntries.ResetAndDestroy(); // SWI operations finished, enable cache - TServerResources::iCacheManager->EnableCache(); - User::LeaveIfError(err); + TServerResources::iCacheManager->EnableCache(); } -void CCentRepSWIWatcher::HandleFileChangesL(TBool aStartup) - { - TInt newCount=iCurrentInstallDirEntries.Count(); - TInt currentCount=iInstallEntryArray.Count(); - TInt i; - TInt r; - TInt operation; - - // If both counts are 0, we shouldn't have been notified, just return - if( (newCount==0) && (currentCount==0)) - return; - - if(aStartup) - { - operation=ESASwisNone; - } - else - { - operation=iSWIOperation; - } - - if( newCount==0) // currentCount > 0, newCount = 0 - { // All installed files have been deleted - // Handle deletes of all files - for(i=0;iHandleFileDeleteL(operation); - } - // Free memory of elements - iInstallEntryArray.ResetAndDestroy(); - } - else - { - if( currentCount==0) // currentCount = 0, newCount > 0 - { // All new files need to be handled - for(i=0;iHandleFileCreateL(operation); - } - } - else // currentCount > 0, newCount > 0 - { - // Find added and modified entries by going through new entries and - // looking for them in current array - for(i=0;i=KErrNone) - { - CInstallEntry* currentEntry=iInstallEntryArray[r]; - if( newEntry->Modified() > currentEntry->Modified()) - { - // Deal with newly installed file, note use newEntry - // so we use new timestamp - newEntry->HandleFileUpdateL(operation); - } - } - else if(r==KErrNotFound) // File has been added - { - // Handle add - newEntry->HandleFileCreateL(operation); - // Don't leave on KErrNotFound - r=KErrNone; - } - User::LeaveIfError(r); - } - - // Find deleted entries by going through current entries and looking for them - // in new array - for(i=0;iHandleFileDeleteL(operation); - // Don't leave on KErrNotFound - r=KErrNone; - } - User::LeaveIfError(r); - } - } - - // Clear out old list - iInstallEntryArray.ResetAndDestroy(); - - // Re-read directory - if any files were corrupt they have been deleted - // during the merge, so we need to re-read in case this has occurred - ReadInstallDirL(iInstallEntryArray); - } - - SaveInstallDirL(); - iCurrentInstallDirEntries.ResetAndDestroy(); - } - CInstallEntry::CInstallEntry() : iUid(KNullUid), iModified(0), diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/cenrepsrv/install.h --- a/persistentstorage/centralrepository/cenrepsrv/install.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/cenrepsrv/install.h Wed Sep 01 12:39:58 2010 +0100 @@ -60,7 +60,7 @@ void Start(); ~CCentRepSWIWatcher(); void HandleSWIEventL(TInt swiProperty); - void FindChangedEntriesL(TBool aStartup=EFalse); + void FindChangedEntriesL(TBool aStartup=EFalse); //From CActive protected: void RunL(); @@ -72,11 +72,11 @@ void ConstructL(); void ReadInstallDirL(RPointerArray& aEntryArray); + void SaveInstallDirL(); void GetInstallDirL(); void ReadAndInternalizeInstallDirL(const TDesC& aInstallDirFilePath); - void HandleFileChangesL(TBool aStartup); static TBool MatchEntries(const CInstallEntry &aSource, const CInstallEntry &aTarget); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/cenrepsrv/obsrvr_noc.cpp --- a/persistentstorage/centralrepository/cenrepsrv/obsrvr_noc.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/cenrepsrv/obsrvr_noc.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -704,23 +704,29 @@ TInt biggestBlock; TInt firstAvail = myHeap.Available(biggestBlock); - TRAPD(err, aRepository = CSharedRepository::NewL(aUid)); + aRepository = CSharedRepository::NewL(aUid); #ifdef CACHE_OOM_TESTABILITY - if ((err!=KErrNone)&&!iTrapOOMOnOpen) + if ((aRepository==NULL)&&!iTrapOOMOnOpen) { - User::Leave(err); + User::Leave(KErrNoMemory); } #endif - if ((err!=KErrNone)&&TServerResources::iCacheManager->Enabled()) + if ((aRepository==NULL)&&TServerResources::iCacheManager->Enabled()) { // If cache enabled, try recovery by releasing the cache TServerResources::iCacheManager->FlushCache(EFalse); // retry aRepository = CSharedRepository::NewL(aUid); - err = KErrNone; } - User::LeaveIfError(err); - CleanupStack::PushL(aRepository); + // If still no memory, return error + if (aRepository==NULL) + { + User::Leave(KErrNoMemory); + } + else // successfully created the object, so push it into the cleanup stack + { + CleanupStack::PushL(aRepository); + } // Now that we have enough memory for the object and constructed it properly // we try to load it. We trap all errors, either from leaving functions or error code diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.cpp --- a/persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -32,25 +32,12 @@ { iNotifier = &aObserver; - TServerResources::iObserver->iObservers.ReserveL(1); - - TServerResources::iObserver->AddSharedRepositoryInfoL(aUid); - - TRAPD( err, iRepository = TServerResources::iObserver->AccessL(aUid, aFailIfNotFound) ); - + iRepository = TServerResources::iObserver->AccessL(aUid, aFailIfNotFound); //store uid - iUid = aUid; - - if (err == KErrNone) - { - TRAP( err, TServerResources::iObserver->AddObserverL(aUid, this) ); - } - - if (err != KErrNone) - { - TServerResources::iObserver->RemoveSharedRepositoryInfo(aUid); - User::Leave(err); - } + iUid = aUid; + + TServerResources::iObserver->AddObserverL(aUid, this); + TServerResources::iObserver->AddSharedRepositoryInfoL(aUid); } void CServerRepository::Close() @@ -411,7 +398,6 @@ { if(err == KErrNoMemory) { - repository->Close(); User::LeaveNoMemory(); } else @@ -666,27 +652,21 @@ // Create install rep for merging CSharedRepository *installRep = 0; - TRAPD( err, TServerResources::iObserver->LoadRepositoryLC(aUid, ETrue, installRep, CIniFileIn::EInstallOnly); CleanupStack::Pop(installRep) ); + TServerResources::iObserver->LoadRepositoryLC(aUid, ETrue, installRep, CIniFileIn::EInstallOnly); - if (err == KErrNone) - { - // Perform merge - TRAP( err, iRepository->HandleUpdateMergeL(aModified, *installRep) ); - } - if (installRep!=NULL) - { - delete installRep; - } - Close(); - User::LeaveIfError(err); + // Perform merge + iRepository->HandleUpdateMergeL(aModified, *installRep); + + CleanupStack::PopAndDestroy(installRep); + Close(); } else // No ROM or persists { // Create install rep for persisting OpenL(aUid, aNotifier); - TRAPD(err, iRepository->CommitChangesL()); - Close(); - User::LeaveIfError(err); + + iRepository->CommitChangesL(); + Close(); } } @@ -718,19 +698,13 @@ // Create ROM rep for merging CSharedRepository *romRep = 0; - TRAPD( err, TServerResources::iObserver->LoadRepositoryLC(aUid, ETrue, romRep, CIniFileIn::ERomOnly); CleanupStack::Pop(romRep) ); + TServerResources::iObserver->LoadRepositoryLC(aUid, ETrue, romRep, CIniFileIn::ERomOnly); - if (err == KErrNone) - { - // Perform merge - TRAP( err, iRepository->HandleDeleteMergeL(*romRep) ); - } - if (romRep!=NULL) - { - delete romRep; - } + // Perform merge + iRepository->HandleDeleteMergeL(*romRep); + + CleanupStack::PopAndDestroy(romRep); Close(); - User::LeaveIfError(err); } else // No ROM file, this is a complete uninstall { @@ -1014,24 +988,24 @@ iRepository = NULL; } -TInt CServerRepository::CheckAccessPolicyBeforeMoving(const TClientRequest& aMessage, const TServerSetting* aSourceSetting, - TUint32 aSourceKey, const TServerSetting* aTargetSetting, TUint32 aTargetKey, TUint32& aErrorKey) +TInt CServerRepository::CheckAccessPolicyBeforeMoving(const TClientRequest& aMessage, const TServerSetting& aSourceSetting, + TUint32 aSourceKey, const TServerSetting& aTargetSetting, TUint32 aTargetKey, TUint32& aErrorKey) { TInt error = KErrNone; - if (aTargetSetting && !aTargetSetting->IsDeleted()) + if (&aTargetSetting && !aTargetSetting.IsDeleted()) { error=KErrAlreadyExists; aErrorKey=aTargetKey; } - if (!aMessage.CheckPolicy(GetReadAccessPolicy(*aSourceSetting), + if (!aMessage.CheckPolicy(GetReadAccessPolicy(aSourceSetting), __PLATSEC_DIAGNOSTIC_STRING("CenRep: CServerRepository::MoveL - Attempt made to read a setting"))) { error = KErrPermissionDenied; aErrorKey = aSourceKey; } - else if (!aMessage.CheckPolicy(GetWriteAccessPolicy(*aSourceSetting), + else if (!aMessage.CheckPolicy(GetWriteAccessPolicy(aSourceSetting), __PLATSEC_DIAGNOSTIC_STRING("CenRep: CServerRepository::MoveL - Attempt made to delete a setting"))) { error = KErrPermissionDenied; @@ -1040,7 +1014,7 @@ else if (error == KErrAlreadyExists) { // set error to KErrPermissionDenied in preference to KErrAlreadyExists - if (!aMessage.CheckPolicy(GetWriteAccessPolicy(*aTargetSetting), + if (!aMessage.CheckPolicy(GetWriteAccessPolicy(aTargetSetting), __PLATSEC_DIAGNOSTIC_STRING("CenRep: CServerRepository::MoveL - Attempt made to create a setting"))) { error = KErrPermissionDenied; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.h --- a/persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/cenrepsrv/srvrepos_noc.h Wed Sep 01 12:39:58 2010 +0100 @@ -107,8 +107,8 @@ TInt CheckPermissions(RSettingPointerArray& aSettings, const TClientRequest& aMessage, const char* aDiagnostic,TBool aReadPolicy,TUint32& aErrId); - TInt CheckAccessPolicyBeforeMoving(const TClientRequest& aMessage, const TServerSetting* aSourceSetting, TUint32 aSourceKey, - const TServerSetting* aTargetSetting, TUint32 aTargetKey, TUint32& aErrorKey); + TInt CheckAccessPolicyBeforeMoving(const TClientRequest& aMessage, const TServerSetting& aSourceSetting, TUint32 aSourceKey, + const TServerSetting& aTargetSetting, TUint32 aTargetKey, TUint32& aErrorKey); TInt CheckMovePermissions(const RSettingPointerArray& aSourceSettings,const TClientRequest& aMessage,TUint aSourceToTarget,TUint32& aErrorKey) { @@ -121,7 +121,7 @@ TUint32 targetKey = sourceKey ^ aSourceToTarget; TServerSetting* targetSetting = GetSetting(targetKey); - error = CheckAccessPolicyBeforeMoving(aMessage, sourceSetting, sourceKey, targetSetting, targetKey, aErrorKey); + error = CheckAccessPolicyBeforeMoving(aMessage, *sourceSetting, sourceKey, *targetSetting, targetKey, aErrorKey); } return error; } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/group/CenRepFotaTvRTests.iby --- a/persistentstorage/centralrepository/group/CenRepFotaTvRTests.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/group/CenRepFotaTvRTests.iby Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -28,10 +28,8 @@ // centrep techview test files #ifdef SYMBIAN_BAFL_SYSUTIL - #ifdef CENTREP_MW_TESTS - file=ABI_DIR\BUILD_DIR\t_cenrep_fota_hw_setup.exe test\t_cenrep_fota_hw_setup.exe - file=ABI_DIR\BUILD_DIR\t_cenrep_fota_hw_tests.exe test\t_cenrep_fota_hw_tests.exe - #endif // CENTREP_MW_TESTS +file=ABI_DIR\BUILD_DIR\t_cenrep_fota_hw_setup.exe test\t_cenrep_fota_hw_setup.exe +file=ABI_DIR\BUILD_DIR\t_cenrep_fota_hw_tests.exe test\t_cenrep_fota_hw_tests.exe #endif #ifdef SYMBIAN_BAFL_SYSUTIL diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/group/CentralRepositoryTechviewFlashPerformance.iby --- a/persistentstorage/centralrepository/group/CentralRepositoryTechviewFlashPerformance.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/group/CentralRepositoryTechviewFlashPerformance.iby Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -24,9 +24,7 @@ // centrep techview test files #ifdef SYMBIAN_BAFL_SYSUTIL // cenrep test exes -#ifdef CENTREP_MW_TESTS - file=ABI_DIR\BUILD_DIR\t_cenrep_fota_perf1.exe test\t_cenrep_fota_perf1.exe -#endif // CENTREP_MW_TESTS +file=ABI_DIR\BUILD_DIR\t_cenrep_fota_perf1.exe test\t_cenrep_fota_perf1.exe file=ABI_DIR\BUILD_DIR\t_cenrep_fota_perf2.exe test\t_cenrep_fota_perf2.exe #ifndef __CENTRALREPOSITORYTECHVIEWRTESTS_IBY__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/group/CentralRepositoryTechviewRTests.iby --- a/persistentstorage/centralrepository/group/CentralRepositoryTechviewRTests.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/group/CentralRepositoryTechviewRTests.iby Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -19,19 +19,13 @@ REM Central Repository Tests that require Techview. #ifdef SYMBIAN_BAFL_SYSUTIL - #ifdef CENTREP_MW_TESTS - #include - #endif // CENTREP_MW_TESTS + #include #endif // SYMBIAN_BAFL_SYSUTIL -#ifdef CENTREP_MW_TESTS - file=ABI_DIR\BUILD_DIR\t_cenrep_back_rest_defect.exe test\t_cenrep_back_rest_defect.exe -#endif // CENTREP_MW_TESTS - +file=ABI_DIR\BUILD_DIR\t_cenrep_back_rest_defect.exe test\t_cenrep_back_rest_defect.exe + #ifdef SYMBIAN_BAFL_SYSUTIL - #ifdef CENTREP_MW_TESTS - file=ABI_DIR\BUILD_DIR\t_cenrep_fotaut.exe test\t_cenrep_fotaut.exe - #endif // CENTREP_MW_TESTS + file=ABI_DIR\BUILD_DIR\t_cenrep_fotaut.exe test\t_cenrep_fotaut.exe #endif // SYMBIAN_BAFL_SYSUTIL #ifndef __CENTREPTESTDATA_IBY__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/group/CentralRepositoryTests.bat --- a/persistentstorage/centralrepository/group/CentralRepositoryTests.bat Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/group/CentralRepositoryTests.bat Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,5 @@ -@rem Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +@rem +@rem Copyright (c) 2009 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" @@ -11,21 +12,18 @@ @rem Contributors: @rem @rem Description: -@rem Batch file to run all the Central Repository textshell RTests. +@rem -t_centrep_notifier_handler.exe -t_cenrep_cache.exe +t_cenrep.exe t_cenrep_perf.exe -t_cenrep.exe +t_cenrep_rfs.exe t_cenreptrans.exe t_cenrep_platsec.exe t_cenrep_preq752.exe t_cenrep_transactions.exe t_cenrep_defects.exe -t_cenrep_meta.exe -t_cenrep_rfs.exe t_cenrep_back_rest.exe t_cenrep_back_rest_delete.exe t_oomcenrepsrv.exe -t_cenrep_preq2112u.exe -t_cenrep_preq2112.exe +t_cenrep_cache.exe +t_cenrep_preq2112.exe \ No newline at end of file diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/group/bld.inf --- a/persistentstorage/centralrepository/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2004-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" @@ -14,14 +14,14 @@ // PRJ_EXPORTS -../include/centralrepository.h OS_LAYER_PUBLIC_EXPORT_PATH(centralrepository.h) +../include/centralrepository.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(centralrepository.h) #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS - #ifdef SYMBIAN_OLD_EXPORT_LOCATION - ../include/centralrepositoryinternal.h /epoc32/include/centralrepositoryinternal.h - #endif +#ifdef SYMBIAN_OLD_EXPORT_LOCATION +../include/centralrepositoryinternal.h /epoc32/include/centralrepositoryinternal.h #endif -centralrepository.iby /epoc32/rom/include/centralrepository.iby -backup_registration.xml z:/private/10202be9/backup_registration.xml +#endif +centralrepository.iby /epoc32/rom/include/centralrepository.iby +backup_registration.xml z:/private/10202be9/backup_registration.xml PRJ_MMPFILES @@ -32,40 +32,12 @@ #endif // WINS #ifdef SYMBIAN_CENREPNOTIFIERHANDLER - // Core OS extension + //Core OS extension #include "../cenrepnotifierhandler/group/bld.inf" #endif // SYMBIAN_CENREPNOTIFIERHANDLER PRJ_TESTEXPORTS -// Stub sis file required by various tests. - -//define PDS_FULL_UI_TEST in the rom build command for Full S60 UI build -#if defined(__SERIES60_) && defined(PDS_FULL_UI_TEST) -../test/testexecute/SWI/data/rnd_sis/centrepswiteststub.sis z:/system/install/centrepswiteststub.sis -#else -../test/testexecute/SWI/data/techview_sis/centrepswiteststub.sis z:/system/install/centrepswiteststub.sis -#endif //__SERIES60_ - -CentralRepositoryTests.bat /epoc32/data/z/system/test/centralrepositorytests.bat -centrepswiteststub.iby /epoc32/rom/include/centrepswiteststub.iby -CentralRepositoryTests.iby /epoc32/rom/include/centralrepositorytests.iby -CentralRepositoryTechviewRTests.iby /epoc32/rom/include/centralrepositorytechviewrtests.iby -centreptesthelper.iby /epoc32/rom/include/centreptesthelper.iby -centreptestdata.iby /epoc32/rom/include/centreptestdata.iby - -// For pccenrep tests. -../pccenrep/include/centralrepository.h OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/centralrepository.h) - -../test/testexecute/SWI/data/certstore/swicertstore.dat z:/resource/versions/swicertstore.dat - -#ifdef SYMBIAN_BAFL_SYSUTIL - //CenRepFotaTvRTests.iby and CentralRepositoryTechviewFlashPerformance.iby are manual tests only. - CenRepFotaTvRTests.iby /epoc32/rom/include/cenrepfotatvrtests.iby - CentralRepositoryTechviewFlashPerformance.iby /epoc32/rom/include/centralrepositorytechviewflashperformance.iby - ../test/t_cenrep_runtxtshellflashtests.bat /epoc32/data/z/system/test/t_cenrep_runtxtshellflashtests.bat - ../test/t_cenrep_runtvflashtests.bat /epoc32/data/z/system/test/t_cenrep_runtvflashtests.bat -#endif // SYMBIAN_BAFL_SYSUTIL ../test/00000100.crb z:/private/10202be9/00000100.crb ../test/00000005.cra z:/private/10202be9/00000005.cra @@ -176,23 +148,14 @@ ../test/sw.txt z:/resource/versions/sw.txt ../test/00000003.txt z:/private/102081e4/00000003.txt ../test/00112273.txt z:/private/10202be9/00112273.txt - -//define PDS_FULL_UI_TEST in the rom build command for Full S60 UI build -#if defined(__SERIES60_) && defined(PDS_FULL_UI_TEST) -../test/rnd_RF1.sis z:/private/10202be9/rf1.sis -../test/rnd_RF2.sis z:/private/10202be9/rf2.sis -../test/rnd_RF3.sis z:/private/10202be9/rf3.sis -../test/rnd_RF4.sis z:/private/10202be9/rf4.sis -#else -../test/techview_RF1.sis z:/private/10202be9/rf1.sis -../test/techview_RF2.sis z:/private/10202be9/rf2.sis -../test/techview_RF3.sis z:/private/10202be9/rf3.sis -../test/techview_RF4.sis z:/private/10202be9/rf4.sis -#endif //__SERIES60_ +../test/RF1.sis z:/private/10202be9/rf1.sis +../test/RF2.sis z:/private/10202be9/rf2.sis +../test/RF3.sis z:/private/10202be9/rf3.sis +../test/RF4.sis z:/private/10202be9/rf4.sis +../test/testexecute/SWI/data/certstore/swicertstore.dat z:/resource/versions/swicertstore.dat #ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS // Multi Rofs testing -centreptestdata_multirofs.iby /epoc32/rom/include/centreptestdata_multirofs.iby ../test/multirofs/testrepository/aaaa0000.txt z:/private/10202be9/aaaa0000.txt ../test/multirofs/testrepository/aaaa0000.txt{01-00} z:/private/10202be9/aaaa0000.txt[01-00] ../test/multirofs/testrepository/bbbb0000.txt z:/private/10202be9/bbbb0000.txt @@ -1437,8 +1400,34 @@ ../test/multirofs/2112_test_keyspaces/102869bc.cre{01-00} z:/private/10202be9/102869bc.cre[01-00] ../test/multirofs/2112_test_keyspaces/102869bd.cre{01-00} z:/private/10202be9/102869bd.cre[01-00] ../test/multirofs/2112_test_keyspaces/102869be.cre{01-00} z:/private/10202be9/102869be.cre[01-00] + #endif // SYMBIAN_CENTREP_SUPPORT_MULTIROFS +// Stub sis file required by various tests. +../test/testexecute/SWI/data/centrepswiteststub.SIS /epoc32/release/winscw/urel/z/system/install/centrepswiteststub.sis +../test/testexecute/SWI/data/centrepswiteststub.SIS /epoc32/release/winscw/udeb/z/system/install/centrepswiteststub.sis + +CentralRepositoryTests.bat /epoc32/data/z/system/test/centralrepositorytests.bat +centrepswiteststub.iby /epoc32/rom/include/centrepswiteststub.iby +CentralRepositoryTests.iby /epoc32/rom/include/centralrepositorytests.iby +CentralRepositoryTechviewRTests.iby /epoc32/rom/include/centralrepositorytechviewrtests.iby +centreptesthelper.iby /epoc32/rom/include/centreptesthelper.iby +centreptestdata.iby /epoc32/rom/include/centreptestdata.iby +#ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS + centreptestdata_multirofs.iby /epoc32/rom/include/centreptestdata_multirofs.iby +#endif // SYMBIAN_CENTREP_SUPPORT_MULTIROFS + +#ifdef SYMBIAN_BAFL_SYSUTIL + //CenRepFotaTvRTests.iby and CentralRepositoryTechviewFlashPerformance.iby are manual tests only. + CenRepFotaTvRTests.iby /epoc32/rom/include/cenrepfotatvrtests.iby + CentralRepositoryTechviewFlashPerformance.iby /epoc32/rom/include/centralrepositorytechviewflashperformance.iby + ../test/t_cenrep_runtxtshellflashtests.bat /epoc32/data/z/system/test/t_cenrep_runtxtshellflashtests.bat + ../test/t_cenrep_runtvflashtests.bat /epoc32/data/z/system/test/t_cenrep_runtvflashtests.bat +#endif // SYMBIAN_BAFL_SYSUTIL + +// for pccenrep tests +../pccenrep/include/centralrepository.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/centralrepository.h) + PRJ_TESTMMPFILES t_cenrep_helper.mmp support @@ -1453,38 +1442,26 @@ t_cenrep_meta.mmp t_cenrep_rfs.mmp t_cenrep_back_rest.mmp -#ifdef CENTREP_MW_TESTS - t_cenrep_back_rest_defect.mmp manual -#endif // CENTREP_MW_TESTS +t_cenrep_back_rest_defect.mmp manual t_cenrep_back_rest_delete.mmp t_oomcenrepsrv.mmp t_processkillprocess.mmp support #ifdef SYMBIAN_BAFL_SYSUTIL - #ifdef CENTREP_MW_TESTS - t_cenrep_fota_tvem1.mmp manual - #endif // CENTREP_MW_TESTS - - t_cenrep_fota_tvem2.mmp manual + t_cenrep_fota_tvem1.mmp manual + t_cenrep_fota_tvem2.mmp manual + t_cenrep_fota_tvem3.mmp manual + t_cenrep_fota_txtem1.mmp manual + t_cenrep_fota_txtem2.mmp manual + t_cenrep_fotaUT.mmp manual - #ifdef CENTREP_MW_TESTS - t_cenrep_fota_tvem3.mmp manual - t_cenrep_fota_txtem1.mmp manual - t_cenrep_fota_txtem2.mmp manual - t_cenrep_fotaUT.mmp manual - #endif // CENTREP_MW_TESTS + #ifdef __CENTREP_SERVER_PERFTEST__ + t_cenrep_fota_perf1.mmp manual + t_cenrep_fota_perf2.mmp manual + #endif // __CENTREP_SERVER_PERFTEST__ - #ifdef __CENTREP_SERVER_PERFTEST__ - #ifdef CENTREP_MW_TESTS - t_cenrep_fota_perf1.mmp manual - #endif // CENTREP_MW_TESTS - t_cenrep_fota_perf2.mmp manual - #endif // __CENTREP_SERVER_PERFTEST__ - - #ifdef CENTREP_MW_TESTS - t_cenrep_fota_hw_setup.mmp manual - t_cenrep_fota_hw_tests.mmp manual - #endif // CENTREP_MW_TESTS + t_cenrep_fota_hw_setup.mmp manual + t_cenrep_fota_hw_tests.mmp manual #endif // SYMBIAN_BAFL_SYSUTIL diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/group/centralrepository.iby --- a/persistentstorage/centralrepository/group/centralrepository.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/group/centralrepository.iby Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ #include -data=ZPRIVATE\10202be9\backup_registration.xml PRIVATE\10202BE9\backup_registration.xml +data=ZPRIVATE\10202BE9\backup_registration.xml PRIVATE\10202BE9\backup_registration.xml #ifdef SYMBIAN_CENREPNOTIFIERHANDLER //Core OS extension diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/group/centrepswiteststub.iby --- a/persistentstorage/centralrepository/group/centrepswiteststub.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/group/centrepswiteststub.iby Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -16,6 +16,6 @@ #ifndef __CENTREPSWITESTSTUB_IBY__ #define __CENTREPSWITESTSTUB_IBY__ -data=DATAZ_\system\install\centrepswiteststub.sis system\install\centrepswiteststub.sis +data=EPOCROOT##Epoc32\release\winscw\udeb\z\System\Install\centrepswiteststub.sis System\Install\centrepswiteststub.sis #endif // __CENTREPSWITESTSTUB_IBY__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/group/centreptestdata.iby --- a/persistentstorage/centralrepository/group/centreptestdata.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/group/centreptestdata.iby Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -104,12 +104,6 @@ #ifndef __CENTRALREPOSITORYTECHVIEWRTESTS_IBY__ data=DATAZ_\PRIVATE\10202BE9\babababa.txt PRIVATE\10202BE9\babababa.txt -#ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS - #ifdef PDS_TEST_MULTIROFS - // Emulated multirofs regression testing. - data=DATAZ_\private\10202be9\babababa.txt private\10202be9\babababa.txt[01-00] - #endif // PDS_TEST_MULTIROFS -#endif // SYMBIAN_CENTREP_SUPPORT_MULTIROFS #ifdef SYMBIAN_BAFL_SYSUTIL #include data=DATAZ_\PRIVATE\10202BE9\10033333.txt PRIVATE\10202BE9\10033333.txt @@ -125,24 +119,13 @@ data=DATAZ_\PRIVATE\10202BE9\10043337.txt PRIVATE\10202BE9\10043337.txt data=DATAZ_\PRIVATE\10202BE9\10043338.txt PRIVATE\10202BE9\10043338.txt data=DATAZ_\PRIVATE\10202BE9\10033333_modified.cre PRIVATE\10202BE9\10033333_modified.cre -data=DATAZ_\private\10202be9\cabacaba.txt private\10202be9\cabacaba.txt -data=DATAZ_\private\10202be9\cadacada.txt private\10202be9\cadacada.txt -#ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS - #ifdef PDS_TEST_MULTIROFS - //Emulated multirofs regression testing - data=DATAZ_\private\10202be9\10033333.txt private\10202be9\10033333.txt[01-00] - data=DATAZ_\private\10202be9\10043336.txt private\10202be9\10043336.txt[01-00] - data=DATAZ_\private\10202be9\10043337.txt private\10202be9\10043337.txt[01-00] - data=DATAZ_\private\10202be9\10043338.txt private\10202be9\10043338.txt[01-00] - #endif // PDS_TEST_MULTIROFS -#endif // SYMBIAN_CENTREP_SUPPORT_MULTIROFS #ifndef __TE_SYSUTILTEFTESTS_IBY__ data=DATAZ_\RESOURCE\versions\sw.txt RESOURCE\versions\sw.txt -#endif // __TE_SYSUTILTEFTESTS_IBY__ +#endif data=DATAZ_\PRIVATE\10202BE9\sw_modified.txt PRIVATE\10202BE9\sw_modified.txt data=DATAZ_\PRIVATE\10202BE9\sw_modified1.txt PRIVATE\10202BE9\sw_modified1.txt data=DATAZ_\PRIVATE\10202BE9\RF1.sis PRIVATE\10202BE9\RF1.sis data=DATAZ_\PRIVATE\10202BE9\RF4.sis PRIVATE\10202BE9\RF4.sis -#endif // SYMBIAN_BAFL_SYSUTIL -#endif // __CENTRALREPOSITORYTECHVIEWRTESTS_IBY__ +#endif +#endif #endif //__CENTREPTESTDATA_IBY__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/group/t_cenrep_back_rest.mmp --- a/persistentstorage/centralrepository/group/t_cenrep_back_rest.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/group/t_cenrep_back_rest.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -28,7 +28,7 @@ target t_cenrep_back_rest.exe targettype exe -OS_LAYER_SYSTEMINCLUDE_SYMBIAN +MW_LAYER_SYSTEMINCLUDE_SYMBIAN OS_LAYER_LIBC_SYSTEMINCLUDE USERINCLUDE ../cenrepsrv ../common/inc diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/group/t_cenrep_back_rest_delete.mmp --- a/persistentstorage/centralrepository/group/t_cenrep_back_rest_delete.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/group/t_cenrep_back_rest_delete.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -25,7 +25,7 @@ target t_cenrep_back_rest_delete.exe targettype exe -OS_LAYER_SYSTEMINCLUDE_SYMBIAN +MW_LAYER_SYSTEMINCLUDE_SYMBIAN OS_LAYER_LIBC_SYSTEMINCLUDE USERINCLUDE ../cenrepsrv ../common/inc diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/group/t_cenrep_defects.mmp --- a/persistentstorage/centralrepository/group/t_cenrep_defects.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/group/t_cenrep_defects.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2004-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" @@ -21,7 +21,7 @@ target t_cenrep_defects.exe targettype exe -OS_LAYER_SYSTEMINCLUDE_SYMBIAN +MW_LAYER_SYSTEMINCLUDE_SYMBIAN USERINCLUDE ../cenrepsrv USERINCLUDE ../common/inc diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/group/t_cenrep_fota_perf2.mmp --- a/persistentstorage/centralrepository/group/t_cenrep_fota_perf2.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/group/t_cenrep_fota_perf2.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -21,7 +21,7 @@ target t_cenrep_fota_perf2.exe targettype exe -OS_LAYER_SYSTEMINCLUDE_SYMBIAN +MW_LAYER_SYSTEMINCLUDE_SYMBIAN USERINCLUDE ../cenrepsrv USERINCLUDE ../common/inc diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/pccenrep/group/bld.inf --- a/persistentstorage/centralrepository/pccenrep/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/pccenrep/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -18,7 +18,7 @@ PRJ_EXPORTS -../include/centralrepository.h OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/centralrepository.h) +../include/centralrepository.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/centralrepository.h) PRJ_TESTEXPORTS diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/RF1.sis Binary file persistentstorage/centralrepository/test/RF1.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/RF2.sis Binary file persistentstorage/centralrepository/test/RF2.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/RF3.sis Binary file persistentstorage/centralrepository/test/RF3.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/RF4.sis Binary file persistentstorage/centralrepository/test/RF4.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/doflashsis.bat --- a/persistentstorage/centralrepository/test/doflashsis.bat Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/test/doflashsis.bat Wed Sep 01 12:39:58 2010 +0100 @@ -19,21 +19,13 @@ rem Make and sign the RF1 package. makesis RF1.pkg -makesis RF2.pkg -makesis RF3.pkg -makesis RF4.pkg +signsis -S RF1.sis RF1.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key -signsis -S RF1.sis techview_RF1.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key -signsis -S RF2.sis techview_RF2.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key -signsis -S RF3.sis techview_RF3.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key -signsis -S RF4.sis techview_RF4.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key +makesis RF2.pkg +signsis -S RF2.sis RF2.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key -signsis -S RF1.sis rnd_RF1.sis testexecute\SWI\data\certstore\Nokia_RnDCert_02.der testexecute\SWI\data\certstore\Nokia_RnDCert_02.key -signsis -S RF2.sis rnd_RF2.sis testexecute\SWI\data\certstore\Nokia_RnDCert_02.der testexecute\SWI\data\certstore\Nokia_RnDCert_02.key -signsis -S RF3.sis rnd_RF3.sis testexecute\SWI\data\certstore\Nokia_RnDCert_02.der testexecute\SWI\data\certstore\Nokia_RnDCert_02.key -signsis -S RF4.sis rnd_RF4.sis testexecute\SWI\data\certstore\Nokia_RnDCert_02.der testexecute\SWI\data\certstore\Nokia_RnDCert_02.key +makesis RF3.pkg +signsis -S RF3.sis RF3.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key -del /f RF1.sis -del /f RF2.sis -del /f RF3.sis -del /f RF4.sis +makesis RF4.pkg +signsis -S RF4.sis RF4.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/multirofs/group/t_cenrep_preq2112.mmp --- a/persistentstorage/centralrepository/test/multirofs/group/t_cenrep_preq2112.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/test/multirofs/group/t_cenrep_preq2112.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -22,7 +22,7 @@ UID 0 0x1020FFFF -OS_LAYER_SYSTEMINCLUDE_SYMBIAN +MW_LAYER_SYSTEMINCLUDE_SYMBIAN USERINCLUDE ../../../cenrepsrv USERINCLUDE ../../../common/inc diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/multirofs/group/t_cenrep_preq2112perf.mmp --- a/persistentstorage/centralrepository/test/multirofs/group/t_cenrep_preq2112perf.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/test/multirofs/group/t_cenrep_preq2112perf.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -22,7 +22,7 @@ target t_cenrep_preq2112perf.exe targettype exe -OS_LAYER_SYSTEMINCLUDE_SYMBIAN +MW_LAYER_SYSTEMINCLUDE_SYMBIAN USERINCLUDE ../../../cenrepsrv USERINCLUDE ../../../common/inc diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/multirofs/group/t_cenrep_preq2112u.mmp --- a/persistentstorage/centralrepository/test/multirofs/group/t_cenrep_preq2112u.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/test/multirofs/group/t_cenrep_preq2112u.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -19,7 +19,7 @@ target t_cenrep_preq2112u.exe targettype exe -OS_LAYER_SYSTEMINCLUDE_SYMBIAN +MW_LAYER_SYSTEMINCLUDE_SYMBIAN USERINCLUDE ../../../cenrepsrv USERINCLUDE ../../../common/inc diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/rnd_RF1.sis Binary file persistentstorage/centralrepository/test/rnd_RF1.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/rnd_RF2.sis Binary file persistentstorage/centralrepository/test/rnd_RF2.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/rnd_RF3.sis Binary file persistentstorage/centralrepository/test/rnd_RF3.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/rnd_RF4.sis Binary file persistentstorage/centralrepository/test/rnd_RF4.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/t_cenrep_back_rest.cpp --- a/persistentstorage/centralrepository/test/t_cenrep_back_rest.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/test/t_cenrep_back_rest.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -13,9 +13,13 @@ // Description: // +//#include #include #include #include +#include +#include + #include "srvrepos_noc.h" #include "srvres.h" #include "cachemgr.h" diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/t_cenrep_back_rest_delete.cpp --- a/persistentstorage/centralrepository/test/t_cenrep_back_rest_delete.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/test/t_cenrep_back_rest_delete.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -17,6 +17,9 @@ #include #include #include +#include +#include + #include "srvrepos_noc.h" #include "srvres.h" #include "cachemgr.h" diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/t_cenrep_rfs.cpp --- a/persistentstorage/centralrepository/test/t_cenrep_rfs.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/test/t_cenrep_rfs.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -73,17 +73,6 @@ #define TEST(arg) ::CheckL((arg), __LINE__) #define TEST2(aValue, aExpected) ::CheckL(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); - } //This function restores the state of the files required for this test //Existing files are deleted and then the required files are copied @@ -633,7 +622,6 @@ { 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. RestoreFactorySettingsTestL(); PDEF105203(); RFSRomOnlyL(); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/techview_RF1.sis Binary file persistentstorage/centralrepository/test/techview_RF1.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/techview_RF2.sis Binary file persistentstorage/centralrepository/test/techview_RF2.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/techview_RF3.sis Binary file persistentstorage/centralrepository/test/techview_RF3.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/techview_RF4.sis Binary file persistentstorage/centralrepository/test/techview_RF4.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/BUR/group/Te_centrep_BURsuite.mmp --- a/persistentstorage/centralrepository/test/testexecute/BUR/group/Te_centrep_BURsuite.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/test/testexecute/BUR/group/Te_centrep_BURsuite.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -32,11 +32,15 @@ USERINCLUDE ../src OS_LAYER_SYSTEMINCLUDE_SYMBIAN +//SYSTEMINCLUDE /epoc32/include/test LIBRARY euser.lib LIBRARY testexecuteutils.lib LIBRARY testexecutelogclient.lib + +//LIBRARY efsrv.lib LIBRARY centralrepository.lib +//LIBRARY bafl.lib CAPABILITY ALL -Tcb diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/BUR/group/te_centrep_burobserversuite.mmp --- a/persistentstorage/centralrepository/test/testexecute/BUR/group/te_centrep_burobserversuite.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/test/testexecute/BUR/group/te_centrep_burobserversuite.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -29,11 +29,15 @@ USERINCLUDE ../src OS_LAYER_SYSTEMINCLUDE_SYMBIAN +//SYSTEMINCLUDE /epoc32/include/test LIBRARY euser.lib LIBRARY testexecuteutils.lib LIBRARY testexecutelogclient.lib + +//LIBRARY efsrv.lib LIBRARY centralrepository.lib +//LIBRARY bafl.lib CAPABILITY ALL -Tcb diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/APPXs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/APPXs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/APPY1s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/APPY1s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/APPY2s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/APPY2s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/APPYs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/APPYs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KP12s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP12s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KP14s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP14s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KP2.SIS Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP2.SIS has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KP22s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP22s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KP23s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP23s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KP2s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP2s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KP3.SIS Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP3.SIS has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KP3s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP3s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KP41s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP41s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KP4s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP4s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KP62s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP62s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KPS14s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KPS14s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KPS4s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KPS4s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KPS64s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KPS64s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KS12s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS12s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KS14s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS14s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KS2.SIS Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS2.SIS has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KS22s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS22s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KS2s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS2s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KS3s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS3s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KS41s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS41s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KS4s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS4s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KS51s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS51s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KS62s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS62s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KSDs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KSDs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KSY1s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KSY1s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KSY2s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KSY2s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/KSYs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KSYs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/centrepswiteststub.SIS Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/centrepswiteststub.SIS has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/certstore/Nokia_RnDCert_02.der Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/certstore/Nokia_RnDCert_02.der has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/certstore/Nokia_RnDCert_02.key --- a/persistentstorage/centralrepository/test/testexecute/SWI/data/certstore/Nokia_RnDCert_02.key Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQC/TDP7KKIaf5+uW4OD2iVZuUMC2a+SeQTjf6srlKcOm+CpPNXn -uLNm/8fdEnyOIuRXPRKmqhs1n0JkxEGHynELWMTuKXbQx9SRAGUXzyneGn+IJNnO -vOKHWgKCouX2hfI8rtkdqJpqmO460gGsMgw+lsbeyWyW9lnfLxq+ZC7sqQIDAQAB -AoGBALmUWZE8GBaQ3P4u9WUCSd3DJkkrmXIFSULSZeH/chlwCwDjbbhArHothVzo -REE3hEFFlERvHbplZ+mNouzy7boduvgUzbksGrbGMLJ2qO1GzWWVwV+GzOWKd3ss -/98Gwoy5R8pjnkqUE2wP1iJFw0FjvUTKcYv/z6t3LLJ0CsoBAkEA+c7ixvsviQ3J -s0INytCKU2bf8fqFQJi1VI82ukxNsujGTQ9upVSjuvqPvWyDvvTdrUBHqO+3qPut -sEh01Q8aiQJBAMQKDJPVRu4ud3mwUfEavzL5EjqwG1k9VCNGYsT4FwtrHcxu1oP/ -pk6M3rIZukqomoEEnHWPMwhrK3fhBqi0OSECQQDr40VXege4FnH5OI2Hj4afHMyp -VdQQXGMWFyopnzXblFz0lXb43cTCIiorR9XcMqNFHybLypkWE5o+lRzlt55pAkBQ -P/zeF5Sts//cpL0mgdh7OVKpC6ZmZaCnwAx2rUhhuDu+kDDoYCLoTOps5fNI1LRK -1GRoC3LMo3Jr5IYhUYWBAkBpCpN6k4JU/mszq98EojHerQNxk8sPqvQKUzTutohT -1gLX9yepGayB/TtT2EEJDkWOlnTy/dvN6W3vzbJYz97x ------END RSA PRIVATE KEY----- diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/dosis.bat --- a/persistentstorage/centralrepository/test/testexecute/SWI/data/dosis.bat Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/test/testexecute/SWI/data/dosis.bat Wed Sep 01 12:39:58 2010 +0100 @@ -1,6 +1,6 @@ @echo off rem -rem Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +rem Copyright (c) 2009 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" @@ -15,126 +15,120 @@ 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 - rem The stub.. makesis -s centrepswiteststub.pkg rem Make and sign the KS12 package. This modifies the KS1.2 keyspace, which rem is a user mod on the ROM keyspace K1. -makesis KS12.pkg KS12.sis -signsis -S KS12.sis KS12s.sis %2 %3 +makesis KS12.pkg +signsis -S KS12.sis KS12s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KS14 package. -makesis KS14.pkg KS14.sis -signsis -S KS14.sis KS14s.sis %2 %3 +makesis KS14.pkg +signsis -S KS14.sis KS14s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KS2 package. This creates the KS2 keyspace, which rem is new. -makesis KS2.pkg KS2.sis -signsis -S KS2.sis KS2s.sis %2 %3 +makesis KS2.pkg +signsis -S KS2.sis KS2s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KS22 package. This creates the KS22 keyspace, which rem upgrades KS21 (user modified KS2). -makesis KS22.pkg KS22.sis -signsis -S KS22.sis KS22s.sis %2 %3 +makesis KS22.pkg +signsis -S KS22.sis KS22s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KS3 package. This package will fail to install rem because the referenced keyspace file is not in the ROM stub. -makesis KS3.pkg KS3.sis -signsis -S KS3.sis KS3s.sis %2 %3 +makesis KS3.pkg +signsis -S KS3.sis KS3s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KS4 package. This keyspace contains various capabilities rem which we'll test don't change on a further install. -makesis KS4.pkg KS4.sis -signsis -S KS4.sis KS4s.sis %2 %3 +makesis KS4.pkg +signsis -S KS4.sis KS4s.sis certstore\centreproot.pem certstore\centreproot.key rem Installs on top of the above, you might think the capabilities in the rem above would be lost, but no - they are persisted before the caps in this rem package can splat them. -makesis KS41.pkg KS41.sis -signsis -S KS41.sis KS41s.sis %2 %3 +makesis KS41.pkg +signsis -S KS41.sis KS41s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KP4 package. This keyspace contains various capabilities rem which we'll test don't change on a further install. -makesis KP4.pkg KP4.sis -signsis -S KP4.sis KP4s.sis %2 %3 +makesis KP4.pkg +signsis -S KP4.sis KP4s.sis certstore\centreproot.pem certstore\centreproot.key rem Installs on top of the above, you might think the capabilities in the rem above would be lost, but no - they are persisted before the caps in this rem package can splat them. -makesis KP41.pkg KP41.sis -signsis -S KP41.sis KP41s.sis %2 %3 +makesis KP41.pkg +signsis -S KP41.sis KP41s.sis certstore\centreproot.pem certstore\centreproot.key rem SP filenull for uninstalling KP4. -makesis KPS4.pkg KPS4.sis -signsis -S KPS4.sis KPS4s.sis %2 %3 +makesis KPS4.pkg +signsis -S KPS4.sis KPS4s.sis certstore\centreproot.pem certstore\centreproot.key rem Installs on top of the ROM (51551554) -makesis KS51.pkg KS51.sis -signsis -S KS51.sis KS51s.sis %2 %3 +makesis KS51.pkg +signsis -S KS51.sis KS51s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KP2 package. This creates the KP2 keyspace, which rem is new. -makesis KP2.pkg KP2.sis -signsis -S KP2.sis KP2s.sis %2 %3 +makesis KP2.pkg +signsis -S KP2.sis KP2s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KP22 package. This creates the KP22 keyspace, which rem upgrades KP21 (user modified KP2). -makesis KP22.pkg KP22.sis -signsis -S KP22.sis KP22s.sis %2 %3 +makesis KP22.pkg +signsis -S KP22.sis KP22s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KP23 package. -makesis KP23.pkg KP23.sis -signsis -S KP23.sis KP23s.sis %2 %3 +makesis KP23.pkg +signsis -S KP23.sis KP23s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KP12 package. -makesis KP12.pkg KP12.sis -signsis -S KP12.sis KP12s.sis %2 %3 +makesis KP12.pkg +signsis -S KP12.sis KP12s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KP14 package. -makesis KP14.pkg KP14.sis -signsis -S KP14.sis KP14s.sis %2 %3 +makesis KP14.pkg +signsis -S KP14.sis KP14s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KPS14 standard patch, this SP is installed with a rem file-null so the 51551551 keyspace file can be removed. -makesis KPS14.pkg KPS14.sis -signsis -S KPS14.sis KPS14s.sis %2 %3 +makesis KPS14.pkg +signsis -S KPS14.sis KPS14s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KP3 package. This package will fail to install rem because the referenced keyspace file is not in the ROM stub. -makesis KP3.pkg KP3.sis -signsis -S KP3.sis KP3s.sis %2 %3 +makesis KP3.pkg +signsis -S KP3.sis KP3s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KP62 package. -makesis KP62.pkg KP62.sis -signsis -S KP62.sis KP62s.sis %2 %3 +makesis KP62.pkg +signsis -S KP62.sis KP62s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KP62 package. -makesis KS62.pkg KS62.sis -signsis -S KS62.sis KS62s.sis %2 %3 +makesis KS62.pkg +signsis -S KS62.sis KS62s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KPS64 package. -makesis KPS64.pkg KPS64.sis -signsis -S KPS64.sis KPS64s.sis %2 %3 +makesis KPS64.pkg +signsis -S KPS64.sis KPS64s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the KSX package. This is the embedded sis that goes in AppX.sis -makesis KSX.pkg KSX.sis -signsis -S KSX.sis KSXs.sis %2 %3 +makesis KSX.pkg +signsis -S KSX.sis KSXs.sis certstore\centreproot.pem certstore\centreproot.key rem Make the AppX package for the application. This is the sis which contains the rem embedded sis that has the application repository as a Centrep patch. This sis rem is self-signed and conditonally installs the exe file depending on the environment -makesis APPX.pkg APPX.sis +makesis APPX.pkg signsis -S APPX.sis APPXs.sis certstore\appx.cer certstore\appx.key rem Make and sign the KSD package. This contains the corrupt KSD keyspace. -makesis KSD.pkg KSD.sis -signsis -S KSD.sis KSDs.sis %2 %3 +makesis KSD.pkg +signsis -S KSD.sis KSDs.sis certstore\centreproot.pem certstore\centreproot.key rem Make the AppY,1,2 packages for the application. These sis files contain the rem embedded sis that has the application repository as a Centrep patch. This sis @@ -144,48 +138,33 @@ rem The following packages are used for the APP-SP test rem Make and sign the KSY package. This is the embedded PU sis that goes in AppY.sis -makesis KSY.pkg KSY.sis -signsis -S KSY.sis KSYs.sis %2 %3 +makesis KSY.pkg +signsis -S KSY.sis KSYs.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the APPY package. This package will install an APP exe rem a keyspace in an embedded PU package and an SP package to be used for the uninstall -makesis APPY.pkg APPY.sis +makesis APPY.pkg signsis -S APPY.sis APPYs.sis certstore\appx.cer certstore\appx.key rem Make and sign the KSY1 package. This is the embedded PU sis that goes in AppY1.sis -makesis KSY1.pkg KSY1.sis -signsis -S KSY1.sis KSY1s.sis %2 %3 +makesis KSY1.pkg +signsis -S KSY1.sis KSY1s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the APPY1 package. This package will install the APP exe rem a new version of the keyspace in an embedded PU package and an SP package rem to be used for the uninstall -makesis APPY1.pkg APPY1.sis +makesis APPY1.pkg signsis -S APPY1.sis APPY1s.sis certstore\appx.cer certstore\appx.key rem Make and sign the KSY2 package. This is the embedded PU sis that goes in AppY2.sis -makesis KSY2.pkg KSY2.sis -signsis -S KSY2.sis KSY2s.sis %2 %3 +makesis KSY2.pkg +signsis -S KSY2.sis KSY2s.sis certstore\centreproot.pem certstore\centreproot.key rem Make and sign the APPY2 package. This package will install the APP exe rem a new version of the keyspace in an embedded PU package and an SP package rem to be used for the uninstall -makesis APPY2.pkg APPY2.sis +makesis APPY2.pkg signsis -S APPY2.sis APPY2s.sis certstore\appx.cer certstore\appx.key -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 diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/logfile.txt --- a/persistentstorage/centralrepository/test/testexecute/SWI/data/logfile.txt Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,267 +0,0 @@ - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem The stub.. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis -s centrepswiteststub.pkg -Processing centrepswiteststub.pkg... -Created centrepswiteststub.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KS12 package. This modifies the KS1.2 keyspace, which - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem is a user mod on the ROM keyspace K1. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS12.pkg -Processing KS12.pkg... -Created KS12.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS12.sis KS12s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KS14 package. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS14.pkg -Processing KS14.pkg... -Created KS14.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS14.sis KS14s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KS2 package. This creates the KS2 keyspace, which - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem is new. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS2.pkg -Processing KS2.pkg... -Created KS2.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS2.sis KS2s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KS22 package. This creates the KS22 keyspace, which - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem upgrades KS21 (user modified KS2). - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS22.pkg -Processing KS22.pkg... -Created KS22.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS22.sis KS22s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KS3 package. This package will fail to install - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem because the referenced keyspace file is not in the ROM stub. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS3.pkg -Processing KS3.pkg... -Created KS3.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS3.sis KS3s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KS4 package. This keyspace contains various capabilities - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem which we'll test don't change on a further install. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS4.pkg -Processing KS4.pkg... -Created KS4.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS4.sis KS4s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Installs on top of the above, you might think the capabilities in the - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem above would be lost, but no - they are persisted before the caps in this - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem package can splat them. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS41.pkg -Processing KS41.pkg... -Created KS41.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS41.sis KS41s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP4 package. This keyspace contains various capabilities - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem which we'll test don't change on a further install. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP4.pkg -Processing KP4.pkg... -Created KP4.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP4.sis KP4s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Installs on top of the above, you might think the capabilities in the - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem above would be lost, but no - they are persisted before the caps in this - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem package can splat them. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP41.pkg -Processing KP41.pkg... -Created KP41.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP41.sis KP41s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem SP filenull for uninstalling KP4. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KPS4.pkg -Processing KPS4.pkg... -Created KPS4.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KPS4.sis KPS4s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Installs on top of the ROM (51551554) - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS51.pkg -Processing KS51.pkg... -Created KS51.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS51.sis KS51s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP2 package. This creates the KP2 keyspace, which - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem is new. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP2.pkg -Processing KP2.pkg... -Created KP2.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP2.sis KP2s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP22 package. This creates the KP22 keyspace, which - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem upgrades KP21 (user modified KP2). - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP22.pkg -Processing KP22.pkg... -Created KP22.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP22.sis KP22s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP23 package. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP23.pkg -Processing KP23.pkg... -Created KP23.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP23.sis KP23s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP12 package. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP12.pkg -Processing KP12.pkg... -Created KP12.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP12.sis KP12s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP14 package. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP14.pkg -Processing KP14.pkg... -Created KP14.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP14.sis KP14s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KPS14 standard patch, this SP is installed with a - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem file-null so the 51551551 keyspace file can be removed. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KPS14.pkg -Processing KPS14.pkg... -Created KPS14.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KPS14.sis KPS14s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP3 package. This package will fail to install - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem because the referenced keyspace file is not in the ROM stub. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP3.pkg -Processing KP3.pkg... -Created KP3.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP3.sis KP3s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP62 package. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP62.pkg -Processing KP62.pkg... -Created KP62.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP62.sis KP62s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP62 package. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS62.pkg -Processing KS62.pkg... -Created KS62.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS62.sis KS62s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KPS64 package. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KPS64.pkg -Processing KPS64.pkg... -Created KPS64.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KPS64.sis KPS64s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KSX package. This is the embedded sis that goes in AppX.sis - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KSX.pkg -Processing KSX.pkg... -Created KSX.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KSX.sis KSXs.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make the AppX package for the application. This is the sis which contains the - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem embedded sis that has the application repository as a Centrep patch. This sis - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem is self-signed and conditonally installs the exe file depending on the environment - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis APPX.pkg -Processing APPX.pkg... -Created APPX.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S APPX.sis APPXs.sis certstore\appx.cer certstore\appx.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KSD package. This contains the corrupt KSD keyspace. - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KSD.pkg -Processing KSD.pkg... -Created KSD.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KSD.sis KSDs.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make the AppY,1,2 packages for the application. These sis files contain the - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem embedded sis that has the application repository as a Centrep patch. This sis - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem is self-signed and conditonally installs the exe file depending on the environment - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem These SIS files are used to test a standard installation - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem The following packages are used for the APP-SP test - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KSY package. This is the embedded PU sis that goes in AppY.sis - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KSY.pkg -Processing KSY.pkg... -Created KSY.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KSY.sis KSYs.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the APPY package. This package will install an APP exe - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem a keyspace in an embedded PU package and an SP package to be used for the uninstall - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis APPY.pkg -Processing APPY.pkg... -Created APPY.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S APPY.sis APPYs.sis certstore\appx.cer certstore\appx.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KSY1 package. This is the embedded PU sis that goes in AppY1.sis - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KSY1.pkg -Processing KSY1.pkg... -Created KSY1.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KSY1.sis KSY1s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the APPY1 package. This package will install the APP exe - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem a new version of the keyspace in an embedded PU package and an SP package - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem to be used for the uninstall - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis APPY1.pkg -Processing APPY1.pkg... -Created APPY1.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S APPY1.sis APPY1s.sis certstore\appx.cer certstore\appx.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KSY2 package. This is the embedded PU sis that goes in AppY2.sis - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KSY2.pkg -Processing KSY2.pkg... -Created KSY2.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KSY2.sis KSY2s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the APPY2 package. This package will install the APP exe - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem a new version of the keyspace in an embedded PU package and an SP package - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem to be used for the uninstall - -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis APPY2.pkg -Processing APPY2.pkg... -Created APPY2.sis. -Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S APPY2.sis APPY2s.sis certstore\appx.cer certstore\appx.key diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_dosis.bat --- a/persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_dosis.bat Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -@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 - -dosis rnd_sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPX.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPX.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPXs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPXs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPY.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPY.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPY1.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPY1.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPY1s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPY1s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPY2.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPY2.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPY2s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPY2s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPYs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/APPYs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP12.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP12.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP12s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP12s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP14.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP14.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP14s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP14s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP2.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP2.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP22.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP22.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP22s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP22s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP23.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP23.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP23s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP23s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP2s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP2s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP3.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP3.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP3s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP3s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP4.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP4.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP41.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP41.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP41s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP41s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP4s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP4s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP62.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP62.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP62s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KP62s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KPS14.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KPS14.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KPS14s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KPS14s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KPS4.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KPS4.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KPS4s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KPS4s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KPS64.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KPS64.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KPS64s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KPS64s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS12.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS12.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS12s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS12s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS14.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS14.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS14s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS14s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS2.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS2.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS22.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS22.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS22s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS22s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS2s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS2s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS3.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS3.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS3s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS3s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS4.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS4.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS41.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS41.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS41s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS41s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS4s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS4s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS51.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS51.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS51s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS51s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS62.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS62.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS62s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KS62s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSD.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSD.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSDs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSDs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSX.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSX.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSXs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSXs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSY.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSY.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSY1.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSY1.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSY1s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSY1s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSY2.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSY2.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSY2s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSY2s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSYs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/KSYs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/centrepswiteststub.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/centrepswiteststub.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_dosis.bat --- a/persistentstorage/centralrepository/test/testexecute/SWI/data/techview_dosis.bat Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -@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 - -dosis techview_sis certstore\centreproot.pem certstore\centreproot.key diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPX.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPX.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPXs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPXs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPY.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPY.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPY1.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPY1.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPY1s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPY1s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPY2.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPY2.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPY2s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPY2s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPYs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/APPYs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP12.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP12.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP12s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP12s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP14.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP14.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP14s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP14s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP2.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP2.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP22.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP22.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP22s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP22s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP23.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP23.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP23s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP23s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP2s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP2s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP3.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP3.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP3s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP3s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP4.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP4.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP41.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP41.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP41s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP41s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP4s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP4s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP62.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP62.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP62s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KP62s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KPS14.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KPS14.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KPS14s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KPS14s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KPS4.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KPS4.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KPS4s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KPS4s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KPS64.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KPS64.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KPS64s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KPS64s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS12.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS12.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS12s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS12s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS14.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS14.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS14s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS14s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS2.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS2.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS22.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS22.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS22s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS22s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS2s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS2s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS3.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS3.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS3s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS3s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS4.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS4.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS41.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS41.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS41s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS41s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS4s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS4s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS51.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS51.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS51s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS51s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS62.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS62.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS62s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KS62s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSD.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSD.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSDs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSDs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSX.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSX.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSXs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSXs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSY.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSY.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSY1.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSY1.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSY1s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSY1s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSY2.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSY2.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSY2s.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSY2s.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSYs.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/KSYs.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/centrepswiteststub.sis Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/centrepswiteststub.sis has changed diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/SWI/group/bld.inf --- a/persistentstorage/centralrepository/test/testexecute/SWI/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/test/testexecute/SWI/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -65,91 +65,50 @@ ../data/certstore/swicertstore.dat z:/resource/swicertstore.dat ./swicertstoredat.iby /epoc32/rom/include/swicertstoredat.iby - -//define PDS_FULL_UI_TEST in the rom build command for Full S60 UI build -#if defined(__SERIES60_) && defined(PDS_FULL_UI_TEST) - // SP tests... -../data/rnd_sis/KS12s.sis z:/tef_centralrepository/ks12s.sis -../data/rnd_sis/KS14s.sis z:/tef_centralrepository/ks14s.sis -../data/rnd_sis/KS2s.sis z:/tef_centralrepository/ks2s.sis -../data/rnd_sis/KS22s.sis z:/tef_centralrepository/ks22s.sis -../data/rnd_sis/KS3s.sis z:/tef_centralrepository/ks3s.sis -../data/rnd_sis/KS4s.sis z:/tef_centralrepository/ks4s.sis -../data/rnd_sis/KS41s.sis z:/tef_centralrepository/ks41s.sis -../data/rnd_sis/KS51s.sis z:/tef_centralrepository/ks51s.sis -../data/rnd_sis/KS62s.sis z:/tef_centralrepository/ks62s.sis +../data/KS12s.sis z:/tef_centralrepository/ks12s.sis +../data/KS14s.sis z:/tef_centralrepository/ks14s.sis +../data/KS2s.sis z:/tef_centralrepository/ks2s.sis +../data/KS22s.sis z:/tef_centralrepository/ks22s.sis +../data/KS3s.sis z:/tef_centralrepository/ks3s.sis +../data/KS4s.sis z:/tef_centralrepository/ks4s.sis +../data/KS41s.sis z:/tef_centralrepository/ks41s.sis +../data/KS51s.sis z:/tef_centralrepository/ks51s.sis +../data/KS62s.sis z:/tef_centralrepository/ks62s.sis // PU tests... -../data/rnd_sis/KP12s.sis z:/tef_centralrepository/kp12s.sis -../data/rnd_sis/KP14s.sis z:/tef_centralrepository/kp14s.sis -../data/rnd_sis/KPS14s.sis z:/tef_centralrepository/kps14s.sis -../data/rnd_sis/KP2s.sis z:/tef_centralrepository/kp2s.sis -../data/rnd_sis/KP22s.sis z:/tef_centralrepository/kp22s.sis -../data/rnd_sis/KP23s.sis z:/tef_centralrepository/kp23s.sis -../data/rnd_sis/KP3s.sis z:/tef_centralrepository/kp3s.sis -../data/rnd_sis/KP4s.sis z:/tef_centralrepository/kp4s.sis -../data/rnd_sis/KP41s.sis z:/tef_centralrepository/kp41s.sis -../data/rnd_sis/KPS4s.sis z:/tef_centralrepository/kps4s.sis -../data/rnd_sis/KP62s.sis z:/tef_centralrepository/kp62s.sis -../data/rnd_sis/KPS64s.sis z:/tef_centralrepository/kps64s.sis +../data/KP12s.sis z:/tef_centralrepository/kp12s.sis +../data/KP14s.sis z:/tef_centralrepository/kp14s.sis +../data/KPS14s.sis z:/tef_centralrepository/kps14s.sis +../data/KP2s.sis z:/tef_centralrepository/kp2s.sis +../data/KP22s.sis z:/tef_centralrepository/kp22s.sis +../data/KP23s.sis z:/tef_centralrepository/kp23s.sis +../data/KP3s.sis z:/tef_centralrepository/kp3s.sis +../data/KP4s.sis z:/tef_centralrepository/kp4s.sis +../data/KP41s.sis z:/tef_centralrepository/kp41s.sis +../data/KPS4s.sis z:/tef_centralrepository/kps4s.sis +../data/KP62s.sis z:/tef_centralrepository/kp62s.sis +../data/KPS64s.sis z:/tef_centralrepository/kps64s.sis // SWI-BUR tests... -../data/rnd_sis/APPXs.sis z:/tef_centralrepository/appxs.sis +../data/APPXs.sis z:/tef_centralrepository/appxs.sis // SWI-APP tests -../data/rnd_sis/APPYs.sis z:/tef_centralrepository/appys.sis -../data/rnd_sis/KSYs.sis z:/tef_centralrepository/ksys.sis -../data/rnd_sis/APPY1s.sis z:/tef_centralrepository/appy1s.sis -../data/rnd_sis/KSY1s.sis z:/tef_centralrepository/ksy1s.sis -../data/rnd_sis/APPY2s.sis z:/tef_centralrepository/appy2s.sis -../data/rnd_sis/KSY2s.sis z:/tef_centralrepository/ksy2s.sis +../data/APPYs.sis z:/tef_centralrepository/appys.sis + +../data/KSYs.sis z:/tef_centralrepository/ksys.sis + +../data/APPY1s.sis z:/tef_centralrepository/appy1s.sis + +../data/KSY1s.sis z:/tef_centralrepository/ksy1s.sis + +../data/APPY2s.sis z:/tef_centralrepository/appy2s.sis + +../data/KSY2s.sis z:/tef_centralrepository/ksy2s.sis + // SWI defect tests... -../data/rnd_sis/KSDs.sis z:/tef_centralrepository/ksds.sis - -#else - -// SP tests... -../data/techview_sis/KS12s.sis z:/tef_centralrepository/ks12s.sis -../data/techview_sis/KS14s.sis z:/tef_centralrepository/ks14s.sis -../data/techview_sis/KS2s.sis z:/tef_centralrepository/ks2s.sis -../data/techview_sis/KS22s.sis z:/tef_centralrepository/ks22s.sis -../data/techview_sis/KS3s.sis z:/tef_centralrepository/ks3s.sis -../data/techview_sis/KS4s.sis z:/tef_centralrepository/ks4s.sis -../data/techview_sis/KS41s.sis z:/tef_centralrepository/ks41s.sis -../data/techview_sis/KS51s.sis z:/tef_centralrepository/ks51s.sis -../data/techview_sis/KS62s.sis z:/tef_centralrepository/ks62s.sis - -// PU tests... -../data/techview_sis/KP12s.sis z:/tef_centralrepository/kp12s.sis -../data/techview_sis/KP14s.sis z:/tef_centralrepository/kp14s.sis -../data/techview_sis/KPS14s.sis z:/tef_centralrepository/kps14s.sis -../data/techview_sis/KP2s.sis z:/tef_centralrepository/kp2s.sis -../data/techview_sis/KP22s.sis z:/tef_centralrepository/kp22s.sis -../data/techview_sis/KP23s.sis z:/tef_centralrepository/kp23s.sis -../data/techview_sis/KP3s.sis z:/tef_centralrepository/kp3s.sis -../data/techview_sis/KP4s.sis z:/tef_centralrepository/kp4s.sis -../data/techview_sis/KP41s.sis z:/tef_centralrepository/kp41s.sis -../data/techview_sis/KPS4s.sis z:/tef_centralrepository/kps4s.sis -../data/techview_sis/KP62s.sis z:/tef_centralrepository/kp62s.sis -../data/techview_sis/KPS64s.sis z:/tef_centralrepository/kps64s.sis - -// SWI-BUR tests... -../data/techview_sis/APPXs.sis z:/tef_centralrepository/appxs.sis - -// SWI-APP tests -../data/techview_sis/APPYs.sis z:/tef_centralrepository/appys.sis -../data/techview_sis/KSYs.sis z:/tef_centralrepository/ksys.sis -../data/techview_sis/APPY1s.sis z:/tef_centralrepository/appy1s.sis -../data/techview_sis/KSY1s.sis z:/tef_centralrepository/ksy1s.sis -../data/techview_sis/APPY2s.sis z:/tef_centralrepository/appy2s.sis -../data/techview_sis/KSY2s.sis z:/tef_centralrepository/ksy2s.sis - -// SWI defect tests... -../data/techview_sis/KSDs.sis z:/tef_centralrepository/ksds.sis - -#endif //__SERIES60_ +../data/KSDs.sis z:/tef_centralrepository/ksds.sis PRJ_TESTMMPFILES // TestExecute test binaries diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/group/TEF_CentralRepository.iby --- a/persistentstorage/centralrepository/test/testexecute/group/TEF_CentralRepository.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/test/testexecute/group/TEF_CentralRepository.iby Wed Sep 01 12:39:58 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -23,9 +23,7 @@ // // Note also that all these tests are techview tests. -#ifdef CENTREP_MW_TESTS - #include - #include -#endif // CENTREP_MW_TESTS - +#include +#include + #endif // __TEF_CentralRepository_IBY__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/group/bld.inf --- a/persistentstorage/centralrepository/test/testexecute/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/test/testexecute/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -14,11 +14,16 @@ // + +#include "../performance/group/bld.inf" #include "../convtool/group/bld.inf" -#ifdef CENTREP_MW_TESTS - #include "../SWI/group/bld.inf" - #include "../BUR/group/bld.inf" -#endif // CENTREP_MW_TESTS +#include "../SWI/group/bld.inf" +#include "../BUR/group/bld.inf" PRJ_TESTEXPORTS -../group/TEF_CentralRepository.iby /epoc32/rom/include/tef_centralrepository.iby + + +../group/TEF_CentralRepository.iby /epoc32/rom/include/tef_centralrepository.iby + + + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/bwins/CentRepPerfTestU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/bwins/CentRepPerfTestU.DEF Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,3 @@ +EXPORTS + ?NewServer@@YAHXZ @ 1 NONAME ; int NewServer(void) + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/config/perf.ini --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/config/perf.ini Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,15 @@ +[boottest] +TestMode=1 + +[timingtest1] +TestMode=0 +Output=ResultSet1 + +[timingtest2] +TestMode=0 +Output=ResultSet2 + +[Shared] +shared_data_num = 2 +shared_name_1 = ResultSet1 +shared_name_2 = ResultSet2 \ No newline at end of file diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/group/TE_CentRepPerfTest.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/group/TE_CentRepPerfTest.iby Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,33 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef __TE_CENTREP_PERFTEST_IBY__ +#define __TE_CENTREP_PERFTEST_IBY__ + +#include + +// centrep test dlls +#include + +// centrep test data +#include + +file=ABI_DIR\BUILD_DIR\CentRepPerfTest.exe System\bin\CentRepPerfTest.exe + +data=DATAZ_\TEF_CentralRepository\perf.ini TEF_CentralRepository\perf.ini +data=DATAZ_\TEF_CentralRepository\TE_PerfTest.script TEF_CentralRepository\TE_PerfTest.Script + +#endif //__TE_CENTREP_PERFTEST_IBY__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/group/TE_CentRepPerfTest.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/group/TE_CentRepPerfTest.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,50 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +TARGET centrepperftest.exe +CAPABILITY AllFiles ReadUserData WriteUserData +TARGETTYPE exe +UID 0x1000007A 0x1027431A + +SMPSAFE + +SOURCEPATH ../src +SOURCE TE_PerfTestUtilities.cpp +SOURCE TE_PerfTestCompareStep.cpp +SOURCE TE_PerfTestCacheStepBase.cpp +SOURCE TE_PerfTestCacheEnabledStep.cpp +SOURCE TE_PerfTestCacheDisabledStep.cpp +SOURCE TE_PerfTestStep.cpp +SOURCE TE_MemTestStep.cpp +SOURCE TE_FindPerfTestStep.cpp +SOURCE TE_PerfTestServer.cpp +SOURCE TE_DefectTestStep.cpp +SOURCE TE_PerfTestClientOpenStep.cpp +SOURCE TE_NotifyMemTestStep.cpp + +USERINCLUDE ../inc +USERINCLUDE ../../../../cenrepsrv +USERINCLUDE ../../../../common/inc +USERINCLUDE ../../../../include +USERINCLUDE ../../../../test +OS_LAYER_SYSTEMINCLUDE_SYMBIAN + +LIBRARY euser.lib +LIBRARY testexecuteutils.lib +LIBRARY testexecutelogclient.lib +LIBRARY hal.lib +LIBRARY centralrepository.lib +LIBRARY t_cenrep_helper.lib bafl.lib efsrv.lib + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,24 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +PRJ_TESTMMPFILES + +TE_CentRepPerfTest.mmp manual + +PRJ_TESTEXPORTS +../scripts/TE_PerfTest.script z:/tef_centralrepository/te_perftest.script +../config/perf.ini z:/tef_centralrepository/perf.ini + +TE_CentRepPerfTest.iby /epoc32/rom/include/te_centrepperftest.iby diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/inc/TE_DefectTestStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_DefectTestStep.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,38 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TE_DEFECTTESTSTEP_H__ +#define __TE_DEFECTTESTSTEP_H__ + +#include + +_LIT(KPerfTestDefectStepDEF057491, "CentRepDefectTest057491"); +_LIT(KPerfTestDefectStepDEF059633, "CentRepDefectTest059633"); + +class CPerfTestDefectStep057491 : public CTestStep + { +public: + CPerfTestDefectStep057491(); + virtual TVerdict doTestStepL(void); + }; + +class CPerfTestDefectStep059633 : public CTestStep + { +public: + CPerfTestDefectStep059633(); + virtual TVerdict doTestStepL(void); + }; + +#endif // __TE_DEFECTTESTSTEP_H__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/inc/TE_FindPerfTestStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_FindPerfTestStep.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,32 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TE_MemTestStep.h +// +// + +#ifndef __TE_FINDPERFTESTSTEP_H__ +#define __TE_FINDPERFTESTSTEP_H__ + +#include + +_LIT(KFindPerfTestName, "CentRepFindPerfTest"); + +class CFindPerfTestStep : public CTestStep + { +public: + CFindPerfTestStep(); + virtual TVerdict doTestStepL(void); + }; + +#endif // __TE_FINDPERFTESTSTEP_H__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/inc/TE_MemTestStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_MemTestStep.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,55 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TE_MEMTESTSTEP_H__ +#define __TE_MEMTESTSTEP_H__ + +#include + +_LIT(KMemTestName, "CentRepMemTestLogger"); + +#ifdef __CENTREP_SERVER_MEMTEST__ +// Class for storing initial and final heap size readings for specific +// location and identifier +class TMemTestResult + { +public: + inline TMemTestResult(TInt32 aLocation, TInt32 aIdentifier, TBool aIsComplete) + : iLocation(aLocation), iIdentifier(aIdentifier), iIsComplete(aIsComplete) { } + //location where the memory reading is done + TInt32 iLocation; + //identifier of the memory reading (e.g. repository id, 10th reading etc) + TInt32 iIdentifier; + //whether both initial and final heap size readings are valid + TBool iIsComplete; + //heap size before the operation starts + TInt32 iInitHeapSize; + //heap size after the operation ends + TInt32 iFinalHeapSize; + }; +#endif //__CENTREP_SERVER_MEMTEST__ + +class CMemTestStep : public CTestStep + { +public: + CMemTestStep(); + virtual TVerdict doTestStepL(void); +protected: +#ifdef __CENTREP_SERVER_MEMTEST__ + virtual void ProcessMemTestResults(TAny* aRawData, TInt32 aRawCount, RArray& aMemTestResults); +#endif //__CENTREP_SERVER_MEMTEST__ + }; + +#endif // __TE_MEMTESTSTEP_H__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/inc/TE_NotifyMemTestStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_NotifyMemTestStep.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,44 @@ +/** +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* This file define all the common values thoughout your test project +* +* +*/ + + + +/** + @file +*/ +#ifndef __TE_NOTIFYMEMTESTSTEP_H__ +#define __TE_NOTIFYMEMTESTSTEP_H__ + +#include +#include "TE_MemTestStep.h" + +_LIT(KNotifyMemTestStep, "NotifyMemTestStep"); + +class CNotifyMemTestStep : public CMemTestStep + { +public: + inline CNotifyMemTestStep(){SetTestStepName(KNotifyMemTestStep);}; + virtual TVerdict doTestStepL(void); +protected: +#ifdef __CENTREP_SERVER_MEMTEST__ + virtual void ProcessMemTestResults(TAny* aRawData, TInt32 aRawCount, RArray& aMemTestResults); +#endif //__CENTREP_SERVER_MEMTEST__ + }; + +#endif //__TE_NOTIFYMEMTESTSTEP_H__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCacheDisabledStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCacheDisabledStep.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,36 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TE_PerfTestCacheEnabledStep.h +// +// + +#ifndef __TE_PERFTESTCACHEDISABLEDSTEP_H__ +#define __TE_PERFTESTCACHEDISABLEDSTEP_H__ + +#include "TE_PerfTestCacheStepBase.h" + +//-------------------------------- +// class CPerfTestCacheDisabledStep +//-------------------------------- + +_LIT(KPerfTestCacheDisabledStep, "PerfTestCacheDisabledStep"); + +class CPerfTestCacheDisabledStep : public CPerfTestCacheStepBase + { +public: + CPerfTestCacheDisabledStep(); + virtual TVerdict doTestStepL(void); + }; + +#endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCacheEnabledStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCacheEnabledStep.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,33 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TE_PERFTESTCACHEENABLEDSTEP_H__ +#define __TE_PERFTESTCACHEENABLEDSTEP_H__ + +#include "TE_PerfTestCacheStepBase.h" + +//-------------------------------- +// class CPerfTestCacheEnabledStep +//-------------------------------- +_LIT(KPerfTestCacheEnabledStep, "PerfTestCacheEnabledStep"); + +class CPerfTestCacheEnabledStep : public CPerfTestCacheStepBase + { +public: + CPerfTestCacheEnabledStep(); + virtual TVerdict doTestStepL(void); + }; + +#endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCacheStepBase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCacheStepBase.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,37 @@ +/** +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* This file define all the common values thoughout your test project +* +* +*/ + + + +/** + @file +*/ +#ifndef __TE_PERFTESTCACHESTEPBASE_H__ +#define __TE_PERFTESTCACHESTEPBASE_H__ + +#include + +class CPerfTestCacheStepBase : public CTestStep + { +public: + CPerfTestCacheStepBase() {}; + void CommonTestStepL(void); + }; + +#endif //__TE_PERFTESTCACHESTEPBASE_H__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestClientOpenStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestClientOpenStep.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,34 @@ +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TE_PERFTESTCLIENTOPENSTEP_H__ +#define __TE_PERFTESTCLIENTOPENSTEP_H__ + +#include + +//-------------------------------- +// class CPerfTestClientOpenStep +//-------------------------------- + +_LIT(KPerfTestClientOpenName, "PerfTestClientOpenStep"); + +class CPerfTestClientOpenStep : public CTestStep + { +public: + CPerfTestClientOpenStep(); + virtual TVerdict doTestStepL(void); + }; + +#endif //__TE_PERFTESTCLIENTOPENSTEP_H__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCompareStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestCompareStep.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,45 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TE_PERFTESTCOMPARESTEP_H__ +#define __TE_PERFTESTCOMPARESTEP_H__ + +#include "TE_PerfTestCacheStepBase.h" + +//-------------------------------- +// class CPerfTestCompareStep +//-------------------------------- +_LIT(KPerfTestCompareStep, "PerfTestCompareStep"); + +class CPerfTestCompareStep : public CTestStep + { +public: + CPerfTestCompareStep(); + virtual TVerdict doTestStepL(void); + +protected: + class TSummary + { + public: + TBuf<20> iName; + TUint iUseCount; + TUint32 iSumElapsedTicks; + }; + void ReadResults(RArray &aArray, TBuf &aString); + RArray iResults1; + RArray iResults2; + }; + +#endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestServer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestServer.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,26 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TE_PERFTESTSERVER_H__ +#define __TE_PERFTESTSERVER_H__ +#include + +class CPerfTestServer : public CTestServer + { +public: + static CPerfTestServer* NewL(); + virtual CTestStep* CreateTestStep(const TDesC& aStepName); + }; +#endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestStep.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,90 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TE_PERFTESTSTEP_H__ +#define __TE_PERFTESTSTEP_H__ + +#include +#include + +class TRepStatistics + { +public: +#ifdef __WINS__ + #ifdef _DEBUG + enum { KTicks2LoadFromCache = 70 }; // emulator UDEB + #else + enum { KTicks2LoadFromCache = 40 }; // emulator UREL + #endif +#else + #ifdef _DEBUG + enum { KTicks2LoadFromCache = 90 }; // armv5 UDEB + #else + enum { KTicks2LoadFromCache = 60 }; // armv5 UREL + #endif +#endif + + inline TRepStatistics(); + inline TRepStatistics(const TRepStatistics& aRepStatistics); + inline TRepStatistics(TUint32 aRepUid, TUint32 aLoadTicks); + inline TBool MatchUid(TUint32 aRepUid) const; + void AddData(TUint32 aElapsedTicks); + + TUint32 iRepUid; + TUint iUseCount; // how many times the rep is open + TUint32 iSumLoadTicks; + TUint iCacheMisses; // how many times rep need to be reloaded + }; + +//----------------------------------------------- + +class TIpcStatistics + { +public: + inline TIpcStatistics(); + void AddData(TUint32 aElapsedTicks); + + TUint iUseCount; + TUint32 iSumElapsedTicks; + }; + +//----------------------------------------------- + +_LIT(KGetPerfTestResults, "GetPerfTestResults"); +_LIT(KIniTestMode, "TestMode"); +_LIT(KResultsSection, "Output"); + +class CPerfTestStep : public CTestStep + { +public: + enum TTestModes + { + ETiming, + EBoot + }; + + inline CPerfTestStep(){SetTestStepName(KGetPerfTestResults);}; + virtual TVerdict doTestStepL(void); + +private: + void ConvertTickToSecAndMilli(TUint32 aTick, TUint& aSec, TUint& aMilliSec); + +private: + TInt iTickFreq; + }; + +#include "TE_PerfTestStep.inl" + +#endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestStep.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestStep.inl Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,47 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +// class TRepStatistics +inline TRepStatistics::TRepStatistics() + : iRepUid(0), iUseCount(0), iSumLoadTicks(0), iCacheMisses(0) + { + } + +inline TRepStatistics::TRepStatistics(const TRepStatistics& aRepStatistics) + { + iRepUid = aRepStatistics.iRepUid; + iUseCount = aRepStatistics.iUseCount; + iSumLoadTicks = aRepStatistics.iSumLoadTicks; + iCacheMisses = aRepStatistics.iCacheMisses; + } + +inline TRepStatistics::TRepStatistics(TUint32 aRepUid, TUint32 aLoadTicks) + : iRepUid(aRepUid), iUseCount(1), iSumLoadTicks(aLoadTicks), iCacheMisses(0) + { + } + +inline TBool TRepStatistics::MatchUid(TUint32 aRepUid) const + { + return iRepUid == aRepUid; + } + +//------------------------------------- +// class TIpcStatistics + +inline TIpcStatistics::TIpcStatistics() + : iUseCount(0), iSumElapsedTicks(0) + { + } + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestUtilities.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/inc/TE_PerfTestUtilities.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,42 @@ +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TE_MemTestFileOpenStep.h +// +// + +#ifndef __TE_PERFTESTUTILITIES_H__ +#define __TE_PERFTESTUTILITIES_H__ + +#include + +//Utility function that converts fast counter result to milliseconds in real +TReal FastCountToMillisecondsInReal(TInt aFastCount); + +//Utility function that converts fast counter result to microseconds in real +TReal FastCountToMicrosecondsInReal(TInt aFastCount); + +//Utility function that converts fast counter result to milliseconds in int +TUint64 FastCountToMillisecondsInInt(TInt aFastCount); + +//Utility function that converts fast counter result to microseconds in int +TUint64 FastCountToMicrosecondsInInt(TInt aFastCount); + +//Utility function that measures the free ram size in bytes +TInt FreeRamSize(); + +//Utility function to cleanup cache +void CleanupRepositoryCache(); + +#endif //__TE_PERFTESTUTILITIES_H__ + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/scripts/TE_PerfTest.script --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/scripts/TE_PerfTest.script Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,152 @@ +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +//! @file +//! @SYMTestSuiteName PDS-TEF-CENTREP-PERFORMANCE +//! @SYMScriptTestEnvironment TEF +//! @internalComponent +//! @test + +PRINT CentralRepository TEF Performance Tests + +LOAD_SUITE CentRepPerfTest + +//Delay to make sure that boot has completed. +DELAY 60000 + +START_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1424 +//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1424 +//! @SYMTestCaseDesc Measure CPU time usage by CentralRepositorySrv during boot +//! @SYMTestPriority Critical +//! @SYMTestActions Retrieve performance data collected by CentRep server, analyze, and +//! print out a summary of the performance data. +//! @SYMTestExpectedResults This test always passes. Engineers working on CentRep +//! improvement will run this suite before and after submission to gage actual +//! savings in CPU time. +//! @SYMPREQ PREQ1192 +//! @SYMTestStatus Defined +RUN_TEST_STEP 300 CentRepPerfTest GetPerfTestResults z:\TEF_CentralRepository\perf.ini boottest + +END_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1424 + +START_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1425 +//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1425 +//! @SYMTestCaseDesc Measure Heap usage by CentralRepositorySrv repositories during boot +//! @SYMTestPriority Critical +//! @SYMTestActions Retrieve performance data collected by CentRep server, analyze, and +//! print out a summary. +//! @SYMTestExpectedResults This test always passes. Engineers working on CentRep +//! improvement will run this suite before and after submission to gauge actual +//! savings in RAM usage of repositories. +//! @SYMPREQ PREQ1192 +//! @SYMTestStatus Defined +RUN_TEST_STEP 300 CentRepPerfTest CentRepMemTestLogger + +END_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1425 + +START_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1459 +//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1459 +//! @SYMTestCaseDesc Measure CPU time used by CentRep client and server for Find~L API. +//! @SYMTestPriority Critical +//! @SYMTestActions Call Find~L API and measure the time it takes for completion then +//! report the summary. +//! @SYMTestExpectedResults This test always passes. Engineers working on CentRep +//! improvement will run this suite before and after submission to gauge actual +//! savings in CPU time. +//! @SYMPREQ PREQ1192 +//! @SYMTestStatus Defined +RUN_TEST_STEP 300 CentRepPerfTest CentRepFindPerfTest +END_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1459 + +START_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1423 //CachePerformance +SHARED_DATA z:\TEF_CentralRepository\perf.ini Shared +//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1423 +//! @SYMTestCaseDesc Measure cached repository access time in CentralRepository +//! @SYMTestPriority High +//! @SYMTestActions Bring up server, connect, access repositories, retrieve performance +//! data, analyze, and print out a summary of the performance data. +//! @SYMTestExpectedResults This test always passes. Engineers working on CentRep +//! improvement will run this suite before and after submission to gage actual +//! savings in CPU time. +//! @SYMPREQ PREQ1192 +//! @SYMTestStatus Defined + + RUN_TEST_STEP 1200 CentRepPerfTest PerfTestCacheEnabledStep + PRINT --- Performance data for repository access with Caching ENABLED --- + RUN_TEST_STEP 300 CentRepPerfTest GetPerfTestResults z:\TEF_CentralRepository\perf.ini timingtest1 + RUN_TEST_STEP 1200 CentRepPerfTest PerfTestCacheDisabledStep + PRINT --- Performance data for repository access with Caching DISABLED --- + RUN_TEST_STEP 300 CentRepPerfTest GetPerfTestResults z:\TEF_CentralRepository\perf.ini timingtest2 + RUN_TEST_STEP 300 CentRepPerfTest PerfTestCompareStep z:\TEF_CentralRepository\perf.ini Shared +END_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1423 //CachePerformance + +START_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1482 +//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1482 +//! @SYMTestCaseDesc Central repository persists operation performance could be improved +//! @SYMTestPriority High +//! @SYMTestActions Calculate Average time to open large repository from ROM file, average time to open +//! large repository from persists file and average time to write large repository to persists file. +//! @SYMTestExpectedResults This test always passes. +//! @SYMDEF DEF057491 +//! @SYMTestStatus Defined +RUN_TEST_STEP 300 CentRepPerfTest CentRepDefectTest057491 +END_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1482 + + +START_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1483 +//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1483 +//! @SYMTestCaseDesc Central Repository adds 11s to 9.1 NAND boot time +//! @SYMTestPriority High +//! @SYMTestActions Calculate time to open text based rep from ROM, time to open binary rep from ROM, +//! average time to open text based rep from ROM, average time to open binary rep from ROM, +//! compare results and prove that opening .ini is slower than opening .cre files +//! @SYMTestExpectedResults This test always passes. +//! @SYMDEF DEF059633 +//! @SYMTestStatus Defined +RUN_TEST_STEP 300 CentRepPerfTest CentRepDefectTest059633 + +END_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1483 + + +START_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1657 +//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1657 +//! @SYMTestCaseDesc Measure the time to open/close multiple repositories from a single thread +//! @SYMTestPriority High +//! @SYMTestActions Measure CPU time, open n repositories, measure CPU time, report the time it +//! takes to open all repositories. Measure CPU time, close n repositories, measure +//! CPU time, report the time it takes to close all repositories. Repeat all of +//! the steps for n=1..5 +//! @SYMTestExpectedResults This test always passes. Engineers working on CentRep improvements +//! will run this suite before and after submission to gauge actual savings +//! in CPU time. +//! @SYMPREQ PREQ1228 +//! @SYMTestStatus Defined +RUN_TEST_STEP 300 CentRepPerfTest PerfTestClientOpenStep +END_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1657 + +START_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1658 //Notify-OnlyRAM +//! @SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1658 +//! @SYMTestCaseDesc Notify-only client optimization RAM usage test +//! @SYMTestPriority High +//! @SYMTestActions Retrieve memory usage data collected by CentRep server, analyze, and +//! print out a summary during certain stages of the lifetime of session objects. +//! @SYMTestExpectedResults This test always pass. Engineers working on CentRep +//! improvement will run this suite before and after submission to gauge actual +//! savings in RAM usage of repositories. +//! @SYMPREQ PREQ1228 +//! @SYMTestStatus Defined + + RUN_TEST_STEP 300 CentRepPerfTest NotifyMemTestStep +END_TESTCASE SYSLIBS-CENTRALREPOSITORY-PT-1658 //Notify-OnlyRAM diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/src/TE_DefectTestStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/src/TE_DefectTestStep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,287 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "TE_DefectTestStep.h" +#include "TE_PerfTestUtilities.h" +#include +#include "t_cenrep_helper.h" +#include "srvdefs.h" +#include "srvreqs.h" +#include +#include "cachemgr.h" + +#ifdef __CENTREP_SERVER_CACHETEST__ + +const TUid KUidLargeRepository = { 0xCCCCCC01 }; +const TUid KUidRep1 = { 0x00000100 }; +const TUid KUidLargeCreRepository = { 0xCCCCCC02 }; + +const TUint32 KNewInt = 1000; +const TInt KIntValue = 1234; + +const TInt KNumOfAttempts = 10; + +_LIT(KZRep1File, "z:\\private\\10202BE9\\00000100.txt"); +_LIT(KCRep1TxtFile, "c:\\private\\10202BE9\\persists\\00000100.txt"); +_LIT(KCRep1CreFile, "c:\\private\\10202BE9\\persists\\00000100.cre"); +#endif + +CPerfTestDefectStep057491::CPerfTestDefectStep057491() + { + SetTestStepName(KPerfTestDefectStepDEF057491); + } + +TVerdict CPerfTestDefectStep057491::doTestStepL() + { +#ifndef __CENTREP_SERVER_CACHETEST__ + return EPass; +#else + SetTestStepResult(EFail); + + CRepository* rep; + TInt64 totalRomMs=0; + TInt64 totalCreMs=0; + TInt64 totalRepWriteMs=0; + + TUint32 startFastCounter; + TUint64 fastCounterromOpenMicroseconds; + TUint64 fastCounterrepWriteMicroseconds; + TUint64 fastCountercreOpenMicroseconds; + + // Flush and disable cache for this test + TInt r; + r = SetGetParameters(TIpcArgs(EDisableCache)); + TEST(r==KErrNone); + + // Time opening and writing repository + for(TInt i=0; iCreate(KNewInt, KIntValue); + fastCounterrepWriteMicroseconds = FastCountToMicrosecondsInInt(User::FastCounter() - startFastCounter); + totalRepWriteMs+=fastCounterrepWriteMicroseconds; + Logger().WriteFormat(_L("Time to write large repos file = %lu microseconds\n"), fastCounterrepWriteMicroseconds); + + TEST(r==KErrNone); + + // Close repository + CleanupStack::PopAndDestroy(rep); + + // Get start time and ticks for .cre file + startFastCounter = User::FastCounter(); + + // Open repository + User::LeaveIfNull(rep = CRepository::NewLC(KUidLargeRepository)); + + // Get finish time and ticks for .cre file + fastCountercreOpenMicroseconds = FastCountToMicrosecondsInInt(User::FastCounter() - startFastCounter); + totalCreMs+=fastCountercreOpenMicroseconds; + Logger().WriteFormat(_L("Time to open large repos from persists file = %lu microseconds\n"), fastCountercreOpenMicroseconds); + +#if !defined(__WINS__) && !defined(__WINSCW__) + TEST(fastCounterromOpenMicroseconds>fastCountercreOpenMicroseconds); +#endif + const TUint32 KIntKey1 = 8847616; + const TInt KIntKey1Value = 1; + const TUint32 KIntKey2 = 139068928; + const TInt KIntKey2Value = 30; + const TUint32 KIntKey3 = 2373975808UL; + const TInt KIntKey3Value = -1920991488; + + // Test 3 random int key values from repository + TInt keyValue; + r=rep->Get(KIntKey1, keyValue); + TEST(r == KErrNone); + TEST(keyValue == KIntKey1Value); + + r=rep->Get(KIntKey2, keyValue); + TEST(r == KErrNone); + TEST(keyValue == KIntKey2Value); + + r=rep->Get(KIntKey3, keyValue); + TEST(r == KErrNone); + TEST(keyValue == KIntKey3Value); + + // Close repository + CleanupStack::PopAndDestroy(rep); + + CleanupFileFromCDriveL(KUidLargeRepository); + } + + Logger().WriteFormat(_L("Average time to open large repos from ROM file = %lu ms\n"), totalRomMs/KNumOfAttempts); + Logger().WriteFormat(_L("Average time to open large repos from persists file = %lu ms\n"), totalCreMs/KNumOfAttempts); + Logger().WriteFormat(_L("Average time to write large repos to persists file = %lu ms\n"), totalRepWriteMs/KNumOfAttempts); + + RFs fs; + User::LeaveIfError(fs.Connect()); + CleanupClosePushL(fs); + CFileMan* fm = CFileMan::NewL(fs); + CleanupStack::PushL(fm); + // Copy a repository txt file to the C: + User::LeaveIfError(fm->Copy(KZRep1File, KCPersistsDir)); + // Reset read-only bit + User::LeaveIfError(fm->Attribs(KCRep1TxtFile,0,KEntryAttReadOnly,TTime(0))); + // Check it exists + TEST( BaflUtils::FileExists (fs, KCRep1TxtFile)); + + // Open repository + User::LeaveIfNull(rep = CRepository::NewLC(KUidRep1)); + + // Create a setting + r = rep->Create(KNewInt, KIntValue); + TEST(r == KErrNone); + + // Check persists file exists + TEST(BaflUtils::FileExists (fs, KCRep1CreFile)); + + // Check that .txt file is gone + TEST(BaflUtils::FileExists (fs, KCRep1TxtFile) == EFalse); + + // Close the repository + CleanupStack::PopAndDestroy(rep); + + CleanupStack::PopAndDestroy(2); // fm, fs + + CleanupFileFromCDriveL(KUidRep1); + + // Enable cache + r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize)); + TEST(r==KErrNone); + + SetTestStepResult(EPass); + + return TestStepResult(); +#endif + } + +CPerfTestDefectStep059633::CPerfTestDefectStep059633() + { + SetTestStepName(KPerfTestDefectStepDEF059633); + } + +TVerdict CPerfTestDefectStep059633::doTestStepL() + { +#ifndef __CENTREP_SERVER_CACHETEST__ + return EPass; +#else + SetTestStepResult(EFail); + + // Flush and disable cache for this test + TInt r; + r = SetGetParameters(TIpcArgs(EDisableCache)); + TEST(r==KErrNone); + + CleanupFileFromCDriveL(KUidLargeRepository); + CleanupFileFromCDriveL(KUidLargeCreRepository); + + CRepository* rep; + + TUint32 startFastCounter; + TUint64 fastCountertimeToOpenLargeIniRep; + TUint64 fastCountertimeToOpenLargeCreRep; + TUint64 fastCountertimeToOpenXLargeInis; + TUint64 fastCountertimeToOpenXLargeCres; + + //========================================================================================= + //Single .ini - opening + startFastCounter = User::FastCounter(); + User::LeaveIfNull(rep = CRepository::NewLC(KUidLargeRepository)); + fastCountertimeToOpenLargeIniRep = FastCountToMicrosecondsInInt(User::FastCounter() - startFastCounter); + Logger().WriteFormat(_L("Time to open text based rep from ROM = %lu microseconds\n\n"), fastCountertimeToOpenLargeIniRep); + CleanupStack::PopAndDestroy(rep); + + //========================================================================================= + //KNumOfAttempts .ini + + startFastCounter = User::FastCounter(); + for (TInt i=0; i fastCountertimeToOpenLargeCreRep); + TEST(fastCountertimeToOpenXLargeInis > fastCountertimeToOpenXLargeCres); + TEST(averageFastCounterTimeToOpenIni > averageFastCounterTimeToOpenCre); +#endif + + //========================================================================================== + //benchmarks - open + #if !defined(__WINS__) && !defined(__WINSCW__) + #ifdef _DEBUG + const TInt64 KOpenCreTime = 150000; //armv5 debug + #else + const TInt64 KOpenCreTime = 75000; //armv5 urel + #endif + + TEST(averageFastCounterTimeToOpenCre < KOpenCreTime); + + #endif//!defined(__WINS__) && !defined(__WINSCW__) + + //======================================================================== + + CleanupFileFromCDriveL(KUidLargeRepository); + CleanupFileFromCDriveL(KUidLargeCreRepository); + + // Enable cache + r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize)); + TEST(r==KErrNone); + + SetTestStepResult(EPass); + + return TestStepResult(); +#endif + } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/src/TE_FindPerfTestStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/src/TE_FindPerfTestStep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,103 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "TE_FindPerfTestStep.h" +#include "TE_PerfTestUtilities.h" +#include +#include "centralrepositoryinternal.h" +#include +#include + +using namespace NCentralRepositoryConstants; + +const TUid KUidFindPerfTestRepositorySmTxt = { 0x00000105 }; + +CFindPerfTestStep::CFindPerfTestStep() + { + SetTestStepName(KFindPerfTestName); + } + +// doTestStepL +// This test fetches the memory data collected by +// CentRep server, processes it and reports the result. +TVerdict CFindPerfTestStep::doTestStepL() + { + SetTestStepResult(EFail); + + CRepository* repository = NULL; + TRAPD(res, repository = CRepository::NewL(KUidFindPerfTestRepositorySmTxt)); + TESTL(res == KErrNone); + TESTL(repository != NULL); + CleanupStack::PushL(repository); + + //if the KCentRepFindBufSize has been increased to a value more then 16 then test + //repository "KUidFindPerfTestRepositorySmTxt" needs to be updated otherwise this + //test will start failing. In this case the repository should be updated to have + //more entries. + TESTL(KCentRepFindBufSize<=16); + + RArray foundIds; + TUint32 accumulatedTicks = 0; + for(TInt j=1; j<=KCentRepFindBufSize; j++) + { + accumulatedTicks = 0; + for(TInt i=0; i<100; i++) + { + TInt r = KErrNone; + TUint32 startTick = User::FastCounter(); + r = repository->FindEqL(0, 0, j, foundIds); + TUint32 endTick = User::FastCounter(); + + //check for errors + TESTL(r == KErrNone); + //check that number of found ids is as expected + TESTL(foundIds.Count() == j); + + accumulatedTicks += endTick - startTick; + } + + INFO_PRINTF3(_L("Total time spent to find settings of count %d is %f[ms]"), j, FastCountToMillisecondsInReal(accumulatedTicks)); + } + + //now run it one more time for settings of count more than KCentRepFindBufSize + for(TInt j=1; j<=KCentRepFindBufSize; j++) + { + accumulatedTicks = 0; + for(TInt i=0; i<100; i++) + { + TInt r = KErrNone; + TUint32 startTick = User::FastCounter(); + r = repository->FindNeqL(0, 0, j, foundIds); + TUint32 endTick = User::FastCounter(); + + //check for errors + TESTL(r == KErrNone); + //check that number of found ids is as expected + TESTL(foundIds.Count() > KCentRepFindBufSize); + + accumulatedTicks += endTick - startTick; + } + + INFO_PRINTF3(_L("Total time spent to find settings of count %d is %f[ms]"), foundIds.Count(), FastCountToMillisecondsInReal(accumulatedTicks)); + } + + CleanupStack::PopAndDestroy(repository); + repository = NULL; + + SetTestStepResult(EPass); + + return TestStepResult(); + } + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/src/TE_MemTestStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/src/TE_MemTestStep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,157 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include "t_cenrep_helper.h" +#include "srvPerf.h" +#include "srvreqs.h" +#include "TE_MemTestStep.h" + +#ifdef __CENTREP_SERVER_MEMTEST__ +// Method used for TIdentityRelation for TMemTestResult arrays +TBool MatchMemTestResult(const TMemTestResult& aKey, const TMemTestResult& aIndexItem) + { + return aIndexItem.iLocation == aKey.iLocation && + aIndexItem.iIdentifier == aKey.iIdentifier && + aIndexItem.iIsComplete == aKey.iIsComplete; + } + +void CMemTestStep::ProcessMemTestResults(TAny* aRawData, TInt32 aRawCount, RArray& aMemTestResults) + { + ASSERT(aRawCount); + ASSERT(aRawCount>=3); + + for(TInt i=0; i+2(aRawData)[i++]; + TInt32 value2 = static_cast(aRawData)[i++]; + TInt32 value3 = static_cast(aRawData)[i++]; + + if(value1 == KMagicMemTestOutOfBounds && value2 == KMagicMemTestOutOfBounds && value2 == KMagicMemTestOutOfBounds) + { + WARN_PRINTF1(_L("Memory test was not able to store all the requested values. Only the stored values will be reported.")); + } + else + { + TMemTestResult result(value1, value2, EFalse); + //look for not completed memTestResult that match the criteria + TIdentityRelation identity(MatchMemTestResult); + + TInt idx = aMemTestResults.Find(result, identity); + if(idx == KErrNotFound) + { + result.iInitHeapSize = value3; + aMemTestResults.Append(result); + } + else + { + TMemTestResult& foundResult = aMemTestResults[idx]; + foundResult.iFinalHeapSize = value3; + foundResult.iIsComplete = ETrue; + } + } + } + } +#endif //__CENTREP_SERVER_MEMTEST__ + +CMemTestStep::CMemTestStep() + { + SetTestStepName(KMemTestName); + } + +// doTestStepL +// This test fetches the memory data collected by +// CentRep server, processes it and reports the result. +TVerdict CMemTestStep::doTestStepL() + { +#ifdef __CENTREP_SERVER_MEMTEST__ + SetTestStepResult(EFail); + // Pause a few seconds to ensure startup sequence is finished. +#ifdef __WINS__ + const TTimeIntervalMicroSeconds32 interval = 12000000; +#else + const TTimeIntervalMicroSeconds32 interval = 4000000; +#endif + User::After(interval); + + TAny* buf = User::AllocL((KMemBufMaxEntry) * sizeof(TInt32)); + CleanupStack::PushL(buf); + TPtr8 pBuf(static_cast(buf), (KMemBufMaxEntry) * sizeof(TInt32)); + TInt numEntries; + TPckg pNumEntries(numEntries); + TInt error = SetGetParameters(TIpcArgs(EGetMemResults, &pNumEntries, &pBuf)); + + if(error == KErrNone && numEntries > 0) + { + RArray memTestResults; + + ProcessMemTestResults(buf, numEntries, memTestResults); + + TInt count = memTestResults.Count(); + for(TInt i=0; i prevResult); break; + case 3: TESTL(result.iFinalHeapSize < prevResult); break; + case 4: TESTL(result.iFinalHeapSize > prevResult); break; + } + prevResult = result.iFinalHeapSize; + } + else + { + Logger().WriteFormat(_L("Memory usage at location[%d] for identifier[%d]: %d"), + result.iLocation, + result.iIdentifier, + result.iFinalHeapSize - result.iInitHeapSize); + } + } + else + { + Logger().WriteFormat(_L("Incomplete memory reading at location[%d] for identifier[%d]"), + result.iLocation, + result.iIdentifier); + } + } + } + + CleanupStack::PopAndDestroy(); + + if(error == KErrNone) + { + SetTestStepResult(EPass); + } +#else + WARN_PRINTF1(_L("Memory test macro __CENTREP_SERVER_MEMTEST__ is not defined. Test was not run.")); +#endif //__CENTREP_SERVER_MEMTEST__ + + return TestStepResult(); + } + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/src/TE_NotifyMemTestStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/src/TE_NotifyMemTestStep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,208 @@ +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "TE_NotifyMemTestStep.h" +#include "TE_PerfTestUtilities.h" +#include "t_cenrep_helper.h" +#include +#include "srvreqs.h" +#include "srvPerf.h" +#include "srvdefs.h" +#include "cachemgr.h" + +//-------------------------------- +// class CNotifyMemTestStep +//-------------------------------- + +#if defined(__CENTREP_SERVER_MEMTEST__) +const TUid KUidTestRepository1 = { 0x00000001 }; +const TUid KUidCacheTestRepositorySmTxt = { 0x00000100 }; +const TUid KUidCacheTestRepositoryMedTxt = { 0x10057522 }; +const TUid KUidCacheTestRepositorySmCre = { 0x22222221 }; +const TUid KUidCacheTestRepositoryLrgCre = { 0xCCCCCC02 }; + +const TInt KKey1 = 1; +const TInt KKey2 = 0x201; +const TInt KKey3 = 8585472; +const TInt KKey4 = 22; +#endif + +#ifdef __CENTREP_SERVER_MEMTEST__ +void CNotifyMemTestStep::ProcessMemTestResults(TAny* aRawData, TInt32 aRawCount, RArray& aMemTestResults) + { + ASSERT(aRawCount); + ASSERT(aRawCount>=3); + + for(TInt i=0; i+2(aRawData)[i++]; + TInt32 value2 = static_cast(aRawData)[i++]; + TInt32 value3 = static_cast(aRawData)[i++]; + + if(value1 == KMagicMemTestOutOfBounds && value2 == KMagicMemTestOutOfBounds && value2 == KMagicMemTestOutOfBounds) + { + WARN_PRINTF1(_L("Memory test was not able to store all the requested values. Only the stored values will be reported.")); + } + else + { + TMemTestResult result(value1, value2, ETrue); + if(result.iLocation == EMemLcnOnDemand) + { + result.iInitHeapSize = 0; + result.iFinalHeapSize = value3; + aMemTestResults.Append(result); + } + } + } + } +#endif //__CENTREP_SERVER_MEMTEST__ + +/** +@SYMTestCaseID SYSLIBS-CENTRALREPOSITORY-PT-1658 +@SYMTestCaseDesc Notify-only client optimization RAM usage test +@SYMTestPriority High +@SYMTestActions Retrieve memory usage data collected by CentRep server, analyze, and + print out a summary during certain stages of the lifetime of session objects. +@SYMTestExpectedResults This test always pass. Engineers working on CentRep + improvement will run this suite before and after submission to gauge actual + savings in RAM usage of repositories. +@SYMPREQ PREQ 1228 Symbian OS v9.3 System Quality: Performance, ROM and RAM targets +*/ +TVerdict CNotifyMemTestStep::doTestStepL() + { +#if defined(__CENTREP_SERVER_MEMTEST__) + + SetTestStepResult(EFail); + + TInt testSteps = 0; + TInt r; + + // Make sure cache is empty before we start +#ifdef __CENTREP_SERVER_CACHETEST__ + r = SetGetParameters(TIpcArgs(EDisableCache)); + TESTL(r==KErrNone); + r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize)); + TESTL(r==KErrNone); +#else //__CENTREP_SERVER_CACHETEST__ + CleanupRepositoryCache(); +#endif //__CENTREP_SERVER_CACHETEST__ + //Reset RAM test data + r = SetGetParameters(TIpcArgs(ERestartMemTests)); + TESTL(r==KErrNone); + + // Start of test + Logger().WriteFormat(_L("Step %d, RAM at the beginning of test"),testSteps); + r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++)); + TESTL(r==KErrNone); + + CRepository* repository1; + User::LeaveIfNull(repository1 = CRepository::NewLC(KUidTestRepository1)); + CRepository* repository2; + User::LeaveIfNull(repository2 = CRepository::NewLC(KUidCacheTestRepositorySmTxt)); + CRepository* repository3; + User::LeaveIfNull(repository3 = CRepository::NewLC(KUidCacheTestRepositoryMedTxt)); + CRepository* repository4; + User::LeaveIfNull(repository4 = CRepository::NewLC(KUidCacheTestRepositorySmCre)); + CRepository* repository5; + User::LeaveIfNull(repository5 = CRepository::NewLC(KUidCacheTestRepositoryLrgCre)); + + // Reps automatically loaded by Init + Logger().WriteFormat(_L("Step %d, RAM after sessions created"),testSteps); + r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++)); + TESTL(r==KErrNone); + + TInt i; + r = repository1->Get(KKey1, i); + TESTL(r==KErrNone); + r = repository2->Get(KKey2, i); + TESTL(r==KErrNone); + r = repository3->Get(KKey4, i); + TESTL(r==KErrNone); + r = repository4->Get(KKey1, i); + TESTL(r==KErrNone); + r = repository5->Get(KKey3, i); + TESTL(r==KErrNone); + + // Get's don't change memory usage because reps are already loaded/in cache + Logger().WriteFormat(_L("Step %d, RAM after Get() calls"),testSteps); + r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++)); + TESTL(r==KErrNone); + +#ifdef __CENTREP_SERVER_CACHETEST__ + r = SetGetParameters(TIpcArgs(EDisableCache)); + TESTL(r==KErrNone); + r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize)); + TESTL(r==KErrNone); +#else //__CENTREP_SERVER_CACHETEST__ + CleanupRepositoryCache(); +#endif //__CENTREP_SERVER_CACHETEST__ + + // Memory freed after reps are evicted + Logger().WriteFormat(_L("Step %d, RAM after delaying for eviction"),testSteps); + r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++)); + TESTL(r==KErrNone); + + r = repository1->Get(KKey1, i); + TESTL(r==KErrNone); + r = repository2->Get(KKey2, i); + TESTL(r==KErrNone); + r = repository3->Get(KKey4, i); + TESTL(r==KErrNone); + r = repository4->Get(KKey1, i); + TESTL(r==KErrNone); + r = repository5->Get(KKey3, i); + TESTL(r==KErrNone); + + // This time Get's trigger loads + Logger().WriteFormat(_L("Step %d, RAM after Get() calls"),testSteps); + r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++)); + TESTL(r==KErrNone); + + CleanupStack::PopAndDestroy(5); + + // Closing sessions don't unload the reps because of coarse grained caching + Logger().WriteFormat(_L("Step %d, RAM after sessions are closed"),testSteps); + r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++)); + TESTL(r==KErrNone); + +#ifdef __CENTREP_SERVER_CACHETEST__ + r = SetGetParameters(TIpcArgs(EDisableCache)); + TESTL(r==KErrNone); + r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize)); + TESTL(r==KErrNone); +#else //__CENTREP_SERVER_CACHETEST__ + CleanupRepositoryCache(); +#endif //__CENTREP_SERVER_CACHETEST__ + + // Reps are unloaded by cache manager + Logger().WriteFormat(_L("Step %d, RAM after delaying for eviction"),testSteps); + r = SetGetParameters(TIpcArgs(ESingleMemTest, testSteps++)); + TESTL(r==KErrNone); + + // call inherited function to get the results + SetTestStepResult(CMemTestStep::doTestStepL()); + + return TestStepResult(); +#else // defined(__CENTREP_SERVER_MEMTEST__) + + _LIT(KWarnMemTestMacroOff, "Memory test macro __CENTREP_SERVER_MEMTEST__ is disabled. Test not run."); + WARN_PRINTF1(KWarnMemTestMacroOff); + + return EPass; +# endif // defined(__CENTREP_SERVER_MEMTEST__) + + + + } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCacheDisabledStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCacheDisabledStep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,51 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include "t_cenrep_helper.h" +#include "srvreqs.h" +#include "TE_PerfTestCacheDisabledStep.h" + +//--------------------------------- +// class CPerfTestCacheDisabledStep +//--------------------------------- + +CPerfTestCacheDisabledStep::CPerfTestCacheDisabledStep() + { + SetTestStepName(KPerfTestCacheDisabledStep); + } + +// doTestStepL +// Implement the pure virtual function. +// This accesses a small and a large repository various times when cache is +// enabled and disabled. +TVerdict CPerfTestCacheDisabledStep::doTestStepL() + { +#ifndef __CENTREP_SERVER_CACHETEST__ + return EPass; +#else + SetTestStepResult(EFail); + + TInt r; + + r = SetGetParameters(TIpcArgs(EDisableCache)); + TESTL(r==KErrNone); + + CommonTestStepL(); + + return TestStepResult(); +#endif + } + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCacheEnabledStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCacheEnabledStep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,55 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include "srvreqs.h" +#include "srvdefs.h" +#include "t_cenrep_helper.h" +#include "TE_PerfTestCacheEnabledStep.h" +#include "cachemgr.h" + +//-------------------------------- +// class CPerfTestCacheEnabledStep +//-------------------------------- + +CPerfTestCacheEnabledStep::CPerfTestCacheEnabledStep() + { + SetTestStepName(KPerfTestCacheEnabledStep); + } + +// doTestStepL +// Implement the pure virtual function. +// This accesses a small and a large repository various times when cache is +// enabled and disabled. +TVerdict CPerfTestCacheEnabledStep::doTestStepL() + { +#ifndef __CENTREP_SERVER_CACHETEST__ + return EPass; +#else + SetTestStepResult(EFail); + + TInt r; + + r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize)); + // Shouldn't leave here if SetGetParameters is not supported (when running with old server) + + TEST(r==KErrNone); + + CommonTestStepL(); + + return TestStepResult(); +#endif + } + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCacheStepBase.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCacheStepBase.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,85 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TE_PerfTestCacheEnabledStep.cpp +// +// + +#include "TE_PerfTestCacheStepBase.h" +#include +#include "t_cenrep_helper.h" +#include "srvreqs.h" + +//-------------------------------- +// class CPerfTestCacheStepBase +//-------------------------------- + +#if defined(__CENTREP_SERVER_CACHETEST__) && defined(__CENTREP_SERVER_PERFTEST__) +const TUid KUidCacheTestRepositorySmTxt = { 0x00000002 }; +const TUid KUidCacheTestRepositoryLrgTxt = { 0xCCCCCC01 }; +const TUid KUidCacheTestRepositorySmCre = { 0x22222221 }; +const TUid KUidCacheTestRepositoryLrgCre = { 0xCCCCCC02 }; +#endif + +// CommonTestStepL +// This function accesses a small and a large repository various times +// when cache is enabled and disabled. +void CPerfTestCacheStepBase::CommonTestStepL() + { + SetTestStepResult(EFail); + +#if defined(__CENTREP_SERVER_CACHETEST__) && defined(__CENTREP_SERVER_PERFTEST__) + TInt r = SetGetParameters(TIpcArgs(ERestartPerfTests)); + TEST(r==KErrNone); + + CRepository* repository; + TInt i; + // Access small text rep 5 times in a row + for(i=0; i<5; i++) + { + User::LeaveIfNull(repository = CRepository::NewL(KUidCacheTestRepositorySmTxt)); + delete repository; + repository = NULL; + User::After(200000); // delay 200ms before access + } + + // Access large text rep 5 times in a row + for(i=0; i<5; i++) + { + User::LeaveIfNull(repository = CRepository::NewL(KUidCacheTestRepositoryLrgTxt)); + delete repository; + repository = NULL; + User::After(200000); // delay 200ms before access + } + + // Access small binary rep 20 times in a row + for(i=0; i<20; i++) + { + User::LeaveIfNull(repository = CRepository::NewL(KUidCacheTestRepositorySmCre)); + delete repository; + repository = NULL; + User::After(200000); // delay 200ms before access + } + + // Access large binary rep 20 times in a row + for(i=0; i<20; i++) + { + User::LeaveIfNull(repository = CRepository::NewL(KUidCacheTestRepositoryLrgCre)); + delete repository; + repository = NULL; + User::After(200000); // delay 200ms before access + } + SetTestStepResult(EPass); + +#endif + } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestClientOpenStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestClientOpenStep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,115 @@ +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "TE_PerfTestClientOpenStep.h" +#include "TE_PerfTestUtilities.h" +#include "t_cenrep_helper.h" +#include "srvreqs.h" +#include "srvdefs.h" +#include +#include "cachemgr.h" + +#ifdef __CENTREP_SERVER_CACHETEST__ + +const TInt KMaxRepositories = 5; +const TInt KIterationCount = 100; +const TUid KUidClientOpenTestRepositoryIds[KMaxRepositories] = { 0x00000106, + 0x00000107, + 0x00000108, + 0x00000109, + 0x0000010A }; +#endif //__CENTREP_SERVER_CACHETEST__ + +CPerfTestClientOpenStep::CPerfTestClientOpenStep() + { + SetTestStepName(KPerfTestClientOpenName); + } + +// doTestStepL +// This test fetches the memory data collected by +// CentRep server, processes it and reports the result. +TVerdict CPerfTestClientOpenStep::doTestStepL() + { + SetTestStepResult(EFail); + +#ifndef __CENTREP_SERVER_CACHETEST__ + WARN_PRINTF1(_L("Test macro __CENTREP_SERVER_CACHETEST__ is not defined. Unable to disable cache. Test was not run.")); +#else + CRepository* repositories[KMaxRepositories]; + TReal openResults[KMaxRepositories]; + TReal closeResults[KMaxRepositories]; + TInt res = KErrNone; + + //enable cache back. + res = SetGetParameters(TIpcArgs(EDisableCache, KDefaultEvictionTimeout, KDefaultCacheSize)); + TESTL(res == KErrNone); + + for(TInt i=0; i=0; j--) + { + startTick = User::FastCounter(); + CleanupStack::PopAndDestroy(repositories[j]); + endTick = User::FastCounter(); + closeResults[i] += endTick - startTick; + + repositories[j] = NULL; + } + } + } + + for(TInt i=0; i +#include "srvreqs.h" +#include "srvdefs.h" +#include "cachemgr.h" + +//-------------------------------- +// class CPerfTestCompareStep +//-------------------------------- + +CPerfTestCompareStep::CPerfTestCompareStep() + { + SetTestStepName(KPerfTestCompareStep); + } + +// doTestStepL +// Implement the pure virtual function. +// Comapre the results of previous timing tests +TVerdict CPerfTestCompareStep::doTestStepL() + { +#ifndef __CENTREP_SERVER_CACHETEST__ + return EPass; +#else + SetTestStepResult(EFail); + + // To make sure future tests in this harness run under caching + TInt r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize)); + + TPtrC resultSection1; + _LIT(KSharedName1, "shared_name_1"); + TInt bRet = GetStringFromConfig(ConfigSection(), KSharedName1, resultSection1); + TESTL(bRet==1); + + TPtrC resultSection2; + _LIT(KSharedName2, "shared_name_2"); + bRet = GetStringFromConfig(ConfigSection(), KSharedName2, resultSection2); + TESTL(bRet==1); + + TBuf sharedString; + + ReadSharedDataL(resultSection1, sharedString); + + ReadResults(iResults1, sharedString); + sharedString.Zero(); + ReadSharedDataL(resultSection2, sharedString); + ReadResults(iResults2, sharedString); + + TESTL(iResults1.Count()==iResults2.Count()); + + for(TInt i=0; i& aArray, TBuf& aString) + { + TLex analyse(aString); + + TInt items; + TSummary summary; + + for(TInt i=0; i<2; i++) + { + analyse.Val(items); + analyse.SkipSpaceAndMark(); + for(TInt i=0;iStartL(KServerName); + CleanupStack::Pop(server); + return server; + } + +LOCAL_C void MainL() + { + // Leave the hooks in for platform security +#if (defined __DATA_CAGING__) + RProcess().DataCaging(RProcess::EDataCagingOn); + RProcess().SecureApi(RProcess::ESecureApiOn); +#endif + + CActiveScheduler* sched=NULL; + sched=new(ELeave) CActiveScheduler; + CActiveScheduler::Install(sched); + CPerfTestServer* server = NULL; + // Create the CTestServer derived server + TRAPD(err,server = CPerfTestServer::NewL()); + if (KErrNone == err) + { + // Sync with the client and enter the active scheduler + RProcess::Rendezvous(KErrNone); + sched->Start(); + } + delete server; + delete sched; + } + +GLDEF_C TInt E32Main() + { + CTrapCleanup* cleanup = CTrapCleanup::New(); + if(cleanup == NULL) + { + return KErrNoMemory; + } + TRAPD(err,MainL()); + delete cleanup; + return err; + } + +CTestStep* CPerfTestServer::CreateTestStep(const TDesC& aStepName) + { + CTestStep* testStep = NULL; + + if (aStepName == KGetPerfTestResults) + { + testStep = new CPerfTestStep(); + } + else if (aStepName == KMemTestName) + { + testStep = new CMemTestStep(); + } + else if (aStepName == KFindPerfTestName) + { + testStep = new CFindPerfTestStep(); + } + else if (aStepName == KPerfTestCacheEnabledStep) + { + testStep = new CPerfTestCacheEnabledStep(); + } + else if (aStepName == KPerfTestCacheDisabledStep) + { + testStep = new CPerfTestCacheDisabledStep(); + } + else if (aStepName == KPerfTestCompareStep) + { + testStep = new CPerfTestCompareStep(); + } + else if (aStepName == KPerfTestDefectStepDEF057491) + { + testStep = new CPerfTestDefectStep057491(); + } + else if (aStepName == KPerfTestDefectStepDEF059633) + { + testStep = new CPerfTestDefectStep059633(); + } + else if (aStepName == KPerfTestClientOpenName) + { + testStep = new CPerfTestClientOpenStep(); + } + else if (aStepName == KNotifyMemTestStep) + { + testStep = new CNotifyMemTestStep(); + } + + return testStep; + } + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestStep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,432 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#include +#include +#include "t_cenrep_helper.h" +#include +#include +#include "srvPerf.h" +#include "srvreqs.h" +#include "TE_PerfTestStep.h" + +#ifdef __CENTREP_SERVER_PERFTEST__ + +// Function DecodeEventAndData +// Extract the high 8-bit event Id and the low 24-bit data +// from the 32 bit integer. +// +// param aEntry - the 32 bit integer to decode +// param aEventId - return the EventId Id. +// param aData - return the 24-bit data value +inline +void DecodeEventAndData(TUint32 aEntry, TUint& aEventId, TUint32& aData) + { + aEventId = (aEntry >> KEventIdShiftBits) & KEventIdMask; + aData = aEntry & KDataMask; + } + +// Function FindRepUid +// Search for the given Repository UID in aArray. +// +// param aArray - the RArray containing a number of repositories. +// param aRepUid - the rep UID to search for. +// Return - if aRepUid is in the array, return its index in array, +// else return KErrNotFound. +TInt FindRepUid(const RArray& aArray, TUint32 aRepUid) + { + for (TInt i = 0; i < aArray.Count(); i++) + { + if (aArray[i].MatchUid(aRepUid)) + return i; + } + return KErrNotFound; + } + +// Function GetFuncCodeName +// Map CentRep function code to string. +// +// param aFunc - the function code to map to string. +// Return - textual representation of the function code. +_LIT(KEInitialise, "Open"); +_LIT(KECreateInt, "ECreateInt"); +_LIT(KECreateReal, "ECreateReal"); +_LIT(KECreateString, "ECreateString"); +_LIT(KEDelete, "EDelete"); +_LIT(KEGetInt, "EGetInt"); +_LIT(KESetInt, "ESetInt"); +_LIT(KEGetReal, "EGetReal"); +_LIT(KESetReal, "ESetReal"); +_LIT(KEGetString, "EGetString"); +_LIT(KESetString, "ESetString"); +_LIT(KEFind, "EFind"); +_LIT(KEFindEqInt, "EFindEqInt"); +_LIT(KEFindEqReal, "EFindEqReal"); +_LIT(KEFindEqString, "EFindEqString"); +_LIT(KEFindNeqInt, "EFindNeqInt"); +_LIT(KEFindNeqReal, "EFindNeqReal"); +_LIT(KEFindNeqString, "EFindNeqString"); +_LIT(KEGetFindResult, "EGetFindResult"); +_LIT(KENotifyRequestCheck, "ENotifyRequestCheck"); +_LIT(KENotifyRequest, "ENotifyRequest"); +_LIT(KENotifyCancel, "ENotifyCancel"); +_LIT(KENotifyCancelAll, "ENotifyCancelAll"); +_LIT(KEGroupNotifyRequest, "EGroupNotifyRequest"); +_LIT(KEGroupNotifyCancel, "EGroupNotifyCancel"); +_LIT(KEReset, "EReset"); +_LIT(KEResetAll, "EResetAll"); +_LIT(KETransactionStart, "ETransactionStart"); +_LIT(KETransactionCommit, "ETransactionCommit"); +_LIT(KETransactionCancel, "ETransactionCancel"); +_LIT(KEMove, "EMove"); +_LIT(KETransactionState, "ETransactionState"); +_LIT(KETransactionFail, "ETransactionFail"); +_LIT(KEDeleteRange, "EDeleteRange"); +_LIT(KEGetSetParameters, "EGetSetParameters"); +_LIT(KEClose, "EClose"); +_LIT(KEEvict, "Evict"); +_LIT(KUnknownFunction, "UnknownCode"); + +const TDesC* GetFuncCodeName(TUint aFunc) + { + switch (aFunc) + { + case EInitialise: return(&KEInitialise); + case ECreateInt: return(&KECreateInt); + case ECreateReal: return(&KECreateReal); + case ECreateString: return(&KECreateString); + case EDelete: return(&KEDelete); + case EGetInt: return(&KEGetInt); + case ESetInt: return(&KESetInt); + case EGetReal: return(&KEGetReal); + case ESetReal: return(&KESetReal); + case EGetString: return(&KEGetString); + case ESetString: return(&KESetString); + case EFind: return(&KEFind); + case EFindEqInt: return(&KEFindEqInt); + case EFindEqReal: return(&KEFindEqReal); + case EFindEqString: return(&KEFindEqString); + case EFindNeqInt: return(&KEFindNeqInt); + case EFindNeqReal: return(&KEFindNeqReal); + case EFindNeqString: return(&KEFindNeqString); + case EGetFindResult: return(&KEGetFindResult); + case ENotifyRequestCheck: return(&KENotifyRequestCheck); + case ENotifyRequest: return(&KENotifyRequest); + case ENotifyCancel: return(&KENotifyCancel); + case ENotifyCancelAll: return(&KENotifyCancelAll); + case EGroupNotifyRequest: return(&KEGroupNotifyRequest); + case EGroupNotifyCancel: return(&KEGroupNotifyCancel); + case EReset: return(&KEReset); + case EResetAll: return(&KEResetAll); + case ETransactionStart: return(&KETransactionStart); + case ETransactionCommit: return(&KETransactionCommit); + case ETransactionCancel: return(&KETransactionCancel); + case EMove: return(&KEMove); + case ETransactionState: return(&KETransactionState); + case ETransactionFail: return(&KETransactionFail); + case EDeleteRange: return(&KEDeleteRange); + case EGetSetParameters: return (&KEGetSetParameters); + case EClose: return(&KEClose); + case EEvict: return (&KEEvict); + } + return &KUnknownFunction; + } +#endif //__CENTREP_SERVER_PERFTEST__ + +//-------------------- +// class CPerfTestStep +//-------------------- + +// doTestStepL +// Implement the pure virtual function. +// This test fetches the performance data collected by +// CentRep server, sums the CPU time spent in servicing +// each type of request and time spent in opening each +// repository, and prints out the total. +TVerdict CPerfTestStep::doTestStepL() + { +#ifdef __CENTREP_SERVER_PERFTEST__ + + TBuf sharedString; + + TPtrC resultSection; + TInt testMode; + TInt bRet; + // get test mode from ini file + bRet = GetIntFromConfig(ConfigSection(), KIniTestMode, testMode); + TESTL(bRet==1); + + _LIT(KBlankLine, "\n"); + Logger().WriteFormat(KBlankLine); + + if (testMode == ETiming) + { + bRet = GetStringFromConfig(ConfigSection(), KResultsSection, resultSection); + TESTL(bRet==1); + } + + if (testMode == EBoot) + { + _LIT(KDoTestStepDisclaimer1, "For this test boot-up is considered to be finished when CommsDat repository is loaded 9 times."); + Logger().WriteFormat(KDoTestStepDisclaimer1); + _LIT(KDoTestStepDisclaimer2, "This is when the watcher thread is used to make re-attempts to connect to the network."); + Logger().WriteFormat(KDoTestStepDisclaimer2); + } + + // Setup IPC args to retreive performance data from server. + TUint bufSize = KCentRepPerfTestArraySize * sizeof(TUint32); + TAny* buf = User::AllocL(bufSize); + TPtr8 bufDesc(static_cast(buf), bufSize); + + TUint numValidEntries; + TPckg pckg(numValidEntries); + + TInt ret = SetGetParameters(TIpcArgs(EGetPerfResults, &bufDesc, &pckg)); + if (ret != KErrNone) + { + _LIT(KSetGetParamFailFmt, "Send msg err %d"); + ERR_PRINTF2(KSetGetParamFailFmt, ret); + User::Free(buf); + return EFail; + } + + if (testMode == EBoot) + { + _LIT(KNumValidEntriesFmt, "Num Valid entries = %d"); + Logger().WriteFormat(KNumValidEntriesFmt, numValidEntries); + } + + RArray perfData(sizeof(TUint32),static_cast(buf),KCentRepPerfTestArraySize); + CleanupClosePushL(perfData); + + // Need to find the tick frequency before using ConvertTickToSecAndMilli. + HAL::Get(HALData::EFastCounterFrequency, iTickFreq); + + TUint sec; + TUint milliSec; + + const TUint KNumIpcs = EEvict + 1; + TIpcStatistics ipcStats[KNumIpcs]; + RArray repStats; + CleanupClosePushL(repStats); + TUint32 totalElapsedTicks = 0; + const TDesC* eventName; + + // Process the data + + // Performance data has 3 parts. First event ID and CPU tick + // to service the request. 2nd & 3rd, if event is open/close/evict + // the time of the event and repository UID. + TInt i; + for (i=0; i keyName; + _LIT(KIndividualIpcStat, "%S used %d times, sum of CPU time = %d ms"); + for (i = 0; i < KNumIpcs; i++) + { + if (ipcStats[i].iUseCount == 0) + { + continue; + } + + numIpcMsgs += ipcStats[i].iUseCount; + eventName = GetFuncCodeName(i); + ConvertTickToSecAndMilli(ipcStats[i].iSumElapsedTicks, sec, milliSec); + if (sec > 0) + { + milliSec += sec * 1000; + } + Logger().WriteFormat(KIndividualIpcStat, eventName, ipcStats[i].iUseCount, milliSec); + if (testMode == ETiming) + { + sharedString.AppendFormat(_L(" %S %d %d"), eventName, ipcStats[i].iUseCount, milliSec); + numLogItems++; + } + } + if (testMode == ETiming) + { + TBuf<2> numofItems; + numofItems.Num(numLogItems); + sharedString.Insert(0, numofItems); + WriteSharedDataL(resultSection, sharedString, ESetText); + } + + // Display Repository statistics + Logger().WriteFormat(KBlankLine); + Logger().WriteFormat(KBlankLine); + _LIT(KRepStatsFmt, "Repository Statistics:"); + Logger().WriteFormat(KRepStatsFmt); + + if (testMode == ETiming) + { + numLogItems = 0; + sharedString.Copy(_L(" ")); + } + _LIT(KIndividualRepStat, "%X used %d times, sum of load time %d ms"); + for (i = 0; i < repStats.Count(); i++) + { + ConvertTickToSecAndMilli(repStats[i].iSumLoadTicks, sec, milliSec); + if (sec > 0) + { + milliSec += sec * 1000; + } + Logger().WriteFormat(KIndividualRepStat, repStats[i].iRepUid, + repStats[i].iUseCount, milliSec); + if (testMode == ETiming) + { + sharedString.AppendFormat(_L(" %08X %d %d"), repStats[i].iRepUid, repStats[i].iUseCount, milliSec); + numLogItems++; + } + } + + if (testMode == ETiming) + { + TBuf<2> numofItems; + numofItems.Num(numLogItems); + sharedString.Insert(1, numofItems); + WriteSharedDataL(resultSection, sharedString, EAppendText); + + Logger().WriteFormat(KBlankLine); + } + + if (testMode == EBoot) + { + // show total CPU used by CentralRepository server. + ConvertTickToSecAndMilli(totalElapsedTicks, sec, milliSec); + if (sec > 0) + { + milliSec += sec * 1000; + } + + Logger().WriteFormat(KBlankLine); + Logger().WriteFormat(KBlankLine); + _LIT(KTotalCpuFmt, "Total CPU time used by CentRepSrv: %d ms"); + Logger().WriteFormat(KTotalCpuFmt, milliSec); + + _LIT(KNoteAboutTotal, "The above does not include kernel processing time and client idle time for the %d IPC messages.\n"); + Logger().WriteFormat(KNoteAboutTotal, numIpcMsgs); + } + + // Stop performance test data recording in the server + TInt r = SetGetParameters(TIpcArgs(EStopPerfTests)); + TEST(r==KErrNone); + + CleanupStack::PopAndDestroy(); // repStats + CleanupStack::PopAndDestroy(); // perfData + return EPass; +#else + _LIT(KWarnTestMacroOff, "Performance test macro __CENTREP_SERVER_PERFTEST__ is disabled. Test not run."); + WARN_PRINTF1(KWarnTestMacroOff); + return EPass; +#endif + } + +// ConvertTickToSecAndMilli +// Convert FastCounter ticks to seconds and milli-seconds. +// +// param aTick - ticks from User::FastCounter +// param aSec - return number of seconds in aTick +// param aMilliSec - return number of ms left behind after number of +// seconds is subtracted from aTick. +void CPerfTestStep::ConvertTickToSecAndMilli(TUint32 aTick, TUint& aSec, TUint& aMilliSec) + { + aSec = aTick / iTickFreq; + aMilliSec = ((aTick - aSec * iTickFreq) * 1000 + (iTickFreq >> 1)) / iTickFreq; + } + +//------------------------ +// class TRepStatistics +//------------------------ + +// AddData +// Increment number of times this rep is open, sum of CPU used +// to load it, and check cache miss. +void TRepStatistics::AddData(TUint32 aElapsedTicks) + { + iSumLoadTicks += aElapsedTicks; + iUseCount++; + if (aElapsedTicks >= KTicks2LoadFromCache) + { + iCacheMisses++; + } + } + +//--------------------- +// class TIpcStatistics +//--------------------- + +// AddData +// Increment number of times the IPC msg is received by server. +// Sum time to service this type of request. +void TIpcStatistics::AddData(TUint32 aElapsedTicks) + { + iUseCount++; + iSumElapsedTicks += aElapsedTicks; + } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestUtilities.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestUtilities.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,59 @@ +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "TE_PerfTestUtilities.h" +#include "srvdefs.h" +#include +#include + +TReal FastCountToMillisecondsInReal(TInt aFastCount) + { + TInt freqInHz; + HAL::Get(HAL::EFastCounterFrequency, freqInHz); + TReal freqInkHz = (TReal)freqInHz / 1000; + return (TReal)aFastCount / freqInkHz; + } + +TReal FastCountToMicrosecondsInReal(TInt aFastCount) + { + TInt freqInHz; + HAL::Get(HAL::EFastCounterFrequency, freqInHz); + TReal freqInkHz = (TReal)freqInHz / 1000000LL; + return (TReal)aFastCount / freqInkHz; + } + +TUint64 FastCountToMillisecondsInInt(TInt aFastCount) + { + TInt freqInHz; + HAL::Get(HAL::EFastCounterFrequency, freqInHz); + return (aFastCount*1000LL)/freqInHz; + } + +TUint64 FastCountToMicrosecondsInInt(TInt aFastCount) + { + TInt freqInHz; + HAL::Get(HAL::EFastCounterFrequency, freqInHz); + return (aFastCount*1000000LL)/freqInHz; + } + +TInt FreeRamSize() + { + TInt freeRamSize = 0; + + HAL::Get(HALData::EMemoryRAMFree, freeRamSize); + + return freeRamSize; + } + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/dbms/group/BLD.INF --- a/persistentstorage/dbms/group/BLD.INF Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/dbms/group/BLD.INF Wed Sep 01 12:39:58 2010 +0100 @@ -25,9 +25,9 @@ PRJ_EXPORTS -../inc/D32DBMS.H OS_LAYER_PUBLIC_EXPORT_PATH(d32dbms.h) -../inc/D32DBMSCONSTANTS.H OS_LAYER_PUBLIC_EXPORT_PATH(d32dbmsconstants.h) -../inc/D32DBMS.INL OS_LAYER_PUBLIC_EXPORT_PATH(d32dbms.inl) +../inc/D32DBMS.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(d32dbms.h) +../inc/D32DBMSCONSTANTS.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(d32dbmsconstants.h) +../inc/D32DBMS.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(d32dbms.inl) dbms.iby /epoc32/rom/include/dbms.iby diff -r 26645d81f48d -r cc28652e0254 persistentstorage/dbms/pcdbms/group/bld.inf --- a/persistentstorage/dbms/pcdbms/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/dbms/pcdbms/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -15,9 +15,9 @@ PRJ_EXPORTS -../inc/D32DBMS.H OS_LAYER_PUBLIC_EXPORT_PATH(x86tool/d32dbms.h) -../inc/D32DBMSCONSTANTS.H OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/d32dbmsconstants.h) -../inc/D32DBMS.INL OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/d32dbms.inl) +../inc/D32DBMS.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(x86tool/d32dbms.h) +../inc/D32DBMSCONSTANTS.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/d32dbmsconstants.h) +../inc/D32DBMS.INL SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(x86tool/d32dbms.inl) PRJ_PLATFORMS DEFAULT TOOLS2 diff -r 26645d81f48d -r cc28652e0254 persistentstorage/dbms/tdbms/t_dbbug.cpp --- a/persistentstorage/dbms/tdbms/t_dbbug.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/dbms/tdbms/t_dbbug.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -345,7 +345,6 @@ static const TDesC& Name(); private: static void WaitForServerExit(); - static void KillDbmsServer(); static TInt Thread(TAny*); }; @@ -355,41 +354,6 @@ return KName; } -void Defect_COMBBAR_463J5D::KillDbmsServer() - { - _LIT(KDbmsServer,"edbsrv.exe"); - TFullName name; - //RDebug::Print(_L("Find and kill \"%S\" process.\n"), &aProcessName); - TBuf<64> pattern(KDbmsServer); - TInt length = pattern.Length(); - pattern += _L("*"); - TFindProcess procFinder(pattern); - - while (procFinder.Next(name) == KErrNone) - { - if (name.Length() > length) - {//If found name is a string containing aProcessName string. - TChar c(name[length]); - if (c.IsAlphaDigit() || - c == TChar('_') || - c == TChar('-')) - { - // If the found name is other valid application name - // starting with aProcessName string. - //RDebug::Print(_L(":: Process name: \"%S\".\n"), &name); - continue; - } - } - RProcess proc; - if (proc.Open(name) == KErrNone) - { - proc.Kill(0); - //RDebug::Print(_L("\"%S\" process killed.\n"), &name); - } - proc.Close(); - } - } - void Defect_COMBBAR_463J5D::WaitForServerExit() { _LIT(KDbmsServer,"*!DBMS server"); @@ -428,8 +392,8 @@ void Defect_COMBBAR_463J5D::TestL() { test.Next(_L(" @SYMTestCaseID:SYSLIB-DBMS-CT-0584 ")); - Print(_S("Kill the server if it has started")); - KillDbmsServer(); + Print(_S("Wait for the server to exit")); + WaitForServerExit(); // Print(_S("Create the launching threads")); RThread t1,t2; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/dbms/tdbms/t_dbbug.mmp --- a/persistentstorage/dbms/tdbms/t_dbbug.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/dbms/tdbms/t_dbbug.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -15,7 +15,7 @@ target t_dbbug.exe targettype exe -capability All -Tcb + OS_LAYER_SYSTEMINCLUDE_SYMBIAN userinclude ../inc diff -r 26645d81f48d -r cc28652e0254 persistentstorage/dbms/tdbms/t_dbperf2.cpp --- a/persistentstorage/dbms/tdbms/t_dbperf2.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/dbms/tdbms/t_dbperf2.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -1292,53 +1292,49 @@ { _LIT(KSpace, " "); TheTest.Printf(_L("%*.*S%S\r\n"), aOffset, aOffset, &KSpace, &aPath); - TFindFile* findFile = new TFindFile(TheFs);//TFindFile has TParse data member. - //Since this function is called recoursively, on some platforms - //the test might crash - "stack overflow" problem. - TEST(findFile != NULL); + TFindFile findFile(TheFs); CDir* fileNameCol = NULL; TBuf<8> fileNameMask; fileNameMask.Copy(_L("*.*")); - TInt err = findFile->FindWildByDir(fileNameMask, aPath, fileNameCol); + TInt err = findFile.FindWildByDir(fileNameMask, aPath, fileNameCol); if(err == KErrNone) { do { - const TDesC& file = findFile->File();//"file" variable contains the drive and the path. the file name in "file" is invalid in this case. + const TDesC& file = findFile.File();//"file" variable contains the drive and the path. the file name in "file" is invalid in this case. (void)TheParse.Set(file, NULL, NULL); TPtrC driveName = TheParse.Drive(); - if(aPath.FindF(driveName) >= 0) - { - TInt cnt = fileNameCol->Count(); - for(TInt i=0;iCopy(aPath); - path->Append(entry.iName); - path->Append(_L("\\")); - PrintDiskUsage(*path, aOffset + 4); - delete path; - } - } - } // if(aPath.FindF(driveName) >= 0) + if(aPath.FindF(driveName) < 0) + { + goto cont; + } + TInt cnt = fileNameCol->Count(); + for(TInt i=0;i path; + path.Copy(aPath); + path.Append(entry.iName); + path.Append(_L("\\")); + PrintDiskUsage(path, aOffset + 4); + } + } +cont: delete fileNameCol; fileNameCol = NULL; - } while((err = findFile->FindWild(fileNameCol)) == KErrNone);//Get the next set of files + } while((err = findFile.FindWild(fileNameCol)) == KErrNone);//Get the next set of files } else { TheTest.Printf(_L(" FindWildByDir() failed with err=%d\r\n"), err); } - delete findFile; } void DoTestL() @@ -1405,7 +1401,7 @@ DeleteFile(TheTestFileName); TEST2(err, KErrNone); - TheTest.Printf(_L("====================== Disk usage ==================\r\n")); + TheTest.Printf(_L("====================================================\r\n")); PrintDiskUsage(_L("c:\\")); TheTest.Printf(_L("====================================================\r\n")); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/dbms/tdbms/t_dbsrv.cpp --- a/persistentstorage/dbms/tdbms/t_dbsrv.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/dbms/tdbms/t_dbsrv.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1257,39 +1257,6 @@ test(r==KErrNone); } -LOCAL_C void KillDbmsServer() - { - _LIT(KDbmsServer,"edbsrv.exe"); - TFullName name; - TBuf<64> pattern(KDbmsServer); - TInt length = pattern.Length(); - pattern += _L("*"); - TFindProcess procFinder(pattern); - - while (procFinder.Next(name) == KErrNone) - { - if (name.Length() > length) - {//If found name is a string containing aProcessName string. - TChar c(name[length]); - if (c.IsAlphaDigit() || - c == TChar('_') || - c == TChar('-')) - { - // If the found name is other valid application name - // starting with aProcessName string. - //RDebug::Print(_L(":: Process name: \"%S\".\n"), &name); - continue; - } - } - RProcess proc; - if (proc.Open(name) == KErrNone) - { - proc.Kill(0); - //RDebug::Print(_L("\"%S\" process killed.\n"), &name); - } - proc.Close(); - } - } void DoTests() { TVersionName n=RDbs::Version().Name(); @@ -1355,7 +1322,6 @@ setupTestDirectory(); DeleteTestFiles(); setupCleanup(); - KillDbmsServer(); DoTests(); delete TheTrapCleanup; DeleteTestFiles(); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/dbms/tdbms/t_dbsrv.mmp --- a/persistentstorage/dbms/tdbms/t_dbsrv.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/dbms/tdbms/t_dbsrv.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -15,7 +15,7 @@ target t_dbsrv.exe targettype exe -capability All -Tcb + OS_LAYER_SYSTEMINCLUDE_SYMBIAN userinclude ../inc diff -r 26645d81f48d -r cc28652e0254 persistentstorage/dbms/tdbms/t_dbstress.cpp --- a/persistentstorage/dbms/tdbms/t_dbstress.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/dbms/tdbms/t_dbstress.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -467,7 +467,7 @@ for (TInt ii=0;;++ii) { TheTest.Printf(_L("Opening %d\r"),ii); - TRAPD(r,store=CFileStore::OpenL(TheFs,KTestDatabase,EFileRead|EFileWrite|EFileWriteDirectIO)); + TRAPD(r,store=CFileStore::OpenL(TheFs,KTestDatabase,EFileRead|EFileWrite)); if (r==KErrNone) break; TEST2(r, KErrInUse); @@ -515,7 +515,7 @@ { TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-DBMS-CT-0636 Open store ")); CFileStore* store=NULL; - TRAPD(r,store=CFileStore::OpenL(TheFs,KTestDatabase,EFileRead|EFileWrite|EFileWriteDirectIO)); + TRAPD(r,store=CFileStore::OpenL(TheFs,KTestDatabase,EFileRead|EFileWrite)); TEST2 (r,KErrNone); TheTest.Next(_L("Verify")); NewCount=-1; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/dbms/tdbms/t_dbthrd.cpp --- a/persistentstorage/dbms/tdbms/t_dbthrd.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/dbms/tdbms/t_dbthrd.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -113,7 +113,7 @@ User::LeaveIfError(iFs.Connect()); User::LeaveIfError(iFs.SetSessionPath(KTestDir)); User::LeaveIfError(iLog.Replace(iFs,KLogFile,EFileWrite|EFileStreamText)); - iStore=CFileStore::OpenL(iFs,KTestDatabase,EFileRead|EFileWrite|EFileWriteDirectIO); + iStore=CFileStore::OpenL(iFs,KTestDatabase,EFileRead|EFileWrite); LogSize(); iData.OpenL(iStore,iStore->Root()); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/dbms/ustor/US_FILE.CPP --- a/persistentstorage/dbms/ustor/US_FILE.CPP Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/dbms/ustor/US_FILE.CPP Wed Sep 01 12:39:58 2010 +0100 @@ -97,8 +97,8 @@ { default: __LEAVE(KErrNotSupported); - case TDbFormat::ECreate: - store=CPermanentFileStore::CreateL(iFs,aName,EFileRead|EFileWrite); + case TDbFormat::ECreate: + store=CPermanentFileStore::CreateL(iFs,aName,EFileRead|EFileWrite); break; case TDbFormat::EReplace: store=CPermanentFileStore::ReplaceL(iFs,aName,EFileRead|EFileWrite); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/BLD.INF --- a/persistentstorage/sql/GROUP/BLD.INF Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/BLD.INF Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ PRJ_EXPORTS -../INC/SqlDb.h OS_LAYER_PUBLIC_EXPORT_PATH(sqldb.h) +../INC/SqlDb.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(sqldb.h) #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS #ifdef SYMBIAN_OLD_EXPORT_LOCATION ../INC/SqlResourceTester.h /epoc32/include/sqlresourcetester.h diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/SqlDb.mmp --- a/persistentstorage/sql/GROUP/SqlDb.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/SqlDb.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -19,6 +19,13 @@ @file */ +//#define SYMBIAN_INCLUDE_EXECUTABLE_TRACE +#include + +#ifdef SYMBIAN_INCLUDE_EXECUTABLE_TRACE +MACRO SQLDB_ENABLE_TRACE +#endif + TARGET sqldb.dll TARGETTYPE dll @@ -28,12 +35,12 @@ OPTION CW -w noillpragmas OS_LAYER_SYSTEMINCLUDE_SYMBIAN -USERINCLUDE ../traces_SqlDb USERINCLUDE ../INC USERINCLUDE ../SRC/Client USERINCLUDE ../SRC/Client/IPC USERINCLUDE ../SRC/Common USERINCLUDE ../SRC/Common/IPC +USERINCLUDE ../SRC/Common/Trace USERINCLUDE ../SRC/Security //SqlDb includes sqlite3.h header file for the error code macros defined there #ifdef SYMBIAN_USE_SQLITE_VERSION_3_6_4 @@ -45,30 +52,26 @@ OS_LAYER_ESTLIB_SYSTEMINCLUDE SOURCEPATH ../SRC/Client -SOURCE SQLDatabase.cpp -SOURCE SqlDatabaseImpl.cpp -SOURCE SqlStatement.cpp -SOURCE SqlStatementImpl.cpp -SOURCE SqlStream.cpp +SOURCE SQLDatabase.cpp SqlDatabaseImpl.cpp SqlStatement.cpp SqlStatementImpl.cpp SqlStream.cpp SOURCE SqlBlob.cpp -SOURCE SqlDbSession.cpp -SOURCE SqlStmtSession.cpp -SOURCE SqlResourceTest.cpp -SOURCE SqlScalarFullSelect.cpp -SOURCE SqlResourceProfiler.cpp +SOURCEPATH ../SRC/Common +SOURCE SqlUtil.cpp SqlBufFlat.cpp SqlBufIterator.cpp + +SOURCEPATH ../SRC/Client +SOURCE SqlDbSession.cpp SqlStmtSession.cpp SqlResourceTest.cpp SqlScalarFullSelect.cpp SqlResourceProfiler.cpp SOURCEPATH ../SRC/Client/IPC SOURCE IPCBuf.cpp - SOURCEPATH ../SRC/Common -SOURCE SqlUtil.cpp -SOURCE SqlBufFlat.cpp -SOURCE SqlBufIterator.cpp SOURCE SqlSrvStartup.cpp SOURCEPATH ../SRC/Security -SOURCE SqlSecurity.cpp -SOURCE SqlSecurityImpl.cpp +SOURCE SqlSecurity.cpp SqlSecurityImpl.cpp + +#ifdef SYMBIAN_INCLUDE_EXECUTABLE_TRACE +SOURCEPATH ../SRC/Common/Trace +SOURCE UTraceSql.cpp +#endif LIBRARY euser.lib efsrv.lib estor.lib diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/SqlSrv.mmp --- a/persistentstorage/sql/GROUP/SqlSrv.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/SqlSrv.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -19,6 +19,13 @@ @file */ +//#define SYMBIAN_INCLUDE_EXECUTABLE_TRACE +#include + +#ifdef SYMBIAN_INCLUDE_EXECUTABLE_TRACE +MACRO SQLSRV_ENABLE_TRACE +#endif + TARGET sqlsrv.exe TARGETTYPE exe CAPABILITY ProtServ @@ -43,10 +50,10 @@ OS_LAYER_SYSTEMINCLUDE_SYMBIAN OS_LAYER_ESTLIB_SYSTEMINCLUDE -USERINCLUDE ../traces_SqlSrv USERINCLUDE ../INC USERINCLUDE ../SRC/Common USERINCLUDE ../SRC/Common/IPC +USERINCLUDE ../SRC/Common/Trace USERINCLUDE ../SRC/Security USERINCLUDE ../SRC/Server USERINCLUDE ../SRC/Server/IPC @@ -59,23 +66,10 @@ #endif SOURCEPATH ../SRC/Server -SOURCE SqlSrvMain.cpp -SOURCE SqlSrvSession.cpp -SOURCE SqlSrvDatabase.cpp -SOURCE SqlSrvStatement.cpp -SOURCE SqlSrvAuthorizer.cpp -SOURCE SqlSrvUtil.cpp -SOURCE SqlSrvStrings.cpp -SOURCE SqlSrvStatementUtil.cpp -SOURCE SqlSrvCollation.cpp -SOURCE SqlSrvSecurityMap.cpp -SOURCE SqlSrvFileData.cpp -SOURCE SqlSrvDriveSpace.cpp -SOURCE SqlSrvDbSysSettings.cpp -SOURCE SqlSrvConfig.cpp -SOURCE SqlSrvBlob.cpp -SOURCE SqlSrvCheckStatement.cpp -SOURCE SqlSrvResourceProfiler.cpp +SOURCE SqlSrvMain.cpp SqlSrvSession.cpp SqlSrvDatabase.cpp SqlSrvStatement.cpp SqlSrvAuthorizer.cpp +SOURCE SqlSrvUtil.cpp SqlSrvStrings.cpp SqlSrvStatementUtil.cpp SqlSrvCollation.cpp SqlSrvSecurityMap.cpp +SOURCE SqlSrvFileData.cpp SqlSrvDriveSpace.cpp SqlSrvDbSysSettings.cpp SqlSrvConfig.cpp SqlSrvBlob.cpp +SOURCE SqlSrvCheckStatement.cpp SqlSrvResourceProfiler.cpp // for backup and restore SOURCE SqlBur.cpp @@ -83,18 +77,18 @@ SOURCE IPCStream.cpp SOURCEPATH ../SRC/Common -SOURCE SqlUtil.cpp -SOURCE SqlBufFlat.cpp -SOURCE SqlBufIterator.cpp +SOURCE SqlUtil.cpp SqlBufFlat.cpp SqlBufIterator.cpp SOURCEPATH ../SRC/Security SOURCE SqlSecurityImpl.cpp SOURCEPATH ../SRC/Server/Compact -SOURCE SqlCompact.cpp -SOURCE SqlCompactEntry.cpp -SOURCE SqlCompactConn.cpp -SOURCE SqlCompactTimer.cpp +SOURCE SqlCompact.cpp SqlCompactEntry.cpp SqlCompactConn.cpp SqlCompactTimer.cpp + +#ifdef SYMBIAN_INCLUDE_EXECUTABLE_TRACE +SOURCEPATH ../SRC/Common/Trace +SOURCE UTraceSql.cpp +#endif LIBRARY estlib.lib LIBRARY euser.lib diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/sqlite.mmp --- a/persistentstorage/sql/GROUP/sqlite.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/sqlite.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -19,8 +19,13 @@ @file */ +//#define SYMBIAN_INCLUDE_EXECUTABLE_TRACE #include "sqlite_macro.mmh" +#ifdef SYMBIAN_INCLUDE_EXECUTABLE_TRACE +MACRO SQLITELIB_ENABLE_TRACE +#endif + TARGET sqlite.lib TARGETTYPE lib @@ -63,9 +68,9 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////// +USERINCLUDE ../SRC/Common/Trace OS_LAYER_SYSTEMINCLUDE_SYMBIAN OS_LAYER_ESTLIB_SYSTEMINCLUDE -USERINCLUDE ../traces_sqlite USERINCLUDE ../OsLayer #ifdef SYMBIAN_USE_SQLITE_VERSION_3_6_4 @@ -190,4 +195,8 @@ SOURCEPATH ../OsLayer SOURCE FileBuf64.cpp SOURCE os_symbian.cpp -SOURCE SqliteUtil.cpp + +#ifdef SYMBIAN_INCLUDE_EXECUTABLE_TRACE +SOURCEPATH ../SRC/Common/Trace +SOURCE UTraceSql.cpp +#endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/sqltests.iby --- a/persistentstorage/sql/GROUP/sqltests.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/sqltests.iby Wed Sep 01 12:39:58 2010 +0100 @@ -23,6 +23,12 @@ #include #include +//Include the following to enable the ulogger server and the client tool. +//This is used to perform tracing using the UTF2 + +//#include +//#include + data=DATAZ_\test\sqlTests.bat \test\sqltests.bat data=DATAZ_\test\contacts_schema_to_vendors.sql \test\contacts_schema_to_vendors.sql diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/t_sqlbur.mmp --- a/persistentstorage/sql/GROUP/t_sqlbur.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/t_sqlbur.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -20,7 +20,7 @@ USERINCLUDE . USERINCLUDE ../SRC/Server USERINCLUDE ../SRC/Common -USERINCLUDE ../traces_SqlSrv +USERINCLUDE ../SRC/Common/Trace #ifdef SYMBIAN_USE_SQLITE_VERSION_3_6_4 USERINCLUDE ../SQLite364 #else @@ -47,4 +47,4 @@ UID 0 0x10281e17 VENDORID 0x70000001 -SMPSAFE +SMPSAFE \ No newline at end of file diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/t_sqlcompact2.mmp --- a/persistentstorage/sql/GROUP/t_sqlcompact2.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/t_sqlcompact2.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -13,6 +13,7 @@ // Description: // +#include #include "sqlite_macro.mmh" TARGET t_sqlcompact2.exe @@ -27,7 +28,7 @@ USERINCLUDE . USERINCLUDE ../INC USERINCLUDE ../SRC/Common -USERINCLUDE ../traces_SqlSrv +USERINCLUDE ../SRC/Common/Trace USERINCLUDE ../SRC/Server/Compact USERINCLUDE ../SRC/Server USERINCLUDE ../OsLayer diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/t_sqlcompact3.mmp --- a/persistentstorage/sql/GROUP/t_sqlcompact3.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/t_sqlcompact3.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -25,7 +25,6 @@ USERINCLUDE . OS_LAYER_SYSTEMINCLUDE_SYMBIAN OS_LAYER_ESTLIB_SYSTEMINCLUDE -USERINCLUDE ../traces_sqlite USERINCLUDE ../OsLayer #ifdef SYMBIAN_USE_SQLITE_VERSION_3_6_4 USERINCLUDE ../SQLite364 diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/t_sqlconfig.mmp --- a/persistentstorage/sql/GROUP/t_sqlconfig.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/t_sqlconfig.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -20,7 +20,7 @@ USERINCLUDE . OS_LAYER_SYSTEMINCLUDE_SYMBIAN USERINCLUDE ../SRC/Common -USERINCLUDE ../traces_SqlSrv +USERINCLUDE ../SRC/Common/Trace USERINCLUDE ../SRC/Server SOURCEPATH ../TEST @@ -34,4 +34,4 @@ UID 0 0x1111C1C1 VENDORID 0x70000001 -SMPSAFE +SMPSAFE \ No newline at end of file diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/t_sqlconfigfile.mmp --- a/persistentstorage/sql/GROUP/t_sqlconfigfile.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/t_sqlconfigfile.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -21,7 +21,7 @@ USERINCLUDE ../INC OS_LAYER_SYSTEMINCLUDE_SYMBIAN USERINCLUDE ../SRC/Common -USERINCLUDE ../traces_SqlSrv +USERINCLUDE ../SRC/Common/Trace USERINCLUDE ../SRC/Server SOURCEPATH ../TEST diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/t_sqldbconfigfile.mmp --- a/persistentstorage/sql/GROUP/t_sqldbconfigfile.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/t_sqldbconfigfile.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -25,8 +25,7 @@ USERINCLUDE ../INC OS_LAYER_SYSTEMINCLUDE_SYMBIAN -OS_LAYER_ESTLIB_SYSTEMINCLUDE - +SYSTEMINCLUDE /epoc32/include/libc USERINCLUDE ../OsLayer #ifdef SYMBIAN_USE_SQLITE_VERSION_3_6_4 USERINCLUDE ../SQLite364 diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/t_sqldefect2.mmp --- a/persistentstorage/sql/GROUP/t_sqldefect2.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/t_sqldefect2.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -35,4 +35,4 @@ VENDORID 0x70000001 -SMPSAFE +SMPSAFE \ No newline at end of file diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/t_sqlfilebuf64.mmp --- a/persistentstorage/sql/GROUP/t_sqlfilebuf64.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/t_sqlfilebuf64.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -19,7 +19,6 @@ MACRO _SQLPROFILER USERINCLUDE . -USERINCLUDE ../traces_sqlite USERINCLUDE ../OsLayer #ifdef SYMBIAN_USE_SQLITE_VERSION_3_6_4 USERINCLUDE ../SQLite364 @@ -32,7 +31,6 @@ SOURCEPATH ../OsLayer SOURCE FileBuf64.cpp -SOURCE SqliteUtil.cpp SOURCEPATH ../TEST SOURCE t_sqlfilebuf64.cpp diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/t_sqlgetfirststmt.mmp --- a/persistentstorage/sql/GROUP/t_sqlgetfirststmt.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/t_sqlgetfirststmt.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -13,6 +13,8 @@ // Description: // +#include + TARGET t_sqlgetfirststmt.exe TARGETTYPE EXE CAPABILITY None @@ -27,8 +29,8 @@ USERINCLUDE . USERINCLUDE ../INC USERINCLUDE ../SRC/Common -USERINCLUDE ../traces_SqlSrv -USERINCLUDE ../OsLayer +USERINCLUDE ../SRC/Common/Trace +USERINCLUDE ../OsLayer SOURCEPATH ../TEST SOURCE t_sqlgetfirststmt.cpp diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/t_sqloom5.mmp --- a/persistentstorage/sql/GROUP/t_sqloom5.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/t_sqloom5.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -12,7 +12,7 @@ // // Description: // -#include + TARGET t_sqloom5.exe TARGETTYPE EXE CAPABILITY ProtServ AllFiles @@ -35,15 +35,13 @@ USERINCLUDE ../INC USERINCLUDE ../SRC/Common USERINCLUDE ../SRC/Common/IPC +USERINCLUDE ../SRC/Common/Trace USERINCLUDE ../SRC/Server USERINCLUDE ../SRC/Server/Compact USERINCLUDE ../SRC/Server/IPC USERINCLUDE ../SRC/Security USERINCLUDE ../SQLite USERINCLUDE ../OsLayer -USERINCLUDE ../traces_SqlDb -USERINCLUDE ../traces_SqlSrv - OS_LAYER_SYSTEMINCLUDE_SYMBIAN OS_LAYER_ESTLIB_SYSTEMINCLUDE diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/t_sqlperformance.mmp --- a/persistentstorage/sql/GROUP/t_sqlperformance.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/t_sqlperformance.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -13,6 +13,8 @@ // Description: // +#include + TARGET t_sqlperformance.exe TARGETTYPE EXE //"AllFiles" capability is needed because the test accesses the database files in the SQL server private data cage @@ -26,7 +28,7 @@ USERINCLUDE . USERINCLUDE ../INC USERINCLUDE ../SRC/Common -USERINCLUDE ../traces_SqlSrv +USERINCLUDE ../SRC/Common/Trace USERINCLUDE ../SRC/Server USERINCLUDE ../OsLayer OS_LAYER_SYSTEMINCLUDE_SYMBIAN diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/t_sqlsecurity6.mmp --- a/persistentstorage/sql/GROUP/t_sqlsecurity6.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/t_sqlsecurity6.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -12,7 +12,6 @@ // // Description: // -#include TARGET t_sqlsecurity6.exe TARGETTYPE EXE diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/GROUP/t_sqlstartup.mmp --- a/persistentstorage/sql/GROUP/t_sqlstartup.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/GROUP/t_sqlstartup.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -12,9 +12,9 @@ // // Description: // -#include -TARGET t_sqlstartup.exe -TARGETTYPE EXE + +TARGET t_sqlstartup.exe +TARGETTYPE EXE CAPABILITY ProtServ AllFiles EPOCFIXEDPROCESS @@ -25,59 +25,58 @@ EPOCHEAPSIZE 0x00020000 0x02000000 #endif -EPOCSTACKSIZE 0x3000 +EPOCSTACKSIZE 0x3000 -UID 0 0x10281E17 +UID 0 0x10281E17 MACRO SQLSRV_STARTUP_TEST -USERINCLUDE . -USERINCLUDE ../INC -USERINCLUDE ../traces_SqlDb -USERINCLUDE ../traces_SqlSrv -USERINCLUDE ../SRC/Common -USERINCLUDE ../SRC/Common/IPC -USERINCLUDE ../SRC/Server -USERINCLUDE ../SRC/Server/Compact -USERINCLUDE ../SRC/Server/IPC -USERINCLUDE ../SRC/Security -USERINCLUDE ../SQLite -USERINCLUDE ../OsLayer +USERINCLUDE . +USERINCLUDE ../INC +USERINCLUDE ../SRC/Common +USERINCLUDE ../SRC/Common/IPC +USERINCLUDE ../SRC/Common/Trace +USERINCLUDE ../SRC/Server +USERINCLUDE ../SRC/Server/Compact +USERINCLUDE ../SRC/Server/IPC +USERINCLUDE ../SRC/Security +USERINCLUDE ../SQLite +USERINCLUDE ../OsLayer OS_LAYER_SYSTEMINCLUDE_SYMBIAN OS_LAYER_ESTLIB_SYSTEMINCLUDE -SOURCEPATH ../TEST -SOURCE t_sqlstartup.cpp +SOURCEPATH ../TEST +SOURCE t_sqlstartup.cpp -SOURCEPATH ../SRC/Common -SOURCE SqlBufFlat.cpp -SOURCE SqlUtil.cpp +SOURCEPATH ../SRC/Common +SOURCE SqlBufFlat.cpp +SOURCE SqlUtil.cpp -SOURCEPATH ../SRC/Server -SOURCE SqlBur.cpp -SOURCE SqlSrvConfig.cpp -SOURCE SqlSrvMain.cpp -SOURCE SqlSrvDriveSpace.cpp -SOURCE SqlSrvStrings.cpp -SOURCE SqlSrvStatementUtil.cpp -SOURCE SqlSrvSecurityMap.cpp -SOURCE SqlSrvUtil.cpp -SOURCE SqlSrvResourceProfiler.cpp +SOURCEPATH ../SRC/Server +SOURCE SqlBur.cpp +SOURCE SqlSrvConfig.cpp +SOURCE SqlSrvMain.cpp +SOURCE SqlSrvDriveSpace.cpp +SOURCE SqlSrvStrings.cpp +SOURCE SqlSrvStatementUtil.cpp +SOURCE SqlSrvSecurityMap.cpp +SOURCE SqlSrvUtil.cpp +SOURCE SqlSrvResourceProfiler.cpp -SOURCEPATH ../SRC/Server/Compact -SOURCE SqlCompact.cpp -SOURCE SqlCompactConn.cpp -SOURCE SqlCompactEntry.cpp -SOURCE SqlCompactTimer.cpp +SOURCEPATH ../SRC/Server/Compact +SOURCE SqlCompact.cpp +SOURCE SqlCompactConn.cpp +SOURCE SqlCompactEntry.cpp +SOURCE SqlCompactTimer.cpp -LIBRARY estlib.lib -LIBRARY hal.lib -LIBRARY euser.lib -LIBRARY efsrv.lib -LIBRARY estor.lib -LIBRARY abclient.lib -STATICLIBRARY sqlite.lib +LIBRARY estlib.lib +LIBRARY hal.lib +LIBRARY euser.lib +LIBRARY efsrv.lib +LIBRARY estor.lib +LIBRARY abclient.lib +STATICLIBRARY sqlite.lib -VENDORID 0x70000001 +VENDORID 0x70000001 SMPSAFE diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/OsLayer/FileBuf64.cpp --- a/persistentstorage/sql/OsLayer/FileBuf64.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/OsLayer/FileBuf64.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -801,7 +801,7 @@ DoDiscard(); iReadAheadSize = RFileBuf64::KDefaultReadAheadSize; iBase = static_cast (User::Alloc(iCapacity)); - return iBase ? KErrNone : KErrNoMemory; + return iBase ? KErrNone : KErrNoMemory; } /** diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/OsLayer/FileBuf64.h --- a/persistentstorage/sql/OsLayer/FileBuf64.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/OsLayer/FileBuf64.h Wed Sep 01 12:39:58 2010 +0100 @@ -180,8 +180,8 @@ TInt iLength; //The length of the data currently held in the buffer. //File related TInt64 iFilePos; //The file position associated with the beginning of the buffer. - TInt64 iFileSize; //The file size which is the nominal file length including the buffer contents. - TInt64 iRealFileSize; //The real file size in disk. + TInt64 iFileSize; //The file size which is the logical end of file from the buffer's point of view. + TInt64 iRealFileSize; //The real file size on disk. RFile64 iFile; //The file object. //Read-ahead related TBool iDirty; //The buffer contains pending data to be written to the file diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/OsLayer/SqliteTraceDef.h --- a/persistentstorage/sql/OsLayer/SqliteTraceDef.h Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -// 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 SQLITETRACEDEF_H -#define SQLITETRACEDEF_H - -#include -#include "SqliteUtil.h" - -////////////////////////////////////////////////////////////////////////////////////// - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_OS_TRACE_ENABLED - #define __SQLITETRACE_OSVAR(var) var - #define __SQLITETRACE_OSEXPR(expr) expr -#else - #define __SQLITETRACE_OSVAR(var) - #define __SQLITETRACE_OSEXPR(expr) -#endif - -////////////////////////////////////////////////////////////////////////////////////// - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_RDEBUG_PRINT - #undef OstTrace0 - #undef OstTrace1 - #undef OstTraceExt1 - #undef OstTraceExt2 - #undef OstTraceExt3 - #undef OstTraceExt4 - #undef OstTraceExt5 - - void SqlitePrintf(TInt aGroupName, TInt aTraceName, const char* aFormat, ...); - - #define OstTrace0 SqlitePrintf - #define OstTrace1 SqlitePrintf - #define OstTraceExt1 SqlitePrintf - #define OstTraceExt2 SqlitePrintf - #define OstTraceExt3 SqlitePrintf - #define OstTraceExt4 SqlitePrintf - #define OstTraceExt5 SqlitePrintf -#endif//defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_RDEBUG_PRINT - -////////////////////////////////////////////////////////////////////////////////////// - -#endif//SQLITETRACEDEF_H diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/OsLayer/SqliteUtil.cpp --- a/persistentstorage/sql/OsLayer/SqliteUtil.cpp Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +0,0 @@ -// 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 -#include "SqliteUtil.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqliteUtilTraces.h" -#endif -#include "SqliteTraceDef.h" - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#define UNUSED_ARG(arg) arg = arg -#define UNUSED_DES(arg) arg - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_RDEBUG_PRINT - -/** -This class has been added here to avoid the crashes when _SQLITE_RDEBUG_PRINT macro is defined but the -data to be printed out is too big and cannot fit into the buffer with size KSqliteMaxPrnStrLen. -@internalComponent -*/ -class TSqliteDes16Overflow : public TDes16Overflow - { -public: - virtual void Overflow(TDes16& /*aDes*/) - { - } - }; - -//Replaces: -// 1) "%lld" with "%ld" -// 2) "%s" with "%S" -//These are the differences in format specification between RDebig::Print and OST functions. -//The new format spec length should be less or equal than the old format spec length. -static void ReplaceFmtSpec(TDes& aFormat, const TDesC& aFmtSpec, const TDesC& aNewFmtSpec) - { - TInt fmtLength = aFormat.Length(); - const TInt KDiff = aFmtSpec.Length() - aNewFmtSpec.Length(); - TPtr ptr((TText*)aFormat.Ptr(), fmtLength, fmtLength); - TInt pos; - while((pos = ptr.Find(aFmtSpec)) >= 0) - { - ptr.Replace(pos, aFmtSpec.Length(), aNewFmtSpec); - fmtLength -= KDiff; - ptr.Set(ptr.MidTPtr(pos)); - } - aFormat.SetLength(fmtLength); - } - -void SqlitePrintf(TInt /*aGroupName*/, TInt /*aTraceName*/, const char* aFormat, ...) - { - VA_LIST list; - VA_START(list, aFormat); - TBuf<128> format; - _LIT(KTraceIdent, "Sqlite;"); - format.Copy(TPtrC8((const TUint8*)aFormat)); - format.Insert(0, KTraceIdent); - format.Append(_L("\r\n")); - _LIT(KOstI64Fmt, "%lld"); - _LIT(KDbgPrnI64Fmt, "%ld"); - ReplaceFmtSpec(format, KOstI64Fmt, KDbgPrnI64Fmt); - _LIT(KOstDes8Fmt, "%s"); - _LIT(KDbgPrnDesFmt, "%S"); - ReplaceFmtSpec(format, KOstDes8Fmt, KDbgPrnDesFmt); - TBuf buf; - TSqliteDes16Overflow overflowHandler; - buf.AppendFormatList(format, list, &overflowHandler); -#ifdef _SQLITE_RDEBUG_PRINT - RDebug::RawPrint(buf); -#endif - } - -const TDesC* SqliteDes8to16Ptr(const TDesC8& aDes) - { - const TInt KBufSize = 100; - static TBuf buf; - TPtrC8 ptr(aDes.Ptr(), Min(aDes.Length(), buf.MaxLength())); - buf.Copy(ptr); - return &buf; - } - -#endif//defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_RDEBUG_PRINT - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -SQLite panic category. - -@internalComponent -*/ -_LIT(KSqlitePanicCategory, "Sqlite"); - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -Panics the caller with aPanicCode panic code. -The call will terminate the thread where it is called from. - -@param aPanicCode Panic code. - -@internalComponent -*/ -static void SqlitePanic(TSqlitePanic aPanicCode) - { - User::Panic(KSqlitePanicCategory, aPanicCode); - } - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -The function prints out a "SQLite" panic message to the console and panics the thread where it is called from. -It gives a useful information about the found error together with the source file name and line number where -it occurred. - -Note: this function will output information regarding the panic only if _SQLITE_PANIC_TRACE_ENABLED macro is defined - -@param aFile Source file name -@param aLine Source line number -@param aPanicCode Panic code -@param aHandle Numeric value, uniquely identfying the leaving location (the "this" pointer for example) - -@return KErrNone - -@internalComponent -*/ -TInt TSqliteUtil::Panic(const TText* aFile, TInt aLine, TInt aPanicCode, TUint aHandle) - { -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_PANIC_TRACE_ENABLED - TPtrC fname(FileName(aFile)); - OstTraceExt5(TRACE_FATAL, TSQLUTIL_PANIC, "SQLite-Panic;0x%X;%S;%d;%S;%d", aHandle, __SQLITEPRNSTR(fname), aLine, __SQLITEPRNSTR(KSqlitePanicCategory), aPanicCode); -#else - UNUSED_ARG(aFile); - UNUSED_ARG(aLine); - UNUSED_ARG(aHandle); -#endif - ::SqlitePanic(static_cast (aPanicCode)); - return KErrNone; - } - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_PANIC_TRACE_ENABLED - -/** -The function creates and returns TPtrC object which points to aFile parameter. - -@param aFile File name -@return TPtrC object pointing to aFile parameter. - -@internalComponent -*/ -TPtrC TSqliteUtil::FileName(const TText* aFile) - { - TPtrC p(aFile); - TInt ix = p.LocateReverse('\\'); - if(ix<0) - ix=p.LocateReverse('/'); - if(ix>=0) - p.Set(p.Mid(1+ix)); - return p; - } - -#endif //defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_PANIC_TRACE_ENABLED - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/OsLayer/SqliteUtil.h --- a/persistentstorage/sql/OsLayer/SqliteUtil.h Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ -// 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 SQLITEUTIL_H -#define SQLITEUTIL_H - -#include - -/** -Panic codes - used by asserts in the OS porting layer and the file buffer. - -@see KPanicCategory - -@internalComponent -*/ -enum TSqlitePanic - { - ESqliteOsPanicNullOsLayerDataPtr = 1, - ESqliteOsPanicInvalidWAmount = 2, - ESqliteOsPanicOffset64bit = 3, - ESqliteOsPanicInvalidOpType =11, - ESqliteOsPanicInvalidFhStr =12, - ESqliteOsPanicInvalidFhData =13, - ESqliteOsPanicInvalidArg =14, - ESqliteOsPanicInvalidRAmount =15, - ESqliteOsPanicOsLayerDataExists =16, - ESqliteOsPanicInvalidDrive =17, - ESqliteOsPanicInvalidSectorSize =18, - ESqliteOsPanicInternalError =19, - ESqliteOsPanicNullDbFilePtr =20, - ESqliteOsPanicFastCounterFreq =21, - // - EFBufPanicCapacity =101, - EFBufPanicNullBuf =102, - EFBufPanicBufLen =103, - EFBufPanicFilePos =104, - EFBufPanicFileSize =105, - EFBufPanicFileHandle =106, - EFBufPanicFsHandle =107, - EFBufPanicMsgHandle =108, - EFBufPanicMsgIndex =109, - EFBufPanicFileNameLen =110, - EFBufPanicNullThis =111, - EFBufPanicDirty =112, - EFBufPanicNextReadFilePos =113, - EFBufPanicNextReadFilePosHits =114, - EFBufPanicFileBlockSize =115, - EFBufPanicRwDataLength =116, - }; - -//////////////////////////////////////////////////////////////////////////////////////////// - -//All macros in this header will have a non-void definition only if the OST_TRACE_COMPILER_IN_USE macro -//is defined. -//In order to get the traces enabled, the OST_TRACE_COMPILER_IN_USE macro has to be defined in -//OstTraceDefinitions.h file. -//After that, the trace output can be redirected by defining _SQL_RDEBUG_PRINT or specific categories -//of traces can be enabled/disabled. - -//Enable _SQLITE_RDEBUG_PRINT if you want to redirect the OS porting layer and file buffer tracing output via RDebug::Print() -//#define _SQLITE_RDEBUG_PRINT - -//Enable _SQLITE_OS_TRACE_ENABLED if you get the OS porting layer traces compiled in the binary -//#define _SQLITE_OS_TRACE_ENABLED - -//Enable _SQLITE_FBUF_TRACE_ENABLED if you get the file buffer traces compiled in the binary -//#define _SQLITE_FBUF_TRACE_ENABLED - -#ifdef _DEBUG - //Enable _SQLITE_PANIC_TRACE_ENABLED if you want to get more detailed output regarding panics - //#define _SQLITE_PANIC_TRACE_ENABLED -#endif - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -//Wrap every string (file name, file path, etc.) you want to trace, in a __SQLITEPRNSTR()/__SQLITEPRNSTR8() macro. -//There is a difference how RDebug::Print() and OstTraceExt() work. -#if defined _SQLITE_RDEBUG_PRINT - const TInt KSqliteMaxPrnStrLen = 512; - #define __SQLITEPRNSTR(des) &des - const TDesC* SqliteDes8to16Ptr(const TDesC8& aDes); - #define __SQLITEPRNSTR8(des) SqliteDes8to16Ptr(des) -#else - #define __SQLITEPRNSTR(des) des - #define __SQLITEPRNSTR8(des) des -#endif - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -Set of useful functions to print diagnostic messages on the console when a panic occurs. - -@internalComponent -*/ -class TSqliteUtil - { -public: - static TInt Panic(const TText* aFile, TInt aLine, TInt aPanicCode, TUint aHandle); - -private: - static TPtrC FileName(const TText* aFile); - - }; - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#define __SQLITESTRING(str) _S(str) - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -//__SQLITEPANIC/__SQLITEPANIC2 macro is used for printing out additional information when panic occurs in SQLite OS porting layer and the file buffer: -//source file name, line number, "this" pointer, panic category. -#define __SQLITEPANIC(aPanicCode) TSqliteUtil::Panic(__SQLITESTRING(__FILE__), __LINE__, aPanicCode, (TUint)this) -#define __SQLITEPANIC2(aPanicCode) TSqliteUtil::Panic(__SQLITESTRING(__FILE__), __LINE__, aPanicCode, 0) - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifdef _SQLITE_OS_TRACE_ENABLED - #define SQLITE_TRACE_OS(trace) trace -#else - #define SQLITE_TRACE_OS(trace) do {} while(0) -#endif - -#ifdef _SQLITE_FBUF_TRACE_ENABLED - #define SQLITE_TRACE_FBUF(trace) trace -#else - #define SQLITE_TRACE_FBUF(trace) do {} while(0) -#endif - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#endif //SQLITEUTIL_H diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/OsLayer/os_symbian.cpp --- a/persistentstorage/sql/OsLayer/os_symbian.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/OsLayer/os_symbian.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -40,21 +40,50 @@ #include "SqliteSymbian.h" #include "FileBuf64.h" #include +#include "UTraceSql.h" #ifdef _SQLPROFILER #include #include "../INC/SqlResourceProfiler.h" #endif -#include "SqliteUtil.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "os_symbianTraces.h" -#endif -#include "SqliteTraceDef.h" ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/** +Panic category - used by asserts in this file (the OS porting layer). + +@see TPanicCodes + +@internalComponent +*/ +_LIT(KPanicCategory, "Sqlite"); + +/** +Panic codes - used by asserts in this file (the OS porting layer). + +@see KPanicCategory + +@internalComponent +*/ +enum TPanicCodes + { + EPanicNullOsLayerDataPtr = 1, + EPanicInvalidWAmount = 2, + EPanicOffset64bit = 3, + EPanicInvalidOpType =11, + EPanicInvalidFhStr =12, + EPanicInvalidFhData =13, + EPanicInvalidArg =14, + EPanicInvalidRAmount =15, + EPanicOsLayerDataExists =16, + EPanicInvalidDrive =17, + EPanicInvalidSectorSize =18, + EPanicInternalError =19, + EPanicNullDbFilePtr =20, + EPanicFastCounterFreq =21 + }; + //The SQLite temp files willl be created in this subdir _LIT(KTempFileDir, "temp"); @@ -395,7 +424,7 @@ fname.Copy(fn8); } // 0 1 2 3 4 5 6 7 8 9 10 - RDebug::Print(_L("[SQL-OS]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬%c¬%S¬%d¬%d¬%ld¬%d¬%ld¬%ld¬%ld¬%S\n"), + RDebug::Print(_L("[SQL-OS]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬%c¬%S¬%d¬%d¬%ld¬%d¬%ld¬%ld¬%ld¬%S\r\n"), //[SQL-OS] //Handle //Time from start, microseconds @@ -459,7 +488,7 @@ { TInt ticksPerSec = 0; TInt err = HAL::Get(HAL::EFastCounterFrequency, ticksPerSec); - __ASSERT_ALWAYS(err == KErrNone, __SQLITEPANIC2(ESqliteOsPanicFastCounterFreq)); + __ASSERT_ALWAYS(err == KErrNone, User::Panic(KPanicCategory, EPanicFastCounterFreq)); return ticksPerSec; } @@ -653,47 +682,6 @@ #endif//_SQLPROFILER /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -Os2SqliteErr() is called at the end of many of the interface functions of the OS porting layer (wherever it is appropriate - -TFileIo and TVfs interfaces). The purpose of this function is to identify the "out of memory" and "disk is full" errors -reported by the used Symbian OS APIs (aOsErr parameter) and report them to SQLite as SQLITE_FULL and SQLITE_NOMEM errors. -The KErrEof error (TFileIo::Read() can return KErrEof) is reported to SQLite as SQLITE_IOERR_SHORT_READ. The rest of failures -are reported as the error specified in aDefaultErr parameter. - -@param aOsErr Symbian OS error -@param aDefaultErr The default SQLite error that should be used if the aOsErr parameter is not one of: - KErrNone, KErrEof, KErrNoMemory, KErrDiskFull -@return SQLITE_OK, The OS porting layer function call has completed successfully, - SQLITE_IOERR_SHORT_READ, The amount of the data read is less than the requested amount, - SQLITE_IOERR_NOMEM, Out of memory, - SQLITE_FULL, The disk is full, - aDefaultErr, The rest of failures will be reported as aDefaultErr. -*/ -static TInt Os2SqliteErr(TInt aOsErr, TInt aDefaultErr) - { - switch(aOsErr) - { - case KErrNone: - return SQLITE_OK; - case KErrEof: - return SQLITE_IOERR_SHORT_READ; - case KErrNoMemory: - return SQLITE_IOERR_NOMEM; - case KErrDiskFull: - return SQLITE_FULL; - default: -#ifdef _DEBUG - RDebug::Print(_L("SQLite OS porting layer, Os2SqliteErr(), err=%d\n"), aOsErr); - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, OS2SQLITEERR, "OS;0;Os2SqliteErr;aOsErr=%d", aOsErr)); -#endif - break; - } - return aDefaultErr; - } - - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////// COsLayerData class declaration ////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -859,7 +847,8 @@ static int Sleep(sqlite3_vfs* aVfs, int aMicrosec); static int CurrentTime(sqlite3_vfs* aVfs, double* aNow); static int GetLastError(sqlite3_vfs *sVfs, int aBufLen, char* aBuf); - static TInt DoGetDeviceCharacteristicsAndSectorSize(TDbFile& aDbFile, TInt& aRecReadBufSize); + static TInt DoGetDeviceCharacteristicsAndSectorSize(TDbFile& aDbFile, TInt& aRecReadBufSize); + private: static TInt DoOpenFromHandle(TDbFile& aDbFile, const RMessage2& aMsg, TBool aReadOnly); static inline TInt DoGetVolumeIoParamInfo(RFs& aFs, TInt aDriveNo, TVolumeIOParamInfo& aVolumeInfo); @@ -969,14 +958,12 @@ */ /* static */ TInt COsLayerData::Create() { - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, COSLAYERDATA_CREATE_ENTRY, "OS-Entry;0;COsLayerData::Create")); - __ASSERT_DEBUG(!COsLayerData::iOsLayerData, __SQLITEPANIC2(ESqliteOsPanicOsLayerDataExists)); + __ASSERT_DEBUG(!COsLayerData::iOsLayerData, User::Panic(KPanicCategory, EPanicOsLayerDataExists)); if(!COsLayerData::iOsLayerData) { COsLayerData::iOsLayerData = new COsLayerData; if(!COsLayerData::iOsLayerData) { - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, COSLAYERDATA_CREATE_EXIT1, "OS-Exit;0;COsLayerData::Create;err=KErrNoMemory")); return KErrNoMemory; } TInt err = COsLayerData::iOsLayerData->DoCreate(); @@ -984,11 +971,9 @@ { delete COsLayerData::iOsLayerData; COsLayerData::iOsLayerData = NULL; - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, COSLAYERDATA_CREATE_EXIT2, "OS-Exit;0;COsLayerData::Create;err=%d", err)); return err; } } - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, COSLAYERDATA_CREATE_EXIT3, "OS-Exit;0;COsLayerData::Create;err=KErrNone")); return KErrNone; } @@ -999,7 +984,6 @@ { delete COsLayerData::iOsLayerData; COsLayerData::iOsLayerData = NULL; - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, COSLAYERDATA_DESTROY, "OS;0;COsLayerData::Destroy")); } /** @@ -1009,7 +993,7 @@ */ /* static */ inline COsLayerData& COsLayerData::Instance() { - __ASSERT_DEBUG(COsLayerData::iOsLayerData != NULL, __SQLITEPANIC2(ESqliteOsPanicNullOsLayerDataPtr)); + __ASSERT_DEBUG(COsLayerData::iOsLayerData != NULL, User::Panic(KPanicCategory, EPanicNullOsLayerDataPtr)); return *COsLayerData::iOsLayerData; } @@ -1083,7 +1067,7 @@ */ inline void COsLayerData::RetrieveAndResetFhData(const RMessage2*& aMsg, TBool& aReadOnly) { - __ASSERT_DEBUG(iMessage != NULL, __SQLITEPANIC(ESqliteOsPanicInvalidFhData)); + __ASSERT_DEBUG(iMessage != NULL, User::Panic(KPanicCategory, EPanicInvalidFhData)); aMsg = iMessage; aReadOnly = iReadOnly; iMessage = NULL; @@ -1109,7 +1093,6 @@ */ inline COsLayerData::~COsLayerData() { - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, COSLAYERDATA_COSLAYERDATA2, "OS;0;COsLayerData::~COsLayerData;iFs.Handle()=0x%X", (TUint)iFs.Handle())); __FS_CALL(EFsOpFsClose, 0); iFs.Close(); } @@ -1166,7 +1149,6 @@ { return err; } - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, COSLAYERDATA_DOCREATE, "OS;0;COsLayerData::DoCreate;iFs.Handle()=0x%X;sysDrive=%d;iSysPrivDir=%S", (TUint)iFs.Handle(), sysDrive, __SQLITEPRNSTR(iSysPrivDir))); return KErrNone; } @@ -1216,7 +1198,6 @@ osErr = sqliteErr == SQLITE_NOMEM ? KErrNoMemory : KErrGeneral; COsLayerData::Destroy(); } - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, SQLITE3SYMBIANLIBINIT, "OS;0;sqlite3SymbianLibInit;osErr=%d", osErr)); return osErr; } @@ -1236,7 +1217,6 @@ { (void)sqlite3_shutdown(); COsLayerData::Destroy(); - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, SQLITE3SYMBIANLIBFINALIZE, "OS;0;sqlite3SymbianLibFinalize")); } /** @@ -1273,7 +1253,7 @@ { wchar_t* dest = reinterpret_cast (const_cast (aFileNameDestBuf.Ptr())); TInt len = mbstowcs(dest, aFileName, aFileNameDestBuf.MaxLength()); - __ASSERT_DEBUG(len >= 0, __SQLITEPANIC2(ESqliteOsPanicInternalError)); + __ASSERT_DEBUG(len >= 0, User::Panic(KPanicCategory, EPanicInternalError)); //If len == aFileNameDestBuf.MaxLength(), then the output buffer is too small. if(len < aFileNameDestBuf.MaxLength()) { @@ -1302,7 +1282,7 @@ char* dest = reinterpret_cast (const_cast (aFileNameDestBuf.Ptr())); const wchar_t* src = reinterpret_cast (aFileName.Ptr()); TInt len = wcstombs(dest, src, aFileNameDestBuf.MaxLength()); - __ASSERT_DEBUG(len >= 0, __SQLITEPANIC2(ESqliteOsPanicInternalError)); + __ASSERT_DEBUG(len >= 0, User::Panic(KPanicCategory, EPanicInternalError)); //If len == aFileNameDestBuf.MaxLength(), then the output buffer is too small. if(len < aFileNameDestBuf.MaxLength()) { @@ -1444,7 +1424,7 @@ static void FhExtractAndStore(TDes& aDbFileName) { TInt fhStartPos = aDbFileName.Locate(TChar(KFhSeparator)); - __ASSERT_DEBUG(fhStartPos == KFhMarkPos, __SQLITEPANIC2(ESqliteOsPanicInvalidFhStr)); + __ASSERT_DEBUG(fhStartPos == KFhMarkPos, User::Panic(KPanicCategory, EPanicInvalidFhStr)); //If this file name string contains file handles if(fhStartPos == KFhMarkPos) { @@ -1452,12 +1432,12 @@ TLex lex(aDbFileName.Mid(fhStartPos + KFhMsgAddrPos, KFhMsgAddrLen)); TUint32 addr; TInt err = lex.Val(addr, EHex); - __ASSERT_DEBUG(err == KErrNone, __SQLITEPANIC2(ESqliteOsPanicInvalidFhStr)); + __ASSERT_DEBUG(err == KErrNone, User::Panic(KPanicCategory, EPanicInvalidFhStr)); if(err == KErrNone) { //Cast the address to RMessage2 pointer. const RMessage2* msg = reinterpret_cast (addr); - __ASSERT_DEBUG(msg != NULL, __SQLITEPANIC2(ESqliteOsPanicInvalidFhStr)); + __ASSERT_DEBUG(msg != NULL, User::Panic(KPanicCategory, EPanicInvalidFhStr)); if(msg) { //Store the data from aDbFileName in the single COsLayerData instance. @@ -1489,7 +1469,6 @@ iIsJournal = EFalse; #endif pMethods = 0; - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TDBFILE_TDBFILE, "OS;0x%X;TDbFile::TDbFile", (TUint)this)); } /** @@ -1510,7 +1489,7 @@ */ static inline TDbFile& DbFile(sqlite3_file* aDbFile) { - __ASSERT_DEBUG(aDbFile != 0, __SQLITEPANIC2(ESqliteOsPanicNullDbFilePtr)); + __ASSERT_DEBUG(aDbFile != 0, User::Panic(KPanicCategory, EPanicNullDbFilePtr)); return *(static_cast (aDbFile)); } @@ -1531,12 +1510,12 @@ */ /* static */ int TFileIo::Close(sqlite3_file* aDbFile) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TFILEIO_CLOSE1, "OS;0x%X;TFileIo::Close", (TUint)&dbFile)); __OS_CALL(EOsFileClose, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsFileClose], ::OsCallProfile(dbFile.iIsJournal, EOsFileClose), 0, 0, aDbFile, 0); __FS_CALL(EFsOpFileClose, 0); - dbFile.iFileBuf.Close(); + dbFile.iFileBuf.Close(); return SQLITE_OK; } @@ -1564,23 +1543,38 @@ */ /* static */ int TFileIo::Read(sqlite3_file* aDbFile, void* aBuf, int aAmt, sqlite3_int64 aOffset) { + SQLUTRACE_PROFILER(aDbFile); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileRead, aAmt, aOffset)); TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_READ_ENTRY, "OS-Entry;0x%X;TFileIo::Read;aAmt=%d;aOffset=%lld", (TUint)&dbFile, aAmt, aOffset)); __OS_CALL(EOsFileRead, 0, 0); __COUNTER_INCR(TheSqlSrvProfilerFileRead); __OSTIME_COUNTER(TheOsCallTicks[EOsFileRead], ::OsCallProfile(dbFile.iIsJournal, EOsFileRead), aOffset, aAmt, aDbFile, 0); TPtr8 ptr((TUint8*)aBuf, 0, aAmt); TInt err = dbFile.iFileBuf.Read(aOffset, ptr); TInt cnt = ptr.Length(); - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_IOERR_READ); - if(cnt != aAmt && (sqliteErr == SQLITE_OK || sqliteErr == SQLITE_IOERR_SHORT_READ)) + TInt sqliteErr = SQLITE_IOERR_READ; + switch(err) { - Mem::FillZ(static_cast (aBuf) + cnt, aAmt - cnt); - err = KErrEof; - sqliteErr = SQLITE_IOERR_SHORT_READ; + case KErrNone: + sqliteErr = SQLITE_OK; + if(cnt != aAmt) + { + Mem::FillZ(static_cast (aBuf) + cnt, aAmt - cnt); + sqliteErr = SQLITE_IOERR_SHORT_READ; + err = KErrEof; + } + break; + case KErrEof: + Mem::FillZ(static_cast (aBuf) + cnt, aAmt - cnt); + sqliteErr = SQLITE_IOERR_SHORT_READ; + break; + case KErrNoMemory: + sqliteErr = SQLITE_IOERR_NOMEM; + break; + default: + break; } COsLayerData::Instance().SetOsErrorCode(err); - SQLITE_TRACE_OS(OstTraceExt4(TRACE_INTERNALS, TFILEIO_READ_EXIT, "OS-Exit;0x%X;TFileIo::Read;cnt=%d;err=%d;sqliteErr=%d", (TUint)&dbFile, cnt, err, sqliteErr)); return sqliteErr; } @@ -1659,11 +1653,9 @@ */ /* static */ int TFileIo::Write(sqlite3_file* aDbFile, const void* aData, int aAmt, sqlite3_int64 aOffset) { + SQLUTRACE_PROFILER(aDbFile); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileWrite, aAmt, aOffset)); TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_WRITE_ENTRY, "OS-Entry;0x%X;TFileIo::Write;aAmt=%d;aOffset=%lld", (TUint)&dbFile, aAmt, aOffset)); - __OS_CALL(EOsFileWrite, 0, 0); - __COUNTER_INCR(TheSqlSrvProfilerFileWrite); - __OSTIME_COUNTER(TheOsCallTicks[EOsFileWrite], ::OsCallProfile(dbFile.iIsJournal, EOsFileWrite), aOffset, aAmt, aDbFile, 0); TInt err = KErrNone; if(!dbFile.iIsFileCreated) {//Create a temp file if it has not been created. @@ -1672,34 +1664,35 @@ if(err != KErrNone) { COsLayerData::Instance().SetOsErrorCode(err); - return ::Os2SqliteErr(err, SQLITE_FULL); + return err == KErrNoMemory ? SQLITE_IOERR_NOMEM : SQLITE_FULL; } - err = KErrAccessDenied; - if(!dbFile.iReadOnly) - { - TPtrC8 ptr((const TUint8*)aData, aAmt); - err = dbFile.iFileBuf.Write(aOffset, ptr); - } - COsLayerData::Instance().SetOsErrorCode(err); - const TInt KFreePageCountOffset = 36;//hard-coded constant. SQLite does not offer anything - a constant or #define. - //The checks in the "if" bellow do: - // - "err == KErrNone" - check the free page count only after a successful "write"; - // - "aOffset == 0" - check the free page count only if the write operation affects the system page (at aOffset = 0); - // - "aAmt >= (KFreePageCountOffset + sizeof(int))" - check the free page count only if the amount of bytes to be written - // is more than the offset of the free page counter (othewrise the free page counter is not affected - // by this write operation); - // - "dbFile.iFreePageCallback.IsValid()" - check the free page count only if there is a valid callback; - if(err == KErrNone && aOffset == 0 && aAmt >= (KFreePageCountOffset + sizeof(int)) && dbFile.iFreePageCallback.IsValid()) - { - const TUint8* ptr = static_cast (aData) + KFreePageCountOffset; - TInt freePageCount = (ptr[0] << 24) | (ptr[1] << 16) | (ptr[2] << 8) | ptr[3]; - dbFile.iFreePageCallback.CheckAndCallback(freePageCount); - } - - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_FULL); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_WRITE_EXIT, "OS-Exit;0x%X;TFileIo::Write;err=%d;sqliteErr=%d", (TUint)&dbFile, err, sqliteErr)); - return sqliteErr; + __OS_CALL(EOsFileWrite, 0, 0); + __COUNTER_INCR(TheSqlSrvProfilerFileWrite); + __OSTIME_COUNTER(TheOsCallTicks[EOsFileWrite], ::OsCallProfile(dbFile.iIsJournal, EOsFileWrite), aOffset, aAmt, aDbFile, 0); + err = KErrAccessDenied; + if(!dbFile.iReadOnly) + { + TPtrC8 ptr((const TUint8*)aData, aAmt); + err = dbFile.iFileBuf.Write(aOffset, ptr); + } + COsLayerData::Instance().SetOsErrorCode(err); + + const TInt KFreePageCountOffset = 36;//hard-coded constant. SQLite does not offer anything - a constant or #define. + //The checks in the "if" bellow do: + // - "err == KErrNone" - check the free page count only after a successful "write"; + // - "aOffset == 0" - check the free page count only if the write operation affects the system page (at aOffset = 0); + // - "aAmt >= (KFreePageCountOffset + sizeof(int))" - check the free page count only if the amount of bytes to be written + // is more than the offset of the free page counter (othewrise the free page counter is not affected + // by this write operation); + // - "dbFile.iFreePageCallback.IsValid()" - check the free page count only if there is a valid callback; + if(err == KErrNone && aOffset == 0 && aAmt >= (KFreePageCountOffset + sizeof(int)) && dbFile.iFreePageCallback.IsValid()) + { + const TUint8* ptr = static_cast (aData) + KFreePageCountOffset; + TInt freePageCount = (ptr[0] << 24) | (ptr[1] << 16) | (ptr[2] << 8) | ptr[3]; + dbFile.iFreePageCallback.CheckAndCallback(freePageCount); + } + return err == KErrNone ? SQLITE_OK : (err == KErrNoMemory ? SQLITE_IOERR_NOMEM : SQLITE_FULL); } /** @@ -1724,8 +1717,9 @@ */ /* static */ int TFileIo::Truncate(sqlite3_file* aDbFile, sqlite3_int64 aLength) { + SQLUTRACE_PROFILER(aDbFile); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileTruncate, aLength)); TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_TRUNCATE_ENTRY, "OS-Entry;0x%X;TFileIo::Truncate;aLength=%lld", (TUint)&dbFile, aLength)); __OS_CALL(EOsFileTruncate, 0, 0); __COUNTER_INCR(TheSqlSrvProfilerFileSetSize); __OSTIME_COUNTER(TheOsCallTicks[EOsFileTruncate], ::OsCallProfile(dbFile.iIsJournal, EOsFileTruncate), aLength, 0, aDbFile, 0); @@ -1737,9 +1731,7 @@ __FS_CALL(EFsOpFileSetSize, 0); TInt err = dbFile.iFileBuf.SetSize(aLength); COsLayerData::Instance().SetOsErrorCode(err); - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_IOERR); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_TRUNCATE_EXIT, "OS-Exit;0x%X;TFileIo::Truncate;err=%d;sqliteErr=%d", (TUint)&dbFile, err, sqliteErr)); - return sqliteErr; + return err == KErrNone ? SQLITE_OK : (err == KErrNoMemory ? SQLITE_IOERR_NOMEM : SQLITE_IOERR); } /** @@ -1762,8 +1754,8 @@ */ /* static */int TFileIo::Sync(sqlite3_file* aDbFile, int /* aFlags */) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TFILEIO_SYNC_ENTRY, "OS-Entry;0x%X;TFileIo::Sync", (TUint)&dbFile)); __OS_CALL(EOsFileSync, 0, 0); __COUNTER_INCR(TheSqlSrvProfilerFileSync); __OSTIME_COUNTER(TheOsCallTicks[EOsFileSync], ::OsCallProfile(dbFile.iIsJournal, EOsFileSync), 0, 0, aDbFile, 0); @@ -1775,9 +1767,7 @@ __FS_CALL(EFsOpFileSync, 0); TInt err = dbFile.iFileBuf.Flush(); COsLayerData::Instance().SetOsErrorCode(err); - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_IOERR); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_SYNC_EXIT, "OS-Exit;0x%X;TFileIo::Sync;err=%d;sqliteErr=%d", (TUint)&dbFile, err, sqliteErr)); - return sqliteErr; + return err == KErrNone ? SQLITE_OK : (err == KErrNoMemory ? SQLITE_IOERR_NOMEM : SQLITE_IOERR); } /** @@ -1800,16 +1790,18 @@ */ /* static */ int TFileIo::FileSize(sqlite3_file* aDbFile, sqlite3_int64* aSize) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TFILEIO_FILESIZE_ENTRY, "OS-Entry;0x%X;TFileIo::FileSize", (TUint)&dbFile)); __OS_CALL(EOsFileFileSize, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsFileFileSize], ::OsCallProfile(dbFile.iIsJournal, EOsFileFileSize), 0, 0, aDbFile, 0); __FS_CALL(EFsOpFileSize, 0); TInt err = dbFile.iFileBuf.Size(*aSize); COsLayerData::Instance().SetOsErrorCode(err); - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_IOERR); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_FILESIZE_EXIT, "OS-Exit;0x%X;TFileIo::FileSize;err=%d;sqliteErr=%d", (TUint)&dbFile, err, sqliteErr)); - return sqliteErr; + if(err == KErrNone) + { + return SQLITE_OK; + } + return err == KErrNoMemory ? SQLITE_IOERR_NOMEM : SQLITE_IOERR; } /** @@ -1832,6 +1824,7 @@ */ /* static */ int TFileIo::Lock(sqlite3_file* aDbFile, int aLockType) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileLock, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsFileLock], ::OsCallProfile(dbFile.iIsJournal, EOsFileLock), aLockType, 0, aDbFile, 0); @@ -1864,6 +1857,7 @@ */ /* static */ int TFileIo::Unlock(sqlite3_file* aDbFile, int aLockType) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileUnlock, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsFileUnlock], ::OsCallProfile(dbFile.iIsJournal, EOsFileUnlock), aLockType, 0, aDbFile, 0); @@ -1892,6 +1886,7 @@ */ /* static */ int TFileIo::CheckReservedLock(sqlite3_file* aDbFile, int *aResOut) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileCheckReservedLock, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsFileCheckReservedLock], ::OsCallProfile(dbFile.iIsJournal, EOsFileCheckReservedLock), 0, 0, aDbFile, 0); @@ -1926,8 +1921,9 @@ */ /* static */ int TFileIo::FileControl(sqlite3_file* aDbFile, int aOp, void* aArg) { + SQLUTRACE_PROFILER(aDbFile); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileFileCtr, aOp)); TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_FILECONTROL_ENTRY, "OS-Entry;0x%X;TFileIo::FileControl;aOp=%d", (TUint)&dbFile, aOp)); __OS_CALL(EOsFileFileControl, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsFileFileControl], ::OsCallProfile(dbFile.iIsJournal, EOsFileFileControl), aOp, 0, aDbFile, 0); TInt err = KErrNone; @@ -1955,9 +1951,7 @@ break; } COsLayerData::Instance().SetOsErrorCode(err); - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_ERROR); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_FILECONTROL_EXIT, "OS-Exit;0x%X;TFileIo::FileControl;err=%d;sqliteErr=%d", (TUint)&dbFile, err, sqliteErr)); - return sqliteErr; + return err == KErrNone ? SQLITE_OK : SQLITE_ERROR; } /** @@ -1979,10 +1973,11 @@ */ /* static */ int TFileIo::SectorSize(sqlite3_file* aDbFile) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileSectorSize, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsFileSectorSize], ::OsCallProfile(dbFile.iIsJournal, EOsFileSectorSize), 0, 0, aDbFile, 0); - __ASSERT_DEBUG(dbFile.iSectorSize > 0, __SQLITEPANIC2(ESqliteOsPanicInternalError)); + __ASSERT_DEBUG(dbFile.iSectorSize > 0, User::Panic(KPanicCategory, EPanicInternalError)); if(dbFile.iSectorSize > 0) { return dbFile.iSectorSize; @@ -2009,10 +2004,11 @@ */ /* static */ int TFileIo::DeviceCharacteristics(sqlite3_file* aDbFile) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); __OS_CALL(EOsFileDeviceCharacteristics, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsFileDeviceCharacteristics], ::OsCallProfile(dbFile.iIsJournal, EOsFileDeviceCharacteristics), 0, 0, aDbFile, 0); - __ASSERT_DEBUG(dbFile.iDeviceCharacteristics >= 0, __SQLITEPANIC2(ESqliteOsPanicInternalError)); + __ASSERT_DEBUG(dbFile.iDeviceCharacteristics >= 0, User::Panic(KPanicCategory, EPanicInternalError)); if(dbFile.iDeviceCharacteristics >= 0) { return dbFile.iDeviceCharacteristics; @@ -2069,9 +2065,7 @@ /* static */ inline TInt TVfs::DoGetVolumeIoParamInfo(RFs& aFs, TInt aDriveNo, TVolumeIOParamInfo& aVolumeInfo) { __FS_CALL(EFsOpFsVolumeIoParam, 0); - TInt err = aFs.VolumeIOParam(aDriveNo, aVolumeInfo); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TVFS_DOGETVOLUMEIOPARAMINFO, "OS;0;TVfs::DoGetVolumeIoParamInfo;aDriveNo=%d;err=%d", aDriveNo, err)); - return err; + return aFs.VolumeIOParam(aDriveNo, aVolumeInfo); } /** @@ -2159,7 +2153,7 @@ sectorSize = aVolumeInfo.iBlockSize; } } - __ASSERT_DEBUG(sectorSize > 0 && (sectorSize & (sectorSize - 1)) == 0, __SQLITEPANIC2(ESqliteOsPanicInternalError)); + __ASSERT_DEBUG(sectorSize > 0 && (sectorSize & (sectorSize - 1)) == 0, User::Panic(KPanicCategory, EPanicInternalError)); return sectorSize; } @@ -2188,8 +2182,8 @@ */ /* static */ TInt TVfs::DoGetDeviceCharacteristicsAndSectorSize(TDbFile& aDbFile, TInt& aRecReadBufSize) { - __ASSERT_DEBUG(aDbFile.iDeviceCharacteristics < 0, __SQLITEPANIC2(ESqliteOsPanicInternalError)); - __ASSERT_DEBUG(aDbFile.iSectorSize <= 0, __SQLITEPANIC2(ESqliteOsPanicInternalError)); + __ASSERT_DEBUG(aDbFile.iDeviceCharacteristics < 0, User::Panic(KPanicCategory, EPanicInternalError)); + __ASSERT_DEBUG(aDbFile.iSectorSize <= 0, User::Panic(KPanicCategory, EPanicInternalError)); TInt driveNo; TDriveInfo driveInfo; __FS_CALL(EFsOpFileDrive, 0); @@ -2207,7 +2201,6 @@ aDbFile.iDeviceCharacteristics = TVfs::DoGetDeviceCharacteristics(driveInfo, volumeInfo); aDbFile.iSectorSize = TVfs::DoGetSectorSize(driveInfo, volumeInfo); aRecReadBufSize = volumeInfo.iRecReadBufSize; - SQLITE_TRACE_OS(OstTraceExt5(TRACE_INTERNALS, TVFS_DOGETGETDEVICECHARACTERISTICSANDSECTORSIZE, "OS;0x%X;TVfs::DoGetDeviceCharacteristicsAndSectorSize;driveNo=%d;sectorSize=%d;devCharact=0x%X;readBufSize=%d", (TUint)&aDbFile, driveNo, aDbFile.iSectorSize, (TUint)aDbFile.iDeviceCharacteristics, volumeInfo.iRecReadBufSize)); return KErrNone; } @@ -2263,10 +2256,8 @@ COsLayerData& osLayerData = COsLayerData::Instance(); aDbFile.iFileBuf.Close(); - __SQLITETRACE_OSEXPR(TInt err2 =) osLayerData.iFs.Delete(aFname); - SQLITE_TRACE_OS(OstTraceExt4(TRACE_INTERNALS, TVFS_DOFILESIZECORRUPTIONCHECK1, "OS;0x%X;TVfs::DoFileSizeCorruptionCheck;size=%lld;err=%d;deleteErr=%d", (TUint)&aDbFile, size, err, err2)); + (void) osLayerData.iFs.Delete(aFname); err = aDbFile.iFileBuf.Create(osLayerData.iFs, aFname, aFmode); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TVFS_DOFILESIZECORRUPTIONCHECK2, "OS;0x%X;TVfs::DoFileSizeCorruptionCheck;createErr=%d", (TUint)&aDbFile, err)); } return err; } @@ -2304,95 +2295,101 @@ @see TDbFile */ /* static */ int TVfs::Open(sqlite3_vfs* aVfs, const char* aFileName, sqlite3_file* aDbFile, int aFlags, int* aOutFlags) - { - __OS_CALL(EOsVfsOpen, 0, 0); - __OSTIME_COUNTER(TheOsCallTicks[EOsVfsOpen], ::OsCallProfile(EFalse, EOsVfsOpen), 0, 0, aDbFile, aFileName); - COsLayerData& osLayerData = COsLayerData::Instance(); - new (aDbFile) TDbFile; - TDbFile& dbFile = ::DbFile(aDbFile); + { + SQLUTRACE_PROFILER(aVfs); + __OS_CALL(EOsVfsOpen, 0, 0); + __OSTIME_COUNTER(TheOsCallTicks[EOsVfsOpen], ::OsCallProfile(EFalse, EOsVfsOpen), 0, 0, aDbFile, aFileName); + + COsLayerData& osLayerData = COsLayerData::Instance(); + TFhStrType fhStrType = ENotFhStr; + new (aDbFile) TDbFile; + TDbFile& dbFile = ::DbFile(aDbFile); + if(!aFileName) { //It is to create and open a temp file if aFileName is NULL. In this case, //we will defer the file creation util it is needed. + dbFile.pMethods = &TheFileIoApi; dbFile.iIsFileCreated = EFalse; if(aOutFlags) { *aOutFlags = SQLITE_OPEN_READWRITE; } - osLayerData.SetOsErrorCode(KErrNone); return SQLITE_OK; } - TFileName fname; + + TFileName fname; if(!::ConvertToUnicode(aFileName, fname)) - { + { osLayerData.SetOsErrorCode(KErrBadName); return SQLITE_CANTOPEN; - } - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TVFS_OPEN_ENTRY, "OS-Entry;0x%X;TVfs::Open;fname=%S;aFlags=0x%X", (TUint)&aDbFile, __SQLITEPRNSTR(fname), (TUint)aFlags)); - TFhStrType fhStrType = aFileName ? ::FhStringProps(aFileName) : ENotFhStr; - TInt err = KErrNone; - if(fhStrType == EFhMainDbStr) - {//Main db file, open from handle - const RMessage2* msg; - TBool readOnly; - osLayerData.RetrieveAndResetFhData(msg, readOnly); - err = msg != NULL ? TVfs::DoOpenFromHandle(dbFile, *msg, readOnly) : KErrGeneral; - } - else - { - if(fhStrType == EFhStr) - {//Not the main db file. Remove invalid characters in the file name - ::FhConvertToFileName(fname, osLayerData.iSysPrivDir);//If fname does not have a path, iSysPrivDir will be used - } - TInt fmode = EFileRead; - if(aFlags & SQLITE_OPEN_READWRITE) - { - fmode |= EFileWrite; - } - if(aFlags & SQLITE_OPEN_EXCLUSIVE) - { - fmode |= EFileShareExclusive; - } - if(aFlags & SQLITE_OPEN_DELETEONCLOSE) - { - fmode |= EDeleteOnClose; - } - err = KErrAccessDenied; - TInt prevErr = KErrNone; - if(aFlags & SQLITE_OPEN_CREATE) - { - __FS_CALL(EFsOpFileCreate, 0); - prevErr = err = dbFile.iFileBuf.Create(osLayerData.iFs, fname, fmode); - } - if(err != KErrNone && err != KErrNoMemory && err != KErrDiskFull) - { - __FS_CALL(EFsOpFileOpen, 0); - err = dbFile.iFileBuf.Open(osLayerData.iFs, fname, fmode); - - if(err == KErrNone && (aFlags & KJournalFileTypeBitMask)) - { - err = TVfs::DoFileSizeCorruptionCheck(dbFile, fname, fmode); - } - } - if((err != KErrNone && err != KErrNoMemory && err != KErrDiskFull) && (aFlags & SQLITE_OPEN_READWRITE)) - { - aFlags &= ~SQLITE_OPEN_READWRITE; - aFlags |= SQLITE_OPEN_READONLY; - fmode &= ~EFileWrite; - __FS_CALL(EFsOpFileOpen, 0); - err = dbFile.iFileBuf.Open(osLayerData.iFs, fname, fmode); - } - if(err != KErrNone && prevErr == KErrAccessDenied) - { - err = KErrAccessDenied; - } - } - TInt recReadBufSize = -1; - if(err == KErrNone) - { - err = TVfs::DoGetDeviceCharacteristicsAndSectorSize(dbFile, recReadBufSize); - } + } + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileOpen, aDbFile, &fname)); + fhStrType = ::FhStringProps(aFileName); + TInt err = KErrNone; + TInt recReadBufSize = -1; + if(fhStrType == EFhMainDbStr) + {//Main db file, open from handle + const RMessage2* msg; + TBool readOnly; + osLayerData.RetrieveAndResetFhData(msg, readOnly); + err = msg != NULL ? TVfs::DoOpenFromHandle(dbFile, *msg, readOnly) : KErrGeneral; + } + else + { + if(fhStrType == EFhStr) + {//Not the main db file. Remove invalid characters in the file name + ::FhConvertToFileName(fname, osLayerData.iSysPrivDir);//If fname does not have a path, iSysPrivDir will be used + } + TInt fmode = EFileRead; + if(aFlags & SQLITE_OPEN_READWRITE) + { + fmode |= EFileWrite; + } + if(aFlags & SQLITE_OPEN_EXCLUSIVE) + { + fmode |= EFileShareExclusive; + } + err = KErrAccessDenied; + TInt prevErr = KErrNone; + if(aFlags & SQLITE_OPEN_DELETEONCLOSE) + { + fmode |= EDeleteOnClose; + } + if(aFlags & SQLITE_OPEN_CREATE) + { + __FS_CALL(EFsOpFileCreate, 0); + prevErr = err = dbFile.iFileBuf.Create(osLayerData.iFs, fname, fmode); + } + if(err != KErrNone && err != KErrNoMemory && err != KErrDiskFull) + { + __FS_CALL(EFsOpFileOpen, 0); + err = dbFile.iFileBuf.Open(osLayerData.iFs, fname, fmode); + + if(err == KErrNone && (aFlags & KJournalFileTypeBitMask)) + { + err = TVfs::DoFileSizeCorruptionCheck(dbFile, fname, fmode); + } + } + if((err != KErrNone && err != KErrNoMemory && err != KErrDiskFull) && (aFlags & SQLITE_OPEN_READWRITE)) + { + aFlags &= ~SQLITE_OPEN_READWRITE; + aFlags |= SQLITE_OPEN_READONLY; + fmode &= ~EFileWrite; + __FS_CALL(EFsOpFileOpen, 0); + err = dbFile.iFileBuf.Open(osLayerData.iFs, fname, fmode); + } + if(err != KErrNone && prevErr == KErrAccessDenied) + { + err = KErrAccessDenied; + } + } + if(err == KErrNone) + { + err = TVfs::DoGetDeviceCharacteristicsAndSectorSize(dbFile, recReadBufSize); + } + osLayerData.SetOsErrorCode(err); if(err != KErrNone) { @@ -2415,9 +2412,7 @@ #ifdef _SQLPROFILER dbFile.iIsJournal = aFlags & KJournalFileTypeBitMask; #endif - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_CANTOPEN); - SQLITE_TRACE_OS(OstTraceExt4(TRACE_INTERNALS, TVFS_OPEN_EXIT, "OS-Exit;0x%X;TVfs::Open;outFlags=0x%X;err=%d;sqliteErr=%d", (TUint)&aDbFile, aOutFlags ? (TUint)*aOutFlags : 0, err, sqliteErr)); - return sqliteErr; + return err == KErrNone ? SQLITE_OK : (err == KErrNoMemory ? SQLITE_IOERR_NOMEM : SQLITE_CANTOPEN); } /** @@ -2440,6 +2435,7 @@ */ /* static */ int TVfs::Delete(sqlite3_vfs* aVfs, const char* aFileName, int /*aSyncDir*/) { + SQLUTRACE_PROFILER(aVfs); __OS_CALL(EOsVfsDelete, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsVfsDelete], ::OsCallProfile(EFalse, EOsVfsDelete), 0, 0, 0, aFileName); COsLayerData& osLayerData = COsLayerData::Instance(); @@ -2447,15 +2443,13 @@ if(!::ConvertToUnicode(aFileName, fname)) { osLayerData.SetOsErrorCode(KErrBadName); - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_DELETE1, "OS;0;TVfs::Delete;err=KErrBadName")); return SQLITE_ERROR; } - SQLITE_TRACE_OS(OstTraceExt1(TRACE_INTERNALS, TVFS_DELETE_ENTRY, "OS-Entry;0;TVfs::Delete;fname=%S", __SQLITEPRNSTR(fname))); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileName, &fname)); TFhStrType fhStrType = FhStringProps(aFileName); if(fhStrType == EFhMainDbStr) {//Deleting files not in your own private data cage - not allowed! osLayerData.SetOsErrorCode(KErrPermissionDenied); - SQLITE_TRACE_OS(OstTraceExt1(TRACE_INTERNALS, TVFS_DELETE2, "OS;0;TVfs::Delete;err=KErrPermissionDenied;fname=%S", __SQLITEPRNSTR(fname))); return SQLITE_ERROR; } if(fhStrType == EFhStr) @@ -2465,9 +2459,7 @@ __FS_CALL(EFsOpFileDelete, 0); TInt err = osLayerData.iFs.Delete(fname); osLayerData.SetOsErrorCode(err); - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_IOERR_DELETE); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TVFS_DELETE_EXIT, "OS-Exit;0;TVfs::Delete;err=%d;sqliteErr=%d", err, sqliteErr)); - return sqliteErr; + return err == KErrNone ? SQLITE_OK : (err == KErrNoMemory ? SQLITE_IOERR_NOMEM : SQLITE_IOERR_DELETE); } /** @@ -2491,6 +2483,7 @@ */ /* static */ int TVfs::Access(sqlite3_vfs* aVfs, const char* aFileName, int aFlags, int* aResOut) { + SQLUTRACE_PROFILER(aVfs); __OS_CALL(EOsVfsAccess, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsVfsAccess], ::OsCallProfile(EFalse, EOsVfsAccess), aFlags, 0, 0, aFileName); COsLayerData& osLayerData = COsLayerData::Instance(); @@ -2498,10 +2491,9 @@ if(!::ConvertToUnicode(aFileName, fname)) { osLayerData.SetOsErrorCode(KErrGeneral); - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_ACCESS1, "OS;0;TVfs::Access;err=KErrGeneral")); return SQLITE_IOERR_ACCESS; } - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TVFS_ACCESS_ENTRY, "OS-Entry;0;TVfs::Access;fname=%S;aFlags=0x%X", __SQLITEPRNSTR(fname), (TUint)aFlags)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileName, &fname)); TFhStrType fhStrType = ::FhStringProps(aFileName); if(fhStrType == EFhStr) { @@ -2514,13 +2506,11 @@ { osLayerData.SetOsErrorCode(KErrNone); *aResOut = 0; - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_ACCESS_EXIT1, "OS-Exit;0;TVfs::Access;Exists-NoFound")); return SQLITE_OK; } if(err != KErrNone) { osLayerData.SetOsErrorCode(err); - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TVFS_ACCESS_EXIT2, "OS-Exit;0;TVfs::Access;err=%d", err)); return err == KErrNoMemory ? SQLITE_IOERR_NOMEM : SQLITE_IOERR_ACCESS; } *aResOut = 0; @@ -2539,7 +2529,6 @@ break; } osLayerData.SetOsErrorCode(KErrNone); - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TVFS_ACCESS_EXIT3, "OS-Exit;0;TVfs::Access;aResOut=%d", *aResOut)); return SQLITE_OK; } @@ -2571,6 +2560,7 @@ */ /* static */ int TVfs::FullPathName(sqlite3_vfs* aVfs, const char* aRelative, int aBufLen, char* aBuf) { + SQLUTRACE_PROFILER(aVfs); __OS_CALL(EOsVfsFullPathName, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsVfsFullPathName], ::OsCallProfile(EFalse, EOsVfsFullPathName), aBufLen, 0, 0, aRelative); COsLayerData& osLayerData = COsLayerData::Instance(); @@ -2579,10 +2569,9 @@ TBuf fname; if(!::ConvertToUnicode(aRelative, fname)) { - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_FULLPATHNAME1, "OS;0;TVfs::FullPathName;err=SQLITE_ERROR")); return SQLITE_ERROR; } - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TVFS_FULLPATHNAME_ENTRY, "OS-Entry;0;TVfs::FullPathName;fname=%S;aBufLen=%d", __SQLITEPRNSTR(fname), aBufLen)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileName, &fname)); //Zero-terminate the converted file name fname.Append(TChar(0)); TParse parse; @@ -2601,10 +2590,8 @@ if(!::ConvertFromUnicode(parse.FullName(), dest8)) {//Zero the stored fh data, because it has been initialized by the FhExtractAndStore(fname) call (couple of lines above) osLayerData.StoreFhData(NULL, EFalse); - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_FULLPATHNAME_EXIT1, "OS-Exit;0;TVfs::FullPathName;err=SQLITE_ERROR")); return SQLITE_ERROR; } - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_FULLPATHNAME_EXIT2, "OS-Exit;0;TVfs::FullPathName;err=SQLITE_OK")); return SQLITE_OK; } @@ -2620,6 +2607,7 @@ */ /* static */ int TVfs::Randomness(sqlite3_vfs* aVfs, int aBufLen, char* aBuf) { + SQLUTRACE_PROFILER(aVfs); __OS_CALL(EOsVfsRandomness, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsVfsRandomness], ::OsCallProfile(EFalse, EOsVfsRandomness), aBufLen, 0, 0, 0); COsLayerData& osLayerData = COsLayerData::Instance(); @@ -2643,6 +2631,7 @@ */ /* static */ int TVfs::Sleep(sqlite3_vfs* aVfs, int aMicrosec) { + SQLUTRACE_PROFILER(aVfs); __OS_CALL(EOsVfsSleep, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsVfsSleep], ::OsCallProfile(EFalse, EOsVfsSleep), aMicrosec, 0, 0, 0); User::AfterHighRes(TTimeIntervalMicroSeconds32(aMicrosec)); @@ -2662,6 +2651,7 @@ */ /* static */ int TVfs::CurrentTime(sqlite3_vfs* aVfs, double* aNow) { + SQLUTRACE_PROFILER(aVfs); __OS_CALL(EOsVfsCurrentTime, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsVfsCurrentTime], ::OsCallProfile(EFalse, EOsVfsCurrentTime), 0, 0, 0, 0); TTime now; @@ -2697,6 +2687,7 @@ */ /* static */int TVfs::GetLastError(sqlite3_vfs* aVfs, int /*aBufLen*/, char* /*aBuf*/) { + SQLUTRACE_PROFILER(aVfs); __OS_CALL(EOsVfsGetLastError, 0, 0); __OSTIME_COUNTER(TheOsCallTicks[EOsVfsGetLastError], ::OsCallProfile(EFalse, EOsVfsGetLastError), 0, 0, 0, 0); return 0; @@ -2711,11 +2702,9 @@ Memory allocation routine. -EXPORT_C required to match IMPORT_C in stdlib.h and avoid compiler warning - @internalComponent */ -extern "C" EXPORT_C void* sqlite3SymbianMalloc(size_t aSize) +extern "C" void* sqlite3SymbianMalloc(size_t aSize) { __MEM_CALL(EMemOpAlloc, aSize, 0); return Allocator().Alloc(aSize); @@ -2726,11 +2715,9 @@ Memory reallocation routine. -EXPORT_C required to match IMPORT_C in stdlib.h and avoid compiler warning - @internalComponent */ -extern "C" EXPORT_C void* sqlite3SymbianRealloc(void* aPtr, size_t aSize) +extern "C" void* sqlite3SymbianRealloc(void* aPtr, size_t aSize) { #ifdef _SQLPROFILER TInt size = Allocator().AllocLen(aPtr); @@ -2744,11 +2731,9 @@ Memory free routine. -EXPORT_C required to match IMPORT_C in stdlib.h and avoid compiler warning - @internalComponent */ -extern "C" EXPORT_C void sqlite3SymbianFree(void* aPtr) +extern "C" void sqlite3SymbianFree(void* aPtr) { #ifdef _SQLPROFILER TInt size = Allocator().AllocLen(aPtr); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SQLite/alter.c --- a/persistentstorage/sql/SQLite/alter.c Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SQLite/alter.c Wed Sep 01 12:39:58 2010 +0100 @@ -46,7 +46,7 @@ unsigned char const *zTableName = sqlite3_value_text(argv[1]); int token; - Token tname = {0,0,0}; /* Initialized to placate warning */ + Token tname; unsigned char const *zCsr = zSql; int len = 0; char *zRet; @@ -101,7 +101,7 @@ unsigned char const *zTableName = sqlite3_value_text(argv[1]); int token; - Token tname = {0,0,0}; /* Initialized to placate warning */ + Token tname; int dist = 3; unsigned char const *zCsr = zSql; int len = 0; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SQLite/btree.c --- a/persistentstorage/sql/SQLite/btree.c Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SQLite/btree.c Wed Sep 01 12:39:58 2010 +0100 @@ -3021,7 +3021,7 @@ Pgno *pPgnoNext /* OUT: Next overflow page number */ ){ Pgno next = 0; - int rc = SQLITE_OK; /* Initialized to placate warning */ + int rc; assert( sqlite3_mutex_held(pBt->mutex) ); /* One of these must not be NULL. Otherwise, why call this function? */ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SQLite/delete.c --- a/persistentstorage/sql/SQLite/delete.c Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SQLite/delete.c Wed Sep 01 12:39:58 2010 +0100 @@ -143,10 +143,10 @@ int isView; /* True if attempting to delete from a view */ int triggers_exist = 0; /* True if any triggers exist */ #endif - int iBeginAfterTrigger = 0; /* Address of after trigger program */ - int iEndAfterTrigger = 0; /* Exit of after trigger program */ - int iBeginBeforeTrigger = 0; /* Address of before trigger program */ - int iEndBeforeTrigger = 0; /* Exit of before trigger program */ + int iBeginAfterTrigger; /* Address of after trigger program */ + int iEndAfterTrigger; /* Exit of after trigger program */ + int iBeginBeforeTrigger; /* Address of before trigger program */ + int iEndBeforeTrigger; /* Exit of before trigger program */ u32 old_col_mask = 0; /* Mask of OLD.* columns in use */ sContext.pParse = 0; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SQLite/expr.c --- a/persistentstorage/sql/SQLite/expr.c Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SQLite/expr.c Wed Sep 01 12:39:58 2010 +0100 @@ -2737,7 +2737,7 @@ Expr opCompare; /* The X==Ei expression */ Expr cacheX; /* Cached expression X */ Expr *pX; /* The X expression */ - Expr *pTest = 0; /* X==Ei (form A) or just Ei (form B) */ + Expr *pTest; /* X==Ei (form A) or just Ei (form B) */ assert(pExpr->pList); assert((pExpr->pList->nExpr % 2) == 0); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SQLite/func.c --- a/persistentstorage/sql/SQLite/func.c Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SQLite/func.c Wed Sep 01 12:39:58 2010 +0100 @@ -911,7 +911,7 @@ flags = SQLITE_PTR_TO_INT(sqlite3_user_data(context)); if( flags & 1 ){ while( nIn>0 ){ - int len = 0; /* Initialized to placate warning. */ + int len; for(i=0; i0 ){ - int len = 0; /* Initialized to placate warning. */ + int len; for(i=0; i>18; @@ -672,8 +655,8 @@ /* a: p2<<28 | p4<<14 | p6 (unmasked) */ if (!(a&0x80)) { - a &= SLOT_4_2_0; - b &= SLOT_2_0; + a &= (0x7f<<28)|(0x7f<<14)|(0x7f); + b &= (0x7f<<14)|(0x7f); b = b<<7; a |= b; s = s>>11; @@ -682,14 +665,14 @@ } /* CSE2 from below */ - a &= SLOT_2_0; + a &= (0x7f<<14)|(0x7f); p++; b = b<<14; b |= *p; /* b: p3<<28 | p5<<14 | p7 (unmasked) */ if (!(b&0x80)) { - b &= SLOT_4_2_0; + b &= (0x7f<<28)|(0x7f<<14)|(0x7f); /* moved CSE2 up */ /* a &= (0x7f<<14)|(0x7f); */ a = a<<7; @@ -706,7 +689,7 @@ /* moved CSE2 up */ /* a &= (0x7f<<29)|(0x7f<<15)|(0xff); */ - b &= SLOT_2_0; + b &= (0x7f<<14)|(0x7f); b = b<<8; a |= b; @@ -784,8 +767,8 @@ /* a: p0<<28 | p2<<14 | p4 (unmasked) */ if (!(a&0x80)) { - a &= SLOT_4_2_0; - b &= SLOT_4_2_0; + a &= (0x7f<<28)|(0x7f<<14)|(0x7f); + b &= (0x7f<<28)|(0x7f<<14)|(0x7f); b = b<<7; *v = a | b; return 5; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SQLite/vdbe.c --- a/persistentstorage/sql/SQLite/vdbe.c Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SQLite/vdbe.c Wed Sep 01 12:39:58 2010 +0100 @@ -543,10 +543,8 @@ int rc = SQLITE_OK; /* Value to return */ sqlite3 *db = p->db; /* The database */ u8 encoding = ENC(db); /* The database encoding */ - Mem *pIn1 = 0; /* Input operands */ - Mem *pIn2 = 0; /* Input operands */ - Mem *pIn3 = 0; /* Input operands */ - Mem *pOut = 0; /* Output operand */ + Mem *pIn1, *pIn2, *pIn3; /* Input operands */ + Mem *pOut; /* Output operand */ u8 opProperty; int iCompare = 0; /* Result of last OP_Compare operation */ int *aPermute = 0; /* Permuation of columns for OP_Compare */ @@ -3534,7 +3532,7 @@ */ case OP_Delete: { int i = pOp->p1; - i64 iKey = 0; + i64 iKey; Cursor *pC; assert( i>=0 && inCursor ); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/IPC/IPCBuf.cpp --- a/persistentstorage/sql/SRC/Client/IPC/IPCBuf.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/IPC/IPCBuf.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -15,13 +15,8 @@ #include #include "IPCBuf.h" -#include "SqlAssert.h" +#include "SqlPanic.h" #include "SqlDbSession.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "IPCBufTraces.h" -#endif -#include "SqlTraceDef.h" /** Standard, phase-one HIpcBuf factory method. @@ -80,7 +75,6 @@ TPckg pckg(iBuf); aArgs.Set(2, &pckg); __SQLLEAVE_IF_ERROR(iHandle = iSession.SendReceive(aFunction, aArgs)); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, HIPCBUF_CONSTRUCTL, "0x%X;HIpcBuf::ConstructL;iHandle=%d", (TUint)this, iHandle)); TUint8* base = iBuf.iData; // if reading we already have one buffer-full of data TInt avail = Max(0, Min(iBuf.iExt, KIpcBufSize)); @@ -106,7 +100,6 @@ */ HIpcBuf::~HIpcBuf() { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, HIPCBUF_HIPCBUFL2, "0x%X;HIpcBuf::~HIpcBuf;iHandle=%d", (TUint)this, iHandle)); if(iHandle > 0) //iHandle is valid only when > 0. { (void)iSession.SendReceive(::MakeMsgCode(ESqlSrvStreamClose, ESqlSrvStreamHandle, iHandle)); @@ -123,7 +116,7 @@ { return 0; } - __ASSERT_DEBUG(Avail(ERead) == 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(Avail(ERead) == 0, ESqlPanicInternalError); TUint8* base=iBuf.iData; IpcWriteL(base,Lag(EWrite)); SetBuf(EWrite,base,base); @@ -138,7 +131,7 @@ */ void HIpcBuf::OverflowL() { - __ASSERT_DEBUG(Avail(EWrite) == 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(Avail(EWrite) == 0, ESqlPanicInternalError); TUint8* base = iBuf.iData; MovePos(ERead, Lag(ERead)); @@ -175,9 +168,9 @@ */ TInt HIpcBuf::DoReadL(TAny* aPtr, TInt aMaxLength) { - __ASSERT_DEBUG(aMaxLength > 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aMaxLength > 0, ESqlPanicInternalError); TInt avail = Avail(ERead); - __ASSERT_DEBUG(avail >= 0 && Avail(EWrite) >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(avail >= 0 && Avail(EWrite) >= 0, ESqlPanicInternalError); if(avail > 0) { TInt len = Min(aMaxLength, avail); @@ -188,7 +181,7 @@ if(aMaxLength == 0) return len; // that's it } - __ASSERT_DEBUG(Avail(ERead) == 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(Avail(ERead) == 0, ESqlPanicInternalError); if(aMaxLength < iBuf.ESize) return avail + TStreamBuf::DoReadL(aPtr, aMaxLength); @@ -209,9 +202,9 @@ */ void HIpcBuf::DoWriteL(const TAny* aPtr,TInt aLength) { - __ASSERT_DEBUG(aLength > 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aLength > 0, ESqlPanicInternalError); TInt avail = Avail(EWrite); - __ASSERT_DEBUG(Avail(ERead) >= 0 && avail >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(Avail(ERead) >= 0 && avail >= 0, ESqlPanicInternalError); if(avail > 0) { TInt len = Min(aLength, avail); @@ -222,7 +215,7 @@ aPtr = (TUint8*)aPtr + len; } - __ASSERT_DEBUG(Avail(EWrite) == 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(Avail(EWrite) == 0, ESqlPanicInternalError); if(aLength < iBuf.ESize) TStreamBuf::DoWriteL(aPtr, aLength); else @@ -257,7 +250,7 @@ aOffset += Mark(EWrite); break; default: - __ASSERT_ALWAYS(0, __SQLPANIC(ESqlPanicStreamMarkInvalid)); + __SQLASSERT_ALWAYS(0, ESqlPanicStreamMarkInvalid); break; } break; @@ -265,7 +258,7 @@ aOffset += end; break; default: - __ASSERT_ALWAYS(0, __SQLPANIC(ESqlPanicStreamLocationInvalid)); + __SQLASSERT_ALWAYS(0, ESqlPanicStreamLocationInvalid); break; } TInt r = KErrNone; @@ -280,7 +273,7 @@ r = KErrEof; } - __ASSERT_ALWAYS(!(aMark & ~(ERead | EWrite)), __SQLPANIC(ESqlPanicStreamMarkInvalid)); + __SQLASSERT_ALWAYS(!(aMark & ~(ERead | EWrite)), ESqlPanicStreamMarkInvalid); if(aMark & ERead) { TInt lag = aOffset - Pos(ERead); @@ -311,7 +304,7 @@ */ TInt HIpcBuf::IpcReadL(TAny* aPtr, TInt aMaxLength) { - __ASSERT_DEBUG(aMaxLength >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aMaxLength >= 0, ESqlPanicInternalError); if(aMaxLength == 0) return 0; @@ -334,7 +327,7 @@ */ void HIpcBuf::IpcWriteL(const TAny* aPtr, TInt aLength) { - __ASSERT_DEBUG(aLength >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aLength >= 0, ESqlPanicInternalError); if(aLength == 0) return; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SQLDatabase.cpp --- a/persistentstorage/sql/SRC/Client/SQLDatabase.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SQLDatabase.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -13,13 +13,8 @@ // Description: // -#include "SqlAssert.h" //ESqlPanicInvalidObj, ESqlPanicObjExists +#include "SqlPanic.h" //ESqlPanicInvalidObj, ESqlPanicObjExists #include "SqlDatabaseImpl.h" //CSqlDatabaseImpl -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlDatabaseTraces.h" -#endif -#include "SqlTraceDef.h" /** Gets the category of the return code value that is returned by @@ -100,11 +95,12 @@ */ EXPORT_C TInt RSqlDatabase::Create(const TDesC& aDbFileName, const TDesC8* aConfig) { - __SQLTRACE_BORDEREXPR(TPtrC8 config(aConfig ? *aConfig : KNullDesC8)); - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLDATABASE_CREATE_ENTRY, "Entry;0x%X;RSqlDatabase::Create;aDbFileName=%S;aConfig=%s", (TUint)this, __SQLPRNSTR(aDbFileName), __SQLPRNSTR8(config, des16prnbuf))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aDbFileName)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(aConfig ? (void)UTF::Printf(UTF::TTraceContext(UTF::EInternals), + KStrParam, 2, aConfig) : void(0)); + TRAPD(err, iImpl = CSqlDatabaseImpl::NewL(ESqlSrvDbCreate, aDbFileName, NULL, aConfig)); - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLDATABASE_CREATE_Exit, "Exit;0x%X;RSqlDatabase::Create;iImpl=0x%X;err=%d", (TUint)this, (TUint)iImpl, err)); return err; } @@ -150,11 +146,13 @@ EXPORT_C TInt RSqlDatabase::Create(const TDesC& aDbFileName, const RSqlSecurityPolicy& aSecurityPolicy, const TDesC8* aConfig) { - __SQLTRACE_BORDEREXPR(TPtrC8 config(aConfig ? *aConfig : KNullDesC8)); - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt4(TRACE_BORDER, RSQLDATABASE_CREATE2_ENTRY, "Entry;0x%X;RSqlDatabase::Create;aDbFileName=%S;aSecurityPolicy=0x%X;aConfig=%s", (TUint)this, __SQLPRNSTR(aDbFileName), (TUint)&aSecurityPolicy, __SQLPRNSTR8(config, des16prnbuf))); - TRAPD(err, iImpl = CSqlDatabaseImpl::NewL(ESqlSrvDbCreateSecure, aDbFileName, &aSecurityPolicy.Impl(), aConfig)); - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLDATABASE_CREATE2_Exit, "Exit;0x%X;RSqlDatabase::Create;iImpl=0x%X;err=%d", (TUint)this, (TUint)iImpl, err)); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aDbFileName)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(aConfig ? (void)UTF::Printf(UTF::TTraceContext(UTF::EInternals), + KStrParam, 2, aConfig) : void(0)); + + TRAPD(err, iImpl = CSqlDatabaseImpl::NewL(ESqlSrvDbCreateSecure, aDbFileName, + &aSecurityPolicy.Impl(), aConfig)); return err; } @@ -201,11 +199,12 @@ */ EXPORT_C TInt RSqlDatabase::Open(const TDesC& aDbFileName, const TDesC8* aConfig) { - __SQLTRACE_BORDEREXPR(TPtrC8 config(aConfig ? *aConfig : KNullDesC8)); - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLDATABASE_OPEN_ENTRY, "Entry;0x%X;RSqlDatabase::Open;aDbFileName=%S;aConfig=%s", (TUint)this, __SQLPRNSTR(aDbFileName), __SQLPRNSTR8(config, des16prnbuf))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aDbFileName)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(aConfig ? (void)UTF::Printf(UTF::TTraceContext(UTF::EInternals), + KStrParam, 2, aConfig) : void(0)); + TRAPD(err, iImpl = CSqlDatabaseImpl::NewL(ESqlSrvDbOpen, aDbFileName, NULL, aConfig)); - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLDATABASE_OPEN_EXIT, "Exit;0x%X;RSqlDatabase::Open;iImpl=0x%X;err=%d", (TUint)this, (TUint)iImpl, err)); return err; } @@ -241,11 +240,12 @@ */ EXPORT_C void RSqlDatabase::CreateL(const TDesC& aDbFileName, const TDesC8* aConfig) { - __SQLTRACE_BORDEREXPR(TPtrC8 config(aConfig ? *aConfig : KNullDesC8)); - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLDATABASE_CREATEL_ENTRY, "Entry;0x%X;RSqlDatabase::CreateL;aDbFileName=%S;aConfig=%s", (TUint)this, __SQLPRNSTR(aDbFileName), __SQLPRNSTR8(config, des16prnbuf))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aDbFileName)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(aConfig ? (void)UTF::Printf(UTF::TTraceContext(UTF::EInternals), + KStrParam, 2, aConfig) : void(0)); + iImpl = CSqlDatabaseImpl::NewL(ESqlSrvDbCreate, aDbFileName, NULL, aConfig); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_CREATEL_EXIT, "Entry;0x%X;RSqlDatabase::CreateL;iImpl=0x%X", (TUint)this, (TUint)iImpl)); } /** @@ -288,11 +288,13 @@ EXPORT_C void RSqlDatabase::CreateL(const TDesC& aDbFileName, const RSqlSecurityPolicy& aSecurityPolicy, const TDesC8* aConfig) { - __SQLTRACE_BORDEREXPR(TPtrC8 config(aConfig ? *aConfig : KNullDesC8)); - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt4(TRACE_BORDER, RSQLDATABASE_CREATEL2_ENTRY, "Entry;0x%X;RSqlDatabase::CreateL;aDbFileName=%S;aSecurityPolicy=0x%X;aConfig=%s", (TUint)this, __SQLPRNSTR(aDbFileName), (TUint)&aSecurityPolicy, __SQLPRNSTR8(config, des16prnbuf))); - iImpl = CSqlDatabaseImpl::NewL(ESqlSrvDbCreateSecure, aDbFileName, &aSecurityPolicy.Impl(), aConfig); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_CREATEL2_EXIT, "Exit;0x%X;RSqlDatabase::CreateL;iImpl=0x%X", (TUint)this, (TUint)iImpl)); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aDbFileName)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(aConfig ? (void)UTF::Printf(UTF::TTraceContext(UTF::EInternals), + KStrParam, 2, aConfig) : void(0)); + + iImpl = CSqlDatabaseImpl::NewL(ESqlSrvDbCreateSecure, aDbFileName, + &aSecurityPolicy.Impl(), aConfig); } /** @@ -337,10 +339,12 @@ */ EXPORT_C void RSqlDatabase::OpenL(const TDesC& aDbFileName, const TDesC8* aConfig) { - __SQLTRACE_BORDEREXPR(TPtrC8 config(aConfig ? *aConfig : KNullDesC8)); - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLDATABASE_OPENL_ENTRY, "Entry;0x%X;RSqlDatabase::OpenL;aDbFileName=%S;aConfig=%s", (TUint)this, __SQLPRNSTR(aDbFileName), __SQLPRNSTR(config))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aDbFileName)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(aConfig ? (void)UTF::Printf(UTF::TTraceContext(UTF::EInternals), + KStrParam, 2, aConfig) : void(0)); + iImpl = CSqlDatabaseImpl::NewL(ESqlSrvDbOpen, aDbFileName, NULL, aConfig); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_OPENL_EXIT, "Exit;0x%X;RSqlDatabase::OpenL;iImpl=0x%X", (TUint)this, (TUint)iImpl)); } /** @@ -358,9 +362,8 @@ */ EXPORT_C void RSqlDatabase::Close() { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_CLOSE_ENTRY, "Entry;0x%X;RSqlDatabase::Close;iImpl=0x%X", (TUint)this, (TUint)iImpl)); + SQLUTRACE_PROFILER(this); delete iImpl; - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_CLOSE_EXIT, "Exit;0x%X;RSqlDatabase::Close;iImpl=0x%X", (TUint)this, (TUint)iImpl)); iImpl = NULL; } @@ -405,10 +408,10 @@ */ EXPORT_C TInt RSqlDatabase::Attach(const TDesC& aDbFileName, const TDesC& aDbName) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLDATABASE_ATTACH_ENTRY, "Entry;0x%X;RSqlDatabase::Attach;aDbFileName=%S;aDbName=%S", (TUint)this, __SQLPRNSTR(aDbFileName), __SQLPRNSTR(aDbName))); - TInt err = Impl().Attach(aDbFileName, aDbName); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_ATTACH_EXIT, "Entry;0x%X;RSqlDatabase::Attach;err=%d", (TUint)this, err)); - return err; + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrStrParam16, &aDbFileName, &aDbName)); + + return Impl().Attach(aDbFileName, aDbName); } /** @@ -426,10 +429,10 @@ */ EXPORT_C TInt RSqlDatabase::Detach(const TDesC& aDbName) { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_DETACH_ENTRY, "Entry;0x%X;RSqlDatabase::Detach;aDbName=%S", (TUint)this, __SQLPRNSTR(aDbName))); - TInt err = Impl().Detach(aDbName); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_DETACH_EXIT, "Exit;0x%X;RSqlDatabase::Detach;err=%d", (TUint)this, err)); - return err; + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aDbName)); + + return Impl().Detach(aDbName); } /** @@ -467,10 +470,11 @@ */ EXPORT_C TInt RSqlDatabase::Copy(const TDesC& aSrcDbFileName, const TDesC& aDestDbFileName) { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_COPY_ENTRY, "Entry;0;RSqlDatabase::Copy;aSrcDbFileName=%S;aDestDbFileName=%S", __SQLPRNSTR(aSrcDbFileName), __SQLPRNSTR(aDestDbFileName))); - TInt err = CSqlDatabaseImpl::Copy(aSrcDbFileName, aDestDbFileName); - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLDATABASE_COPY_EXIT, "Exit;0;RSqlDatabase::Copy;err=%d", err)); - return err; + SQLUTRACE_PROFILER(0); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrStrParam16, + &aSrcDbFileName, &aDestDbFileName)); + + return CSqlDatabaseImpl::Copy(aSrcDbFileName, aDestDbFileName); } /** @@ -500,10 +504,10 @@ */ EXPORT_C TInt RSqlDatabase::Delete(const TDesC& aDbFileName) { - SQL_TRACE_BORDER(OstTraceExt1(TRACE_BORDER, RSQLDATABASE_DELETE_ENTRY, "Entry;0;RSqlDatabase::Delete;aDbFileName=%S", __SQLPRNSTR(aDbFileName))); - TInt err = CSqlDatabaseImpl::Delete(aDbFileName); - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLDATABASE_DELETE_EXIT, "Exit;0;RSqlDatabase::Delete;err=%d", err)); - return err; + SQLUTRACE_PROFILER(0); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aDbFileName)); + + return CSqlDatabaseImpl::Delete(aDbFileName); } /** @@ -523,9 +527,10 @@ */ EXPORT_C TInt RSqlDatabase::GetSecurityPolicy(RSqlSecurityPolicy& aSecurityPolicy) const { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_GETSECURITYPOLICY_ENTRY, "Entry;0x%X;RSqlDatabase::GetSecurityPolicy;aSecurityPolicy=0x%X", (TUint)this, (TUint)&aSecurityPolicy)); - TRAPD(err, CSqlSecurityPolicy* securityPolicy = Impl().CloneSecurityPolicyL(); aSecurityPolicy.Set(*securityPolicy)); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_GETSECURITYPOLICY_EXIT, "Exit;0x%X;RSqlDatabase::GetSecurityPolicy;err=%d", (TUint)this, err)); + SQLUTRACE_PROFILER(this); + TRAPD(err, CSqlSecurityPolicy* securityPolicy = Impl().CloneSecurityPolicyL(); + aSecurityPolicy.Set(*securityPolicy)); + return err; } @@ -545,10 +550,9 @@ */ EXPORT_C void RSqlDatabase::GetSecurityPolicyL(RSqlSecurityPolicy& aSecurityPolicy) const { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_GETSECURITYPOLICYL_ENTRY, "Entry;0x%X;RSqlDatabase::GetSecurityPolicyL;aSecurityPolicy=0x%X", (TUint)this, (TUint)&aSecurityPolicy)); + SQLUTRACE_PROFILER(this); CSqlSecurityPolicy* securityPolicy = Impl().CloneSecurityPolicyL(); aSecurityPolicy.Set(*securityPolicy); - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLDATABASE_GETSECURITYPOLICYL_EXIT, "Exit;0x%X;RSqlDatabase::GetSecurityPolicyL", (TUint)this)); } /** @@ -577,10 +581,8 @@ */ EXPORT_C TInt RSqlDatabase::SetIsolationLevel(RSqlDatabase::TIsolationLevel aIsolationLevel) { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_SETISOLATIONLEVEL_ENTRY, "Entry;0x%X;RSqlDatabase::SetIsolationLevel;aIsolationLevel=%d", (TUint)this, aIsolationLevel)); - TInt err = Impl().SetIsolationLevel(aIsolationLevel); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_SETISOLATIONLEVEL_EXIT, "Exit;0x%X;RSqlDatabase::SetIsolationLevel;err=%d", (TUint)this, err)); - return err; + SQLUTRACE_PROFILER(this); + return Impl().SetIsolationLevel(aIsolationLevel); } /** @@ -630,10 +632,10 @@ */ EXPORT_C TInt RSqlDatabase::Exec(const TDesC& aSqlStmt) { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_EXEC16_ENTRY, "Entry;0x%X;RSqlDatabase::Exec16;aSqlStmt=%S", (TUint)this, __SQLPRNSTR(aSqlStmt))); - TInt err = Impl().Exec(aSqlStmt); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_EXEC16_EXIT, "Exit;0x%X;RSqlDatabase::Exec16;err=%d", (TUint)this, err)); - return err; + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aSqlStmt)); + + return Impl().Exec(aSqlStmt); } /** @@ -683,11 +685,10 @@ */ EXPORT_C TInt RSqlDatabase::Exec(const TDesC8& aSqlStmt) { - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_EXEC8_ENTRY, "Entry;0x%X;RSqlDatabase::Exec8;aSqlStmt=%s", (TUint)this, __SQLPRNSTR8(aSqlStmt, des16prnbuf))); - TInt err = Impl().Exec(aSqlStmt); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_EXEC8_EXIT, "Exit;0x%X;RSqlDatabase::Exec8;err=%d", (TUint)this, err)); - return err; + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam, 1, &aSqlStmt)); + + return Impl().Exec(aSqlStmt); } /** @@ -742,9 +743,10 @@ */ EXPORT_C void RSqlDatabase::Exec(const TDesC& aSqlStmt, TRequestStatus& aStatus) { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_EXECASYNC16_ENTRY, "Entry;0x%X;RSqlDatabase::ExecAsync16;aSqlStmt=%S", (TUint)this, __SQLPRNSTR(aSqlStmt))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aSqlStmt)); + Impl().Exec(aSqlStmt, aStatus); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_EXECASYNC16_EXIT, "Exit;0x%X;RSqlDatabase::ExecAsync16;aStatus.Int()=%d", (TUint)this, aStatus.Int())); } /** @@ -799,10 +801,10 @@ */ EXPORT_C void RSqlDatabase::Exec(const TDesC8& aSqlStmt, TRequestStatus& aStatus) { - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_EXECASYNC8_ENTRY, "Entry;0x%X;RSqlDatabase::ExecAsync8;aSqlStmt=%s", (TUint)this, __SQLPRNSTR8(aSqlStmt, des16prnbuf))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam, 1, &aSqlStmt)); + Impl().Exec(aSqlStmt, aStatus); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_EXECASYNC8_EXIT, "Exit;0x%X;RSqlDatabase::ExecAsync8;aStatus.Int()=%d", (TUint)this, aStatus.Int())); } /** @@ -831,9 +833,8 @@ */ EXPORT_C TPtrC RSqlDatabase::LastErrorMessage() const { - TPtrC msg(Impl().LastErrorMessage()); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_LASTERRORMESSAGE, "0x%X;RSqlDatabase::LastErrorMessage;msg=%S", (TUint)this, __SQLPRNSTR(msg))); - return msg; + SQLUTRACE_PROFILER(0); + return Impl().LastErrorMessage(); } /** @@ -849,10 +850,8 @@ */ EXPORT_C TInt64 RSqlDatabase::LastInsertedRowId() const { - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLDATABASE_LASTINSERTEDROWID_ENTRY, "Entry;0x%X;RSqlDatabase::LastInsertedRowId", (TUint)this)); - TInt64 rc = Impl().LastInsertedRowId(); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_LASTINSERTEDROWID_EXIT, "Exit;0x%X;RSqlDatabase::LastInsertedRowId;RowId=%lld", (TUint)this, rc)); - return rc; + SQLUTRACE_PROFILER(0); + return Impl().LastInsertedRowId(); } /** @@ -864,10 +863,8 @@ */ EXPORT_C TBool RSqlDatabase::InTransaction() const { - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLDATABASE_INTRABSACTION_ENTRY, "Entry;0x%X;RSqlDatabase::InTransaction", (TUint)this)); - TBool res = Impl().InTransaction(); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_INTRABSACTION_EXIT, "Exit;0x%X;RSqlDatabase::InTransaction;res=%d", (TUint)this, res)); - return res; + SQLUTRACE_PROFILER(0); + return Impl().InTransaction(); } /** @@ -884,10 +881,8 @@ */ EXPORT_C TInt RSqlDatabase::Size() const { - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLDATABASE_SIZE_ENTRY, "Entry;0x%X;RSqlDatabase::Size", (TUint)this)); - TInt rc = Impl().Size(); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_SIZE_EXIT, "Exit;0x%X;RSqlDatabase::Size;rc=%d", (TUint)this, rc)); - return rc; + SQLUTRACE_PROFILER(0); + return Impl().Size(); } /** @@ -907,10 +902,10 @@ */ EXPORT_C TInt RSqlDatabase::Size(RSqlDatabase::TSize& aSize, const TDesC& aDbName) const { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_SIZE2_ENTRY, "Entry;0x%X;RSqlDatabase::Size-2;aDbName=%S", (TUint)this, __SQLPRNSTR(aDbName))); - TInt err = Impl().Size(aSize, aDbName); - SQL_TRACE_BORDER(OstTraceExt4(TRACE_BORDER, RSQLDATABASE_SIZE2_EXIT, "Exit;0x%X;RSqlDatabase::Size-2;err=%d;aSize.iSize=%lld;aSize.iFree=%lld", (TUint)this, err, aSize.iSize, aSize.iFree)); - return err; + SQLUTRACE_PROFILER(0); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 2, &aDbName)); + + return Impl().Size(aSize, aDbName); } /** @@ -945,10 +940,10 @@ */ EXPORT_C TInt RSqlDatabase::Compact(TInt64 aSize, const TDesC& aDbName) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLDATABASE_COMPACT_ENTRY, "Entry;0x%X;RSqlDatabase::Compact;aSize=%lld;aDbName=%S", (TUint)this, aSize, __SQLPRNSTR(aDbName))); - TInt rc = Impl().Compact(aSize, aDbName); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_COMPACT_EXIT, "Exit;0x%X;RSqlDatabase::Compact;rc=%d", (TUint)this, rc)); - return rc; + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KSizeStrParam16, 1, aSize, 2, &aDbName)); + + return Impl().Compact(aSize, aDbName); } /** @@ -985,9 +980,10 @@ */ EXPORT_C void RSqlDatabase::Compact(TInt64 aSize, TRequestStatus& aStatus, const TDesC& aDbName) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLDATABASE_COMPACTASYNC_ENTRY, "Entry;0x%X;RSqlDatabase::CompactAsync;aSize=%lld;aDbName=%S", (TUint)this, aSize, __SQLPRNSTR(aDbName))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KSizeStrParam16, 1, aSize, 3, &aDbName)); + Impl().Compact(aSize, aDbName, aStatus); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_COMPACTASYNC_EXIT, "Exit;0x%X;RSqlDatabase::CompactAsync;aStatus.Int()=%d", (TUint)this, aStatus.Int())); } /** @@ -1014,12 +1010,10 @@ */ EXPORT_C TInt RSqlDatabase::ReserveDriveSpace(TInt aSize) { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_RESERVEDRIVESPACE_ENTRY, "Entry;0x%X;RSqlDatabase::ReserveDriveSpace;aSize=%d", (TUint)this, aSize)); + SQLUTRACE_PROFILER(this); //Usage of the IPC call arguments: //Arg 0: [out] requested size - TInt err = Impl().Session().SendReceive(ESqlSrvDbReserveDriveSpace, TIpcArgs(aSize)); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_RESERVEDRIVESPACE_EXIT, "Exit;0x%X;RSqlDatabase::ReserveDriveSpace;err=%d", (TUint)this, err)); - return err; + return Impl().Session().SendReceive(ESqlSrvDbReserveDriveSpace, TIpcArgs(aSize)); } /** @@ -1031,9 +1025,8 @@ */ EXPORT_C void RSqlDatabase::FreeReservedSpace() { - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLDATABASE_FREERESERVEDSPACE_ENTRY, "Entry;0x%X;RSqlDatabase::FreeReservedSpace", (TUint)this)); - __SQLTRACE_BORDERVAR(TInt err =) Impl().Session().SendReceive(ESqlSrvDbFreeReservedSpace); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_FREERESERVEDSPACE_EXIT, "Exit;0x%X;RSqlDatabase::FreeReservedSpace;err=%d", (TUint)this, err)); + SQLUTRACE_PROFILER(this); + Impl().Session().SendReceive(ESqlSrvDbFreeReservedSpace); } /** @@ -1050,10 +1043,8 @@ */ EXPORT_C TInt RSqlDatabase::GetReserveAccess() { - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLDATABASE_GETRESERVEACCESS_ENTRY, "Exit;0x%X;RSqlDatabase::GetReserveAccess", (TUint)this)); - TInt err = Impl().Session().SendReceive(ESqlSrvDbGetReserveAccess); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_GETRESERVEACCESS_EXIT, "Exit;0x%X;RSqlDatabase::GetReserveAccess;err=%d", (TUint)this, err)); - return err; + SQLUTRACE_PROFILER(this); + return Impl().Session().SendReceive(ESqlSrvDbGetReserveAccess); } /** @@ -1065,9 +1056,8 @@ */ EXPORT_C void RSqlDatabase::ReleaseReserveAccess() { - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLDATABASE_RELEASERESERVEACCESS_ENTRY, "Entry;0x%X;RSqlDatabase::ReleaseReserveAccess", (TUint)this)); - __SQLTRACE_BORDERVAR(TInt err =) Impl().Session().SendReceive(ESqlSrvDbReleaseReserveAccess); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLDATABASE_RELEASERESERVEACCESS_EXIT, "Exit;0x%X;RSqlDatabase::ReleaseReserveAccess;err=%d", (TUint)this, err)); + SQLUTRACE_PROFILER(this); + Impl().Session().SendReceive(ESqlSrvDbReleaseReserveAccess); } /** @@ -1079,6 +1069,6 @@ */ CSqlDatabaseImpl& RSqlDatabase::Impl() const { - __ASSERT_ALWAYS(iImpl != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT_ALWAYS(iImpl != NULL, ESqlPanicInvalidObj); return *iImpl; } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlBlob.cpp --- a/persistentstorage/sql/SRC/Client/SqlBlob.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlBlob.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -15,14 +15,9 @@ #include #include "SqlDb.h" -#include "SqlAssert.h" +#include "SqlPanic.h" #include "SqlDatabaseImpl.h" #include "IPCBuf.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlBlobTraces.h" -#endif -#include "SqlTraceDef.h" // The maximum time (100 milliseconds) that a block of data is allowed to take to be read/written by TSqlBlob. // If the time taken is longer than this value then the next block size used will be less @@ -108,7 +103,7 @@ // Update how much data is still to be read, and the buffer pointer remainingDataSize -= blockSize; - __ASSERT_DEBUG(remainingDataSize >= 0, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(remainingDataSize >= 0, ESqlPanicInternalError); ptr.Set((TUint8*)(ptr.Ptr() + blockSize), 0, remainingDataSize); } aDestBuffer.SetLength(aBlobSize); @@ -137,7 +132,7 @@ // Update how much data is still to be written remainingDataSize -= blockSize; - __ASSERT_DEBUG(remainingDataSize >= 0, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(remainingDataSize >= 0, ESqlPanicInternalError); } aStrm.CommitL(); } @@ -176,7 +171,7 @@ TInt blobSize = strm.SizeL(); // size of the blob, in bytes if(blobSize > aBuffer.MaxSize()) { - __SQLLEAVE2(KErrOverflow); + __SQLLEAVE(KErrOverflow); } DoReadInBlocksL(strm, aBuffer, blobSize); CleanupStack::PopAndDestroy(); // strm @@ -197,7 +192,7 @@ TInt blobSize = strm.SizeL(); // size of the blob, in bytes if(dataSize > blobSize) { - __SQLLEAVE2(KErrEof); + __SQLLEAVE(KErrEof); } if(dataSize > 0) { @@ -241,12 +236,14 @@ EXPORT_C void RSqlBlobReadStream::OpenL(RSqlDatabase& aDb, const TDesC& aTableName, const TDesC& aColumnName, TInt64 aRowId, const TDesC& aDbName) { - SQL_TRACE_BORDER(OstTraceExt5(TRACE_BORDER, RSQLBLOBREADSTREAM_OPENL_ENTRY, "Entry;0;RSqlBlobReadStream::OpenL;aDb=0x%X;aTableName=%S;aColumnName=%S;aDbName=%S;aRowId=%lld", (TUint)&aDb, __SQLPRNSTR(aTableName), __SQLPRNSTR(aColumnName), __SQLPRNSTR(aDbName), aRowId)); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KRSqlBlobParam16, &aDb, &aTableName, + &aColumnName, aRowId, &aDbName)); + HBufC8* ipcPrmBuf = ::PrepareIpcParamBufLC(aTableName, aColumnName, aRowId, ETrue, aDbName); MStreamBuf* strm = ::CreateIpcStreamL(aDb.Impl().Session(), ipcPrmBuf->Des()); Attach(strm); CleanupStack::PopAndDestroy(ipcPrmBuf); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLBLOBREADSTREAM_OPENL_EXIT, "Exit;0x%x;RSqlBlobReadStream::OpenL;strm=0x%X", (TUint)this, (TUint)strm)); } /** @@ -262,12 +259,11 @@ */ EXPORT_C TInt RSqlBlobReadStream::SizeL() { - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLBLOBREADSTREAM_SIZEL_ENTRY, "Entry;0x%X;RSqlBlobReadStream::SizeL;", (TUint)this)); + SQLUTRACE_PROFILER(this); + MStreamBuf* src = Source(); - __ASSERT_ALWAYS(src != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - TInt size = src->SizeL(); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLBLOBREADSTREAM_SIZEL_EXIT, "Exit;0x%X;RSqlBlobReadStream::SizeL;size=%d", (TUint)this, size)); - return size; + __SQLASSERT_ALWAYS(src != NULL, ESqlPanicInvalidObj); + return src->SizeL(); } /** @@ -303,12 +299,14 @@ EXPORT_C void RSqlBlobWriteStream::OpenL(RSqlDatabase& aDb, const TDesC& aTableName, const TDesC& aColumnName, TInt64 aRowId, const TDesC& aDbName) { - SQL_TRACE_BORDER(OstTraceExt5(TRACE_BORDER, RSQLBLOBWRITESTREAM_OPENL_ENTRY, "Entry;0;RSqlBlobWriteStream::OpenL;aDb=0x%X;aTableName=%S;aColumnName=%S;aDbName=%S;aRowId=%lld", (TUint)&aDb, __SQLPRNSTR(aTableName), __SQLPRNSTR(aColumnName), __SQLPRNSTR(aDbName), aRowId)); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KRSqlBlobParam16, &aDb, &aTableName, + &aColumnName, aRowId, &aDbName)); + HBufC8* ipcPrmBuf = ::PrepareIpcParamBufLC(aTableName, aColumnName, aRowId, EFalse, aDbName); MStreamBuf* strm = ::CreateIpcStreamL(aDb.Impl().Session(), ipcPrmBuf->Des()); Attach(strm); CleanupStack::PopAndDestroy(ipcPrmBuf); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLBLOBWRITESTREAM_OPENL_EXIT, "Exit;0x%x;RSqlBlobWriteStream::OpenL;strm=0x%X", (TUint)this, (TUint)strm)); } /** @@ -324,12 +322,11 @@ */ EXPORT_C TInt RSqlBlobWriteStream::SizeL() { - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLBLOBWRITESTREAM_SIZEL_ENTRY, "Entry;0x%X;RSqlBlobWriteStream::SizeL;", (TUint)this)); + SQLUTRACE_PROFILER(this); + MStreamBuf* sink = Sink(); - __ASSERT_ALWAYS(sink != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - TInt size = sink->SizeL(); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLBLOBWRITESTREAM_SIZEL_EXIT, "Exit;0x%X;RSqlBlobWriteStream::SizeL;size=%d", (TUint)this, size)); - return size; + __SQLASSERT_ALWAYS(sink != NULL, ESqlPanicInvalidObj); + return sink->SizeL(); } /** @@ -370,10 +367,11 @@ TInt64 aRowId, const TDesC& aDbName) { - SQL_TRACE_BORDER(OstTraceExt5(TRACE_BORDER, TSQLBLOB_GETLC_ENTRY, "Entry;0;TSqlBlob::GetLC;aDb=0x%X;aTableName=%S;aColumnName=%S;aDbName=%S;aRowId=%lld", (TUint)&aDb, __SQLPRNSTR(aTableName), __SQLPRNSTR(aColumnName), __SQLPRNSTR(aDbName), aRowId)); - HBufC8* res = ReadLC(aDb, aTableName, aColumnName, aRowId, aDbName); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLBLOB_GETLC_EXIT, "Exit;0;TSqlBlob::GetLC;res=0x%X;res->Size()=%d", (TUint)res, res->Des().Size())); - return res; + SQLUTRACE_PROFILER(0); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KRSqlBlobParam16, &aDb, &aTableName, + &aColumnName, aRowId, &aDbName)); + + return ReadLC(aDb, aTableName, aColumnName, aRowId, aDbName); } /** @@ -414,9 +412,11 @@ TInt64 aRowId, const TDesC& aDbName) { - SQL_TRACE_BORDER(OstTraceExt5(TRACE_BORDER, TSQLBLOB_GET_ENTRY, "Entry;0;TSqlBlob::Get;aDb=0x%X;aTableName=%S;aColumnName=%S;aDbName=%S;aRowId=%lld", (TUint)&aDb, __SQLPRNSTR(aTableName), __SQLPRNSTR(aColumnName), __SQLPRNSTR(aDbName), aRowId)); + SQLUTRACE_PROFILER(0); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KRSqlBlobParam16, &aDb, &aTableName, + &aColumnName, aRowId, &aDbName)); + TRAPD(err, ReadL(aDb, aTableName, aColumnName, aBuffer, aRowId, aDbName)); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLBLOB_GET_EXIT, "Exit;0;TSqlBlob::Get;aBuffer.Ptr()=0x%X;aBuffer.Size()=%d", (TUint)aBuffer.Ptr(), aBuffer.Size())); return err; } @@ -458,9 +458,10 @@ TInt64 aRowId, const TDesC& aDbName) { - SQL_TRACE_BORDER(OstTraceExt5(TRACE_BORDER, TSQLBLOB_SET_ENTRY, "Entry;0;TSqlBlob::Set;aDb=0x%X;aTableName=%S;aColumnName=%S;aDbName=%S;aRowId=%lld", (TUint)&aDb, __SQLPRNSTR(aTableName), __SQLPRNSTR(aColumnName), __SQLPRNSTR(aDbName), aRowId)); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLBLOB_SET_ENTRYEXT, "EntryExt;0;TSqlBlob::Set;aData.Ptr=0x%X;aData.Size()=%d", (TUint)aData.Ptr(), aData.Size())); + SQLUTRACE_PROFILER(0); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KRSqlBlobParam16, &aDb, &aTableName, + &aColumnName, aRowId, &aDbName)); + WriteL(aDb, aTableName, aColumnName, aData, aRowId, aDbName); - SQL_TRACE_BORDER(OstTrace0(TRACE_BORDER, TSQLBLOB_SET_EXIT, "Exit;0;TSqlBlob::Set")); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlDatabaseImpl.cpp --- a/persistentstorage/sql/SRC/Client/SqlDatabaseImpl.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlDatabaseImpl.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -171,7 +171,7 @@ TPtrC8 securityPolicyData; if(aFunction == ESqlSrvDbCreateSecure) { - __ASSERT_DEBUG(aSecurityPolicy != NULL, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aSecurityPolicy != NULL, ESqlPanicBadArgument); const RSqlBufFlat& bufFlat = aSecurityPolicy->BufFlat(); securityPolicyData.Set(bufFlat.BufDes()); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlDbSession.cpp --- a/persistentstorage/sql/SRC/Client/SqlDbSession.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlDbSession.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -23,11 +23,6 @@ #include "SqlSrvStartup.h" //StartSqlServer() #include "SqlResourceTest.h" //TSqlResourceTestData #include "SqlSecurityImpl.h" //CSqlSecurityPolicy -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlDbSessionTraces.h" -#endif -#include "SqlTraceDef.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////// TSqlFhCmdFunctor /////////////////////////////////////////////// @@ -201,8 +196,8 @@ TPtr8 bufPtr = buf->Des(); RDesWriteStream out(bufPtr); TRAPD(err, SerializeToStreamL(out)); - __ASSERT_DEBUG(err == KErrNone, __SQLPANIC(ESqlPanicInternalError));//"Write to descriptor" streaming operatons can't fail - TUint32 arg0 = (TUint32)bufPtr.Length() | (aReadOnly ? 0x80000000 : 0); + __SQLASSERT(err == KErrNone, ESqlPanicInternalError);//"Write to descriptor" streaming operatons can't fail + TUint32 arg0 = (TUint32)bufPtr.Length() | (aReadOnly ? 0x80000000 : 0); TIpcArgs ipcArgs(arg0, &bufPtr); err = aDbFile.TransferToServer(ipcArgs, 2, 3); if(err == KErrNone) @@ -306,7 +301,6 @@ */ TInt RSqlDbSession::Connect(TSqlSrvFunction aFunction, const TDesC& aDbFileName, const TDesC8& aSecurityPolicyData, const TDesC8* aConfig) { - SQL_TRACE_SESSION(OstTraceExt2(TRACE_INTERNALS, RSQLDBSESSION_CONNECT_ENTRY, "Entry;0x%X;RSqlDbSession::Connect;aDbFileName=%S", (TUint)this, __SQLPRNSTR(aDbFileName))); #ifdef SYSLIBS_TEST const TInt KDefaultMsgBufLen = 4; #else @@ -364,7 +358,6 @@ { Close(); } - SQL_TRACE_SESSION(OstTraceExt3(TRACE_INTERNALS, RSQLDBSESSION_CONNECT_EXIT, "Exit;0x%X;RSqlDbSession::Connect;err=%d;handle=0x%X", (TUint)this, err, (TUint)Handle())); return err; } @@ -657,7 +650,6 @@ */ void RSqlDbSession::Close() { - SQL_TRACE_SESSION(OstTraceExt2(TRACE_INTERNALS, RSQLDBSESSION_CLOSE, "0x%X;RSqlDbSession::Close;handle=0x%X", (TUint)this, (TUint)Handle())); if(Handle()) { (void)SendReceive(ESqlSrvDbClose); @@ -856,7 +848,7 @@ { //coverity[DEADCODE] //The ASSERT might be useful in catching future defect in this function - __ASSERT_DEBUG(aConfig != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aConfig != NULL, ESqlPanicInternalError); arg3Ptr.Append(*aConfig); } ipcArgs.Set(3, &arg3Ptr); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlDbSession.h --- a/persistentstorage/sql/SRC/Client/SqlDbSession.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlDbSession.h Wed Sep 01 12:39:58 2010 +0100 @@ -18,6 +18,7 @@ #include //RSqlDatabase::TIsolationLevel #include "SqlUtil.h" //TSqlSrvFunction +#include "UTraceSql.h" //Forward declarations struct sqlite3; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlDbSession.inl --- a/persistentstorage/sql/SRC/Client/SqlDbSession.inl Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlDbSession.inl Wed Sep 01 12:39:58 2010 +0100 @@ -223,6 +223,8 @@ */ inline TInt RSqlDbSession::SendReceive(TInt aFunction) { + SYMBIAN_TRACE_SQL_EVENTS_ONLY(TPtrC8 funcStr = GetIPCFuncStr(aFunction)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EBorder), KDbMsgStr, &funcStr)); return RSessionBase::SendReceive(aFunction); } @@ -235,6 +237,8 @@ */ inline void RSqlDbSession::SendReceive(TInt aFunction, TRequestStatus& aStatus) { + SYMBIAN_TRACE_SQL_EVENTS_ONLY(TPtrC8 funcStr = GetIPCFuncStr(aFunction)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EBorder), KDbMsgStr, &funcStr)); RSessionBase::SendReceive(aFunction, aStatus); } @@ -248,6 +252,8 @@ */ inline TInt RSqlDbSession::SendReceive(TInt aFunction, const TIpcArgs& aArgs) { + SYMBIAN_TRACE_SQL_EVENTS_ONLY(TPtrC8 funcStr = GetIPCFuncStr(aFunction)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EBorder), KDbMsgStr, &funcStr)); return RSessionBase::SendReceive(aFunction, aArgs); } @@ -260,5 +266,7 @@ */ inline void RSqlDbSession::SendReceive(TInt aFunction,const TIpcArgs& aArgs, TRequestStatus& aStatus) { + SYMBIAN_TRACE_SQL_EVENTS_ONLY(TPtrC8 funcStr = GetIPCFuncStr(aFunction)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EBorder), KDbMsgStr, &funcStr)); RSessionBase::SendReceive(aFunction, aArgs, aStatus); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlResourceProfiler.cpp --- a/persistentstorage/sql/SRC/Client/SqlResourceProfiler.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlResourceProfiler.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -14,7 +14,7 @@ // #include "SqlResourceProfiler.h" -#include "SqlAssert.h" +#include "SqlPanic.h" #include "SqlDatabaseImpl.h" diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlResourceTest.cpp --- a/persistentstorage/sql/SRC/Client/SqlResourceTest.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlResourceTest.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -15,7 +15,7 @@ #include //TSqlResourceTester #include "SqlResourceTest.h" //TSqlResourceTestData -#include "SqlAssert.h" //ESqlPanicInternalError +#include "SqlPanic.h" //__SQLASSERT, ESqlPanicInternalError #include "SqlDbSession.h" //RSqlDbSession #include "SqlResourceTester.h" //TSqlResourceTester @@ -102,7 +102,7 @@ */ TInt TSqlResourceTestData::Set(TSqlSrvFunction aFunction, TInt aAllocFailType, TInt aRate) { - __ASSERT_DEBUG(!iRqPending, __SQLPANIC(ESqlPanicMisuse)); + __SQLASSERT(!iRqPending, ESqlPanicMisuse); if(iDbSession) { return iDbSession->SendReceive(aFunction, TIpcArgs(aAllocFailType, aRate)); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlScalarFullSelect.cpp --- a/persistentstorage/sql/SRC/Client/SqlScalarFullSelect.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlScalarFullSelect.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -13,13 +13,8 @@ // Description: // -#include "SqlAssert.h" //ESqlPanicInvalidObj, ESqlPanicObjExists +#include "SqlPanic.h" //ESqlPanicInvalidObj, ESqlPanicObjExists #include "SqlDatabaseImpl.h" //CSqlDatabaseImpl -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlScalarFullSelectTraces.h" -#endif -#include "SqlTraceDef.h" /** Returns a reference to the implementation object of RSqlDatabase - CSqlDatabaseImpl. @@ -30,7 +25,7 @@ */ inline CSqlDatabaseImpl& TSqlScalarFullSelectQuery::Impl() const { - __ASSERT_ALWAYS(iDatabaseImpl != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT_ALWAYS(iDatabaseImpl != NULL, ESqlPanicInvalidObj); return *iDatabaseImpl; } @@ -51,7 +46,6 @@ EXPORT_C TSqlScalarFullSelectQuery::TSqlScalarFullSelectQuery(RSqlDatabase& aDatabase) : iDatabaseImpl(&aDatabase.Impl()) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_TSQLSCALARFULLSELECTQUERY, "0x%X;TSqlScalarFullSelectQuery::TSqlScalarFullSelectQuery;aDatabase=0x%X;iDatabaseImpl=0x%X", (TUint)this, (TUint)&aDatabase, (TUint)iDatabaseImpl)); } /** @@ -62,8 +56,8 @@ */ EXPORT_C void TSqlScalarFullSelectQuery::SetDatabase(RSqlDatabase& aDatabase) { + SQLUTRACE_PROFILER(this); iDatabaseImpl = &aDatabase.Impl(); - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SETDATABASE, "0x%X;TSqlScalarFullSelectQuery::SetDatabase;aDatabase=0x%X;iDatabaseImpl=0x%X", (TUint)this, (TUint)&aDatabase, (TUint)iDatabaseImpl)); } /** @@ -80,11 +74,12 @@ */ EXPORT_C TInt TSqlScalarFullSelectQuery::SelectIntL(const TDesC& aSqlStmt) { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTINTL_ENTRY16, "Entry;0x%X;TSqlScalarFullSelectQuery::SelectIntL-16;aSqlStmt=%S", (TUint)this, __SQLPRNSTR(aSqlStmt))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aSqlStmt)); + TInt res; TPtr8 ptr(reinterpret_cast (&res), sizeof(res)); (void)Impl().ExecScalarFullSelectL(aSqlStmt, ESqlInt, ptr); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTINTL_EXIT16, "Exit;0x%X;TSqlScalarFullSelectQuery::SelectIntL-16;res=%d", (TUint)this, res)); return res; } @@ -102,11 +97,12 @@ */ EXPORT_C TInt64 TSqlScalarFullSelectQuery::SelectInt64L(const TDesC& aSqlStmt) { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTINT64L_ENTRY16, "Entry;0x%X;TSqlScalarFullSelectQuery::SelectInt64L-16;aSqlStmt=%S", (TUint)this, __SQLPRNSTR(aSqlStmt))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aSqlStmt)); + TInt64 res; TPtr8 ptr(reinterpret_cast (&res), sizeof(res)); (void)Impl().ExecScalarFullSelectL(aSqlStmt, ESqlInt64, ptr); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTINT64L_EXIT16, "Exit;0x%X;TSqlScalarFullSelectQuery::SelectInt64L-16;res=%lld", (TUint)this, res)); return res; } @@ -124,11 +120,12 @@ */ EXPORT_C TReal TSqlScalarFullSelectQuery::SelectRealL(const TDesC& aSqlStmt) { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTREALL_ENTRY16, "Entry;0x%X;TSqlScalarFullSelectQuery::SelectRealL-16;aSqlStmt=%S", (TUint)this, __SQLPRNSTR(aSqlStmt))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aSqlStmt)); + TReal res; TPtr8 ptr(reinterpret_cast (&res), sizeof(res)); (void)Impl().ExecScalarFullSelectL(aSqlStmt, ESqlReal, ptr); - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTREALL_EXIT16, "Exit;0x%X;TSqlScalarFullSelectQuery::SelectRealL-16", (TUint)this)); return res; } @@ -152,12 +149,13 @@ */ EXPORT_C TInt TSqlScalarFullSelectQuery::SelectTextL(const TDesC& aSqlStmt, TDes& aDest) { - SQL_TRACE_BORDER(OstTraceExt5(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTTEXTL_ENTRY16, "Entry;0x%X;TSqlScalarFullSelectQuery::SelectTextL-16;aSqlStmt=%S;aDest.Ptr()=0x%X;aDest.Size()=%d;aDest.MaxSize()=%d", (TUint)this, __SQLPRNSTR(aSqlStmt), (TUint)aDest.Ptr(), aDest.Size(), aDest.MaxSize())); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aSqlStmt)); + TPtr8 ptr(reinterpret_cast (const_cast (aDest.Ptr())), aDest.MaxLength() * sizeof(TUint16)); - TInt rc = Impl().ExecScalarFullSelectL(aSqlStmt, ESqlText, ptr); + TInt err = Impl().ExecScalarFullSelectL(aSqlStmt, ESqlText, ptr); aDest.SetLength(ptr.Length() / sizeof(TUint16)); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTTEXTL_EXIT16, "Exit;0x%X;TSqlScalarFullSelectQuery::SelectTextL-16;rc=%d", (TUint)this, rc)); - return rc; + return err; } /** @@ -180,10 +178,10 @@ */ EXPORT_C TInt TSqlScalarFullSelectQuery::SelectBinaryL(const TDesC& aSqlStmt, TDes8& aDest) { - SQL_TRACE_BORDER(OstTraceExt5(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTBINARYL_ENTRY16, "Entry;0x%X;TSqlScalarFullSelectQuery::SelectBinaryL-16;aSqlStmt=%S;aDest.Ptr()=0x%X;aDest.Size()=%d;aDest.MaxSize()=%d", (TUint)this, __SQLPRNSTR(aSqlStmt), (TUint)aDest.Ptr(), aDest.Size(), aDest.MaxSize())); - TInt rc = Impl().ExecScalarFullSelectL(aSqlStmt, ESqlBinary, aDest); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTBINARYL_EXIT16, "Exit;0x%X;TSqlScalarFullSelectQuery::SelectBinaryL-16;rc=%d", (TUint)this, rc)); - return rc; + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aSqlStmt)); + + return Impl().ExecScalarFullSelectL(aSqlStmt, ESqlBinary, aDest); } /** @@ -200,12 +198,12 @@ */ EXPORT_C TInt TSqlScalarFullSelectQuery::SelectIntL(const TDesC8& aSqlStmt) { - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTINTL_ENTRY8, "Entry;0x%X;TSqlScalarFullSelectQuery::SelectIntL-8;aSqlStmt=%s", (TUint)this, __SQLPRNSTR8(aSqlStmt, des16prnbuf))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam, 1, &aSqlStmt)); + TInt res; TPtr8 ptr(reinterpret_cast (&res), sizeof(res)); (void)Impl().ExecScalarFullSelectL(aSqlStmt, ESqlInt, ptr); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTINTL_EXIT8, "Exit;0x%X;TSqlScalarFullSelectQuery::SelectIntL-8;res=%d", (TUint)this, res)); return res; } @@ -223,12 +221,12 @@ */ EXPORT_C TInt64 TSqlScalarFullSelectQuery::SelectInt64L(const TDesC8& aSqlStmt) { - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTINT64L_ENTRY8, "Entry;0x%X;TSqlScalarFullSelectQuery::SelectInt64L-8;aSqlStmt=%s", (TUint)this, __SQLPRNSTR8(aSqlStmt, des16prnbuf))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam, 1, &aSqlStmt)); + TInt64 res; TPtr8 ptr(reinterpret_cast (&res), sizeof(res)); (void)Impl().ExecScalarFullSelectL(aSqlStmt, ESqlInt64, ptr); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTINT64L_EXIT8, "Exit;0x%X;TSqlScalarFullSelectQuery::SelectInt64L-8;res=%lld", (TUint)this, res)); return res; } @@ -246,12 +244,12 @@ */ EXPORT_C TReal TSqlScalarFullSelectQuery::SelectRealL(const TDesC8& aSqlStmt) { - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTREALL_ENTRY8, "Entry;0x%X;TSqlScalarFullSelectQuery::SelectRealL-8;aSqlStmt=%s", (TUint)this, __SQLPRNSTR8(aSqlStmt, des16prnbuf))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam, 1, &aSqlStmt)); + TReal res; TPtr8 ptr(reinterpret_cast (&res), sizeof(res)); (void)Impl().ExecScalarFullSelectL(aSqlStmt, ESqlReal, ptr); - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTREALL_EXIT8, "Exit;0x%X;TSqlScalarFullSelectQuery::SelectRealL-8", (TUint)this)); return res; } @@ -275,13 +273,13 @@ */ EXPORT_C TInt TSqlScalarFullSelectQuery::SelectTextL(const TDesC8& aSqlStmt, TDes& aDest) { - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt5(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTTEXTL_ENTRY8, "Entry;0x%X;TSqlScalarFullSelectQuery::SelectTextL-8;aSqlStmt=%s;aDest.Ptr()=0x%X;aDest.Size()=%d;aDest.MaxSize()=%d", (TUint)this, __SQLPRNSTR8(aSqlStmt, des16prnbuf), (TUint)aDest.Ptr(), aDest.Size(), aDest.MaxSize())); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam, 1, &aSqlStmt)); + TPtr8 ptr(reinterpret_cast (const_cast (aDest.Ptr())), aDest.MaxLength() * sizeof(TUint16)); - TInt rc = Impl().ExecScalarFullSelectL(aSqlStmt, ESqlText, ptr); + TInt err = Impl().ExecScalarFullSelectL(aSqlStmt, ESqlText, ptr); aDest.SetLength(ptr.Length() / sizeof(TUint16)); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTTEXTL_EXIT8, "Exit;0x%X;TSqlScalarFullSelectQuery::SelectTextL-8;rc=%d", (TUint)this, rc)); - return rc; + return err; } /** @@ -304,9 +302,8 @@ */ EXPORT_C TInt TSqlScalarFullSelectQuery::SelectBinaryL(const TDesC8& aSqlStmt, TDes8& aDest) { - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt5(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTBINARYL_ENTRY8, "Entry;0x%X;TSqlScalarFullSelectQuery::SelectBinaryL-8;aSqlStmt=%s;aDest.Ptr()=0x%X;aDest.Size()=%d;aDest.MaxSize()=%d", (TUint)this, __SQLPRNSTR8(aSqlStmt, des16prnbuf), (TUint)aDest.Ptr(), aDest.Size(), aDest.MaxSize())); - TInt rc = Impl().ExecScalarFullSelectL(aSqlStmt, ESqlBinary, aDest); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, TSQLSCALARFULLSELECTQUERY_SELECTBINARYL_EXIT8, "Exit;0x%X;TSqlScalarFullSelectQuery::SelectBinaryL-8;rc=%d", (TUint)this, rc)); - return rc; + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam, 1, &aSqlStmt)); + + return Impl().ExecScalarFullSelectL(aSqlStmt, ESqlBinary, aDest); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlStatement.cpp --- a/persistentstorage/sql/SRC/Client/SqlStatement.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlStatement.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -14,11 +14,6 @@ // #include "SqlStatementImpl.h" //CSqlStatementImpl -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlStatementTraces.h" -#endif -#include "SqlTraceDef.h" ///////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -84,10 +79,10 @@ */ EXPORT_C TInt RSqlStatement::Prepare(RSqlDatabase& aDatabase, const TDesC& aSqlStmt) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLSTATEMENT_PREPARE16_ENTRY, "Entry;0x%X;RSqlStatement::Prepare16;aDatabase=0x%X;aSqlStmt=%S", (TUint)this, (TUint)&aDatabase, __SQLPRNSTR(aSqlStmt))); - TInt err = CSqlStatementImpl::New(iImpl, aDatabase.Impl(), aSqlStmt); - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLSTATEMENT_PREPARE16_EXIT, "Exit;0x%X;RSqlStatement::Prepare16;iImpl=0x%X;err=%d", (TUint)this, (TUint)iImpl, err)); - return err; + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KHexStrParam16, &aDatabase, &aSqlStmt)); + + return CSqlStatementImpl::New(iImpl, aDatabase.Impl(), aSqlStmt); } /** @@ -143,11 +138,11 @@ */ EXPORT_C TInt RSqlStatement::Prepare(RSqlDatabase& aDatabase, const TDesC8& aSqlStmt) { - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLSTATEMENT_PREPARE8_ENTRY, "Entry;0x%X;RSqlStatement::Prepare8;aDatabase=0x%X;aSqlStmt=%s", (TUint)this, (TUint)&aDatabase, __SQLPRNSTR8(aSqlStmt, des16prnbuf))); - TInt err = CSqlStatementImpl::New(iImpl, aDatabase.Impl(), aSqlStmt); - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLSTATEMENT_PREPARE8_EXIT, "Exit;0x%X;RSqlStatement::Prepare8;iImpl=0x%X;err=%d", (TUint)this, (TUint)iImpl, err)); - return err; + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KHexStrParam, + &aDatabase, &aSqlStmt)); + + return CSqlStatementImpl::New(iImpl, aDatabase.Impl(), aSqlStmt); } /** @@ -201,9 +196,11 @@ */ EXPORT_C void RSqlStatement::PrepareL(RSqlDatabase& aDatabase, const TDesC& aSqlStmt) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLSTATEMENT_PREPARE16L_ENTRY, "Entry;0x%X;RSqlStatement::Prepare16L;aDatabase=0x%X;aSqlStmt=%S", (TUint)this, (TUint)&aDatabase, __SQLPRNSTR(aSqlStmt))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KHexStrParam16, + &aDatabase, &aSqlStmt)); + __SQLLEAVE_IF_ERROR(Prepare(aDatabase, aSqlStmt)); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLSTATEMENT_PREPARE16L_EXIT, "Exit;0x%X;RSqlStatement::Prepare16L;iImpl=0x%X", (TUint)this, (TUint)iImpl)); } /** @@ -258,10 +255,11 @@ */ EXPORT_C void RSqlStatement::PrepareL(RSqlDatabase& aDatabase, const TDesC8& aSqlStmt) { - __SQLTRACE_BORDERVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLSTATEMENT_PREPARE8L_ENTRY, "Entry;0x%X;RSqlStatement::Prepare8L;aDatabase=0x%X;aSqlStmt=%s", (TUint)this, (TUint)&aDatabase, __SQLPRNSTR8(aSqlStmt, des16prnbuf))); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KHexStrParam, + &aDatabase, &aSqlStmt)); + __SQLLEAVE_IF_ERROR(Prepare(aDatabase, aSqlStmt)); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLSTATEMENT_PREPARE8L_EXIT, "Exit;0x%X;RSqlStatement::Prepare8L;iImpl=0x%X", (TUint)this, (TUint)iImpl)); } @@ -276,9 +274,8 @@ */ EXPORT_C void RSqlStatement::Close() { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLSTATEMENT_CLOSE_ENTRY, "Entry;0x%X;RSqlStatement::Close;iImpl=0x%X", (TUint)this, (TUint)iImpl)); + SQLUTRACE_PROFILER(this); delete iImpl; - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLSTATEMENT_CLOSE_EXIT, "Exit;0x%X;RSqlStatement::Close;iImpl=0x%X", (TUint)this, (TUint)iImpl)); iImpl = NULL; } @@ -291,6 +288,7 @@ */ EXPORT_C TBool RSqlStatement::AtRow() const { + SQLUTRACE_PROFILER(this); return Impl().AtRow(); } @@ -354,10 +352,8 @@ */ EXPORT_C TInt RSqlStatement::Reset() { - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLSTATEMENT_RESET_ENTRY, "Entry;0x%X;RSqlStatement::Reset", (TUint)this)); - TInt err = Impl().Reset(); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLSTATEMENT_RESET_EXIT, "Exit;0x%X;RSqlStatement::Reset;err=%d", (TUint)this, err)); - return err; + SQLUTRACE_PROFILER(this); + return Impl().Reset(); } /** @@ -416,10 +412,8 @@ */ EXPORT_C TInt RSqlStatement::Exec() { - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLSTATEMENT_EXEC_ENTRY, "Entry;0x%X;RSqlStatement::Exec", (TUint)this)); - TInt err = Impl().Exec(); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLSTATEMENT_EXEC_EXIT, "Exit;0x%X;RSqlStatement::Exec;err=%d", (TUint)this, err)); - return err; + SQLUTRACE_PROFILER(this); + return Impl().Exec(); } /** @@ -469,9 +463,8 @@ */ EXPORT_C void RSqlStatement::Exec(TRequestStatus& aStatus) { - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLSTATEMENT_EXECASYNC_ENTRY, "Entry;0x%X;RSqlStatement::ExecAsync", (TUint)this)); + SQLUTRACE_PROFILER(this); Impl().Exec(aStatus); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLSTATEMENT_EXECASYNC_EXIT, "Exit;0x%X;RSqlStatement::ExecAsync;aStatus.Int()=%d", (TUint)this, aStatus.Int())); } /** @@ -520,10 +513,8 @@ */ EXPORT_C TInt RSqlStatement::Next() { - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLSTATEMENT_NEXT_ENTRY, "Entry;0x%X;RSqlStatement::Next", (TUint)this)); - TInt err = Impl().Next(); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLSTATEMENT_NEXT_EXIT, "Exit;0x%X;RSqlStatement::Next;err=%d", (TUint)this, err)); - return err; + SQLUTRACE_PROFILER(this); + return Impl().Next(); } /** @@ -546,6 +537,9 @@ */ EXPORT_C TInt RSqlStatement::ParameterIndex(const TDesC& aParameterName) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aParameterName)); + return Impl().ParamIndex(aParameterName); } @@ -561,6 +555,7 @@ */ EXPORT_C TInt RSqlStatement::ColumnCount() const { + SQLUTRACE_PROFILER(this); return Impl().ColumnCount(); } @@ -581,6 +576,9 @@ */ EXPORT_C TInt RSqlStatement::ColumnIndex(const TDesC& aColumnName) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KStrParam16, 1, &aColumnName)); + return Impl().ColumnIndex(aColumnName); } @@ -611,6 +609,9 @@ */ EXPORT_C TSqlColumnType RSqlStatement::ColumnType(TInt aColumnIndex) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + return Impl().ColumnType(aColumnIndex); } @@ -649,6 +650,9 @@ */ EXPORT_C TInt RSqlStatement::DeclaredColumnType(TInt aColumnIndex, TSqlColumnType& aColumnType) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + return Impl().DeclaredColumnType(aColumnIndex, aColumnType); } @@ -696,6 +700,9 @@ */ EXPORT_C TInt RSqlStatement::ColumnSize(TInt aColumnIndex) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + return Impl().ColumnSize(aColumnIndex); } @@ -726,6 +733,9 @@ */ EXPORT_C TInt RSqlStatement::BindNull(TInt aParamIndex) { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aParamIndex)); + return Impl().BindNull(aParamIndex); } @@ -754,6 +764,9 @@ */ EXPORT_C TInt RSqlStatement::BindInt(TInt aParamIndex, TInt aParamValue) { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aParamIndex)); + return Impl().BindInt(aParamIndex, aParamValue); } @@ -782,6 +795,9 @@ */ EXPORT_C TInt RSqlStatement::BindInt64(TInt aParamIndex, TInt64 aParamValue) { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aParamIndex)); + return Impl().BindInt64(aParamIndex, aParamValue); } @@ -810,6 +826,9 @@ */ EXPORT_C TInt RSqlStatement::BindReal(TInt aParamIndex, TReal aParamValue) { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aParamIndex)); + return Impl().BindReal(aParamIndex, aParamValue); } @@ -853,6 +872,10 @@ */ EXPORT_C TInt RSqlStatement::BindText(TInt aParamIndex, const TDesC& aParamText) { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntSizeParam, + aParamIndex, aParamText.Length())); + return Impl().BindText(aParamIndex, aParamText); } @@ -894,6 +917,10 @@ */ EXPORT_C TInt RSqlStatement::BindBinary(TInt aParamIndex, const TDesC8& aParamData) { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntSizeParam, + aParamIndex, aParamData.Length())); + return Impl().BindBinary(aParamIndex, aParamData); } @@ -942,6 +969,10 @@ */ EXPORT_C TInt RSqlStatement::BindZeroBlob(TInt aParamIndex, TInt aBlobSize) { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntSizeParam, + aParamIndex, aBlobSize)); + return Impl().BindZeroBlob(aParamIndex, aBlobSize); } @@ -974,6 +1005,9 @@ */ EXPORT_C TBool RSqlStatement::IsNull(TInt aColumnIndex) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + return Impl().ColumnType(aColumnIndex) == ESqlNull; } @@ -1001,6 +1035,9 @@ */ EXPORT_C TInt RSqlStatement::ColumnInt(TInt aColumnIndex) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + return Impl().ColumnInt(aColumnIndex); } @@ -1028,6 +1065,9 @@ */ EXPORT_C TInt64 RSqlStatement::ColumnInt64(TInt aColumnIndex) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + return Impl().ColumnInt64(aColumnIndex); } @@ -1055,6 +1095,9 @@ */ EXPORT_C TReal RSqlStatement::ColumnReal(TInt aColumnIndex) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + return Impl().ColumnReal(aColumnIndex); } @@ -1097,6 +1140,9 @@ */ EXPORT_C TPtrC RSqlStatement::ColumnTextL(TInt aColumnIndex) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + TPtrC res; __SQLLEAVE_IF_ERROR(Impl().ColumnText(aColumnIndex, res)); return res; @@ -1138,6 +1184,9 @@ */ EXPORT_C TInt RSqlStatement::ColumnText(TInt aColumnIndex, TPtrC& aPtr) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + return Impl().ColumnText(aColumnIndex, aPtr); } @@ -1179,6 +1228,9 @@ */ EXPORT_C TInt RSqlStatement::ColumnText(TInt aColumnIndex, TDes& aDest) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + return Impl().ColumnText(aColumnIndex, aDest); } @@ -1221,6 +1273,9 @@ */ EXPORT_C TPtrC8 RSqlStatement::ColumnBinaryL(TInt aColumnIndex) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + TPtrC8 res; __SQLLEAVE_IF_ERROR(Impl().ColumnBinary(aColumnIndex, res)); return res; @@ -1262,6 +1317,9 @@ */ EXPORT_C TInt RSqlStatement::ColumnBinary(TInt aColumnIndex, TPtrC8& aPtr) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + return Impl().ColumnBinary(aColumnIndex, aPtr); } @@ -1303,6 +1361,9 @@ */ EXPORT_C TInt RSqlStatement::ColumnBinary(TInt aColumnIndex, TDes8& aDest) const { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + return Impl().ColumnBinary(aColumnIndex, aDest); } @@ -1316,6 +1377,9 @@ */ EXPORT_C TInt RSqlStatement::ColumnName(TInt aColumnIndex, TPtrC& aNameDest) { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aColumnIndex)); + return Impl().ColumnName(aColumnIndex, aNameDest); } @@ -1334,6 +1398,9 @@ */ EXPORT_C TInt RSqlStatement::ParameterName(TInt aParameterIndex, TPtrC& aNameDest) { + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KIntParam, 1, aParameterIndex)); + return Impl().ParameterName(aParameterIndex, aNameDest); } @@ -1373,6 +1440,6 @@ */ CSqlStatementImpl& RSqlStatement::Impl() const { - __ASSERT_ALWAYS(iImpl != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT_ALWAYS(iImpl != NULL, ESqlPanicInvalidObj); return *iImpl; } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlStatementImpl.cpp --- a/persistentstorage/sql/SRC/Client/SqlStatementImpl.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlStatementImpl.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -9,7 +9,7 @@ // Nokia Corporation - initial contribution. // // Contributors: -// NTT DOCOMO, INC - Fix for defect 1915 "SQL server panics when using long column type strings" +// NTT DOCOMO, INC - Fix for Bug 1915 "SQL server panics when using long column type strings" // // Description: // @@ -45,8 +45,8 @@ */ TBool RSqlLongColumnColl::TData::Compare(const TInt* aIndex, const RSqlLongColumnColl::TData& aData) { - __ASSERT_DEBUG(aIndex != NULL, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(*aIndex >= 0, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aIndex != NULL, ESqlPanicBadArgument); + __SQLASSERT(*aIndex >= 0, ESqlPanicBadArgument); return *aIndex == aData.iIndex; } @@ -63,8 +63,8 @@ */ TInt RSqlLongColumnColl::Append(RSqlLongColumnColl::TColumnReader& aReader, TInt aColumnIndex, TInt aColumnSize) { - __ASSERT_DEBUG(aColumnIndex >= 0, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aColumnSize >= KSqlMaxDesLen, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aColumnIndex >= 0, ESqlPanicBadArgument); + __SQLASSERT(aColumnSize >= KSqlMaxDesLen, ESqlPanicBadArgument); LONGCOL_INVARIANT(); HBufC8* colBuf = HBufC8::New(aColumnSize); if(!colBuf) @@ -96,11 +96,11 @@ for(TInt i=iValues.Count()-1;i>=0;--i) { const RSqlLongColumnColl::TData& data = iValues[i]; - __ASSERT_DEBUG(data.iIndex >= 0, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(data.iData != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(data.iIndex >= 0, ESqlPanicInternalError); + __SQLASSERT(data.iData != NULL, ESqlPanicInternalError); for(TInt j=i-1;j>=0;--j) { - __ASSERT_DEBUG(data.iIndex != iValues[j].iIndex, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(data.iIndex != iValues[j].iIndex, ESqlPanicInternalError); } } } @@ -318,7 +318,7 @@ */ TInt CSqlStatementImpl::BindNull(TInt aParamIndex) { - __ASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); + __SQLASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, ESqlPanicBadColumnIndex); iBound = EFalse; iParamValBufIt.MoveTo(aParamIndex); iParamValBufIt.SetNull(); @@ -334,7 +334,7 @@ */ TInt CSqlStatementImpl::BindInt(TInt aParamIndex, TInt aParamValue) { - __ASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); + __SQLASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, ESqlPanicBadColumnIndex); iBound = EFalse; iParamValBufIt.MoveTo(aParamIndex); return iParamValBufIt.SetInt(aParamValue); @@ -349,7 +349,7 @@ */ TInt CSqlStatementImpl::BindInt64(TInt aParamIndex, TInt64 aParamValue) { - __ASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); + __SQLASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, ESqlPanicBadColumnIndex); iBound = EFalse; iParamValBufIt.MoveTo(aParamIndex); return iParamValBufIt.SetInt64(aParamValue); @@ -364,7 +364,7 @@ */ TInt CSqlStatementImpl::BindReal(TInt aParamIndex, TReal aParamValue) { - __ASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); + __SQLASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, ESqlPanicBadColumnIndex); iBound = EFalse; iParamValBufIt.MoveTo(aParamIndex); return iParamValBufIt.SetReal(aParamValue); @@ -379,7 +379,7 @@ */ TInt CSqlStatementImpl::BindText(TInt aParamIndex, const TDesC& aParamText) { - __ASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); + __SQLASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, ESqlPanicBadColumnIndex); iBound = EFalse; iParamValBufIt.MoveTo(aParamIndex); return iParamValBufIt.SetText(aParamText); @@ -394,7 +394,7 @@ */ TInt CSqlStatementImpl::BindBinary(TInt aParamIndex, const TDesC8& aParamData) { - __ASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); + __SQLASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, ESqlPanicBadColumnIndex); iBound = EFalse; iParamValBufIt.MoveTo(aParamIndex); return iParamValBufIt.SetBinary(aParamData); @@ -409,7 +409,7 @@ */ TInt CSqlStatementImpl::BindZeroBlob(TInt aParamIndex, TInt aBlobSize) { - __ASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); + __SQLASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, ESqlPanicBadColumnIndex); iBound = EFalse; iParamValBufIt.MoveTo(aParamIndex); return iParamValBufIt.SetZeroBlob(aBlobSize); @@ -425,8 +425,8 @@ */ TSqlColumnType CSqlStatementImpl::ColumnType(TInt aColumnIndex) { - __ASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); - __ASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, __SQLPANIC(ESqlPanicInvalidRow)); + __SQLASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, ESqlPanicBadColumnIndex); + __SQLASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, ESqlPanicInvalidRow); iColumnValBufIt.MoveTo(aColumnIndex); return static_cast (iColumnValBufIt.Type()); } @@ -447,7 +447,7 @@ */ TInt CSqlStatementImpl::DeclaredColumnType(TInt aColumnIndex, TSqlColumnType& aColumnType) { - __ASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); + __SQLASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, ESqlPanicBadColumnIndex); if(iDeclaredColumnTypes.Count() == 0) //initialise iDeclaredColumnTypes array if necessary { RSqlBufFlat declaredColumnTypeBuf; @@ -506,10 +506,10 @@ colType = ESqlReal; } err = iDeclaredColumnTypes.Append(colType); - __ASSERT_DEBUG(err == KErrNone, __SQLPANIC(ESqlPanicInternalError));//memory for the array elements has been reserved already + __SQLASSERT(err == KErrNone, ESqlPanicInternalError);//memory for the array elements has been reserved already ++colIdx; } //end of - while(declColumnTypeBufIt.Next()) - __ASSERT_DEBUG(colIdx == iColumnCnt, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(colIdx == iColumnCnt, ESqlPanicInternalError); declaredColumnTypeBuf.Close(); } //end of - if(iDeclaredColumnTypes.Count() == 0 && iColumnCnt > 0) aColumnType = iDeclaredColumnTypes[aColumnIndex]; @@ -526,8 +526,8 @@ */ TInt CSqlStatementImpl::ColumnSize(TInt aColumnIndex) { - __ASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); - __ASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, __SQLPANIC(ESqlPanicInvalidRow)); + __SQLASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, ESqlPanicBadColumnIndex); + __SQLASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, ESqlPanicInvalidRow); iColumnValBufIt.MoveTo(aColumnIndex); return iColumnValBufIt.Size(); } @@ -542,10 +542,10 @@ */ TInt CSqlStatementImpl::ColumnInt(TInt aColumnIndex) { - __ASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); - __ASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, __SQLPANIC(ESqlPanicInvalidRow)); + __SQLASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, ESqlPanicBadColumnIndex); + __SQLASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, ESqlPanicInvalidRow); iColumnValBufIt.MoveTo(aColumnIndex); - __ASSERT_DEBUG(iColumnValBufIt.IsPresent(), __SQLPANIC(ESqlPanicValueNotPresent)); + __SQLASSERT(iColumnValBufIt.IsPresent(), ESqlPanicValueNotPresent); return iColumnValBufIt.Int(); } @@ -559,10 +559,10 @@ */ TInt64 CSqlStatementImpl::ColumnInt64(TInt aColumnIndex) { - __ASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); - __ASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, __SQLPANIC(ESqlPanicInvalidRow)); + __SQLASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, ESqlPanicBadColumnIndex); + __SQLASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, ESqlPanicInvalidRow); iColumnValBufIt.MoveTo(aColumnIndex); - __ASSERT_DEBUG(iColumnValBufIt.IsPresent(), __SQLPANIC(ESqlPanicValueNotPresent)); + __SQLASSERT(iColumnValBufIt.IsPresent(), ESqlPanicValueNotPresent); return iColumnValBufIt.Int64(); } @@ -576,10 +576,10 @@ */ TReal CSqlStatementImpl::ColumnReal(TInt aColumnIndex) { - __ASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); - __ASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, __SQLPANIC(ESqlPanicInvalidRow)); + __SQLASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, ESqlPanicBadColumnIndex); + __SQLASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, ESqlPanicInvalidRow); iColumnValBufIt.MoveTo(aColumnIndex); - __ASSERT_DEBUG(iColumnValBufIt.IsPresent(), __SQLPANIC(ESqlPanicValueNotPresent)); + __SQLASSERT(iColumnValBufIt.IsPresent(), ESqlPanicValueNotPresent); return iColumnValBufIt.Real(); } @@ -597,8 +597,8 @@ */ TInt CSqlStatementImpl::ColumnText(TInt aColumnIndex, TPtrC& aPtr) { - __ASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); - __ASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, __SQLPANIC(ESqlPanicInvalidRow)); + __SQLASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, ESqlPanicBadColumnIndex); + __SQLASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, ESqlPanicInvalidRow); iColumnValBufIt.MoveTo(aColumnIndex); if(iColumnValBufIt.IsPresent()) { @@ -644,8 +644,8 @@ */ TInt CSqlStatementImpl::ColumnText(TInt aColumnIndex, TDes& aDest) { - __ASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); - __ASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, __SQLPANIC(ESqlPanicInvalidRow)); + __SQLASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, ESqlPanicBadColumnIndex); + __SQLASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, ESqlPanicInvalidRow); iColumnValBufIt.MoveTo(aColumnIndex); TInt err = KErrNone; //The text column value has not been transferred to the client side if its length is >= KSqlMaxDesLen characters. @@ -697,8 +697,8 @@ */ TInt CSqlStatementImpl::ColumnBinary(TInt aColumnIndex, TPtrC8& aPtr) { - __ASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); - __ASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, __SQLPANIC(ESqlPanicInvalidRow)); + __SQLASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, ESqlPanicBadColumnIndex); + __SQLASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, ESqlPanicInvalidRow); iColumnValBufIt.MoveTo(aColumnIndex); if(iColumnValBufIt.IsPresent()) { @@ -744,8 +744,8 @@ */ TInt CSqlStatementImpl::ColumnBinary(TInt aColumnIndex, TDes8& aDest) { - __ASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); - __ASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, __SQLPANIC(ESqlPanicInvalidRow)); + __SQLASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, ESqlPanicBadColumnIndex); + __SQLASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, ESqlPanicInvalidRow); iColumnValBufIt.MoveTo(aColumnIndex); TInt err = KErrNone; //The binary column value has not been transferred to the client side if its length is >= KSqlMaxDesLen bytes. diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlStatementImpl.h --- a/persistentstorage/sql/SRC/Client/SqlStatementImpl.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlStatementImpl.h Wed Sep 01 12:39:58 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" diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlStatementImpl.inl --- a/persistentstorage/sql/SRC/Client/SqlStatementImpl.inl Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlStatementImpl.inl Wed Sep 01 12:39:58 2010 +0100 @@ -53,10 +53,10 @@ */ inline TPtrC RSqlLongColumnColl::Text(TInt aColumnIndex) const { - __ASSERT_DEBUG(aColumnIndex >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aColumnIndex >= 0, ESqlPanicBadArgument); LONGCOL_INVARIANT(); TInt rc = FindValue(aColumnIndex); - __ASSERT_ALWAYS(rc >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT_ALWAYS(rc >= 0, ESqlPanicInternalError); TPtrC8 ptr(iValues[rc].iData->Des()); return TPtrC(reinterpret_cast (ptr.Ptr()), ptr.Length() / sizeof(TUint16)); } @@ -70,10 +70,10 @@ */ inline TPtrC8 RSqlLongColumnColl::Binary(TInt aColumnIndex) const { - __ASSERT_DEBUG(aColumnIndex >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aColumnIndex >= 0, ESqlPanicBadArgument); LONGCOL_INVARIANT(); TInt rc = FindValue(aColumnIndex); - __ASSERT_ALWAYS(rc >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT_ALWAYS(rc >= 0, ESqlPanicInternalError); return iValues[rc].iData->Des(); } @@ -85,7 +85,7 @@ */ inline TBool RSqlLongColumnColl::IsPresent(TInt aColumnIndex) const { - __ASSERT_DEBUG(aColumnIndex >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aColumnIndex >= 0, ESqlPanicBadArgument); LONGCOL_INVARIANT(); return FindValue(aColumnIndex) >= 0; } @@ -99,7 +99,7 @@ */ inline TInt RSqlLongColumnColl::FindValue(TInt aColumnIndex) const { - __ASSERT_DEBUG(aColumnIndex >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aColumnIndex >= 0, ESqlPanicBadArgument); return iValues.Find(aColumnIndex, &RSqlLongColumnColl::TData::Compare); } @@ -113,8 +113,8 @@ iIndex(aIndex), iData(aData) { - __ASSERT_DEBUG(aIndex >= 0, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aData != NULL, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aIndex >= 0, ESqlPanicBadArgument); + __SQLASSERT(aData != NULL, ESqlPanicBadArgument); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -145,7 +145,7 @@ { return err; } - __ASSERT_DEBUG(iColumnCnt >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iColumnCnt >= 0, ESqlPanicInternalError); err = iColumnValueBuf.SetCount(iColumnCnt); if(err != KErrNone) { @@ -342,8 +342,8 @@ */ inline MStreamBuf* CSqlStatementImpl::ColumnSourceL(TInt aColumnIndex) { - __ASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); - __ASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, __SQLPANIC(ESqlPanicInvalidRow)); + __SQLASSERT_ALWAYS((TUint)aColumnIndex < (TUint)iColumnCnt, ESqlPanicBadColumnIndex); + __SQLASSERT_ALWAYS(iState == CSqlStatementImpl::EAtRow, ESqlPanicInvalidRow); iColumnValBufIt.MoveTo(aColumnIndex); return iColumnValBufIt.IsPresent() ? iColumnValBufIt.StreamL() : iSqlStmtSession.ColumnSourceL(aColumnIndex); } @@ -369,7 +369,7 @@ */ inline MStreamBuf* CSqlStatementImpl::ParamSinkL(TSqlSrvFunction aFunction, TInt aParamIndex) { - __ASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, __SQLPANIC(ESqlPanicBadColumnIndex)); + __SQLASSERT_ALWAYS((TUint)aParamIndex < (TUint)iParamCnt, ESqlPanicBadColumnIndex); return iSqlStmtSession.ParamSinkL(aFunction, aParamIndex); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlStmtSession.cpp --- a/persistentstorage/sql/SRC/Client/SqlStmtSession.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlStmtSession.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -16,83 +16,6 @@ #include #include "SqlStmtSession.h" //RSqlStatementSession -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlStmtSessionTraces.h" -#endif -#include "SqlTraceDef.h" - -/** - Sends a request to the SQL server to prepare 16-bit aSqlStmt statement. - - Usage of the IPC call arguments: - Arg 0: [in/out] data buffer for the column and parameter count. - Arg 1: [out] statement length in characters - Arg 2: [out] 16-bit statement - - @param aDbSession A reference to RSqlDbSession instance. - @param aSqlStmt 16-bit SQL statement. - @param aColumnCount Output parameter. Statement column count. - @param aParamCount Output parameter. Statement parameter count. - - @return KErrNoMemory, an out of memory condition has occured; - KErrArgument, bad argument, for example - the SQL string contains more than one SQL statements. - Note that the function may return some database specific errors categorised as - ESqlDbError or other system-wide error codes; - KErrNone The operation has completed successfully. - - @panic SqlDb 7 In _DEBUG mode if the statement handle is 0. -*/ -TInt RSqlStatementSession::Prepare(RSqlDbSession& aDbSession, const TDesC& aSqlStmt, - TInt& aColumnCount, TInt& aParamCount) - { - iDbSession = &aDbSession; - TSqlIpcData data; - TPckg pckg(data); - TUint stmtLen = aSqlStmt.Length(); - iHandle = iDbSession->SendReceive(ESqlSrvStmtPrepare16, TIpcArgs(&pckg, stmtLen, &aSqlStmt)); - __ASSERT_DEBUG(iHandle != 0, __SQLPANIC(ESqlPanicInternalError)); - aColumnCount = static_cast (data.iPrm1); - aParamCount = static_cast (data.iPrm2); - SQL_TRACE_SESSION(OstTraceExt2(TRACE_INTERNALS, RSQLSTATEMENTSESSION_PREPARE16, "0x%X;RSqlStatementSession::Prepare-16;iHandle=%d", (TUint)this, iHandle)); - return iHandle > 0 ? KErrNone : iHandle; - } - -/** -Sends a request to the SQL server to prepare 8-bit aSqlStmt statement. - -Usage of the IPC call arguments: -Arg 0: [in/out] data buffer for the column and parameter count. -Arg 1: [out] statement length in characters -Arg 2: [out] 8-bit statement - -@param aDbSession A reference to RSqlDbSession instance. -@param aSqlStmt 8-bit SQL statement. -@param aColumnCount Output parameter. Statement column count. -@param aParamCount Output parameter. Statement parameter count. - -@return KErrNoMemory, an out of memory condition has occured; - KErrArgument, bad argument, for example - the SQL string contains more than one SQL statements. - Note that the function may return some database specific errors categorised as - ESqlDbError or other system-wide error codes; - KErrNone The operation has completed successfully. - -@panic SqlDb 7 In _DEBUG mode if the statement handle is 0. -*/ -TInt RSqlStatementSession::Prepare(RSqlDbSession& aDbSession, const TDesC8& aSqlStmt, - TInt& aColumnCount, TInt& aParamCount) - { - iDbSession = &aDbSession; - TSqlIpcData data; - TPckg pckg(data); - TUint stmtLen = aSqlStmt.Length(); - iHandle = iDbSession->SendReceive(ESqlSrvStmtPrepare8, TIpcArgs(&pckg, stmtLen, &aSqlStmt)); - __ASSERT_DEBUG(iHandle != 0, __SQLPANIC(ESqlPanicInternalError)); - aColumnCount = static_cast (data.iPrm1); - aParamCount = static_cast (data.iPrm2); - SQL_TRACE_SESSION(OstTraceExt2(TRACE_INTERNALS, RSQLSTATEMENTSESSION_PREPARE8, "0x%X;RSqlStatementSession::Prepare-8;iHandle=%d", (TUint)this, iHandle)); - return iHandle > 0 ? KErrNone : iHandle; - } /** Sends a request to the server to close the statement handle. @@ -100,7 +23,6 @@ */ void RSqlStatementSession::Close() { - SQL_TRACE_SESSION(OstTraceExt2(TRACE_INTERNALS, RSQLSTATEMENTSESSION_CLOSE, "0x%X;RSqlStatementSession::Close;iHandle=%d", (TUint)this, iHandle)); if(iDbSession && iHandle > 0) { (void)iDbSession->SendReceive(::MakeMsgCode(ESqlSrvStmtClose, ESqlSrvStatementHandle, iHandle)); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlStmtSession.h --- a/persistentstorage/sql/SRC/Client/SqlStmtSession.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlStmtSession.h Wed Sep 01 12:39:58 2010 +0100 @@ -81,8 +81,8 @@ { public: inline RSqlStatementSession(); - TInt Prepare(RSqlDbSession& aDbSession, const TDesC& aSqlStmt, TInt& aColumnCount, TInt& aParamCount); - TInt Prepare(RSqlDbSession& aDbSession, const TDesC8& aSqlStmt, TInt& aColumnCount, TInt& aParamCount); + inline TInt Prepare(RSqlDbSession& aDbSession, const TDesC& aSqlStmt, TInt& aColumnCount, TInt& aParamCount); + inline TInt Prepare(RSqlDbSession& aDbSession, const TDesC8& aSqlStmt, TInt& aColumnCount, TInt& aParamCount); void Close(); inline TInt Reset(); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlStmtSession.inl --- a/persistentstorage/sql/SRC/Client/SqlStmtSession.inl Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlStmtSession.inl Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -16,6 +16,77 @@ // /** + + Sends a request to the SQL server to prepare 16-bit aSqlStmt statement. + + Usage of the IPC call arguments: + Arg 0: [in/out] data buffer for the column and parameter count. + Arg 1: [out] statement length in characters + Arg 2: [out] 16-bit statement + + @param aDbSession A reference to RSqlDbSession instance. + @param aSqlStmt 16-bit SQL statement. + @param aColumnCount Output parameter. Statement column count. + @param aParamCount Output parameter. Statement parameter count. + + @return KErrNoMemory, an out of memory condition has occured; + KErrArgument, bad argument, for example - the SQL string contains more than one SQL statements. + Note that the function may leave with some database specific errors categorised as + ESqlDbError or other system-wide error codes; + KErrNone The operation has completed successfully. + + @panic SqlDb 7 In _DEBUG mode if the statement handle is 0. +*/ +inline TInt RSqlStatementSession::Prepare(RSqlDbSession& aDbSession, const TDesC& aSqlStmt, + TInt& aColumnCount, TInt& aParamCount) + { + iDbSession = &aDbSession; + TSqlIpcData data; + TPckg pckg(data); + TUint stmtLen = aSqlStmt.Length(); + iHandle = iDbSession->SendReceive(ESqlSrvStmtPrepare16, TIpcArgs(&pckg, stmtLen, &aSqlStmt)); + __SQLASSERT(iHandle != 0, ESqlPanicInternalError); + aColumnCount = static_cast (data.iPrm1); + aParamCount = static_cast (data.iPrm2); + return iHandle > 0 ? KErrNone : iHandle; + } + +/** +Sends a request to the SQL server to prepare 8-bit aSqlStmt statement. + +Usage of the IPC call arguments: +Arg 0: [in/out] data buffer for the column and parameter count. +Arg 1: [out] statement length in characters +Arg 2: [out] 8-bit statement + +@param aDbSession A reference to RSqlDbSession instance. +@param aSqlStmt 8-bit SQL statement. +@param aColumnCount Output parameter. Statement column count. +@param aParamCount Output parameter. Statement parameter count. + +@return KErrNoMemory, an out of memory condition has occured; + KErrArgument, bad argument, for example - the SQL string contains more than one SQL statements. + Note that the function may leave with some database specific errors categorised as + ESqlDbError or other system-wide error codes; + KErrNone The operation has completed successfully. + +@panic SqlDb 7 In _DEBUG mode if the statement handle is 0. +*/ +inline TInt RSqlStatementSession::Prepare(RSqlDbSession& aDbSession, const TDesC8& aSqlStmt, + TInt& aColumnCount, TInt& aParamCount) + { + iDbSession = &aDbSession; + TSqlIpcData data; + TPckg pckg(data); + TUint stmtLen = aSqlStmt.Length(); + iHandle = iDbSession->SendReceive(ESqlSrvStmtPrepare8, TIpcArgs(&pckg, stmtLen, &aSqlStmt)); + __SQLASSERT(iHandle != 0, ESqlPanicInternalError); + aColumnCount = static_cast (data.iPrm1); + aParamCount = static_cast (data.iPrm2); + return iHandle > 0 ? KErrNone : iHandle; + } + +/** @panic SqlDb 2 In _DEBUG mode if the statement handle is 0 or the database session is NULL, i.e. Prepare() has not yet been called on this RSqlStatementSession object. @@ -23,7 +94,7 @@ */ inline RSqlDbSession& RSqlStatementSession::DbSession() const { - __ASSERT_DEBUG(iHandle > 0 && iDbSession != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iHandle > 0 && iDbSession != NULL, ESqlPanicInvalidObj); return *iDbSession; } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Client/SqlStream.cpp --- a/persistentstorage/sql/SRC/Client/SqlStream.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Client/SqlStream.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -15,11 +15,6 @@ #include //RSqlColumnReadStream, RSqlParamWriteStream #include "SqlStatementImpl.h" //CSqlStatementImpl -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlStreamTraces.h" -#endif -#include "SqlTraceDef.h" //////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////// RSqlColumnReadStream //////////////////////////////////// @@ -43,9 +38,10 @@ */ EXPORT_C TInt RSqlColumnReadStream::ColumnText(RSqlStatement& aStmt, TInt aColumnIndex) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLCOLUMNREADSTREAM_COLUMNTEXT_ENTRY, "Entry;0x%X;RSqlColumnReadStream::ColumnText;aStmt=0x%X;aColumnIndex=%d", (TUint)this, (TUint)&aStmt, aColumnIndex)); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KHexIntParam, &aStmt, aColumnIndex)); + TRAPD(err, Attach(aStmt.Impl().ColumnSourceL(aColumnIndex))); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLCOLUMNREADSTREAM_COLUMNTEXT_EXIT, "Exit;0x%X;RSqlColumnReadStream::ColumnText;err=%d", (TUint)this, err)); return err; } @@ -67,9 +63,10 @@ */ EXPORT_C TInt RSqlColumnReadStream::ColumnBinary(RSqlStatement& aStmt, TInt aColumnIndex) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLCOLUMNREADSTREAM_COLUMNBINARY_ENTRY, "Entry;0x%X;RSqlColumnReadStream::ColumnBinary;aStmt=0x%X;aColumnIndex=%d", (TUint)this, (TUint)&aStmt, aColumnIndex)); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KHexIntParam, &aStmt, aColumnIndex)); + TRAPD(err, Attach(aStmt.Impl().ColumnSourceL(aColumnIndex))); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLCOLUMNREADSTREAM_COLUMNBINARY_EXIT, "Exit;0x%X;RSqlColumnReadStream::ColumnBinary;err=%d", (TUint)this, err)); return err; } @@ -90,9 +87,10 @@ */ EXPORT_C void RSqlColumnReadStream::ColumnTextL(RSqlStatement& aStmt, TInt aColumnIndex) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLCOLUMNREADSTREAM_COLUMNTEXTL_ENTRY, "Entry;0x%X;RSqlColumnReadStream::ColumnTextL;aStmt=0x%X;aColumnIndex=%d", (TUint)this, (TUint)&aStmt, aColumnIndex)); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KHexIntParam, &aStmt, aColumnIndex)); + Attach(aStmt.Impl().ColumnSourceL(aColumnIndex)); - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLCOLUMNREADSTREAM_COLUMNTEXTL_EXIT, "Exit;0x%X;RSqlColumnReadStream::ColumnTextL", (TUint)this)); } /** @@ -112,9 +110,10 @@ */ EXPORT_C void RSqlColumnReadStream::ColumnBinaryL(RSqlStatement& aStmt, TInt aColumnIndex) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLCOLUMNREADSTREAM_COLUMNBINARYL_ENTRY, "Entry;0x%X;RSqlColumnReadStream::ColumnBinaryL;aStmt=0x%X;aColumnIndex=%d", (TUint)this, (TUint)&aStmt, aColumnIndex)); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KHexIntParam, &aStmt, aColumnIndex)); + Attach(aStmt.Impl().ColumnSourceL(aColumnIndex)); - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLCOLUMNREADSTREAM_COLUMNBINARYL_EXIT, "Exit;0x%X;RSqlColumnReadStream::ColumnBinaryL", (TUint)this)); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -142,9 +141,10 @@ */ EXPORT_C TInt RSqlParamWriteStream::BindText(RSqlStatement& aStmt, TInt aParameterIndex) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLPARAMWRITESTREAM_BINDTEXT_ENTRY, "Entry;0x%X;RSqlParamWriteStream::BindText;aStmt=0x%X;aParameterIndex=%d", (TUint)this, (TUint)&aStmt, aParameterIndex)); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KHexIntParam, &aStmt, aParameterIndex)); + TRAPD(err, Attach(aStmt.Impl().ParamSinkL(ESqlSrvStmtTxtParamSink16, aParameterIndex))); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLPARAMWRITESTREAM_BINDTEXT_EXIT, "Exit;0x%X;RSqlParamWriteStream::BindText;err=%d", (TUint)this, err)); return err; } @@ -169,9 +169,10 @@ */ EXPORT_C TInt RSqlParamWriteStream::BindBinary(RSqlStatement& aStmt, TInt aParameterIndex) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLPARAMWRITESTREAM_BINDBINARY_ENTRY, "Entry;0x%X;RSqlParamWriteStream::BindBinary;aStmt=0x%X;aParameterIndex=%d", (TUint)this, (TUint)&aStmt, aParameterIndex)); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KHexIntParam, &aStmt, aParameterIndex)); + TRAPD(err, Attach(aStmt.Impl().ParamSinkL(ESqlSrvStmtBinParamSink, aParameterIndex))); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLPARAMWRITESTREAM_BINDBINARY_EXIT, "Exit;0x%X;RSqlParamWriteStream::BindBinary;err=%d", (TUint)this, err)); return err; } @@ -195,9 +196,10 @@ */ EXPORT_C void RSqlParamWriteStream::BindTextL(RSqlStatement& aStmt, TInt aParameterIndex) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLPARAMWRITESTREAM_BINDTEXTL_ENTRY, "Entry;0x%X;RSqlParamWriteStream::BindTextL;aStmt=0x%X;aParameterIndex=%d", (TUint)this, (TUint)&aStmt, aParameterIndex)); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KHexIntParam, &aStmt, aParameterIndex)); + Attach(aStmt.Impl().ParamSinkL(ESqlSrvStmtTxtParamSink16, aParameterIndex)); - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLPARAMWRITESTREAM_BINDTEXTL_EXIT, "Exit;0x%X;RSqlParamWriteStream::BindTextL", (TUint)this)); } /** @@ -220,8 +222,9 @@ */ EXPORT_C void RSqlParamWriteStream::BindBinaryL(RSqlStatement& aStmt, TInt aParameterIndex) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLPARAMWRITESTREAM_BINDBINARYL_ENTRY, "Entry;0x%X;RSqlParamWriteStream::BindBinaryL;aStmt=0x%X;aParameterIndex=%d", (TUint)this, (TUint)&aStmt, aParameterIndex)); + SQLUTRACE_PROFILER(this); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KHexIntParam, &aStmt, aParameterIndex)); + Attach(aStmt.Impl().ParamSinkL(ESqlSrvStmtBinParamSink, aParameterIndex)); - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLPARAMWRITESTREAM_BINDBINARYL_EXIT, "Exit;0x%X;RSqlParamWriteStream::BindBinaryL", (TUint)this)); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/SqlAssert.h --- a/persistentstorage/sql/SRC/Common/SqlAssert.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Common/SqlAssert.h Wed Sep 01 12:39:58 2010 +0100 @@ -17,68 +17,17 @@ #define __SQLASSERT_H__ #include -#include "SqlPanic.h" //TSqlPanic - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -//Enable _SQLPROFILER if you want to use the TSqlResourceProfiler functions. Do not forget the same macro declaration in os_symbian.cpp file. - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -//All macros in this header will have a non-void definition only if the OST_TRACE_COMPILER_IN_USE macro -//is defined. -//In order to get the traces enabled, the OST_TRACE_COMPILER_IN_USE macro has to be defined in -//OstTraceDefinitions.h file. -//After that, the trace output can be redirected by defining _SQL_RDEBUG_PRINT or specific categories -//of traces can be enabled/disabled. - -//Enable _SQL_RDEBUG_PRINT if you want to redirect the tracing output via RDebug::Print() -//#define _SQL_RDEBUG_PRINT +#include "UTraceSql.h" -//Enable _SQL_BORDER_TRACE_ENABLED if you want to get the entry/exit traces compiled in the binary -//#define _SQL_BORDER_TRACE_ENABLED - -//Enable _SQL_INTERNALS_TRACE_ENABLED if you want to get the internal traces compiled in the binary -//#define _SQL_INTERNALS_TRACE_ENABLED - -//Enable _SQL_BUR_TRACE_ENABLED if you want to get the backup&restore traces compiled in the binary -//#define _SQL_BUR_TRACE_ENABLED - -//Enable _SQL_COMPACT_TRACE_ENABLED if you want to get the background compaction traces compiled in the binary -//#define _SQL_COMPACT_TRACE_ENABLED - -//Enable _SQL_SESSION_TRACE_ENABLED if you want to get the client and server sessions traces compiled in the binary -//#define _SQL_SESSION_TRACE_ENABLED - -//Enable _SQL_AUTHORIZER_TRACE_ENABLED if you want to trace the authorizer parameters -//#define _SQL_AUTHORIZER_TRACE_ENABLED - -//Enable _SQL_BLOB_TRACE_ENABLED if you want to trace the server side BLOB calls -//#define _SQL_BLOB_TRACE_ENABLED +//#define _SQLPROFILER //Enable _SQLPROFILER if you want to use the TSqlResourceProfiler functions. Do not forget the same macro declaration in os_symbian.cpp file. #ifdef _DEBUG - //Enable _SQL_PANIC_TRACE_ENABLED if you want to get more detailed output regarding panics - //#define _SQL_PANIC_TRACE_ENABLED - - //Enable _SQL_LEAVE_TRACE_ENABLED if you want to get more detailed output regarding leaving locations - //#define _SQL_LEAVE_TRACE_ENABLED +#define _ASSERTIONS +//#define _LOGGING +//#define _NOTIFY //Enable _NOTIFY if you want to get more detailed output in _DEBUG mode #endif -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -//Wrap every string (file name, file path, etc.) you want to trace, in a __SQLPRNSTR()/__SQLPRNSTR8() macro. -//There is a difference how RDebug::Print() and OstTraceExt() work. -#if defined _SQL_RDEBUG_PRINT - const TInt KSqlMaxPrnStrLen = 512; - #define __SQLPRNSTR(des) &des - const TDesC* SqlDes8to16Ptr(const TDesC8& aDes, TDes& aOut); - #define __SQLPRNSTR8(des, out) SqlDes8to16Ptr(des, out) -#else - #define __SQLPRNSTR(des) des - #define __SQLPRNSTR8(des, out) des -#endif - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +const TInt KSqlLeavePanic = -359;//The (last-1) error code from the reserved area for the SQL component. //Forward declarations class RMessage2; @@ -88,104 +37,98 @@ @internalComponent */ -class TSqlUtil +class Util { friend void UtilFileNameTest(); public: static void GetTimeStr(TDes& aWhere); - static TInt Panic(const TText* aFile, TInt aLine, TInt aPanicCode, TUint aHandle); - static void Leave(const TText* aFile, TInt aLine, TInt aError, TUint aHandle); - static TInt LeaveIfError(const TText* aFile, TInt aLine, TInt aError, TUint aHandle); - static void* LeaveIfNull(const TText* aFile, TInt aLine, void* aPtr, TUint aHandle); - static TInt PanicClientL(const TText* aFile, TInt aLine, const RMessage2& aMessage, TInt aPanicCode, TUint aHandle); + static TInt Assert(const TText* aFile, TInt aLine, TInt aPanicCode); + static void Leave(const TText* aFile, TInt aLine, TInt aError); + static TInt LeaveIfError(const TText* aFile, TInt aLine, TInt aError); + static const void* LeaveIfNull(const TText* aFile, TInt aLine, const void* aPtr); + static TInt PanicClientL(const TText* aFile, TInt aLine, const RMessage2& aMessage, TInt aPanicCode); + static void ErrorPrint(const TDesC& aMsg, TInt aErr); + static void ErrorPrint(const TDesC& aMsg, const TDesC& aStr); private: - static TPtrC FileName(const TText* aFile); + static TPtrC Filename(const TText* aFile); }; +#define __STRING(str) _S(str) + +//This macro should be used when there is a need to panic the client/server if "expr" condition is not satisfied. +//Works in both debug and release modes. +#define __SQLASSERT_ALWAYS(expr, panicCode) (void)((expr) || Util::Assert(__STRING(__FILE__), __LINE__, panicCode)) + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////// _ASSERTIONS ///////////////////////////////////////////////////////// +#ifdef _ASSERTIONS -#define __SQLSTRING(str) _S(str) +//This macro should be used when there is a need to panic the client/server if "expr" condition is not satisfied. +//Works in only in debug mode. In release mode evaluates to nothing. +#define __SQLASSERT(expr, panicCode) (void)((expr) || Util::Assert(__STRING(__FILE__), __LINE__, panicCode)) + +#else + +#define __SQLASSERT(expr, panicCode) void(0) + +#endif //_ASSERTIONS /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////// _LOGGING ////////////////////////////////////////////////////////// +#if defined _LOGGING || defined SYMBIAN_TRACE_SQL_ERR -//__SQLPANIC/__SQLPANIC2 macro is used for printing out additional information when panic occurs in SQL: -//source file name, line number, "this" pointer, panic category. -#define __SQLPANIC(aPanicCode) TSqlUtil::Panic(__SQLSTRING(__FILE__), __LINE__, aPanicCode, (TUint)this) -#define __SQLPANIC2(aPanicCode) TSqlUtil::Panic(__SQLSTRING(__FILE__), __LINE__, aPanicCode, 0) +//This macro should be used to log the message "msg" containing the "err" error code. +//The message "msg" should contain the format specifier %d. +//Works only in debug mode. In release mode evaluates to nothing. +#define __SQLLOG_ERR(msg, err) Util::ErrorPrint(msg, err) + +//This macro should be used to log the message "msg" containing the "str" string. +//The message "msg" should contain the format specifier %S. +//Works only in debug mode. In release mode evaluates to nothing. +#define __SQLLOG_STRING(msg, str) Util::ErrorPrint(msg, str) + +#else + +#define __SQLLOG_ERR(msg, err) do {} while(0) +#define __SQLLOG_STRING(msg, str) do {} while(0) + +#endif //_LOGGING || SYMBIAN_TRACE_SQL_ERR /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////// _NOTIFY /////////////////////////////////////////////////////////// +#if defined _NOTIFY || defined SYMBIAN_TRACE_SQL_ERR //This macro should be used to leave with "err" error code. //In debug mode prints the file name and the line number where the leaving occurs and then leaves. //In release mode only leaves. -#define __SQLLEAVE(err) TSqlUtil::Leave(__SQLSTRING(__FILE__), __LINE__, err, (TUint)this) -#define __SQLLEAVE2(err) TSqlUtil::Leave(__SQLSTRING(__FILE__), __LINE__, err, 0) +#define __SQLLEAVE(err) Util::Leave(__STRING(__FILE__), __LINE__, err) //This macro should be used to leave with "err" error code, if the error code is negative. //In debug mode prints the file name and the line number where the leaving occurs and then leaves. //In release mode only leaves. -#define __SQLLEAVE_IF_ERROR(err) TSqlUtil::LeaveIfError(__SQLSTRING(__FILE__), __LINE__, err, (TUint)this) -#define __SQLLEAVE_IF_ERROR2(err) TSqlUtil::LeaveIfError(__SQLSTRING(__FILE__), __LINE__, err, 0) +#define __SQLLEAVE_IF_ERROR(err) Util::LeaveIfError(__STRING(__FILE__), __LINE__, err) //This macro should be used to leave with KErrNoMemory if "ptr" argument is NULL. //In debug mode prints the file name and the line number where the leaving occurs and then leaves. //In release mode only leaves. -#define __SQLLEAVE_IF_NULL(ptr) TSqlUtil::LeaveIfNull(__SQLSTRING(__FILE__), __LINE__, ptr, (TUint)this) +#define __SQLLEAVE_IF_NULL(ptr) Util::LeaveIfNull(__STRING(__FILE__), __LINE__, ptr) //This macro should be used to panic the client and leave if "expr" condition is not satisfied. //In debug mode prints the file name and the line number where the leaving occurs and then //panics the client and leaves. //In release mode only panics the client and leaves. -#define __SQLPANIC_CLIENT(expr, msg, panicCode) (void)((expr) || TSqlUtil::PanicClientL(__SQLSTRING(__FILE__), __LINE__, msg, panicCode, (TUint)this)) -#define __SQLPANIC_CLIENT2(expr, msg, panicCode) (void)((expr) || TSqlUtil::PanicClientL(__SQLSTRING(__FILE__), __LINE__, msg, panicCode, 0)) - -//=================================================================================== - -#ifdef _SQL_BORDER_TRACE_ENABLED - #define SQL_TRACE_BORDER(trace) trace -#else - #define SQL_TRACE_BORDER(trace) do {} while(0) -#endif +#define __SQLPANIC_CLIENT(expr, msg, panicCode) (void)((expr) || Util::PanicClientL(__STRING(__FILE__), __LINE__, msg, panicCode)) -#ifdef _SQL_INTERNALS_TRACE_ENABLED - #define SQL_TRACE_INTERNALS(trace) trace #else - #define SQL_TRACE_INTERNALS(trace) do {} while(0) -#endif - -#ifdef _SQL_BUR_TRACE_ENABLED - #define SQL_TRACE_BUR(trace) trace -#else - #define SQL_TRACE_BUR(trace) do {} while(0) -#endif -#ifdef _SQL_COMPACT_TRACE_ENABLED - #define SQL_TRACE_COMPACT(trace) trace -#else - #define SQL_TRACE_COMPACT(trace) do {} while(0) -#endif - -#ifdef _SQL_SESSION_TRACE_ENABLED - #define SQL_TRACE_SESSION(trace) trace -#else - #define SQL_TRACE_SESSION(trace) do {} while(0) -#endif +#define __SQLLEAVE(err) User::Leave(err) +#define __SQLLEAVE_IF_ERROR(err) User::LeaveIfError(err) +#define __SQLLEAVE_IF_NULL(ptr) User::LeaveIfNull(ptr) +#define __SQLPANIC_CLIENT(expr, msg, panicCode) (void)((expr) || ::SqlPanicClientL(msg, panicCode)) -#ifdef _SQL_AUTHORIZER_TRACE_ENABLED - #define SQL_TRACE_AUTHORIZER(trace) trace -#else - #define SQL_TRACE_AUTHORIZER(trace) do {} while(0) -#endif - -#ifdef _SQL_BLOB_TRACE_ENABLED - #define SQL_TRACE_BLOB(trace) trace -#else - #define SQL_TRACE_BLOB(trace) do {} while(0) -#endif - -//=================================================================================== +#endif //_NOTIFY || SYMBIAN_TRACE_SQL_ERR #endif//__SQLASSERT_H__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/SqlBufFlat.cpp --- a/persistentstorage/sql/SRC/Common/SqlBufFlat.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Common/SqlBufFlat.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -15,7 +15,6 @@ #include "SqlUtil.h" #include "SqlBufFlat.h" -#include "OstTraceDefinitions.h" /** Sets the flat buffer pointer to NULL @@ -46,7 +45,7 @@ */ TInt RSqlBufFlat::SetCount(TInt aCount) { - __ASSERT_DEBUG(aCount >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aCount >= 0, ESqlPanicBadArgument); TInt headerSize = sizeof(RSqlBufFlat::TCell) * aCount; TInt newSize = headerSize + sizeof(RSqlBufFlat::TBufFlat); if(DoReAlloc(newSize) != KErrNone) @@ -111,7 +110,7 @@ iMaxSize = KBufLimit - 1; //to force the reallocation (void)DoReAlloc(KBufLimit);//User::ReAlloc() does not fail if the new requested size is less than the current block size } - __ASSERT_DEBUG(oldBuf == iBuf, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(oldBuf == iBuf, ESqlPanicInternalError); SQLFLATBUF_INVARIANT(); } @@ -157,12 +156,12 @@ TInt RSqlBufFlat::SetField(TInt aIndex, TInt aType, const void* aData, TInt aDataLength) { SQLFLATBUF_INVARIANT(); - __ASSERT_DEBUG((TUint)aIndex < iBuf->iCount, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG((TUint)aType < RSqlBufFlat::EMaxType, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG((TUint)aDataLength < RSqlBufFlat::EMaxLength, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT((TUint)aIndex < iBuf->iCount, ESqlPanicBadArgument); + __SQLASSERT((TUint)aType < RSqlBufFlat::EMaxType, ESqlPanicBadArgument); + __SQLASSERT((TUint)aDataLength < RSqlBufFlat::EMaxLength, ESqlPanicBadArgument); if(aData) //field value "present" { - __ASSERT_DEBUG(aDataLength >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aDataLength >= 0, ESqlPanicBadArgument); if(aDataLength > 0) { if(Reserve(aDataLength) != KErrNone) @@ -196,9 +195,9 @@ void RSqlBufFlat::DoInit() { TBufFlat& buf = *iBuf; - __ASSERT_DEBUG(buf.iCount >= 0, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(buf.iSize <= iMaxSize, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(buf.iHeaderSize == sizeof(RSqlBufFlat::TCell) * buf.iCount, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(buf.iCount >= 0, ESqlPanicInternalError); + __SQLASSERT(buf.iSize <= iMaxSize, ESqlPanicInternalError); + __SQLASSERT(buf.iHeaderSize == sizeof(RSqlBufFlat::TCell) * buf.iCount, ESqlPanicInternalError); if(buf.iHeaderSize > 0) { Mem::FillZ(Header(), buf.iHeaderSize); @@ -245,10 +244,10 @@ void RSqlBufFlat::DoSet(TInt aIndex, TInt aType, const void* aData, TInt aDataLength) { TBufFlat& buf = *iBuf; - __ASSERT_DEBUG((TUint)aDataLength < RSqlBufFlat::EMaxLength, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aDataLength > 0 ? aData != NULL : ETrue, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aDataLength <= (iMaxSize - buf.iSize), __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(::IsAligned8(buf.iSize), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT((TUint)aDataLength < RSqlBufFlat::EMaxLength, ESqlPanicBadArgument); + __SQLASSERT(aDataLength > 0 ? aData != NULL : ETrue, ESqlPanicBadArgument); + __SQLASSERT(aDataLength <= (iMaxSize - buf.iSize), ESqlPanicInternalError); + __SQLASSERT(::IsAligned8(buf.iSize), ESqlPanicInternalError); RSqlBufFlat::TCell& cell = *(Header() + aIndex); cell.iBits = (TUint)(((TUint)aType << RSqlBufFlat::EWidthLen) | (TUint)aDataLength); cell.iPos = 1; //not 0, because 0 means "not present" @@ -292,24 +291,24 @@ */ void RSqlBufFlat::Invariant() const { - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iBuf != NULL, ESqlPanicInternalError); const TBufFlat& buf = *iBuf; - __ASSERT_DEBUG(buf.iCount >= 0, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(buf.iHeaderSize == sizeof(RSqlBufFlat::TCell) * buf.iCount, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(::IsAligned8(buf.iSize), __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(buf.iSize >= buf.iHeaderSize + sizeof(RSqlBufFlat::TBufFlat), __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(buf.iSize <= iMaxSize, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(buf.iSize <= User::AllocLen(iBuf), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(buf.iCount >= 0, ESqlPanicInternalError); + __SQLASSERT(buf.iHeaderSize == sizeof(RSqlBufFlat::TCell) * buf.iCount, ESqlPanicInternalError); + __SQLASSERT(::IsAligned8(buf.iSize), ESqlPanicInternalError); + __SQLASSERT(buf.iSize >= buf.iHeaderSize + sizeof(RSqlBufFlat::TBufFlat), ESqlPanicInternalError); + __SQLASSERT(buf.iSize <= iMaxSize, ESqlPanicInternalError); + __SQLASSERT(buf.iSize <= User::AllocLen(iBuf), ESqlPanicInternalError); for(TInt i=0;i<(TInt)buf.iCount;++i) { const RSqlBufFlat::TCell& cell = *((reinterpret_cast (iBuf + 1)) + i); - __ASSERT_DEBUG(cell.Type() < RSqlBufFlat::EMaxType, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(cell.Type() < RSqlBufFlat::EMaxType, ESqlPanicInternalError); if(cell.Size() > 0 && cell.iPos >= buf.iHeaderSize) //only for present fields with length > 0 { - __ASSERT_DEBUG((TUint)cell.Size() <= buf.iSize, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(cell.iPos < (buf.iSize - sizeof(RSqlBufFlat::TBufFlat)), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT((TUint)cell.Size() <= buf.iSize, ESqlPanicInternalError); + __SQLASSERT(cell.iPos < (buf.iSize - sizeof(RSqlBufFlat::TBufFlat)), ESqlPanicInternalError); TUint64 val = *(TUint64*)(reinterpret_cast (iBuf) + cell.iPos + sizeof(RSqlBufFlat::TBufFlat) - sizeof(KSqlBufFlatMagicValue)); - __ASSERT_DEBUG(val == KSqlBufFlatMagicValue, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(val == KSqlBufFlatMagicValue, ESqlPanicInternalError); } } } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/SqlBufFlat.h --- a/persistentstorage/sql/SRC/Common/SqlBufFlat.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Common/SqlBufFlat.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -17,7 +17,7 @@ #define __SQLBUFFLAT_H__ #include -#include "SqlAssert.h" +#include "SqlPanic.h" //Forward declarations class TSqlBufRIterator; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/SqlBufIterator.cpp --- a/persistentstorage/sql/SRC/Common/SqlBufIterator.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Common/SqlBufIterator.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -26,7 +26,7 @@ */ inline TInt TSqlBufRIterator::AsInt() const { - __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); return *reinterpret_cast (reinterpret_cast (iBegin) + iCurrent->iPos); } @@ -35,7 +35,7 @@ */ inline TInt64 TSqlBufRIterator::AsInt64() const { - __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); return *reinterpret_cast (reinterpret_cast (iBegin) + iCurrent->iPos); } @@ -44,7 +44,7 @@ */ inline TReal TSqlBufRIterator::AsReal() const { - __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); return *reinterpret_cast (reinterpret_cast (iBegin) + iCurrent->iPos); } @@ -56,7 +56,7 @@ */ TInt TSqlBufRIterator::Int() const { - __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); switch(Type()) { case ESqlInt64: @@ -94,7 +94,7 @@ */ TInt64 TSqlBufRIterator::Int64() const { - __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); switch(Type()) { case ESqlInt: @@ -128,7 +128,7 @@ */ TReal TSqlBufRIterator::Real() const { - __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); switch(Type()) { case ESqlInt: @@ -159,7 +159,7 @@ */ TPtrC8 TSqlBufRIterator::Binary() const { - __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); TInt size = Size(); if(Type() != ESqlBinary || size == 0) { @@ -176,7 +176,7 @@ */ TPtrC16 TSqlBufRIterator::Text() const { - __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); TInt size = Size(); if(Type() != ESqlText || size == 0) { @@ -196,7 +196,7 @@ public: static HReadOnlyBuf* NewL(const TUint8* aFrom, TInt aLen) { - __ASSERT_DEBUG(aLen >= 0, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aLen >= 0, ESqlPanicBadArgument); HReadOnlyBuf* self = new (ELeave) HReadOnlyBuf; TUint8* p = const_cast (aFrom); self->Set(p, p + aLen, MStreamBuf::ERead); @@ -219,7 +219,7 @@ */ MStreamBuf* TSqlBufRIterator::StreamL() const { - __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); if(!::IsSequenceSqlType(Type())) { __SQLLEAVE(KErrArgument); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/SqlBufIterator.h --- a/persistentstorage/sql/SRC/Common/SqlBufIterator.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Common/SqlBufIterator.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ #include //TSqlColumnType #include "SqlBufFlat.h" //RSqlBufFlat -#include "SqlAssert.h" +#include "SqlPanic.h" //Forward declarations class MStreamBuf; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/SqlBufIterator.inl --- a/persistentstorage/sql/SRC/Common/SqlBufIterator.inl Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Common/SqlBufIterator.inl Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -46,7 +46,7 @@ */ inline void TSqlBufRIterator::MoveTo(TInt aIndex) { - __ASSERT_DEBUG((iBegin + (TUint)aIndex) < iEnd, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT((iBegin + (TUint)aIndex) < iEnd, ESqlPanicBadArgument); iCurrent = iBegin + aIndex; } @@ -55,7 +55,7 @@ */ inline TBool TSqlBufRIterator::IsPresent() const { - __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); return iCurrent->iPos > 0; } @@ -64,7 +64,7 @@ */ inline TInt TSqlBufRIterator::Type() const { - __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); return iCurrent->Type(); } @@ -73,7 +73,7 @@ */ inline TInt TSqlBufRIterator::Size() const { - __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); return Type() == ESqlText ? iCurrent->Size() / sizeof(TUint16) : iCurrent->Size(); } @@ -101,7 +101,7 @@ */ inline TBool TSqlBufWIterator::Next() { - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iBuf != NULL, ESqlPanicInternalError); return ++iIndex < iBuf->Count(); } @@ -112,8 +112,8 @@ */ inline void TSqlBufWIterator::MoveTo(TInt aIndex) { - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG((TUint)aIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iBuf != NULL, ESqlPanicInternalError); + __SQLASSERT((TUint)aIndex < iBuf->Count(), ESqlPanicInternalError); iIndex = aIndex; } @@ -122,8 +122,8 @@ */ inline void TSqlBufWIterator::SetNull() { - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iBuf != NULL, ESqlPanicInternalError); + __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError); (void)iBuf->SetField(iIndex, ESqlNull, NULL, 0); } @@ -135,10 +135,10 @@ */ inline void TSqlBufWIterator::SetAsNotPresent(TInt aType, TInt aLength) { - __ASSERT_DEBUG(::IsSequenceSqlType(aType), __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aLength >= 0, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(::IsSequenceSqlType(aType), ESqlPanicBadArgument); + __SQLASSERT(aLength >= 0, ESqlPanicBadArgument); + __SQLASSERT(iBuf != NULL, ESqlPanicInternalError); + __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError); iBuf->SetField(iIndex, aType, NULL, aType == ESqlText ? aLength * sizeof(TUint16) : aLength); } @@ -152,8 +152,8 @@ */ inline TInt TSqlBufWIterator::SetInt(TInt aValue) { - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iBuf != NULL, ESqlPanicInternalError); + __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError); return iBuf->SetField(iIndex, ESqlInt, &aValue, sizeof(TInt)); } @@ -167,8 +167,8 @@ */ inline TInt TSqlBufWIterator::SetInt64(TInt64 aValue) { - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iBuf != NULL, ESqlPanicInternalError); + __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError); return iBuf->SetField(iIndex, ESqlInt64, &aValue, sizeof(TInt64)); } @@ -182,8 +182,8 @@ */ inline TInt TSqlBufWIterator::SetReal(TReal aValue) { - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iBuf != NULL, ESqlPanicInternalError); + __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError); return iBuf->SetField(iIndex, ESqlReal, &aValue, sizeof(TReal)); } @@ -197,8 +197,8 @@ */ inline TInt TSqlBufWIterator::SetBinary(const TDesC8& aValue) { - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iBuf != NULL, ESqlPanicInternalError); + __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError); return iBuf->SetField(iIndex, ESqlBinary, aValue.Ptr(), aValue.Length()); } @@ -212,8 +212,8 @@ */ inline TInt TSqlBufWIterator::SetText(const TDesC16& aValue) { - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iBuf != NULL, ESqlPanicInternalError); + __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError); return iBuf->SetField(iIndex, ESqlText, aValue.Ptr(), aValue.Length() * sizeof(TUint16)); } @@ -228,7 +228,7 @@ */ inline TInt TSqlBufWIterator::SetZeroBlob(TInt aSize) { - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iBuf != NULL, ESqlPanicInternalError); + __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError); return iBuf->SetField(iIndex, ESqlZeroBlob, &aSize, sizeof(TInt)); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/SqlMap.h --- a/persistentstorage/sql/SRC/Common/SqlMap.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Common/SqlMap.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2004-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" @@ -18,7 +18,7 @@ #ifndef __SQLMAP_H__ #define __SQLMAP_H__ -#include "SqlAssert.h" +#include "SqlPanic.h" //Forward declaration template class RSqlMap; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/SqlMap.inl --- a/persistentstorage/sql/SRC/Common/SqlMap.inl Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Common/SqlMap.inl Wed Sep 01 12:39:58 2010 +0100 @@ -142,7 +142,7 @@ } return; } - __ASSERT_DEBUG(EFalse, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(EFalse, ESqlPanicInternalError); } /** diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/SqlPanic.h --- a/persistentstorage/sql/SRC/Common/SqlPanic.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Common/SqlPanic.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -16,6 +16,11 @@ #ifndef __SQLPANIC_H__ #define __SQLPANIC_H__ +#include "SqlAssert.h" + +//Forward declarations +class RMessage2; + /** TSqlPanic contains panic codes which may used by the SQL component (SqlDb.dll and SqlSrv.exe). @@ -39,4 +44,27 @@ ESqlPanicBadDescriptor = 13 }; +/** +This function panics the thread where it is called from with aPanicCode panic code. + +@param aPanicCode Panic code + +@internalComponent +*/ +void SqlPanic(TSqlPanic aPanicCode); + +/** +This function is used inside the SQL server to panic the calling client. + +@param aMessage The message which processing causes the panic. +@param aPanicCode Panic code + +@leave KSqlLeavePanic + +@return KErrNone + +@internalComponent +*/ +TInt SqlPanicClientL(const RMessage2& aMessage, TSqlPanic aPanicCode); + #endif //__SQLPANIC_H__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/SqlTraceDef.h --- a/persistentstorage/sql/SRC/Common/SqlTraceDef.h Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// -#ifndef SQLTRACEDEF_H -#define SQLTRACEDEF_H - -#include -#include "SqlAssert.h" - -////////////////////////////////////////////////////////////////////////////////////// - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQL_BORDER_TRACE_ENABLED - #define __SQLTRACE_BORDERVAR(var) var - #define __SQLTRACE_BORDEREXPR(expr) expr -#else - #define __SQLTRACE_BORDERVAR(var) - #define __SQLTRACE_BORDEREXPR(expr) -#endif - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQL_INTERNALS_TRACE_ENABLED - #define __SQLTRACE_INTERNALSVAR(var) var - #define __SQLTRACE_INTERNALSEXPR(expr) expr -#else - #define __SQLTRACE_INTERNALSVAR(var) - #define __SQLTRACE_INTERNALSEXPR(expr) -#endif - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQL_BUR_TRACE_ENABLED - #define __SQLTRACE_BURVAR(var) var - #define __SQLTRACE_BUREXPR(expr) expr -#else - #define __SQLTRACE_BURVAR(var) - #define __SQLTRACE_BUREXPR(expr) -#endif - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQL_COMPACT_TRACE_ENABLED - #define __SQLTRACE_COMPACTVAR(var) var - #define __SQLTRACE_COMPACTEXPR(expr) expr -#else - #define __SQLTRACE_COMPACTVAR(var) - #define __SQLTRACE_COMPACTEXPR(expr) -#endif - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQL_SESSION_TRACE_ENABLED - #define __SQLTRACE_SESSIONVAR(var) var - #define __SQLTRACE_SESSIONEXPR(expr) expr -#else - #define __SQLTRACE_SESSIONVAR(var) - #define __SQLTRACE_SESSIONEXPR(expr) -#endif - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQL_AUTHORIZER_TRACE_ENABLED - #define __SQLTRACE_AUTHORIZERVAR(var) var - #define __SQLTRACE_AUTHORIZEREXPR(expr) expr -#else - #define __SQLTRACE_AUTHORIZERVAR(var) - #define __SQLTRACE_AUTHORIZEREXPR(expr) -#endif - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQL_BLOB_TRACE_ENABLED - #define __SQLTRACE_BLOBVAR(var) var - #define __SQLTRACE_BLOBEXPR(expr) expr -#else - #define __SQLTRACE_BLOBVAR(var) - #define __SQLTRACE_BLOBEXPR(expr) -#endif - -////////////////////////////////////////////////////////////////////////////////////// - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQL_RDEBUG_PRINT - #undef OstTrace0 - #undef OstTrace1 - #undef OstTraceExt1 - #undef OstTraceExt2 - #undef OstTraceExt3 - #undef OstTraceExt4 - #undef OstTraceExt5 - - void SqlPrintf(TInt aGroupName, TInt aTraceName, const char* aFormat, ...); - - #define OstTrace0 SqlPrintf - #define OstTrace1 SqlPrintf - #define OstTraceExt1 SqlPrintf - #define OstTraceExt2 SqlPrintf - #define OstTraceExt3 SqlPrintf - #define OstTraceExt4 SqlPrintf - #define OstTraceExt5 SqlPrintf -#endif//defined OST_TRACE_COMPILER_IN_USE && defined _SQL_RDEBUG_PRINT - -////////////////////////////////////////////////////////////////////////////////////// - -#endif//SQLTRACEDEF_H diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/SqlUtil.cpp --- a/persistentstorage/sql/SRC/Common/SqlUtil.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Common/SqlUtil.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -14,101 +14,18 @@ // #include -#include "SqlAssert.h" #include //ESqlAtRow, ESqlAtEnd, ESqlErrGeneral +#include "SqlUtil.h" +#include "SqlPanic.h" //SqlPanic(), TSqlPanic #include "sqlite3.h" //SQLITE_OK, SQLITE_ROW, SQLITE_DONE -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlUtilTraces.h" -#endif -#include "SqlTraceDef.h" - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -const TInt KSqlLeavePanic = -359;//The (last-1) error code from the reserved area for the SQL component. - -#define UNUSED_ARG(arg) arg = arg -#define UNUSED_DES(arg) arg - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQL_RDEBUG_PRINT - -/** -This class has been added here to avoid the crashes when _SQL_RDEBUG_PRINT macro is defined but the -data to be printed out is too big and cannot fit into the buffer with size KSqlMaxPrnStrLen. -@internalComponent -*/ -class TSqlDes16Overflow : public TDes16Overflow - { -public: - virtual void Overflow(TDes16& /*aDes*/) - { - } - }; - -//Replaces: -// 1) "%lld" with "%ld" -// 2) "%s" with "%S" -//These are the differences in format specification between RDebig::Print and OST functions. -//The new format spec length should be less or equal than the old format spec length. -static void ReplaceFmtSpec(TDes& aFormat, const TDesC& aFmtSpec, const TDesC& aNewFmtSpec) - { - TInt fmtLength = aFormat.Length(); - const TInt KDiff = aFmtSpec.Length() - aNewFmtSpec.Length(); - TPtr ptr((TText*)aFormat.Ptr(), fmtLength, fmtLength); - TInt pos; - while((pos = ptr.Find(aFmtSpec)) >= 0) - { - ptr.Replace(pos, aFmtSpec.Length(), aNewFmtSpec); - fmtLength -= KDiff; - ptr.Set(ptr.MidTPtr(pos)); - } - aFormat.SetLength(fmtLength); - } - -void SqlPrintf(TInt /*aGroupName*/, TInt /*aTraceName*/, const char* aFormat, ...) - { - VA_LIST list; - VA_START(list, aFormat); - TBuf<128> format; - _LIT(KTraceIdent, "SQL;"); - format.Copy(TPtrC8((const TUint8*)aFormat)); - format.Insert(0, KTraceIdent); - format.Append(_L("\r\n")); - _LIT(KOstI64Fmt, "%lld"); - _LIT(KDbgPrnI64Fmt, "%ld"); - ReplaceFmtSpec(format, KOstI64Fmt, KDbgPrnI64Fmt); - _LIT(KOstDes8Fmt, "%s"); - _LIT(KDbgPrnDesFmt, "%S"); - ReplaceFmtSpec(format, KOstDes8Fmt, KDbgPrnDesFmt); - TBuf buf; - TSqlDes16Overflow overflowHandler; - buf.AppendFormatList(format, list, &overflowHandler); -#ifdef _SQL_RDEBUG_PRINT - RDebug::RawPrint(buf); -#endif - } - -const TDesC* SqlDes8to16Ptr(const TDesC8& aDes, TDes& aOut) - { - TPtrC8 ptr(aDes.Ptr(), Min(aDes.Length(), aOut.MaxLength())); - aOut.Copy(ptr); - return &aOut; - } - -#endif//defined OST_TRACE_COMPILER_IN_USE && defined _SQL_RDEBUG_PRINT - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#include "UTraceSql.h" /** SQL panic category. @internalComponent */ -_LIT(KPanicCategory, "SqlDb"); - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +_LIT(KPanicCategory,"SqlDb"); /** Panics the caller with aPanicCode panic code. @@ -118,13 +35,11 @@ @internalComponent */ -static void SqlPanic(TSqlPanic aPanicCode) +void SqlPanic(TSqlPanic aPanicCode) { User::Panic(KPanicCategory, aPanicCode); } -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** Panics the client with aPanicCode panic code. This function is used by the SQL server to panic the caller (the client). @@ -138,158 +53,13 @@ @internalComponent */ -static TInt SqlPanicClientL(const RMessage2& aMessage, TSqlPanic aPanicCode) +TInt SqlPanicClientL(const RMessage2& aMessage, TSqlPanic aPanicCode) { aMessage.Panic(KPanicCategory, aPanicCode); - __SQLLEAVE2(KSqlLeavePanic); + __SQLLEAVE(KSqlLeavePanic); return KErrNone; - } - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -The function prints out a "SQL panic" message to the console and panics the thread where it is called from. -It gives a useful information about the found error together with the source file name and line number where -it occurred. - -Note: this function will output information regarding the panic only if _SQL_PANIC_TRACE_ENABLED macro is defined - -@param aFile Source file name -@param aLine Source line number -@param aPanicCode Panic code -@param aHandle Numeric value, uniquely identfying the leaving location (the "this" pointer for example) - -@return KErrNone - -@internalComponent -*/ -TInt TSqlUtil::Panic(const TText* aFile, TInt aLine, TInt aPanicCode, TUint aHandle) - { -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQL_PANIC_TRACE_ENABLED - TPtrC fname(FileName(aFile)); - OstTraceExt5(TRACE_FATAL, TSQLUTIL_PANIC, "Panic;0x%X;%S;%d;%S;%d", aHandle, __SQLPRNSTR(fname), aLine, __SQLPRNSTR(KPanicCategory), aPanicCode); -#else - UNUSED_ARG(aFile); - UNUSED_ARG(aLine); - UNUSED_ARG(aHandle); -#endif - ::SqlPanic(static_cast (aPanicCode)); - return KErrNone; - } - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -The function prints out a "SQL leave" message to the console and leaves with aError error code. -It gives a usefull information about the found error together with the source file name and line number where -it occured. - -Note: this function will output information regarding the panic only if _SQL_LEAVE_TRACE_ENABLED macro is defined - -@param aFile Source file name -@param aLine Source line number -@param aError Error code -@param aHandle Numeric value, uniquely identfying the leaving location (the "this" pointer for example) - -@internalComponent -*/ -void TSqlUtil::Leave(const TText* aFile, TInt aLine, TInt aError, TUint aHandle) - { -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQL_LEAVE_TRACE_ENABLED - TPtrC fname(FileName(aFile)); - OstTraceExt4(TRACE_ERROR, TSQLUTIL_LEAVE, "Leave;0x%X;%S;%d;Error=%d", aHandle, __SQLPRNSTR(fname), aLine, aError); -#else - UNUSED_ARG(aFile); - UNUSED_ARG(aLine); - UNUSED_ARG(aHandle); -#endif - User::Leave(aError); - } - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -The function prints out a "SQL leave" message to the console and leaves with aError error code, if it is -negative. -It gives a usefull information about the found error together with the source file name and line number where -it occured. - -Note: this function will output information regarding the panic only if _SQL_LEAVE_TRACE_ENABLED macro is defined - -@param aFile Source file name -@param aLine Source line number -@param aError Error code - -@internalComponent -*/ -TInt TSqlUtil::LeaveIfError(const TText* aFile, TInt aLine, TInt aError, TUint aHandle) - { - if(aError < 0) - { - TSqlUtil::Leave(aFile, aLine, aError, aHandle); - } - return aError; - } - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -The function prints out a "SQL leave" message to the console and leaves with KErrNoMemory if -aPtr parameter is NULL. - -Note: this function will output information regarding the panic only if _SQL_LEAVE_TRACE_ENABLED macro is defined - -@param aFile Source file name -@param aLine Source line number -@param aPtr The pointer to be tested against NULL value. - -@internalComponent -*/ -void* TSqlUtil::LeaveIfNull(const TText* aFile, TInt aLine, void* aPtr, TUint aHandle) - { - if(!aPtr) - { - TSqlUtil::Leave(aFile, aLine, KErrNoMemory, aHandle); - } - return aPtr; - } - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -The function is used by the SQL server. -It prints out a "SQL panic" message to the console and panic the client. -It gives a usefull information about the found error together with the source file name and line number where -it occured. - -Note: this function will output information regarding the panic only if _SQL_PANIC_TRACE_ENABLED macro is defined - -@param aFile Source file name -@param aLine Source line number -@param aMessage The client message, which processing caused the panic. -@param aPanicCode Error code - -@leave KSqlLeavePanic - -@return KErrNone; - -@internalComponent -*/ -TInt TSqlUtil::PanicClientL(const TText* aFile, TInt aLine, const RMessage2& aMessage, TInt aPanicCode, TUint aHandle) - { -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQL_PANIC_TRACE_ENABLED - TPtrC fname(FileName(aFile)); - OstTraceExt5(TRACE_FATAL, TSQLUTIL_PANICCLIENTL, "Panic;%X;%S;%d;%S;%d", aHandle, __SQLPRNSTR(fname), aLine, __SQLPRNSTR(KPanicCategory), aPanicCode); -#else - UNUSED_ARG(aFile); - UNUSED_ARG(aLine); - UNUSED_ARG(aHandle); -#endif - return ::SqlPanicClientL(aMessage, static_cast (aPanicCode)); - } - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - + } + /** Processes SQL database error code and OS error code and returns unified error code. If aSqlError == SQLITE_ROW then the function returns KSqlAtRow. @@ -310,8 +80,7 @@ */ TInt Sql2OsErrCode(TInt aSqlError, TInt aOsError) { - - __ASSERT_DEBUG(aSqlError >= SQLITE_OK && aOsError <= KErrNone, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aSqlError >= SQLITE_OK && aOsError <= KErrNone, ESqlPanicBadArgument); TInt err = KErrNone; if(aOsError == KErrDiskFull) {//Whatever is the aSqlError value, even SQLITE_OK, never ignore KErrDiskFull errors @@ -345,19 +114,243 @@ return err; } -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////// class Util //////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////// +#if defined _LOGGING || defined SYMBIAN_TRACE_SQL_ERR + +/** +This function is used to log the message "msg" containing the "err" error code. +The message "msg" should contain the format specifier %d. + +The function is used when _LOGGING or SYMBIAN_TRACE_SQL_ERR is defined. + +@param aMsg Error message +@param aErr Error code + +@internalComponent +*/ +void Util::ErrorPrint(const TDesC& aMsg, TInt aErr) + { + SYMBIAN_TRACE_SQL_ERR_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EError), aMsg, aErr)); + RDebug::Print(aMsg, aErr); + } + +/** +This macro should be used to log the message "msg" containing the "str" string. +The message "msg" should contain the format specifier %S. + +The function is used when _LOGGING or SYMBIAN_TRACE_SQL_ERR is defined. + +@param aMsg Error message +@param aErr Error code + +@internalComponent +*/ +void Util::ErrorPrint(const TDesC& aMsg, const TDesC& aStr) + { + SYMBIAN_TRACE_SQL_ERR_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EError), aMsg, &aStr)); + RDebug::Print(aMsg, &aStr); + } + +#endif //_LOGGING || SYMBIAN_TRACE_SQL_ERR + +#if defined _ASSERTIONS + +/** +The function prints out a "SQL panic" message to the console and panics the thread where it is called from. +It gives a useful information about the found error together with the source file name and line number where +it occurred. + +The function is used when _ASSERTIONS is defined. + +@param aFile Source file name +@param aLine Source line number +@param aPanicCode Panic code + +@return KErrNone + +@internalComponent +*/ +TInt Util::Assert(const TText* aFile, TInt aLine, TInt aPanicCode) + { + TBuf<16> tbuf; + Util::GetTimeStr(tbuf); + TBuf<80> buf; + _LIT(KFormat,"**%S* SQL panic %d, at %S(%d)"); + TPtrC fname(Filename(aFile)); + SYMBIAN_TRACE_SQL_ERR_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EError), KSqlPanic, aPanicCode, &fname, aLine)); + buf.Format(KFormat, &tbuf, aPanicCode, &fname, aLine); + RDebug::Print(buf); + ::SqlPanic(static_cast (aPanicCode)); + return KErrNone; + } + +#else //_ASSERTIONS + +/** +The function panics the thread where it is called from. + +The function is used when _ASSERTIONS is not defined. + +@param Not used +@param Not used +@param aPanicCode Panic code + +@return KErrNone + +@internalComponent +*/ +TInt Util::Assert(const TText*, TInt, TInt aPanicCode) + { + ::SqlPanic(static_cast (aPanicCode)); + return KErrNone; + } + +#endif //_ASSERTIONS + +#if defined _NOTIFY || defined SYMBIAN_TRACE_SQL_ERR + +/** +The function prints out a "SQL leave" message to the console and leaves with aError error code. +It gives a usefull information about the found error together with the source file name and line number where +it occured. + +The function is used when _NOTIFY is defined. + +@param aFile Source file name +@param aLine Source line number +@param aError Error code -#if defined OST_TRACE_COMPILER_IN_USE && (defined _SQL_PANIC_TRACE_ENABLED || defined _SQL_LEAVE_TRACE_ENABLED) +@internalComponent +*/ +void Util::Leave(const TText* aFile, TInt aLine, TInt aError) + { + SYMBIAN_TRACE_SQL_ERR_ONLY(TPtrC filename(Filename(aFile))); + SYMBIAN_TRACE_SQL_ERR_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EError), KSqlLeave, aError, &filename, aLine)); + +#ifdef _NOTIFY + TBuf<16> tbuf; + Util::GetTimeStr(tbuf); + TPtrC f(Filename(aFile)); + TBuf<80> buf; + _LIT(KFormat,"**%S* SQL leave, error=%d at %S(%d)\r\n"); + buf.Format(KFormat, &tbuf, aError, &f, aLine); + RDebug::Print(buf); +#endif //_NOTIFY + User::Leave(aError); + } + +/** +The function prints out a "SQL leave" message to the console and leaves with aError error code, if it is +negative. +It gives a usefull information about the found error together with the source file name and line number where +it occured. + +The function is used when _NOTIFY is defined. + +@param aFile Source file name +@param aLine Source line number +@param aError Error code + +@internalComponent +*/ +TInt Util::LeaveIfError(const TText* aFile, TInt aLine, TInt aError) + { + if(aError<0) + Util::Leave(aFile,aLine,aError); + return aError; + } + +/** +The function prints out a "SQL leave" message to the console and leaves with KErrNoMemory if +aPtr parameter is NULL. + +The function is used when _NOTIFY is defined. + +@param aFile Source file name +@param aLine Source line number +@param aPtr The pointer to be tested against NULL value. +@internalComponent +*/ +const void* Util::LeaveIfNull(const TText* aFile, TInt aLine, const void* aPtr) + { + if(!aPtr) + { + Util::Leave(aFile, aLine, KErrNoMemory); + } + return aPtr; + } + +/** +The function is used by the SQL server. +It prints out a "SQL panic" message to the console and panic the client. +It gives a usefull information about the found error together with the source file name and line number where +it occured. + +The function is used when _NOTIFY is defined. + +@param aFile Source file name +@param aLine Source line number +@param aMessage The client message, which processing caused the panic. +@param aPanicCode Error code + +@leave KSqlLeavePanic + +@return KErrNone; + +@internalComponent +*/ +TInt Util::PanicClientL(const TText* aFile, TInt aLine, const RMessage2& aMessage, TInt aPanicCode) + { + SYMBIAN_TRACE_SQL_ERR_ONLY(TPtrC filename(Filename(aFile))); + SYMBIAN_TRACE_SQL_ERR_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EError), KSqlPanicClient, aPanicCode, &filename, aLine)); + +#ifdef _NOTIFY + TBuf<16> tbuf; + Util::GetTimeStr(tbuf); + TPtrC fname(Filename(aFile)); + TBuf<80> buf; + _LIT(KFormat,"**%S* SQL panic=%d at %S(%d)\r\n"); + buf.Format(KFormat, &tbuf, aPanicCode, &fname, aLine); + RDebug::Print(buf); +#endif + return ::SqlPanicClientL(aMessage, static_cast (aPanicCode)); + } + +#endif//defined _NOTIFY || SYMBIAN_TRACE_SQL_ERR + +#if defined _ASSERTIONS || defined _NOTIFY ||defined SYMBIAN_TRACE_SQL_ERR + +/** +Formats the current time into aWhere descriptor. + +@param aWhere Output parameter. The current time will be formatted there. The buffer length should be at least 16 characters. + +The function is used when _ASSERT or _NOTIFY or SYMBIAN_TRACE_SQL_ERR is defined. + +@internalComponent +*/ +void Util::GetTimeStr(TDes& aWhere) + { + TTime time; + time.HomeTime(); + TDateTime dt = time.DateTime(); + aWhere.Format(_L("%02d:%02d:%02d.%06d"), dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond()); + }; + /** The function creates and returns TPtrC object which points to aFile parameter. @param aFile File name @return TPtrC object pointing to aFile parameter. +The function is used when _ASSERT or _NOTIFY or SYMBIAN_TRACE_SQL_ERR is defined. + @internalComponent */ -TPtrC TSqlUtil::FileName(const TText* aFile) +TPtrC Util::Filename(const TText* aFile) { TPtrC p(aFile); TInt ix = p.LocateReverse('\\'); @@ -368,4 +361,4 @@ return p; } -#endif //defined OST_TRACE_COMPILER_IN_USE && (defined _SQL_PANIC_TRACE_ENABLED || defined _SQL_LEAVE_TRACE_ENABLED) +#endif//defined _ASSERTIONS || defined _NOTIFY || SYMBIAN_TRACE_SQL_ERR diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/SqlUtil.h --- a/persistentstorage/sql/SRC/Common/SqlUtil.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Common/SqlUtil.h Wed Sep 01 12:39:58 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" diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/Trace/UTraceSql.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/sql/SRC/Common/Trace/UTraceSql.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,217 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +//The file is used only to compile and include in the executable server image only a single +//copy of the trace strings. +#define __SQLTRACE_STRINGS__ +#include "UTraceSql.h" + +#ifdef SYMBIAN_TRACE_SQL_EVENTS + +/** +Get the corresponding string to the IPC function from the TSqlSrvFunction enum + +@param aFunction Function code + +@return A pointer to the string literal associated with the TSqlSrvFunction enum identifiers + +@internalComponent + */ +const TPtrC8 GetIPCFuncStr(TInt aFunction) + { + TInt function = aFunction & 0xFF; + + //Array of Sql Server's IPC functions.This should map to TSqlSrvFunction + const TText8* const KSrvFunctionStr[] = + { + //Test functions + _S8("ESqlSrvTestBase"), //0x00 + _S8("ESqlSrvResourceMark"), //0x01 + _S8("ESqlSrvResourceCheck"), //0x02 + _S8("ESqlSrvResourceCount"), //0x03 + _S8("ESqlSrvSetDbHeapFailure"), //0x04 + _S8("ESqlSrvSetHeapFailure"), //0x05 + + //Profiling functions + _S8("ESqlSrvProfilerStart"), //0x06 + _S8("ESqlSrvProfilerStop"), //0x07 + _S8("ESqlSrvProfilerReset"), //0x08 + _S8("ESqlSrvProfilerSetRange"), //0x09 + _S8("ESqlSrvProfilerQuery"), //0x0A + + //Not Used + _S8(""), //0x0B + _S8(""), //0x0C + _S8(""), //0x0D + _S8(""), //0x0E + _S8(""), //0x0F + + //Database functions + _S8("ESqlSrvDbBase"), //0x10 + _S8("ESqlSrvDbCreate"), //0x11 + _S8("ESqlSrvDbCreateSecure"), //0x12 + _S8("ESqlSrvDbOpen"), //0x13 + _S8("ESqlSrvDbOpenFromHandle"), //0x14 + _S8("ESqlSrvDbClose"), //0x15 + _S8("ESqlSrvDbCopy"), //0x16 + _S8("ESqlSrvDbDelete"), //0x17 + + //All operations with opcode > ESqlSrvDbDelete require valid database object (on the server side) + _S8("ESqlSrvLastErrorMsg"), //0x18 + _S8("ESqlSrvDbExec8"), //0x19 + _S8("ESqlSrvDbExec16"), //0x1A + _S8("ESqlSrvDbRowIdExec16"), //0x1B + _S8("ESqlSrvDbSetIsolationLevel"), //0x1C + _S8("ESqlSrvDbGetSecurityPolicy"), //0x1D + _S8("ESqlSrvDbAttach"), //0x1E + _S8("ESqlSrvDbAttachFromHandle"), //0x1F + _S8("ESqlSrvDbDetach"), //0x20 + _S8("ESqlSrvDbScalarFullSelect8"), //0x21 + _S8("ESqlSrvDbScalarFullSelect16"), //0x22 + _S8("ESqlSrvDbInTransaction"), //0x23 + _S8("ESqlSrvDbSize"), //0x24 + _S8("ESqlSrvDbSize2"), //0x25 + _S8("ESqlSrvDbBlobSource"), //0x26 + _S8("ESqlSrvDbLastInsertedRowId"), //0x27 + _S8("ESqlSrvDbCompact"), //0x28 + + //Database - reserved drive space management + _S8("ESqlSrvDbReserveDriveSpace"), //0x29 + _S8("ESqlSrvDbFreeReservedSpace"), //0x2A + _S8("ESqlSrvDbGetReserveAccess"), //0x2B + _S8("ESqlSrvDbReleaseReserveAccess"), //0x2C + + //Not Used + _S8(""), //0x2D + _S8(""), //0x2E + _S8(""), //0x2F + _S8(""), //0x30 + _S8(""), //0x31 + _S8(""), //0x32 + _S8(""), //0x33 + _S8(""), //0x34 + _S8(""), //0x35 + _S8(""), //0x36 + _S8(""), //0x37 + _S8(""), //0x38 + _S8(""), //0x39 + _S8(""), //0x3A + _S8(""), //0x3B + _S8(""), //0x3C + _S8(""), //0x3D + _S8(""), //0x3E + _S8(""), //0x3F + _S8(""), //0x40 + _S8(""), //0x41 + _S8(""), //0x42 + _S8(""), //0x43 + _S8(""), //0x44 + _S8(""), //0x45 + _S8(""), //0x46 + _S8(""), //0x47 + _S8(""), //0x48 + _S8(""), //0x49 + _S8(""), //0x4A + _S8(""), //0x4B + _S8(""), //0x4C + _S8(""), //0x4D + _S8(""), //0x4E + _S8(""), //0x4F + + //Statement functions + _S8("ESqlSrvStmtBase"), //0x50 + _S8("ESqlSrvStmtPrepare8"), //0x51 + _S8("ESqlSrvStmtPrepare16"), //0x52 + _S8("ESqlSrvStmtClose"), //0x53 + _S8("ESqlSrvStmtReset"), //0x54 + _S8("ESqlSrvStmtExec"), //0x55 + _S8("ESqlSrvStmtAsyncExec"), //0x56 + _S8("ESqlSrvStmtBindExec"), //0x57 + _S8("ESqlSrvStmtBindExecRowId"), //0x58 + _S8("ESqlSrvStmtAsyncBindExec"), //0x59 + _S8("ESqlSrvStmtNext"), //0x5A + _S8("ESqlSrvStmtBindNext"), //0x5B + _S8("ESqlSrvStmtColumnNames"), //0x5C + _S8("ESqlSrvStmtParamNames"), //0x5D + _S8("ESqlSrvStmtColumnSource"), //0x5E + _S8("ESqlSrvStmtBinParamSink"), //0x5F + _S8("ESqlSrvStmtTxtParamSink8"), //0x60 + _S8("ESqlSrvStmtTxtParamSink16"), //0x61 + _S8("ESqlSrvStmtBufFlat"), //0x62 + _S8("ESqlSrvStmtColumnValue"), //0x63 + _S8("ESqlSrvStmtDeclColumnTypes"), //0x64 + _S8("ESqlSrvStmtEvaluateAll"), //0x65 + _S8("ESqlSrvStmtGoto"), //0x66 + + //Not Used + _S8(""), //0x67 + _S8(""), //0x68 + _S8(""), //0x69 + _S8(""), //0x6A + _S8(""), //0x6B + _S8(""), //0x6C + _S8(""), //0x6D + _S8(""), //0x6E + _S8(""), //0x6F + + //Stream functions + _S8("ESqlSrvStreamBase"), //0x70 + _S8("ESqlSrvStreamRead"), //0x71 + _S8("ESqlSrvStreamWrite"), //0x72 + _S8("ESqlSrvStreamSize"), //0x73 + _S8("ESqlSrvStreamSynch"), //0x74 + _S8("ESqlSrvStreamClose") //0x75 + }; + + const TInt KMaxSrvFunctions = sizeof(KSrvFunctionStr) / sizeof(KSrvFunctionStr[0]); + + if (function <= KMaxSrvFunctions) + return KSrvFunctionStr[function]; + else + return _S8("Unknown"); + } +#endif //SYMBIAN_TRACE_SQL_EVENTS + +#ifdef SYMBIAN_TRACE_SQL_FUNC + +/** +Create the TSqlUTraceProfiler object which inserts a UTF trace, used to signal a function entry + +@param aFunctionStr A "const char" pointer describing the function to be profiled. + Currently this is the type signature of the function returned by + the __PRETTY_FUNCTION__ macro. +@param aObj A object pointer used to provide context for the function. + +@internalComponent +*/ +TSqlUTraceProfiler::TSqlUTraceProfiler(const TAny* aObj, const char* aFunctionStr): +iObj(aObj), iFunctionStr(reinterpret_cast(aFunctionStr)) + { + UTF::Printf(UTF::TTraceContext(UTF::ESystemCharacteristicMetrics), KProfilerBegin, &iFunctionStr, iObj); + } + +/** +Destroys TSqlUTraceProfiler object which inserts a UTF trace, used to signal a function exit + +@internalComponent +*/ +TSqlUTraceProfiler::~TSqlUTraceProfiler() + { + UTF::Printf(UTF::TTraceContext(UTF::ESystemCharacteristicMetrics), KProfilerEnd, &iFunctionStr, iObj); + } + +#endif //SYMBIAN_TRACE_SQL_FUNC diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Common/Trace/UTraceSql.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/sql/SRC/Common/Trace/UTraceSql.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,186 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef UTRACESQL_H +#define UTRACESQL_H + +#if defined SQLSRV_ENABLE_TRACE +//If this header is included from Sqlsrv.exe then use the UID3 from that process +#define EXECUTABLE_DEFAULT_MODULEUID 0x10281E17 +#define SQL_ENABLE_TRACE + +#elif defined SQLDB_ENABLE_TRACE +//If this header is included from Sqldb.dll then use the UID3 from that process +#define EXECUTABLE_DEFAULT_MODULEUID 0x10281E18 +#define SQL_ENABLE_TRACE + +#elif defined SQLITELIB_ENABLE_TRACE +//If this header is included from Sqlite.lib then use the UID3 from that process +#define EXECUTABLE_DEFAULT_MODULEUID 0x10281E19 +#define SQL_ENABLE_TRACE + +#endif //SQLSRV_ENABLE_TRACE, SQLDB_ENABLE_TRACE, SQLITELIB_ENABLE_TRACE + +#ifdef SQL_ENABLE_TRACE + +//The UTF header can only be included after EXECUTABLE_DEFAULT_MODULEUID is defined +#include + +/** +Enable this macro to compile in the SQL trace points that trace function leaves and panics. +These traces can be used to assist debugging in client applications and the Symbian SQL. + +@SymTraceMacro +*/ +#undef SYMBIAN_TRACE_SQL_ERR + +/** +Enable this macro to compile in the SQL trace points that trace exported functions and certain +porting layer functions entry and exit. From the timestamps of these trace, the total time spent +in these functions can be worked out. +These traces are particularly useful for performance investigations. + +@SymTraceMacro +*/ +#undef SYMBIAN_TRACE_SQL_FUNC + +/** +Enable this macro to compile in the SQL trace points that trace the following internal events. + - IPC calls send to and serviced by the SQL Server + - SQL Server's startup and close + - No. of full table scans and sort operation performed by a RSqlStatement object + - Extra internal information for certain exported and porting layer functions +These traces can be used to assist performance and debug investigations + +@SymTraceMacro +*/ +#undef SYMBIAN_TRACE_SQL_EVENTS + +#endif //SQL_ENABLE_TRACE + +////////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////// UTrace Related Strings ////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#ifdef SQL_ENABLE_TRACE + +#ifdef __SQLTRACE_STRINGS__ + #define CONST_LIT8(var, val) extern const TLitC8 var = {sizeof(val) - 1, val} + #define CONST_LIT16(var, val) extern const TLitC16 var = {sizeof(L##val)/2 - 1, L##val} +#else + #define CONST_LIT8(var, val) extern const TLitC8 var + #define CONST_LIT16(var, val) extern const TLitC16 var +#endif + +//File I/O trace format strings +CONST_LIT8(KFileRead, "Sqlite: Size - %d bytes, File Offset Position - %d,"); +CONST_LIT8(KFileWrite, "Sqlite: Size - %d bytes, File Offset Position - %d,"); +CONST_LIT8(KFileTruncate, "Sqlite: Size - %d bytes"); +CONST_LIT8(KFileFileCtr, "Sqlite: Opeartion Called - %d"); +CONST_LIT16(KFileOpen, "Sqlite: Sqlite3_file - 0x%x, Filename - \"%S\""); +CONST_LIT16(KFileName, "Sqlite: Filename - \"%S\""); + +//Input pararmeter format strings +CONST_LIT8(KStrParam, "SqlDb: Parameter %d - \"%S\""); +CONST_LIT8(KHexStrParam, "SqlDb: Parameter 1 - 0x%x, Parameter 2 - \"%S\""); +CONST_LIT8(KHexIntParam, "SqlDb: Parameter 1 - 0x%x, Parameter 2 - %d"); +CONST_LIT8(KIntParam, "SqlDb: Parameter 1 - %d"); +CONST_LIT8(KIntSizeParam, "SqlDb: Parameter 1 - %d, Parameter %d - %d bytes"); + +CONST_LIT16(KStrParam16, "SqlDb: Parameter %d - \"%S\""); +CONST_LIT16(KStrStrParam16, "SqlDb: Parameter 1 - \"%S\", Parameter 2 - \"%S\""); +CONST_LIT16(KHexStrParam16, "SqlDb: Parameter 1 - 0x%x, Parameter 2 - \"%S\""); +CONST_LIT16(KSizeStrParam16, "SqlDb: Parameter %d - %d bytes, Parameter %d - \"%S\""); +CONST_LIT16(KRSqlBlobParam16, "SqlDb: Parameter 1 - 0x%x, Parameter 2 - \"%S\", Parameter 3 - \"%S\", Parameter 4 - %d, Parameter 5 - \"%S\""); + +//IPC request trace format strings +CONST_LIT8(KDbMsgStr, "SqlDb: Request - %S Sent to SQL Server"); +CONST_LIT8(KSrvMsgStr, "SqlSrv: Request - %S Recieved by SQL Server"); +CONST_LIT8(KSrvStmtCreated, "SqlSrv: sqlite3_stmt Object 0x%x Created"); +CONST_LIT8(KSrvStmtStatus, "SqlSrv: sqlite3_stmt Object 0x%x Destroyed, %d Full Table Scan Performed, %d Sort Performed"); + +//Server startup and close trace format strings +CONST_LIT8(KSqlSrvStart, "SqlSrv: SQL Server Startup"); +CONST_LIT8(KSqlSrvClose, "SqlSrv: SQL Server Close"); + +//TSqlUTraceProfiler trace format strings, used to display function entry and exit +CONST_LIT8(KProfilerBegin, "Function Entry:\"%S\", Address - 0x%x"); +CONST_LIT8(KProfilerEnd, "Function Exit:\"%S\", Address - 0x%x"); + +//Panic and leave trace format strings +CONST_LIT16(KSqlPanic, "Sql: Panic %d at %S(%d)"); +CONST_LIT16(KSqlPanicClient, "Sql: Panic client %d at %S(%d)"); +CONST_LIT16(KSqlLeave, "Sql: Leave error %d at %S(%d)"); +CONST_LIT8(KSqlSrvPanicClient, "SqlSrv ServiceError: Panic Client %d"); +CONST_LIT8(KSqlSrvError, "SqlSrv ServiceError: Error %d"); + +#endif //SQL_ENABLE_TRACE + +//////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////// UTrace Related Macro Functions and Class Declarations //////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#ifdef SYMBIAN_TRACE_SQL_ERR + +//This macro should be used to trace errors occurring within Symbian SQL. +//To use the macro, insert the full UTF statement as the macro parameter +//Works only when SYMBIAN_TRACE_SQL_ERR is enabled. Otherwise it evaluates to zero +#define SYMBIAN_TRACE_SQL_ERR_ONLY(c) c + +#else + +#define SYMBIAN_TRACE_SQL_ERR_ONLY(c) do {} while(0) +#endif //SYMBIAN_TRACE_SQL_ERR + + +#ifdef SYMBIAN_TRACE_SQL_FUNC + +/** +This class is used to help trace function entry and exits within Symbian SQL +Exist only when SYMBIAN_TRACE_SQL_FUNC is enabled. + +@internalComponent +*/ +class TSqlUTraceProfiler + { + public: + TSqlUTraceProfiler(const TAny* aObj, const char* aFunctionStr); + ~TSqlUTraceProfiler(); + private: + const TAny* iObj; + TPtrC8 iFunctionStr; + }; + +//This macro should be used to trace function entry and exits within Symbian SQL +//Works only when SYMBIAN_TRACE_SQL_FUNC is enabled. Otherwise it evaluates to zero +#define SQLUTRACE_PROFILER(x) TSqlUTraceProfiler _profiler(x, __PRETTY_FUNCTION__) + +#else + +#define SQLUTRACE_PROFILER(x) do {} while(0) +#endif //SYMBIAN_TRACE_SQL_FUNC + +#ifdef SYMBIAN_TRACE_SQL_EVENTS + +//This macro should be used to trace events occurring within Symbian SQL. +//To use the macro, insert the full UTF statement as the macro parameter +//Works only when SYMBIAN_TRACE_SQL_EVENTS is enabled. Otherwise it evaluates to zero +#define SYMBIAN_TRACE_SQL_EVENTS_ONLY(c) c +const TPtrC8 GetIPCFuncStr(TInt aFunction); + +#else + +#define SYMBIAN_TRACE_SQL_EVENTS_ONLY(c) do {} while(0) +#endif //SYMBIAN_TRACE_SQL_EVENTS +//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif // UTRACESQL_H diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Security/SqlSecurity.cpp --- a/persistentstorage/sql/SRC/Security/SqlSecurity.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Security/SqlSecurity.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -14,12 +14,8 @@ // #include "SqlSecurityImpl.h" -#include "SqlAssert.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlSecurityTraces.h" -#endif -#include "SqlTraceDef.h" +#include "SqlPanic.h" +#include "UTraceSql.h" const TInt32 KEndOfSPStream = -1;//If found in the stream, given as an argument to RSqlSecurityPolicy::InternalizeL(), //then there are no more policies in the stream. @@ -50,9 +46,8 @@ */ EXPORT_C TInt RSqlSecurityPolicy::Create(const TSecurityPolicy& aDefaultPolicy) { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLSECURITYPOLICY_CREATE_ENTRY , "Entry;0x%X;RSqlSecurityPolicy::Create;aDefaultPolicy=0x%X", (TUint)this, (TUint)&aDefaultPolicy)); + SQLUTRACE_PROFILER(this); TRAPD(err, CreateL(aDefaultPolicy)); - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLSECURITYPOLICY_CREATE_EXIT, "Exit;0x%X;RSqlSecurityPolicy::Create;iImpl=0x%X;err=%d", (TUint)this, (TUint)iImpl, err)); return err; } @@ -71,9 +66,8 @@ */ EXPORT_C void RSqlSecurityPolicy::CreateL(const TSecurityPolicy& aDefaultPolicy) { - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLSECURITYPOLICY_CREATEL_ENTRY , "Entry;0x%X;RSqlSecurityPolicy::CreateL;aDefaultPolicy=0x%X", (TUint)this, (TUint)&aDefaultPolicy)); + SQLUTRACE_PROFILER(this); iImpl = CSqlSecurityPolicy::NewL(aDefaultPolicy); - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLSECURITYPOLICY_CREATEL_EXIT, "Exit;0x%X;RSqlSecurityPolicy::CreateL;iImpl=0x%X", (TUint)this, (TUint)iImpl)); } /** @@ -83,9 +77,8 @@ */ EXPORT_C void RSqlSecurityPolicy::Close() { - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLSECURITYPOLICY_CLOSE_ENTRY , "Entry;0x%X;RSqlSecurityPolicy::Close", (TUint)this)); + SQLUTRACE_PROFILER(this); delete iImpl; - SQL_TRACE_BORDER(OstTraceExt2(TRACE_BORDER, RSQLSECURITYPOLICY_CLOSE_EXIT, "Exit;0x%X;RSqlSecurityPolicy::Close;iImpl=0x%X", (TUint)this, (TUint)iImpl)); iImpl = NULL; } @@ -110,7 +103,8 @@ */ EXPORT_C TInt RSqlSecurityPolicy::SetDbPolicy(TPolicyType aPolicyType, const TSecurityPolicy& aPolicy) { - __ASSERT_ALWAYS(aPolicyType >= ESchemaPolicy && aPolicyType <= EWritePolicy, __SQLPANIC(ESqlPanicBadArgument)); + SQLUTRACE_PROFILER(this); + __SQLASSERT_ALWAYS(aPolicyType >= ESchemaPolicy && aPolicyType <= EWritePolicy, ESqlPanicBadArgument); Impl().SetDbPolicy(aPolicyType, aPolicy); return KErrNone; } @@ -146,9 +140,10 @@ EXPORT_C TInt RSqlSecurityPolicy::SetPolicy(TObjectType aObjectType, const TDesC& aObjectName, TPolicyType aPolicyType, const TSecurityPolicy& aPolicy) { - __ASSERT_ALWAYS(aObjectType == ETable, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_ALWAYS(aObjectName.Length() > 0, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_ALWAYS(aPolicyType >= EReadPolicy && aPolicyType <= EWritePolicy, __SQLPANIC(ESqlPanicBadArgument)); + SQLUTRACE_PROFILER(this); + __SQLASSERT_ALWAYS(aObjectType == ETable, ESqlPanicBadArgument); + __SQLASSERT_ALWAYS(aObjectName.Length() > 0, ESqlPanicBadArgument); + __SQLASSERT_ALWAYS(aPolicyType >= EReadPolicy && aPolicyType <= EWritePolicy, ESqlPanicBadArgument); return Impl().SetPolicy(aObjectType, aObjectName, aPolicyType, aPolicy); } @@ -163,6 +158,7 @@ */ EXPORT_C TSecurityPolicy RSqlSecurityPolicy::DefaultPolicy() const { + SQLUTRACE_PROFILER(this); return Impl().DefaultPolicy(); } @@ -183,7 +179,8 @@ */ EXPORT_C TSecurityPolicy RSqlSecurityPolicy::DbPolicy(TPolicyType aPolicyType) const { - __ASSERT_ALWAYS(aPolicyType >= ESchemaPolicy && aPolicyType <= EWritePolicy, __SQLPANIC(ESqlPanicBadArgument)); + SQLUTRACE_PROFILER(this); + __SQLASSERT_ALWAYS(aPolicyType >= ESchemaPolicy && aPolicyType <= EWritePolicy, ESqlPanicBadArgument); return Impl().DbPolicy(aPolicyType); } @@ -212,9 +209,10 @@ EXPORT_C TSecurityPolicy RSqlSecurityPolicy::Policy(TObjectType aObjectType, const TDesC& aObjectName, TPolicyType aPolicyType) const { - __ASSERT_ALWAYS(aObjectType == ETable, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_ALWAYS(aObjectName.Length() > 0, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_ALWAYS(aPolicyType >= EReadPolicy && aPolicyType <= EWritePolicy, __SQLPANIC(ESqlPanicBadArgument)); + SQLUTRACE_PROFILER(this); + __SQLASSERT_ALWAYS(aObjectType == ETable, ESqlPanicBadArgument); + __SQLASSERT_ALWAYS(aObjectName.Length() > 0, ESqlPanicBadArgument); + __SQLASSERT_ALWAYS(aPolicyType >= EReadPolicy && aPolicyType <= EWritePolicy, ESqlPanicBadArgument); return Impl().Policy(aObjectType, aObjectName, aPolicyType); } @@ -229,7 +227,7 @@ */ EXPORT_C void RSqlSecurityPolicy::ExternalizeL(RWriteStream& aStream) const { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLSECURITYPOLICY_EXTERNALIZEL_ENTRY , "Entry;0x%X;RSqlSecurityPolicy::ExternalizeL;aStream=0x%X;aStream.Sink()=0x%X", (TUint)this, (TUint)&aStream, (TUint)aStream.Sink())); + SQLUTRACE_PROFILER(this); RSqlSecurityPolicy::TObjectType objectType; TPtrC objectName; RSqlSecurityPolicy::TPolicyType policyType; @@ -255,7 +253,6 @@ } //Object policy stream - end aStream << KEndOfSPStream; - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLSECURITYPOLICY_EXTERNALIZEL_EXIT, "Exit;0x%X;RSqlSecurityPolicy::ExternalizeL", (TUint)this)); } /** @@ -271,7 +268,7 @@ */ EXPORT_C void RSqlSecurityPolicy::InternalizeL(RReadStream& aStream) { - SQL_TRACE_BORDER(OstTraceExt3(TRACE_BORDER, RSQLSECURITYPOLICY_INTERNALIZEL_ENTRY , "Entry;0x%X;RSqlSecurityPolicy::InternalizeL;aStream=0x%X;aStream.Source()=0x%X", (TUint)this, (TUint)&aStream, (TUint)aStream.Source())); + SQLUTRACE_PROFILER(this); TSecurityPolicy policy; TBuf8 policyBuf; //Default policy @@ -314,7 +311,6 @@ iImpl = temp; //Destroy the old policy (which was swapped) CleanupStack::PopAndDestroy(&newPolicy); - SQL_TRACE_BORDER(OstTrace1(TRACE_BORDER, RSQLSECURITYPOLICY_INTERNALIZEL_EXIT, "Exit;0x%X;RSqlSecurityPolicy::InternalizeL", (TUint)this)); } /** @@ -337,6 +333,6 @@ */ CSqlSecurityPolicy& RSqlSecurityPolicy::Impl() const { - __ASSERT_ALWAYS(iImpl != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT_ALWAYS(iImpl != NULL, ESqlPanicInvalidObj); return *iImpl; } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Security/SqlSecurityImpl.cpp --- a/persistentstorage/sql/SRC/Security/SqlSecurityImpl.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Security/SqlSecurityImpl.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -43,8 +43,8 @@ */ inline CSqlSecurityPolicy::TPolicyItem* CSqlSecurityPolicy::PolicyItemPtr(const RSqlBufFlat::TCell* aBegin, const RSqlBufFlat::TCell* aCurrent) { - __ASSERT_DEBUG(aBegin != NULL && aCurrent != NULL, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aCurrent->iPos != 0, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aBegin != NULL && aCurrent != NULL, ESqlPanicBadArgument); + __SQLASSERT(aCurrent->iPos != 0, ESqlPanicBadArgument); const TUint8* begin = reinterpret_cast (aBegin); return reinterpret_cast (const_cast (begin) + aCurrent->iPos); } @@ -63,7 +63,7 @@ const TDesC& aObjectName) const { const RSqlBufFlat::TCell* begin = iBufFlat.Header(); - __ASSERT_DEBUG(begin != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(begin != NULL, ESqlPanicInternalError); const RSqlBufFlat::TCell* end = begin + Count(); const RSqlBufFlat::TCell* current = begin + CSqlSecurityPolicy::EDbPolicyIdx;//ignore default and database policiy types ("current" points before the first non-database policy) while(++current < end) @@ -71,8 +71,8 @@ if(current->iPos > 0 && current->Type() == (TInt)aObjectType) //if present and the same type as aObjectType { const CSqlSecurityPolicy::TPolicyItem* item = CSqlSecurityPolicy::PolicyItemPtr(begin, current); - __ASSERT_DEBUG(item != NULL, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(((current->Size() - sizeof(CSqlSecurityPolicy::TPolicyItem) - sizeof(TInt)) / sizeof(TUint16)) == item->NameSize(), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(item != NULL, ESqlPanicInternalError); + __SQLASSERT(((current->Size() - sizeof(CSqlSecurityPolicy::TPolicyItem) - sizeof(TInt)) / sizeof(TUint16)) == item->NameSize(), ESqlPanicInternalError); if(::CompareNoCase16(aObjectName, TPtrC(item->NamePtr(), item->NameSize())) == 0) { return item; @@ -147,7 +147,7 @@ TInt CSqlSecurityPolicy::Count() const { const RSqlBufFlat::TCell* begin = iBufFlat.Header(); - __ASSERT_DEBUG(begin != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(begin != NULL, ESqlPanicInternalError); return *reinterpret_cast (reinterpret_cast (begin) + (begin + CSqlSecurityPolicy::ECountIdx)->iPos); } @@ -156,9 +156,9 @@ */ void CSqlSecurityPolicy::SetCount(TInt aCount) { - __ASSERT_DEBUG(aCount >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aCount >= 0, ESqlPanicBadArgument); RSqlBufFlat::TCell* begin = iBufFlat.Header(); - __ASSERT_DEBUG(begin != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(begin != NULL, ESqlPanicInternalError); *reinterpret_cast (reinterpret_cast (begin) + (begin + CSqlSecurityPolicy::ECountIdx)->iPos) = aCount; } @@ -168,9 +168,9 @@ void CSqlSecurityPolicy::SetDefaultPolicy(const TSecurityPolicy& aPolicy) { RSqlBufFlat::TCell* begin = iBufFlat.Header(); - __ASSERT_DEBUG(begin != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(begin != NULL, ESqlPanicInternalError); CSqlSecurityPolicy::TPolicyItem* item = CSqlSecurityPolicy::PolicyItemPtr(begin, begin + CSqlSecurityPolicy::EDefaultPolicyIdx); - __ASSERT_DEBUG(item != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(item != NULL, ESqlPanicInternalError); item->iPolicy[0] = aPolicy; } @@ -184,11 +184,11 @@ void CSqlSecurityPolicy::SetDbPolicy(RSqlSecurityPolicy::TPolicyType aPolicyType, const TSecurityPolicy& aPolicy) { const TInt KPolicyIndex = CSqlSecurityPolicy::PolicyType2Index(aPolicyType); - __ASSERT_DEBUG((TUint)KPolicyIndex < EPolicyTypeCount, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT((TUint)KPolicyIndex < EPolicyTypeCount, ESqlPanicBadArgument); RSqlBufFlat::TCell* begin = iBufFlat.Header(); - __ASSERT_DEBUG(begin != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(begin != NULL, ESqlPanicInternalError); CSqlSecurityPolicy::TPolicyItem* item = CSqlSecurityPolicy::PolicyItemPtr(begin, begin + CSqlSecurityPolicy::EDbPolicyIdx); - __ASSERT_DEBUG(item != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(item != NULL, ESqlPanicInternalError); //KPolicyIndex value is tested at the beginning of the function //coverity[overrun-local] item->iPolicy[KPolicyIndex] = aPolicy; @@ -220,8 +220,8 @@ RSqlSecurityPolicy::TPolicyType aPolicyType, const TSecurityPolicy& aPolicy) { const TInt KPolicyIndex = CSqlSecurityPolicy::PolicyType2Index(aPolicyType); - __ASSERT_DEBUG((TUint)KPolicyIndex < EPolicyTypeCount, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aObjectName.Length() > 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT((TUint)KPolicyIndex < EPolicyTypeCount, ESqlPanicBadArgument); + __SQLASSERT(aObjectName.Length() > 0, ESqlPanicBadArgument); CSqlSecurityPolicy::TPolicyItem* item = const_cast (FindPolicyItemPtr(aObjectType, aObjectName)); if(item) {//There is a field in the flat buffer for {aObjectType, aObjectName}. Set the policy. @@ -246,7 +246,7 @@ item = reinterpret_cast (buf); //coverity[DEADCODE] //The ASSERT might be useful in catching future defect in this function - __ASSERT_DEBUG(item != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(item != NULL, ESqlPanicInternalError); TSecurityPolicy defaultPolicy = DefaultPolicy(); for(TInt i=0;iiPolicy[0]; } @@ -292,11 +292,11 @@ TSecurityPolicy CSqlSecurityPolicy::DbPolicy(RSqlSecurityPolicy::TPolicyType aPolicyType) const { const TInt KPolicyIndex = CSqlSecurityPolicy::PolicyType2Index(aPolicyType); - __ASSERT_DEBUG((TUint)KPolicyIndex < EPolicyTypeCount, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT((TUint)KPolicyIndex < EPolicyTypeCount, ESqlPanicBadArgument); const RSqlBufFlat::TCell* begin = iBufFlat.Header(); - __ASSERT_DEBUG(begin != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(begin != NULL, ESqlPanicInternalError); const CSqlSecurityPolicy::TPolicyItem* item = CSqlSecurityPolicy::PolicyItemPtr(begin, begin + CSqlSecurityPolicy::EDbPolicyIdx); - __ASSERT_DEBUG(item != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(item != NULL, ESqlPanicInternalError); //KPolicyIndex value is tested at the beginning of the function //coverity[overrun-local] return item->iPolicy[KPolicyIndex]; @@ -324,8 +324,8 @@ const TDesC& aObjectName, RSqlSecurityPolicy::TPolicyType aPolicyType) { const TInt KPolicyIndex = CSqlSecurityPolicy::PolicyType2Index(aPolicyType); - __ASSERT_DEBUG((TUint)KPolicyIndex < EPolicyTypeCount, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aObjectName.Length() > 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT((TUint)KPolicyIndex < EPolicyTypeCount, ESqlPanicBadArgument); + __SQLASSERT(aObjectName.Length() > 0, ESqlPanicBadArgument); const CSqlSecurityPolicy::TPolicyItem* item = FindPolicyItemPtr(aObjectType, aObjectName); //KPolicyIndex value is tested at the beginning of the function //coverity[overrun-local] @@ -377,7 +377,7 @@ iEnd(iBegin + aSqlSecurityPolicy.Count()), iCurPolicyIdx(CSqlSecurityPolicy::EPolicyTypeCount) { - __ASSERT_DEBUG(iBegin != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iBegin != NULL, ESqlPanicInternalError); } /** @@ -402,7 +402,7 @@ } } const CSqlSecurityPolicy::TPolicyItem* item = CSqlSecurityPolicy::PolicyItemPtr(iBegin, iCurrent); - __ASSERT_DEBUG(item != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(item != NULL, ESqlPanicInternalError); aObjectType = static_cast (iCurrent->Type()); aPolicyType = static_cast (iCurPolicyIdx); aPolicy = item->iPolicy[iCurPolicyIdx]; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/Compact/SqlCompact.cpp --- a/persistentstorage/sql/SRC/Server/Compact/SqlCompact.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/Compact/SqlCompact.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -13,16 +13,11 @@ // Description: // -#include "SqlAssert.h" +#include "SqlPanic.h" #include "SqlCompact.h" #include "SqlCompactEntry.h" #include "SqlCompactTimer.h" #include "SqlUtil.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlCompactTraces.h" -#endif -#include "SqlTraceDef.h" ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -43,8 +38,8 @@ */ void TSqlCompactSettings::Invariant() const { - __ASSERT_DEBUG(iStepLength > 0, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(iFreePageThresholdKb >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iStepLength > 0, ESqlPanicInternalError); + __SQLASSERT(iFreePageThresholdKb >= 0, ESqlPanicInternalError); } #endif//_DEBUG @@ -77,8 +72,8 @@ */ CSqlCompactor* CSqlCompactor::NewL(TSqlCompactConnFactoryL aConnFactoryL, TInt aCompactStepInterval) { - __ASSERT_DEBUG(aConnFactoryL != NULL, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aCompactStepInterval > 0, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aConnFactoryL != NULL, ESqlPanicBadArgument); + __SQLASSERT(aCompactStepInterval > 0, ESqlPanicBadArgument); CSqlCompactor* self = new (ELeave) CSqlCompactor(aConnFactoryL); CleanupStack::PushL(self); self->ConstructL(aCompactStepInterval); @@ -94,7 +89,7 @@ { for(TInt idx=iEntries.Count()-1;idx>=0;--idx) { - __ASSERT_DEBUG(iEntries[idx] != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iEntries[idx] != NULL, ESqlPanicInternalError); while(iEntries[idx]->Release() != 0) { } @@ -139,13 +134,12 @@ */ void CSqlCompactor::AddEntryL(const TDesC& aFullName, const TSqlCompactSettings& aSettings) { - __ASSERT_DEBUG(aFullName.Length() > 0 && aFullName.Length() <= KMaxFileName, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aFullName.Length() > 0 && aFullName.Length() <= KMaxFileName, ESqlPanicBadArgument); SQLCOMPACTOR_INVARIANT(); CSqlCompactEntry* entry = NULL; TInt idx = iEntries.FindInOrder(aFullName, &CSqlCompactor::Search); if(idx == KErrNotFound) { - SQL_TRACE_COMPACT(OstTraceExt4(TRACE_INTERNALS, CSQLCOMPACTOR_ADDENTRYL1, "0x%X;CSqlCompactor::AddEntryL;New entry;aFullName=%S;iStepLength=%d;iFreePageThreashold=%d", (TUint)this, __SQLPRNSTR(aFullName), aSettings.iStepLength, aSettings.iFreePageThresholdKb)); entry = CSqlCompactEntry::NewLC(aFullName, iConnFactoryL, aSettings, *iTimer); TLinearOrder order(&CSqlCompactor::Compare); __SQLLEAVE_IF_ERROR(iEntries.InsertInOrder(entry, order)); @@ -153,9 +147,8 @@ } else { - SQL_TRACE_COMPACT(OstTraceExt4(TRACE_INTERNALS, CSQLCOMPACTOR_ADDENTRYL2, "0x%X;CSqlCompactor::AddEntryL;Reuse entry;aFullName=%S;iStepLength=%d;iFreePageThreashold=%d", (TUint)this, __SQLPRNSTR(aFullName), aSettings.iStepLength, aSettings.iFreePageThresholdKb)); entry = iEntries[idx]; - __ASSERT_DEBUG(entry != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(entry != NULL, ESqlPanicInternalError); (void)entry->AddRef(); } SQLCOMPACTOR_INVARIANT(); @@ -170,14 +163,13 @@ */ void CSqlCompactor::ReleaseEntry(const TDesC& aFullName) { - SQL_TRACE_COMPACT(OstTraceExt2(TRACE_INTERNALS, CSQLCOMPACTOR_RELEASEENTRY1, "0x%X;CSqlCompactor::ReleaseEntry;aFullName=%S", (TUint)this, __SQLPRNSTR(aFullName))); SQLCOMPACTOR_INVARIANT(); TInt idx = iEntries.FindInOrder(aFullName, &CSqlCompactor::Search); - __ASSERT_DEBUG(idx >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(idx >= 0, ESqlPanicInternalError); if(idx >= 0) { CSqlCompactEntry* entry = iEntries[idx]; - __ASSERT_DEBUG(entry != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(entry != NULL, ESqlPanicInternalError); if(entry) { if(entry->Release() == 0) @@ -207,7 +199,7 @@ iConnFactoryL(aConnFactoryL), iEntries(KEntriesGranularity) { - __ASSERT_DEBUG(aConnFactoryL != NULL, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aConnFactoryL != NULL, ESqlPanicBadArgument); } /** @@ -219,7 +211,7 @@ */ void CSqlCompactor::ConstructL(TInt aCompactStepInterval) { - __ASSERT_DEBUG(aCompactStepInterval > 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aCompactStepInterval > 0, ESqlPanicBadArgument); iTimer = CSqlCompactTimer::NewL(aCompactStepInterval); } @@ -231,11 +223,11 @@ */ /* static */TInt CSqlCompactor::Search(const TDesC* aFullName, const CSqlCompactEntry& aEntry) { - __ASSERT_DEBUG(&aEntry != NULL, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aFullName != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(&aEntry != NULL, ESqlPanicInternalError); + __SQLASSERT(aFullName != NULL, ESqlPanicInternalError); const TDesC& fullName = *aFullName; - __ASSERT_DEBUG(fullName.Length() > 0 && fullName.Length() <= KMaxFileName, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aEntry.FullName().Length() > 0 && aEntry.FullName().Length() <= KMaxFileName, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(fullName.Length() > 0 && fullName.Length() <= KMaxFileName, ESqlPanicInternalError); + __SQLASSERT(aEntry.FullName().Length() > 0 && aEntry.FullName().Length() <= KMaxFileName, ESqlPanicInternalError); return fullName.CompareF(aEntry.FullName()); } @@ -244,10 +236,10 @@ */ /* static */TInt CSqlCompactor::Compare(const CSqlCompactEntry& aLeft, const CSqlCompactEntry& aRight) { - __ASSERT_DEBUG(&aLeft != NULL, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(&aRight != NULL, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aLeft.FullName().Length() > 0 && aLeft.FullName().Length() <= KMaxFileName, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aRight.FullName().Length() > 0 && aRight.FullName().Length() <= KMaxFileName, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(&aLeft != NULL, ESqlPanicInternalError); + __SQLASSERT(&aRight != NULL, ESqlPanicInternalError); + __SQLASSERT(aLeft.FullName().Length() > 0 && aLeft.FullName().Length() <= KMaxFileName, ESqlPanicInternalError); + __SQLASSERT(aRight.FullName().Length() > 0 && aRight.FullName().Length() <= KMaxFileName, ESqlPanicInternalError); return aLeft.FullName().CompareF(aRight.FullName()); } @@ -257,12 +249,12 @@ */ void CSqlCompactor::Invariant() const { - __ASSERT_DEBUG(iConnFactoryL != NULL, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(iTimer != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iConnFactoryL != NULL, ESqlPanicInternalError); + __SQLASSERT(iTimer != NULL, ESqlPanicInternalError); iTimer->Invariant(); for(TInt idx=iEntries.Count()-1;idx>=0;--idx) { - __ASSERT_DEBUG(iEntries[idx] != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iEntries[idx] != NULL, ESqlPanicInternalError); iEntries[idx]->Invariant(); } } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/Compact/SqlCompactConn.cpp --- a/persistentstorage/sql/SRC/Server/Compact/SqlCompactConn.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/Compact/SqlCompactConn.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -15,17 +15,12 @@ #include #include -#include "SqlAssert.h" +#include "SqlPanic.h" #include "sqlite3.h" #include "SqliteSymbian.h" //TSqlFreePageCallback #include "SqlSrvUtil.h" #include "SqlSrvStatementUtil.h" #include "SqlCompactConn.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlCompactConnTraces.h" -#endif -#include "SqlTraceDef.h" /** Creates a new CSqlCompactConn instance. @@ -50,14 +45,12 @@ */ CSqlCompactConn* CSqlCompactConn::NewL(const TDesC& aFullName, TSqlFreePageCallback& aFreePageCallback) { - SQL_TRACE_COMPACT(OstTraceExt1(TRACE_INTERNALS, CSQLCOMPACTCONN_NEWLC_ENTRY, "Entry;0;CSqlCompactConn::NewL;aFullName=%S", __SQLPRNSTR(aFullName))); - __ASSERT_DEBUG(aFullName.Length() > 0 && aFullName.Length() <= KMaxFileName, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aFreePageCallback.IsValid(), __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aFullName.Length() > 0 && aFullName.Length() <= KMaxFileName, ESqlPanicBadArgument); + __SQLASSERT(aFreePageCallback.IsValid(), ESqlPanicBadArgument); CSqlCompactConn* self = new (ELeave) CSqlCompactConn; CleanupStack::PushL(self); self->ConstructL(aFullName, aFreePageCallback); CleanupStack::Pop(self); - SQL_TRACE_COMPACT(OstTraceExt2(TRACE_INTERNALS, CSQLCOMPACTCONN_NEWLC_EXIT, "Exit;0x%X;CSqlCompactConn::NewL;aFullName=%S", (TUint)self, __SQLPRNSTR(aFullName))); return self; } @@ -66,7 +59,6 @@ */ CSqlCompactConn::~CSqlCompactConn() { - SQL_TRACE_COMPACT(OstTrace1(TRACE_INTERNALS, CSQLCOMPACTCONN_CSQLCOMPACTCONN2, "0x%X;CSqlCompactConn::~CSqlCompactConn", (TUint)this)); ::CloseDbHandle(iHandle); } @@ -97,8 +89,8 @@ */ TInt CSqlCompactConn::Compact(TInt aPageCount, TInt& aProcessedPageCount, TInt aLength) { - __ASSERT_DEBUG(aPageCount >= 0, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aLength >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aPageCount >= 0, ESqlPanicBadArgument); + __SQLASSERT(aLength >= 0, ESqlPanicBadArgument); SQLCOMPACTCONN_INVARIANT(); TInt err = ::DbCompact(iHandle, KNullDesC, aPageCount, aProcessedPageCount, aLength); SQLCOMPACTCONN_INVARIANT(); @@ -131,9 +123,9 @@ */ void CSqlCompactConn::ConstructL(const TDesC& aFullName, TSqlFreePageCallback& aFreePageCallback) { - __ASSERT_DEBUG(aFullName.Length() > 0 && aFullName.Length() <= KMaxFileName, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aFreePageCallback.IsValid(), __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(!iHandle, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aFullName.Length() > 0 && aFullName.Length() <= KMaxFileName, ESqlPanicBadArgument); + __SQLASSERT(aFreePageCallback.IsValid(), ESqlPanicBadArgument); + __SQLASSERT(!iHandle, ESqlPanicInternalError); TBuf8 fname; (void)::UTF16ToUTF8Z(aFullName, fname);//The file is first open by the main connection. @@ -198,7 +190,7 @@ */ void CSqlCompactConn::Invariant() const { - __ASSERT_ALWAYS(iHandle != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT_ALWAYS(iHandle != NULL, ESqlPanicInternalError); } #endif//_DEBUG @@ -230,7 +222,7 @@ */ MSqlCompactConn* SqlCreateCompactConnL(const TDesC& aFullName, TSqlFreePageCallback& aFreePageCallback) { - __ASSERT_DEBUG(aFullName.Length() > 0 && aFullName.Length() <= KMaxFileName, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aFreePageCallback.IsValid(), __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aFullName.Length() > 0 && aFullName.Length() <= KMaxFileName, ESqlPanicBadArgument); + __SQLASSERT(aFreePageCallback.IsValid(), ESqlPanicBadArgument); return CSqlCompactConn::NewL(aFullName, aFreePageCallback); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/Compact/SqlCompactEntry.cpp --- a/persistentstorage/sql/SRC/Server/Compact/SqlCompactEntry.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/Compact/SqlCompactEntry.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -16,15 +16,10 @@ #include #include #include -#include "SqlAssert.h" +#include "SqlPanic.h" #include "SqlCompactEntry.h" #include "SqlCompactTimer.h" #include "SqliteSymbian.h" //TSqlFreePageCallback -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlCompactEntryTraces.h" -#endif -#include "SqlTraceDef.h" //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -52,13 +47,11 @@ CSqlCompactEntry* CSqlCompactEntry::NewLC(const TDesC& aFullName, TSqlCompactConnFactoryL aConnFactoryL, const TSqlCompactSettings& aSettings, CSqlCompactTimer& aTimer) { - SQL_TRACE_COMPACT(OstTraceExt1(TRACE_INTERNALS, CSQLCOMPACTENTRY_NEWLC_ENTRY, "Entry;0;CSqlCompactEntry::NewLC;aFullName=%S", __SQLPRNSTR(aFullName))); - __ASSERT_DEBUG(aFullName.Length() > 0 && aFullName.Length() <= KMaxFileName, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aConnFactoryL != NULL, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aFullName.Length() > 0 && aFullName.Length() <= KMaxFileName, ESqlPanicBadArgument); + __SQLASSERT(aConnFactoryL != NULL, ESqlPanicBadArgument); CSqlCompactEntry* self = new (ELeave) CSqlCompactEntry(aSettings, aTimer); CleanupStack::PushL(self); self->ConstructL(aFullName, aConnFactoryL); - SQL_TRACE_COMPACT(OstTrace1(TRACE_INTERNALS, CSQLCOMPACTENTRY_NEWLC_EXIT, "Exit;0x%X;CSqlCompactEntry::NewLC", (TUint)self)); return self; } @@ -67,7 +60,6 @@ */ CSqlCompactEntry::~CSqlCompactEntry() { - SQL_TRACE_COMPACT(OstTraceExt3(TRACE_INTERNALS, CSQLCOMPACTENTRY_CSQLCOMPACTENTRY2, "0x%X;CSqlCompactEntry::~CSqlCompactEntry;iState=%d;iPageCount=%d", (TUint)this, (TInt)iState, iPageCount)); if(iState == CSqlCompactEntry::EInProgress) { iTimer.DeQueue(*this); @@ -86,7 +78,6 @@ */ TInt CSqlCompactEntry::AddRef() { - SQL_TRACE_COMPACT(OstTraceExt4(TRACE_INTERNALS, CSQLCOMPACTENTRY_ADDREF, "0x%X;CSqlCompactEntry::AddRef;iState=%d;iPageCount=%d;iRefCounter=%d", (TUint)this, (TInt)iState, iPageCount, iRefCounter)); SQLCOMPACTENTRY_INVARIANT(); return ++iRefCounter; } @@ -99,7 +90,6 @@ */ TInt CSqlCompactEntry::Release() { - SQL_TRACE_COMPACT(OstTraceExt4(TRACE_INTERNALS, CSQLCOMPACTENTRY_RELEASE, "0x%X;CSqlCompactEntry::Release;iState=%d;iPageCount=%d;iRefCounter=%d", (TUint)this, (TInt)iState, iPageCount, iRefCounter)); SQLCOMPACTENTRY_INVARIANT(); TInt rc = --iRefCounter; if(rc == 0) @@ -124,11 +114,10 @@ */ /* static */ void CSqlCompactEntry::FreePageCallback(void* aThis, TInt aFreePageCount) { - __ASSERT_DEBUG(aThis != NULL, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aFreePageCount > 0, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aThis != NULL, ESqlPanicBadArgument); + __SQLASSERT(aFreePageCount > 0, ESqlPanicBadArgument); CSqlCompactEntry& entry = *(static_cast (aThis)); - SQL_TRACE_COMPACT(OstTraceExt3(TRACE_INTERNALS, CSQLCOMPACTENTRY_FREEPAGECALLBACK, "0x%X;CSqlCompactEntry::FreePageCallback;aFreePageCount=%d;iState=%d", (TUint)aThis, aFreePageCount, (TInt)entry.iState)); if(entry.iFreePageCallbackDisabled) {//The callback is disabled during the background compaction step. //The server is single-threaded, so no other client can activate the callback. @@ -172,9 +161,9 @@ */ void CSqlCompactEntry::ConstructL(const TDesC& aFullName, TSqlCompactConnFactoryL aConnFactoryL) { - __ASSERT_DEBUG(aFullName.Length() > 0 && aFullName.Length() <= KMaxFileName, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aConnFactoryL != NULL, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(!iConnection, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aFullName.Length() > 0 && aFullName.Length() <= KMaxFileName, ESqlPanicBadArgument); + __SQLASSERT(aConnFactoryL != NULL, ESqlPanicBadArgument); + __SQLASSERT(!iConnection, ESqlPanicInternalError); __SQLLEAVE_IF_ERROR(iFullName.Create(aFullName)); @@ -184,7 +173,7 @@ //the threshold from Kbs to pages when the connection with the database is established. TSqlFreePageCallback callback(this, iSettings.iFreePageThresholdKb, &CSqlCompactEntry::FreePageCallback); iConnection = (*aConnFactoryL)(aFullName, callback); - __ASSERT_DEBUG(iConnection != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iConnection != NULL, ESqlPanicInternalError); //"callback.iThreshold > 0" is an indication that the background compaction should be kicked-off if(callback.iThreshold > 0) @@ -212,19 +201,19 @@ */ TInt CSqlCompactEntry::Compact() { - SQL_TRACE_COMPACT(OstTraceExt3(TRACE_INTERNALS, CSQLCOMPACTENTRY_COMPACT_ENTRY, "Entry;0x%X;CSqlCompactEntry::Compact;aFreePageCount=%d;iState=%d", (TUint)this, iPageCount, (TInt)iState)); + //RDebug::Print(_L("++ CSqlCompactEntry::Compact() ++\r\n")); SQLCOMPACTENTRY_INVARIANT(); - __ASSERT_DEBUG(iPageCount > 0, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(iState == CSqlCompactEntry::EInProgress, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iPageCount > 0, ESqlPanicInternalError); + __SQLASSERT(iState == CSqlCompactEntry::EInProgress, ESqlPanicInternalError); TInt processedPageCount = 0; iFreePageCallbackDisabled = ETrue; TInt err = Connection().Compact(iPageCount, processedPageCount, iSettings.iStepLength); iFreePageCallbackDisabled = EFalse; - __ASSERT_DEBUG(processedPageCount >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(processedPageCount >= 0, ESqlPanicInternalError); if(err == KErrNone) { iPageCount -= processedPageCount; - __ASSERT_DEBUG(iPageCount >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iPageCount >= 0, ESqlPanicInternalError); } TBool stopCompaction = err == KSqlErrCorrupt || err == KSqlErrNotDb || err == KErrCorrupt || err == KErrDisMounted; if(iPageCount <= 0 || stopCompaction) @@ -232,7 +221,6 @@ ResetState(); iTimer.DeQueue(*this); } - SQL_TRACE_COMPACT(OstTraceExt4(TRACE_INTERNALS, CSQLCOMPACTENTRY_COMPACT_EXIT, "Exit;0x%X;CSqlCompactEntry::Compact;iPageCount=%d;iState=%d;err=%d", (TUint)this, iPageCount, (TInt)iState, err)); SQLCOMPACTENTRY_INVARIANT(); return err; } @@ -269,7 +257,7 @@ MSqlCompactConn& CSqlCompactEntry::Connection() { SQLCOMPACTENTRY_INVARIANT(); - __ASSERT_ALWAYS(iConnection != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT_ALWAYS(iConnection != NULL, ESqlPanicInternalError); return *iConnection; } @@ -279,11 +267,11 @@ */ void CSqlCompactEntry::Invariant() const { - __ASSERT_DEBUG(iFullName.Length() > 0 && iFullName.Length() <= KMaxFileName, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(iConnection != NULL, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(iRefCounter > 0, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(iState == CSqlCompactEntry::EInactive || iState == CSqlCompactEntry::EInProgress, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(iPageCount >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iFullName.Length() > 0 && iFullName.Length() <= KMaxFileName, ESqlPanicInternalError); + __SQLASSERT(iConnection != NULL, ESqlPanicInternalError); + __SQLASSERT(iRefCounter > 0, ESqlPanicInternalError); + __SQLASSERT(iState == CSqlCompactEntry::EInactive || iState == CSqlCompactEntry::EInProgress, ESqlPanicInternalError); + __SQLASSERT(iPageCount >= 0, ESqlPanicInternalError); iSettings.Invariant(); } #endif//_DEBUG diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/Compact/SqlCompactTimer.cpp --- a/persistentstorage/sql/SRC/Server/Compact/SqlCompactTimer.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/Compact/SqlCompactTimer.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -14,13 +14,8 @@ // #include "SqlCompactTimer.h" -#include "SqlAssert.h" +#include "SqlPanic.h" #include "SqlCompactEntry.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlCompactTimerTraces.h" -#endif -#include "SqlTraceDef.h" /** Creates new CSqlCompactTimer instance. @@ -31,13 +26,11 @@ */ CSqlCompactTimer* CSqlCompactTimer::NewL(TInt aIntervalMs) { - SQL_TRACE_COMPACT(OstTrace1(TRACE_INTERNALS, CSQLCOMPACTTIMER_NEWL_ENTRY, "Entry;0;CSqlCompactTimer::NewL;aIntervalMs=%d", aIntervalMs)); - __ASSERT_DEBUG(aIntervalMs > 0, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aIntervalMs > 0, ESqlPanicBadArgument); CSqlCompactTimer* self = new (ELeave) CSqlCompactTimer(aIntervalMs); CleanupStack::PushL(self); self->ConstructL(); CleanupStack::Pop(self); - SQL_TRACE_COMPACT(OstTraceExt2(TRACE_INTERNALS, CSQLCOMPACTTIMER_NEWL_EXIT, "Exit;0x%X;CSqlCompactTimer::NewL;aIntervalMs=%d", (TUint)self, aIntervalMs)); return self; } @@ -46,7 +39,6 @@ */ CSqlCompactTimer::~CSqlCompactTimer() { - SQL_TRACE_COMPACT(OstTrace1(TRACE_INTERNALS, CSQLCOMPACTTIMER_CSQLCOMPACTTIMER2, "0x%X;CSqlCompactTimer::~CSqlCompactTimer", (TUint)this)); Cancel(); } @@ -73,7 +65,6 @@ */ void CSqlCompactTimer::Queue(CSqlCompactEntry& aEntry) { - SQL_TRACE_COMPACT(OstTraceExt3(TRACE_INTERNALS, CSQLCOMPACTTIMER_QUEUE, "0x%X;CSqlCompactTimer::Queue;aEntry=0x%X;Name=%S", (TUint)this, (TUint)&aEntry,__SQLPRNSTR(aEntry.FullName()))); SQLCOMPACTTIMER_INVARIANT(); iQueue.AddFirst(aEntry); if(!IsActive()) @@ -92,7 +83,6 @@ */ void CSqlCompactTimer::DeQueue(CSqlCompactEntry& aEntry) { - SQL_TRACE_COMPACT(OstTraceExt2(TRACE_INTERNALS, CSQLCOMPACTTIMER_DEQUEUE, "0x%X;CSqlCompactTimer::DeQueue;aEntry=0x%X", (TUint)this, (TUint)&aEntry)); SQLCOMPACTTIMER_INVARIANT(); iQueue.Remove(aEntry); if(iQueue.IsEmpty()) @@ -114,7 +104,7 @@ iIntervalMicroSec(aIntervalMs * 1000), iQueue(_FOFF(CSqlCompactEntry, iLink)) { - __ASSERT_DEBUG(aIntervalMs > 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aIntervalMs > 0, ESqlPanicBadArgument); } /** @@ -138,12 +128,10 @@ */ void CSqlCompactTimer::RunL() { - SQL_TRACE_COMPACT(OstTrace1(TRACE_INTERNALS, CSQLCOMPACTTIMER_RUNL, "0x%X;CSqlCompactTimer::RunL", (TUint)this)); SQLCOMPACTTIMER_INVARIANT(); - __ASSERT_ALWAYS(!iQueue.IsEmpty(), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT_ALWAYS(!iQueue.IsEmpty(), ESqlPanicInternalError); CSqlCompactEntry* entry = iQueue.Last(); - SQL_TRACE_COMPACT(OstTraceExt4(TRACE_INTERNALS, CSQLCOMPACTTIMER_RUNL2, "0x%X;CSqlCompactTimer::RunL;Compact;entry=0x%X;Name=%S;iQueue.IsEmpty()=%d", (TUint)this, (TUint)entry,__SQLPRNSTR(entry->FullName()), (TInt)iQueue.IsEmpty())); - __ASSERT_DEBUG(entry, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(entry, ESqlPanicInternalError); (void)entry->Compact(); if(!iQueue.IsEmpty()) { @@ -158,11 +146,11 @@ */ void CSqlCompactTimer::Invariant() const { - __ASSERT_DEBUG(iIntervalMicroSec > 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iIntervalMicroSec > 0, ESqlPanicInternalError); if(!iQueue.IsEmpty()) { CSqlCompactEntry* entry = iQueue.Last(); - __ASSERT_DEBUG(entry != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(entry != NULL, ESqlPanicInternalError); } } #endif//_DEBUG diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/IPC/IPCStream.cpp --- a/persistentstorage/sql/SRC/Server/IPC/IPCStream.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/IPC/IPCStream.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -14,7 +14,7 @@ // #include -#include "SqlAssert.h" +#include "SqlPanic.h" #include "IPCStream.h" #include "SqlSrvResourceProfiler.h" diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/IPC/IPCStream.inl --- a/persistentstorage/sql/SRC/Server/IPC/IPCStream.inl Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/IPC/IPCStream.inl Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -31,7 +31,7 @@ iRPos(aReadPos), iWPos(0) { - __ASSERT_DEBUG(aHost != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aHost != NULL, ESqlPanicInternalError); } /** diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlBur.cpp --- a/persistentstorage/sql/SRC/Server/SqlBur.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlBur.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -15,13 +15,7 @@ #include "SqlBur.h" #include "SqlAssert.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlBurTraces.h" -#endif -#include "SqlTraceDef.h" - -#define UNUSED_ARG(arg) arg = arg +#include "SqlPanic.h" //Extracts and returns 32-bit integer from aNumBuf buffer. static TUint32 GetNumUint32L(const TDesC& aNumBuf) @@ -29,7 +23,7 @@ TLex lex(aNumBuf); lex.SkipSpace(); TUint32 num = 0xFFFFFFFF; - __SQLLEAVE_IF_ERROR2(lex.Val(num, EHex)); + __SQLLEAVE_IF_ERROR(lex.Val(num, EHex)); return num; } @@ -39,7 +33,7 @@ TLex lex(aNumBuf); lex.SkipSpace(); TInt64 num = -1; - __SQLLEAVE_IF_ERROR2(lex.Val(num, EHex)); + __SQLLEAVE_IF_ERROR(lex.Val(num, EHex)); return num; } @@ -63,7 +57,6 @@ CSqlBackupClient *self=(CSqlBackupClient *)new(ELeave) CSqlBackupClient(aInterface); CleanupStack::PushL(self); self->ConstructL(); - SQL_TRACE_BUR(OstTrace1(TRACE_INTERNALS, CSQLBACKUPCLIENT_NEWLC, "0x%X;CSqlBackupClient::NewLC", (TUint)self)); return self; } @@ -93,8 +86,6 @@ */ CSqlBackupClient::~CSqlBackupClient() { - SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_CSQLBACKUPCLIENT2, "0x%X;CSqlBackupClient::~CSqlBackupClient;iFile.SubSessionHandle()=0x%X", (TUint)this, (TUint)iFile.SubSessionHandle())); - // cancel outstanding requests Cancel(); @@ -139,10 +130,8 @@ @return a flag indicating whether we actioned the error @param the error unused */ -TInt CSqlBackupClient::RunError(TInt aError) +TInt CSqlBackupClient::RunError(TInt /* aError */) { - UNUSED_ARG(aError); - SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_RUNERROR, "0x%X;CSqlBackupClient::RunError;aError=%d", (TUint)this, aError)); // just satisfy it that we did something! return KErrNone; } @@ -160,7 +149,6 @@ */ void CSqlBackupClient::NotifyChange() { - SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_NOTIFYCHANGE, "0x%X;CSqlBackupClient::NotifyChange;iBurProperty.Handle()=0x%X", (TUint)this, (TUint)iBurProperty.Handle())); iBurProperty.Subscribe(iStatus); SetActive(); } @@ -173,17 +161,10 @@ */ void CSqlBackupClient::TestBurStatusL() { - SQL_TRACE_BUR(OstTrace1(TRACE_INTERNALS, CSQLBACKUPCLIENT_TESTBURSTATUSL_ENTRY, "Entry;0x%X;CSqlBackupClient::TestBurStatusL", (TUint)this)); TInt status; - __SQLTRACE_BURVAR(TInt err = KErrNone); - if((__SQLTRACE_BUREXPR(err =) iBurProperty.Get(status)) != KErrNotFound) + if(iBurProperty.Get(status)!=KErrNotFound) { status&=KBURPartTypeMask; -#ifdef _SQL_RDEBUG_PRINT - SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_TESTBURSTATUSL1, "0x%X;CSqlBackupClient::TestBurStatusL;status=%d", (TUint)this, status)); -#else - SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_TESTBURSTATUSL2, "0x%X;CSqlBackupClient::TestBurStatusL;status=%{TBURPartType}", (TUint)this, status)); -#endif switch(status) { case EBURUnset: // same as EBURNormal @@ -203,10 +184,9 @@ iActiveBackupClient->ConfirmReadyForBURL(KErrNone); break; default: - break; + return; } } - SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_TESTBURSTATUSL_EXIT, "Exit;0x%X;CSqlBackupClient::TestBurStatusL;iProperty.Get() err=%d", (TUint)this, err)); } /** Called when BUE notifies a BUR event @@ -229,12 +209,10 @@ @return an arbitrary number @param TDrive unused */ -TUint CSqlBackupClient::GetExpectedDataSize(TDriveNumber aDrive) +TUint CSqlBackupClient::GetExpectedDataSize(TDriveNumber /* aDrive */) { - UNUSED_ARG(aDrive); // we have no idea at this point - we even don't know who is to be backed up yet const TUint KArbitraryNumber = 1024; - SQL_TRACE_BUR(OstTraceExt3(TRACE_INTERNALS, CSQLBACKUPCLIENT_GETEXPECTEDDATASIZE, "0x%X;CSqlBackupClient::GetExpectedDataSize;aDrive=%d;rc=%u", (TUint)this, (TInt)aDrive, KArbitraryNumber)); return KArbitraryNumber; } @@ -249,13 +227,11 @@ */ void CSqlBackupClient::GetBackupDataSectionL(TPtr8& aBuffer, TBool& aFinishedFlag) { - SQL_TRACE_BUR(OstTraceExt3(TRACE_INTERNALS, CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL0, "0x%X;CSqlBackupClient::GetBackupDataSectionL;iState=%d;iFileIndex=%d", (TUint)this, (TInt)iState, iFileIndex)); // don't assume they set it to false aFinishedFlag=EFalse; // any files to backup if(iFileList.Count()==0) { - SQL_TRACE_BUR(OstTrace1(TRACE_INTERNALS, CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL1, "0x%X;CSqlBackupClient::GetBackupDataSectionL;file count is 0", (TUint)this)); // nothing to backup - just return the finished flag aFinishedFlag=ETrue; // clear down the list @@ -263,7 +239,7 @@ // iFileList closed in dtor return; } - + // run the state machine for(TInt bufFreeSpace=aBuffer.MaxSize()-aBuffer.Size(); bufFreeSpace>0; bufFreeSpace=aBuffer.MaxSize()-aBuffer.Size()) { @@ -273,7 +249,6 @@ { if(iFileIndex>=iFileList.Count()) { - SQL_TRACE_BUR(OstTrace1(TRACE_INTERNALS, CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL2, "0x%X;CSqlBackupClient::GetBackupDataSectionL;all files processed", (TUint)this)); // all files have been processed - send the finished flag aFinishedFlag=ETrue; // clear down the filelist @@ -282,8 +257,6 @@ } // open the database file to send TInt rc=iFile.Open( iInterface->Fs(), iFileList[iFileIndex].FullName(), EFileRead | EFileShareExclusive); - __SQLTRACE_BUREXPR(TPtrC fname = iFileList[iFileIndex].FullName()); - SQL_TRACE_BUR(OstTraceExt5(TRACE_INTERNALS, CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL3, "0x%X;CSqlBackupClient::GetBackupDataSectionL;BEGIN;fname=%S;iFileIndex=%d;iFile.SubSessionHandle()=0x%X;rc=%d", (TUint)this, __SQLPRNSTR(fname), iFileIndex, (TUint)iFile.SubSessionHandle(), rc)); if(KErrNone!=rc) { // there's nothing we can do if we can't open the file so we just skip it @@ -317,7 +290,6 @@ fileSize, // %16lx fileName.Length(), // %8x &fileName); // %S - SQL_TRACE_BUR(OstTraceExt4(TRACE_INTERNALS, CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL5, "0x%X;CSqlBackupClient::GetBackupDataSectionL;fileName=%S;hdrPtr=|%S|;fileSize=%lld", (TUint)this, __SQLPRNSTR(fileName), __SQLPRNSTR(iBuffer), fileSize)); // we need it to look like an 8bit buffer TPtr8 hdrPtr8((TUint8*)iBuffer.Ptr(), iBuffer.Size(), iBuffer.Size()); @@ -385,7 +357,6 @@ } case EBackupEndOfFile: { - SQL_TRACE_BUR(OstTraceExt3(TRACE_INTERNALS, CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL4, "0x%X;CSqlBackupClient::GetBackupDataSectionL;END;iFile.SubSessionHandle()=0x%X;iFileIndex=%d", (TUint)this, (TUint)iFile.SubSessionHandle(), iFileIndex)); iFile.Close(); ++iFileIndex; // move on to next file iState = EBackupNoFileOpen; // go round again @@ -403,10 +374,8 @@ Nothing to do here except tell the server @param TDrive the drive that is being restored (unused) */ -void CSqlBackupClient::RestoreComplete(TDriveNumber aDrive) +void CSqlBackupClient::RestoreComplete(TDriveNumber /* aDrive */) { - UNUSED_ARG(aDrive); - SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_RESTORECOMPLETE, "0x%X;CSqlBackupClient::RestoreComplete;aDrive=%d", (TUint)this, (TInt)aDrive)); } /** This is called to let us know that the given SID is to be backed up @@ -418,10 +387,8 @@ @param TDriveNumber the drive to be backed up (unused) @leave */ -void CSqlBackupClient::InitialiseGetProxyBackupDataL(TSecureId aSid, TDriveNumber aDrive) +void CSqlBackupClient::InitialiseGetProxyBackupDataL(TSecureId aSid, TDriveNumber /*aDrive*/) { - UNUSED_ARG(aDrive); - SQL_TRACE_BUR(OstTraceExt3(TRACE_INTERNALS, CSQLBACKUPCLIENT_INITIALIZEGETPROXYBACKUPDATAL, "0x%X;CSqlBackupClient::InitialiseGetProxyBackupDataL;aSid=0x%X;aDrive=%d", (TUint)this, (TUint)aSid.iId, (TInt)aDrive)); // get the list of database files to back up - this is provided by the SQL server GetBackupListL(aSid); // this is the index of the file being processed - point to the beginning @@ -437,10 +404,8 @@ @param TDriveNumber the drive to restore (unused) @leave */ -void CSqlBackupClient::InitialiseRestoreProxyBaseDataL(TSecureId aSid, TDriveNumber aDrive) +void CSqlBackupClient::InitialiseRestoreProxyBaseDataL(TSecureId aSid, TDriveNumber /* aDrive */) { - UNUSED_ARG(aDrive); - SQL_TRACE_BUR(OstTraceExt3(TRACE_INTERNALS, CSQLBACKUPCLIENT_INITIALIZERESTOREPROXYBASEDATAL, "0x%X;CSqlBackupClient::InitialiseRestoreProxyBaseDataL;aSid=0x%X;aDrive=%d", (TUint)this, (TUint)aSid.iId, (TInt)aDrive)); iBuffer.Zero(); // this is the first state of the restore state machine iState=ERestoreExpectChecksum; @@ -461,7 +426,6 @@ */ void CSqlBackupClient::RestoreBaseDataSectionL(TDesC8& aInBuffer, TBool aFinishedFlag) { - SQL_TRACE_BUR(OstTraceExt4(TRACE_INTERNALS, CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL0, "0x%X;CSqlBackupClient::RestoreBaseDataSectionL;iState=%d;aInBuffer.Length()=%d;aFinishedFlag=%d", (TUint)this, (TInt)iState, aInBuffer.Length(), (TInt)aFinishedFlag)); // used to walk the buffer // got a new buffer - because each time this method is called, we have a // fresh chunk of data @@ -562,7 +526,6 @@ iState = ERestoreExpectFileNameSize; iBuffer.Zero(); } - SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL1, "0x%X;CSqlBackupClient::RestoreBaseDataSectionL;iFileSize=%lld", (TUint)this, iFileSize)); break; } case ERestoreExpectFileNameSize: // the size of the file name to restore @@ -580,7 +543,6 @@ case ERestoreExpectFileName: // the name of the file to restore { CopyBufData(aInBuffer, inBufferPos, iBuffer, iFileNameSize); - SQL_TRACE_BUR(OstTraceExt4(TRACE_INTERNALS, CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL2, "0x%X;CSqlBackupClient::RestoreBaseDataSectionL;BEGIN;iBuffer=%S;iBuffer.Length()=%d;iFileNameSize=%d", (TUint)this, __SQLPRNSTR(iBuffer), iBuffer.Length(), iFileNameSize)); if(iBuffer.Length() == iFileNameSize) { iState = ERestoreExpectData; @@ -590,7 +552,6 @@ // once all the temp files are created, then they are renamed to the // real file names in one fell swoop __SQLLEAVE_IF_ERROR(iFile.Replace(iInterface->Fs(), iBuffer, EFileWrite | EFileShareExclusive)); - SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL3, "0x%X;CSqlBackupClient::RestoreBaseDataSectionL;iFile.SubSessionHandle()=0x%X", (TUint)this, (TUint)iFile.SubSessionHandle())); iBuffer.Zero(); } break; @@ -613,9 +574,8 @@ TUint32 cksum = CheckSumL(iFile) & KMaxTUint32; // done with the file now - has to follow checksum cos it - // expects ann open file - SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL4, "0x%X;CSqlBackupClient::RestoreBaseDataSectionL;END;iFile.SubSessionHandle()=0x%X", (TUint)this, (TUint)iFile.SubSessionHandle())); - __SQLLEAVE_IF_ERROR(iFile.Flush()); + // expects an open file + __SQLLEAVE_IF_ERROR(iFile.Flush()); iFile.Close(); // validate that the checksum matches @@ -648,7 +608,6 @@ //the ".bak" file, if exists, will be deleted first. (void)iInterface->Fs().Delete(bak); TInt err=iInterface->Fs().Rename(db,bak); - SQL_TRACE_BUR(OstTraceExt4(TRACE_INTERNALS, CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL5, "0x%X;CSqlBackupClient::RestoreBaseDataSectionL;END;bak=%S;db=%S;err=%d", (TUint)this, __SQLPRNSTR(bak), __SQLPRNSTR(db), err)); if(err == KErrNone || err == KErrNotFound) { // now, rename the .rst as .db @@ -661,6 +620,7 @@ //its owner. Then "TInt err=iInterface->Fs().Rename(db,bak);" will fail again. err2 = err; } + // if we got here, we have a backup of the original database in .db.bak // and the new database in .db }//end of for(...) @@ -677,7 +637,6 @@ // files that belong together and not bits of old and new __SQLLEAVE_IF_ERROR(iInterface->Fs().GetDir(KBackupFilter,KEntryAttNormal,ESortNone,dir)); CleanupStack::PushL(dir); - SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL6, "0x%X;CSqlBackupClient::RestoreBaseDataSectionL;bak files count=%d", (TUint)this, dir->Count())); for(TInt a1=0;a1Count();++a1) { TEntry entry=(*dir)[a1]; @@ -716,7 +675,6 @@ // rename all the .bak files to .db CDir *dir=NULL; TInt rc=iInterface->Fs().GetDir(KBackupFilter,KEntryAttNormal,ESortNone,dir); - SQL_TRACE_BUR(OstTraceExt3(TRACE_INTERNALS, CSQLBACKUPCLIENT_TERMINATEMULTISTAGEOPERATION1, "0x%X;CSqlBackupClient::TerminateMultiStageOperation;Fs().GetDir() err=%d;file count=%d", (TUint)this, rc, rc == KErrNone ? dir->Count() : 0)); if(KErrNone!=rc) { // can't get a file list - can't do anything @@ -737,7 +695,7 @@ //and continue with the next file. if(KErrNone != rc) { - SQL_TRACE_BUR(OstTraceExt4(TRACE_INTERNALS, CSQLBACKUPCLIENT_TERMINATEMULTISTAGEOPERATION2, "0x%X;CSqlBackupClient::TerminateMultiStageOperation;Fs().Rename() err=%d;bak=%S;db=%S", (TUint)this, rc, __SQLPRNSTR(bak), __SQLPRNSTR(db))); + RDebug::Print(_L(" *** CSqlBackupClient::TerminateMultiStageOperation(), file \"%S\", err=%d\r\n"), &db, rc); } // backup restored ok } @@ -825,7 +783,6 @@ */ void CSqlBackupClient::GetBackupListL(TSecureId aSid) { - SQL_TRACE_BUR(OstTraceExt2(TRACE_INTERNALS, CSQLBACKUPCLIENT_GETBACKUPLISTL, "0x%X;CSqlBackupClient::GetBackupListL;aSid=0x%X", (TUint)this, (TUint)aSid.iId)); // we own the array - the SQL server just populates it iInterface->GetBackUpListL(aSid,iFileList); } @@ -886,9 +843,9 @@ // void CSqlBackupClient::CopyBufData(const TDesC8& aInBuf, TInt& aInBufReadPos, TDes& aOutBuf, TInt aDataLen) { - __ASSERT_DEBUG(aInBufReadPos >= 0, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aDataLen > 0, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(!(aInBuf.Length() & 0x01), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aInBufReadPos >= 0, ESqlPanicBadArgument); + __SQLASSERT(aDataLen > 0, ESqlPanicBadArgument); + __SQLASSERT(!(aInBuf.Length() & 0x01), ESqlPanicInternalError); TInt needed = (aDataLen - aOutBuf.Length()) << K8to16bitShift; TInt available = aInBuf.Size() - aInBufReadPos; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvAuthorizer.cpp --- a/persistentstorage/sql/SRC/Server/SqlSrvAuthorizer.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvAuthorizer.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -154,7 +154,7 @@ //The function returns the argument number where the table name is. inline TInt DbOp2TableNameArgIndex(TInt aDbOpType) { - __ASSERT_DEBUG(aDbOpType > 0 && aDbOpType <= SQLITE_FUNCTION, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aDbOpType > 0 && aDbOpType <= SQLITE_FUNCTION, ESqlPanicInternalError); return KTableNameArgIndex[aDbOpType]; } @@ -165,12 +165,12 @@ TInt pos = DbOp2TableNameArgIndex(aDbOpType); if(pos == 2) { - __ASSERT_DEBUG(aDbObjName2 != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aDbObjName2 != NULL, ESqlPanicInternalError); return aDbObjName2; } else if(pos == 1) { - __ASSERT_DEBUG(aDbObjName1 != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aDbObjName1 != NULL, ESqlPanicInternalError); return aDbObjName1; } return NULL;//Some database operations do not use table name @@ -182,7 +182,7 @@ { if(aDbOpType == SQLITE_DETACH || aDbOpType == SQLITE_ALTER_TABLE) { - __ASSERT_DEBUG(aDbObjName1 != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aDbObjName1 != NULL, ESqlPanicInternalError); return aDbObjName1; } return aDbName;//It may be NULL for some database operations @@ -298,7 +298,7 @@ // case SQLITE_CREATE_VTABLE: // case SQLITE_DROP_VTABLE: default: - __ASSERT_DEBUG(EFalse, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(EFalse, ESqlPanicInternalError); break; } return res; @@ -428,7 +428,7 @@ // case SQLITE_CREATE_VTABLE: // case SQLITE_DROP_VTABLE: default: - __ASSERT_DEBUG(EFalse, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(EFalse, ESqlPanicInternalError); break; } return res; @@ -503,9 +503,9 @@ const char* aDbName, const char* aTrgOrViewName) { UNUSED_ARG(aTrgOrViewName); - __ASSERT_DEBUG(aDb != NULL, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDb != NULL, ESqlPanicBadArgument); -#ifdef _SQL_AUTHORIZER_TRACE_ENABLED +#ifdef _NOTIFY enum TDbOpType {EOpCreateIndex = 1, EOpCreateTable, EOpCreateTempIndex, EOpCreateTempTable, EOpCreateTempTrigger, EOpCreateTempView, EOpCreateTrigger, EOpCreateView, EOpDelete, EOpDropIndex, EOpDropTable, EOpDropTempIndex, EOpDropTempTable, EOpDropTempTrigger, EOpDropTempView, EOpDropTrigger, @@ -513,7 +513,7 @@ EOpAlterTable, EOpReindex, EOpAnalyze, EOpCreateVTable, EOpDropVTable, EOpFunctionCall}; TDbOpType dbOpType = static_cast (aDbOpType);//can be seen now in the debugger ::PrintAuthorizerArguments(dbOpType, aDbObjName1, aDbObjName2, aDbName, aTrgOrViewName); -#endif +#endif//_NOTIFY CSqlSrvDatabase& db = *static_cast (aDb); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvBlob.cpp --- a/persistentstorage/sql/SRC/Server/SqlSrvBlob.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvBlob.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -14,19 +14,12 @@ // #include "sqlite3.h" -#include "SqlAssert.h" +#include "SqlPanic.h" #include "SqlSrvBlob.h" #include "SqliteSymbian.h" #include "SqlSrvUtil.h" #include "SqlSrvStrings.h" #include "SqlDb.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlSrvBlobTraces.h" -#endif -#include "SqlTraceDef.h" - -#define UNUSED_VAR(var) var = var /** Creates a new HBlobBuf instance. @@ -52,19 +45,14 @@ */ HBlobBuf* HBlobBuf::NewL(sqlite3* aDb, const TDesC8& aDbName, const TDesC8& aTableName, const TDesC8& aColumnName, TInt64 aRowId, TMode aMode) { - __SQLTRACE_BLOBVAR(TBuf<100> des16prnbuf); - SQL_TRACE_BLOB(OstTraceExt4(TRACE_INTERNALS, HBLOBBUF_NEWL_ENTRY1, "Entry;0;HBlobBuf::NewL;sqlite3*=0x%X;aDbName=%s;aRowId=%lld;aMode=%d", (TUint)aDb, __SQLPRNSTR8(aDbName, des16prnbuf), aRowId, (TInt)aMode)); - SQL_TRACE_BLOB(OstTraceExt1(TRACE_INTERNALS, HBLOBBUF_NEWL_ENTRY2, "Entry;0;HBlobBuf::NewL;aTableName=%s", __SQLPRNSTR8(aTableName, des16prnbuf))); - SQL_TRACE_BLOB(OstTraceExt1(TRACE_INTERNALS, HBLOBBUF_NEWL_ENTRY3, "Entry;0;HBlobBuf::NewL;aColumnName=%s", __SQLPRNSTR8(aColumnName, des16prnbuf))); - __ASSERT_DEBUG(aDb != NULL, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aRowId > 0, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aMode == HBlobBuf::EReadOnly || aMode == HBlobBuf::EReadWrite, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDb != NULL, ESqlPanicBadArgument); + __SQLASSERT(aRowId > 0, ESqlPanicBadArgument); + __SQLASSERT(aMode == HBlobBuf::EReadOnly || aMode == HBlobBuf::EReadWrite, ESqlPanicBadArgument); HBlobBuf* self = new (ELeave) HBlobBuf; CleanupStack::PushL(self); self->ConstructL(aDb, aDbName, aTableName, aColumnName, aRowId, aMode); CleanupStack::Pop(self); - SQL_TRACE_BLOB(OstTraceExt2(TRACE_INTERNALS, HBLOBBUF_NEWL_EXIT, "Exit;0x%X;HBlobBuf::NewL;sqlite3_blob*=0x%X", (TUint)self, (TUint)self->iBlobHandle)); return self; } @@ -101,16 +89,16 @@ */ void HBlobBuf::ConstructL(sqlite3* aDb, const TDesC8& aDbName, const TDesC8& aTableName, const TDesC8& aColumnName, TInt64 aRowId, TMode aMode) { - __ASSERT_DEBUG(aDb != NULL, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aRowId > 0, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aMode == HBlobBuf::EReadOnly || aMode == HBlobBuf::EReadWrite, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aDb != NULL, ESqlPanicBadArgument); + __SQLASSERT(aRowId > 0, ESqlPanicBadArgument); + __SQLASSERT(aMode == HBlobBuf::EReadOnly || aMode == HBlobBuf::EReadWrite, ESqlPanicBadArgument); (void)sqlite3SymbianLastOsError();//clear last OS error TInt err = sqlite3_blob_open(aDb, (const char*)aDbName.Ptr(), (const char*)aTableName.Ptr(), (const char*)aColumnName.Ptr(), aRowId, aMode & HBlobBuf::EReadWrite, &iBlobHandle); __SQLLEAVE_IF_ERROR(::Sql2OsErrCode(err, sqlite3SymbianLastOsError())); - __ASSERT_DEBUG(iBlobHandle != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iBlobHandle != NULL, ESqlPanicInternalError); iBlobSize = sqlite3_blob_bytes(iBlobHandle); iWrPos = iRdPos = 0; } @@ -120,11 +108,8 @@ */ void HBlobBuf::DoRelease() { - SQL_TRACE_BLOB(OstTraceExt2(TRACE_INTERNALS, HBLOBBUF_DORELEASE_ENTRY, "Entry;0x%X;HBlobBuf::DoRelease;sqlite3_blob*=0x%X", (TUint)this, (TUint)iBlobHandle)); - TRAPD(err, DoSynchL()); - SQL_TRACE_BLOB(OstTraceExt2(TRACE_INTERNALS, HBLOBBUF_DORELEASE_EXIT, "Exit;0x%X;HBlobBuf::DoRelease;err=%d", (TUint)this, err)); - UNUSED_VAR(err); - } + TRAP_IGNORE(DoSynchL()); + } /** Closes the blob handle. @@ -135,7 +120,6 @@ if(iBlobHandle) { TInt err = sqlite3_blob_close(iBlobHandle); - SQL_TRACE_BLOB(OstTraceExt2(TRACE_INTERNALS, HBLOBBUF_DOSYNCHL, "0x%X;HBlobBuf::DoSynchL;err=%d", (TUint)this, err)); iBlobHandle = NULL; // the close is unconditional, even if an error occurs __SQLLEAVE_IF_ERROR(::Sql2OsErrCode(err, sqlite3SymbianLastOsError())); } @@ -161,11 +145,9 @@ */ TInt HBlobBuf::DoReadL(TAny* aPtr, TInt aMaxLength) { - __ASSERT_DEBUG(aPtr != NULL, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aMaxLength >= 0, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(iBlobHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - - SQL_TRACE_BLOB(OstTraceExt5(TRACE_INTERNALS, HBLOBBUF_DOREADL, "0x%X;HBlobBuf::DoReadL;aMaxLength=%d;iBlobSize=%d;iWrPos=%d;iRdPos=%d", (TUint)this, aMaxLength, iBlobSize, iWrPos, iRdPos)); + __SQLASSERT(aPtr != NULL, ESqlPanicBadArgument); + __SQLASSERT(aMaxLength >= 0, ESqlPanicBadArgument); + __SQLASSERT(iBlobHandle != NULL, ESqlPanicInvalidObj); if(aMaxLength <= 0) { @@ -206,11 +188,9 @@ */ void HBlobBuf::DoWriteL(const TAny* aPtr, TInt aLength) { - __ASSERT_DEBUG(aPtr != NULL, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aLength >= 0, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(iBlobHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - - SQL_TRACE_BLOB(OstTraceExt5(TRACE_INTERNALS, HBLOBBUF_DOWRITEL, "0x%X;HBlobBuf::DoWriteL;aLength=%d;iBlobSize=%d;iWrPos=%d;iRdPos=%d", (TUint)this, aLength, iBlobSize, iWrPos, iRdPos)); + __SQLASSERT(aPtr != NULL, ESqlPanicBadArgument); + __SQLASSERT(aLength >= 0, ESqlPanicBadArgument); + __SQLASSERT(iBlobHandle != NULL, ESqlPanicInvalidObj); if(aLength <= 0) { @@ -247,10 +227,9 @@ */ TStreamPos HBlobBuf::DoSeekL(MStreamBuf::TMark aMark, TStreamLocation aLocation, TInt aOffset) { - SQL_TRACE_BLOB(OstTraceExt5(TRACE_INTERNALS, HBLOBBUF_DOSEEKL, "0x%X;HBlobBuf::DoSeekL;aMark=%d;aLocation=%d;aOffset=%d;iBlobSize=%d", (TUint)this, (TInt)aMark, (TInt)aLocation, aOffset, iBlobSize)); - __ASSERT_ALWAYS(!(aMark & ~(ERead | EWrite)), __SQLPANIC(ESqlPanicStreamMarkInvalid)); - __ASSERT_DEBUG(aOffset >= 0, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(iBlobHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT_ALWAYS(!(aMark & ~(ERead | EWrite)), ESqlPanicStreamMarkInvalid); + __SQLASSERT(aOffset >= 0, ESqlPanicBadArgument); + __SQLASSERT(iBlobHandle != NULL, ESqlPanicInvalidObj); TInt newPos = 0; switch(aLocation) @@ -265,7 +244,7 @@ newPos = iBlobSize + aOffset; break; default: - __ASSERT_DEBUG(0, __SQLPANIC(ESqlPanicStreamLocationInvalid)); + __SQLASSERT(0, ESqlPanicStreamLocationInvalid); newPos = -1; break; } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvCollation.cpp --- a/persistentstorage/sql/SRC/Server/SqlSrvCollation.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvCollation.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ // #include "SqlSrvCollation.h" -#include "SqlAssert.h" +#include "SqlPanic.h" #include "SqlUtil.h" #include "sqlite3.h" #include "SqliteSymbian.h" //sqlite3SymbianLastOsError() @@ -155,7 +155,7 @@ TSqlCollationUtil::TSqlCollationUtil(sqlite3* aDbHandle) : iDbHandle(aDbHandle) { - __ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(iDbHandle != NULL, ESqlPanicBadArgument); } /** @@ -194,7 +194,7 @@ */ void TSqlCollationUtil::InstallCollationsL() { - __ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iDbHandle != NULL, ESqlPanicInvalidObj); (void)sqlite3SymbianLastOsError();//clear last OS error //Register user defined collations for(TInt i=0;i #include "SqlSrvConfig.h" #include "SqlSrvUtil.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlSrvConfigTraces.h" -#endif -#include "SqlTraceDef.h" /** Initializes TSqlSrvConfigParams data members with their default values. @@ -51,15 +46,11 @@ */ void TSqlSrvConfig::InitL(RFs& aFs, const TDesC& aFileName) { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, TSQLSRVCONFIGFILE_INITL_ENTRY, "Entry;0;TSqlSrvConfig::InitL;aFs.Handle()=0x%X;aFileName=%S", (TUint)aFs.Handle(), __SQLPRNSTR(aFileName))); if(::FileExists(aFs, aFileName)) { - SQL_TRACE_INTERNALS(OstTrace0(TRACE_INTERNALS, TSQLSRVCONFIGFILE_INITL1, "0;TSqlSrvConfig::InitL;Config file found")); TBuf8 configFileStr; //Step 1: get the config string from the config file and store the string in configFileStr TSqlSrvConfig::GetConfigStringFromFileL(aFs, aFileName, configFileStr); - __SQLTRACE_INTERNALSVAR(TBuf<100> des16prnbuf); - SQL_TRACE_INTERNALS(OstTraceExt1(TRACE_INTERNALS, TSQLSRVCONFIGFILE_INITL2, "0;TSqlSrvConfig::InitL;Config file string=%s", __SQLPRNSTR8(configFileStr, des16prnbuf))); //Step 2: extract config file parameters from the string (configFileStr) and store them in iConfigFileParams TSqlSrvConfig::ExtractConfigParamsFromStringL(configFileStr, iConfigFileParams); } @@ -73,13 +64,6 @@ { iConfigFileParams.iFreePageThresholdKb = KSqlCompactFreePageThresholdKb; } - -#ifdef _SQL_RDEBUG_PRINT - SQL_TRACE_INTERNALS(OstTraceExt4(TRACE_INTERNALS, TSQLSRVCONFIGFILE_INITL_EXIT1, "Exit;0;TSqlSrvConfig::InitL;iCacheSize=%d;iPageSize=%d;iDbEncoding=%d;iSoftHeapLimit=%d", iConfigFileParams.iCacheSize, iConfigFileParams.iPageSize, iConfigFileParams.iDbEncoding, iConfigFileParams.iSoftHeapLimitKb)); -#else - SQL_TRACE_INTERNALS(OstTraceExt4(TRACE_INTERNALS, TSQLSRVCONFIGFILE_INITL_EXIT2, "Exit;0;TSqlSrvConfig::InitL;iCacheSize=%d;iPageSize=%d;iDbEncoding=%{TSqlSrvConfig_TDbEncoding};iSoftHeapLimit=%d", iConfigFileParams.iCacheSize, iConfigFileParams.iPageSize, iConfigFileParams.iDbEncoding, iConfigFileParams.iSoftHeapLimitKb)); -#endif - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, TSQLSRVCONFIGFILE_INITL_EXIT3, "Exit;0;TSqlSrvConfig::InitL;iCompactionMode=%d;iFreePageThresholdKb=%d", iConfigFileParams.iCompactionMode, iConfigFileParams.iFreePageThresholdKb)); } /** @@ -98,8 +82,6 @@ */ void TSqlSrvConfig::GetConfigParamsL(const TDesC8& aConfigStr, TSqlSrvConfigParams& aConfigParams) const { - __SQLTRACE_INTERNALSVAR(TBuf<100> des16prnbuf); - SQL_TRACE_INTERNALS(OstTraceExt1(TRACE_INTERNALS, TSQLSRVCONFIGFILE_GETCONFIGPARAMSL_ENTRY, "Entry;0;TSqlSrvConfig::GetConfigParamsL;aConfigStr=%s", __SQLPRNSTR8(aConfigStr, des16prnbuf))); TSqlSrvConfigParams tmpConfigParams; //Step 1: extract configuration parameters from aConfigStr, store them in tmpConfigParams. TSqlSrvConfig::ExtractConfigParamsFromStringL(aConfigStr, tmpConfigParams); @@ -129,24 +111,18 @@ //Step 5: set the free page threshold. aConfigParams.iFreePageThresholdKb = iConfigFileParams.iFreePageThresholdKb; //Step 6: assert the parameter values. - __ASSERT_DEBUG(aConfigParams.iPageSize == TSqlSrvConfigParams::KConfigPrmValueNotSet || aConfigParams.iPageSize >= 0, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(aConfigParams.iCacheSize == TSqlSrvConfigParams::KConfigPrmValueNotSet || aConfigParams.iCacheSize >= 0, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(aConfigParams.iDbEncoding == TSqlSrvConfigParams::EEncNotSet || + __SQLASSERT(aConfigParams.iPageSize == TSqlSrvConfigParams::KConfigPrmValueNotSet || aConfigParams.iPageSize >= 0, ESqlPanicInternalError); + __SQLASSERT(aConfigParams.iCacheSize == TSqlSrvConfigParams::KConfigPrmValueNotSet || aConfigParams.iCacheSize >= 0, ESqlPanicInternalError); + __SQLASSERT(aConfigParams.iDbEncoding == TSqlSrvConfigParams::EEncNotSet || aConfigParams.iDbEncoding == TSqlSrvConfigParams::EEncUtf8 || - aConfigParams.iDbEncoding == TSqlSrvConfigParams::EEncUtf16, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(aConfigParams.iSoftHeapLimitKb == TSqlSrvConfigParams::KConfigPrmValueNotSet || + aConfigParams.iDbEncoding == TSqlSrvConfigParams::EEncUtf16, ESqlPanicInternalError); + __SQLASSERT(aConfigParams.iSoftHeapLimitKb == TSqlSrvConfigParams::KConfigPrmValueNotSet || (aConfigParams.iSoftHeapLimitKb >= TSqlSrvConfigParams::KMinSoftHeapLimitKb && - aConfigParams.iSoftHeapLimitKb <= TSqlSrvConfigParams::KMaxSoftHeapLimitKb), __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(aConfigParams.iCompactionMode == ESqlCompactionNotSet || aConfigParams.iCompactionMode == ESqlCompactionManual || - aConfigParams.iCompactionMode == ESqlCompactionBackground || aConfigParams.iCompactionMode == ESqlCompactionAuto, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(aConfigParams.iFreePageThresholdKb == TSqlSrvConfigParams::KConfigPrmValueNotSet || - aConfigParams.iFreePageThresholdKb >= 0, __SQLPANIC(ESqlPanicInternalError)); -#ifdef _SQL_RDEBUG_PRINT - SQL_TRACE_INTERNALS(OstTraceExt4(TRACE_INTERNALS, TSQLSRVCONFIGFILE_GETCONFIGPARAMSL_EXIT1, "Exit;0;TSqlSrvConfig::GetConfigParamsL;cacheSize=%d;pageSize=%d;dbEncoding=%d;softHeapLimit=%d", aConfigParams.iCacheSize, aConfigParams.iPageSize, aConfigParams.iDbEncoding, aConfigParams.iSoftHeapLimitKb)); -#else - SQL_TRACE_INTERNALS(OstTraceExt4(TRACE_INTERNALS, TSQLSRVCONFIGFILE_GETCONFIGPARAMSL_EXIT2, "Exit;0;TSqlSrvConfig::GetConfigParamsL;cacheSize=%d;pageSize=%d;dbEncoding=%{TSqlSrvConfig_TDbEncoding};softHeapLimit=%d", aConfigParams.iCacheSize, aConfigParams.iPageSize, aConfigParams.iDbEncoding, aConfigParams.iSoftHeapLimitKb)); -#endif - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, TSQLSRVCONFIGFILE_GETCONFIGPARAMSL_EXIT3, "Exit;0;TSqlSrvConfig::GetConfigParamsL;compactionMode=%d;freePageThresholdKb=%d", aConfigParams.iCompactionMode, aConfigParams.iFreePageThresholdKb)); + aConfigParams.iSoftHeapLimitKb <= TSqlSrvConfigParams::KMaxSoftHeapLimitKb), ESqlPanicInternalError); + __SQLASSERT(aConfigParams.iCompactionMode == ESqlCompactionNotSet || aConfigParams.iCompactionMode == ESqlCompactionManual || + aConfigParams.iCompactionMode == ESqlCompactionBackground || aConfigParams.iCompactionMode == ESqlCompactionAuto, ESqlPanicInternalError); + __SQLASSERT(aConfigParams.iFreePageThresholdKb == TSqlSrvConfigParams::KConfigPrmValueNotSet || + aConfigParams.iFreePageThresholdKb >= 0, ESqlPanicInternalError); } //The function opeans the aFileName config file and reads the config string, storring it in aConfigStr argument. @@ -157,10 +133,10 @@ //The function may leave if some of the file I/O operations (open file, read file) fails. void TSqlSrvConfig::GetConfigStringFromFileL(RFs& aFs, const TDesC& aFileName, TDes8& aConfigStr) { - __ASSERT_DEBUG(aConfigStr.MaxLength() >= KSqlSrvMaxConfigStrLen, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aConfigStr.MaxLength() >= KSqlSrvMaxConfigStrLen, ESqlPanicBadArgument); RFile64 cfgFile; CleanupClosePushL(cfgFile); - __SQLLEAVE_IF_ERROR2(cfgFile.Open(aFs, aFileName, EFileRead)); + __SQLLEAVE_IF_ERROR(cfgFile.Open(aFs, aFileName, EFileRead)); TFileText cfgFileReader; cfgFileReader.Set(cfgFile); TBuf buf; @@ -180,13 +156,13 @@ CleanupStack::PopAndDestroy(&cfgFile); if(err != KErrEof) {//The "read configuration file" operation has failed with "err" (if err != KErrNone) - __SQLLEAVE_IF_ERROR2(err); + __SQLLEAVE_IF_ERROR(err); } if(!cfgLineFound) {//End of config file reached - no valid configuration line found. - __SQLLEAVE2(KErrEof); + __SQLLEAVE(KErrEof); } - __ASSERT_DEBUG(err == KErrNone || err == KErrEof, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(err == KErrNone || err == KErrEof, ESqlPanicInternalError); aConfigStr.Copy(buf); } @@ -208,18 +184,18 @@ } } //Assert the extracted parameter values. - __ASSERT_DEBUG(aConfigParams.iPageSize == TSqlSrvConfigParams::KConfigPrmValueNotSet || aConfigParams.iPageSize >= 0, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aConfigParams.iCacheSize == TSqlSrvConfigParams::KConfigPrmValueNotSet || aConfigParams.iCacheSize >= 0, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aConfigParams.iDbEncoding == TSqlSrvConfigParams::EEncNotSet || + __SQLASSERT(aConfigParams.iPageSize == TSqlSrvConfigParams::KConfigPrmValueNotSet || aConfigParams.iPageSize >= 0, ESqlPanicInternalError); + __SQLASSERT(aConfigParams.iCacheSize == TSqlSrvConfigParams::KConfigPrmValueNotSet || aConfigParams.iCacheSize >= 0, ESqlPanicInternalError); + __SQLASSERT(aConfigParams.iDbEncoding == TSqlSrvConfigParams::EEncNotSet || aConfigParams.iDbEncoding == TSqlSrvConfigParams::EEncUtf8 || - aConfigParams.iDbEncoding == TSqlSrvConfigParams::EEncUtf16, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aConfigParams.iSoftHeapLimitKb == TSqlSrvConfigParams::KConfigPrmValueNotSet || + aConfigParams.iDbEncoding == TSqlSrvConfigParams::EEncUtf16, ESqlPanicInternalError); + __SQLASSERT(aConfigParams.iSoftHeapLimitKb == TSqlSrvConfigParams::KConfigPrmValueNotSet || (aConfigParams.iSoftHeapLimitKb >= TSqlSrvConfigParams::KMinSoftHeapLimitKb && - aConfigParams.iSoftHeapLimitKb <= TSqlSrvConfigParams::KMaxSoftHeapLimitKb), __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aConfigParams.iCompactionMode == ESqlCompactionNotSet || aConfigParams.iCompactionMode == ESqlCompactionManual || - aConfigParams.iCompactionMode == ESqlCompactionBackground || aConfigParams.iCompactionMode == ESqlCompactionAuto, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aConfigParams.iFreePageThresholdKb == TSqlSrvConfigParams::KConfigPrmValueNotSet || - aConfigParams.iFreePageThresholdKb >= 0, __SQLPANIC2(ESqlPanicInternalError)); + aConfigParams.iSoftHeapLimitKb <= TSqlSrvConfigParams::KMaxSoftHeapLimitKb), ESqlPanicInternalError); + __SQLASSERT(aConfigParams.iCompactionMode == ESqlCompactionNotSet || aConfigParams.iCompactionMode == ESqlCompactionManual || + aConfigParams.iCompactionMode == ESqlCompactionBackground || aConfigParams.iCompactionMode == ESqlCompactionAuto, ESqlPanicInternalError); + __SQLASSERT(aConfigParams.iFreePageThresholdKb == TSqlSrvConfigParams::KConfigPrmValueNotSet || + aConfigParams.iFreePageThresholdKb >= 0, ESqlPanicInternalError); } //The function searches aConfigStr arguments for "PARAM=VALUE;" pair. If such pair is found, then @@ -261,7 +237,7 @@ pos = prmText.Locate(KAssignment); if(pos < 0 || pos >= (prmText.Length() - 1)) { - __SQLLEAVE2(KErrArgument); + __SQLLEAVE(KErrArgument); } //we've got now prmText pointing to a " PARAM = VALUE " string. aParamName.Set(TSqlSrvConfig::TrimAndConstructPtr(prmText.Ptr(), pos)); @@ -313,7 +289,7 @@ TInt err = lex.Val(cacheSize); if(err != KErrNone || cacheSize < 0) //The correct check is for "<=0", but it has to be backward { //compatible with the previous implementation - __SQLLEAVE2(KErrArgument); + __SQLLEAVE(KErrArgument); } return cacheSize; } @@ -327,7 +303,7 @@ TInt err = lex.Val(pageSize); if(err != KErrNone || pageSize < 0) //The correct check is for "<0", "power of 2", "between 512 and 32768", { //but it has to be backward compatible with the previous implementation - __SQLLEAVE2(KErrArgument); + __SQLLEAVE(KErrArgument); } return pageSize; } @@ -360,7 +336,7 @@ if(err != KErrNone || softHeapLimitKb < 0 || (softHeapLimitKb < TSqlSrvConfigParams::KMinSoftHeapLimitKb || softHeapLimitKb > TSqlSrvConfigParams::KMaxSoftHeapLimitKb)) { - __SQLLEAVE2(KErrArgument); + __SQLLEAVE(KErrArgument); } return softHeapLimitKb; } @@ -396,7 +372,7 @@ TInt err = lex.Val(freePageThreshold); if(err != KErrNone || freePageThreshold < 0) { - __SQLLEAVE2(KErrArgument); + __SQLLEAVE(KErrArgument); } return freePageThreshold; } @@ -407,8 +383,8 @@ //aStr content without leading and trailing whitespace characters. TPtrC8 TSqlSrvConfig::TrimAndConstructPtr(const TUint8* aStr, TInt aLength) { - __ASSERT_DEBUG(aStr != NULL, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aLength >= 0, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aStr != NULL, ESqlPanicBadArgument); + __SQLASSERT(aLength >= 0, ESqlPanicBadArgument); //Trim left for(;aLength>0;--aLength,++aStr) { diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvConfig.h --- a/persistentstorage/sql/SRC/Server/SqlSrvConfig.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvConfig.h Wed Sep 01 12:39:58 2010 +0100 @@ -18,7 +18,7 @@ #include #include -#include "SqlAssert.h" +#include "SqlPanic.h" #include "SqlUtil.h" //Forward declarations @@ -54,7 +54,8 @@ KDefaultSoftHeapLimitKb = 1024, #else KDefaultSoftHeapLimitKb = 8192, -#endif +#endif + #ifdef SYSLIBS_TEST KMinSoftHeapLimitKb = 8, #else diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvDatabase.cpp --- a/persistentstorage/sql/SRC/Server/SqlSrvDatabase.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvDatabase.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -22,11 +22,6 @@ #include "SqlSrvUtil.h" //Global server functions #include "SqlCompact.h" #include "SqlSrvResourceProfiler.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlSrvDatabaseTraces.h" -#endif -#include "SqlTraceDef.h" // // The following macro disables the creation/loading of the settings table. @@ -91,7 +86,7 @@ //aRight argument is NULL. static TInt Compare(const TSqlAttachDbPair& aLeft, const TSqlAttachDbPair& aRight) { - __ASSERT_DEBUG(aLeft.iKey != NULL && aRight.iKey != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aLeft.iKey != NULL && aRight.iKey != NULL, ESqlPanicInternalError); return ::CompareNoCase8(TPtrC8(aLeft.iKey), TPtrC8(aRight.iKey)); } @@ -106,7 +101,7 @@ //aRight argument is NULL. static TInt Compare2(const TSqlCompactDbPair& aLeft, const TSqlCompactDbPair& aRight) { - __ASSERT_DEBUG(aLeft.iKey != NULL && aRight.iKey != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aLeft.iKey != NULL && aRight.iKey != NULL, ESqlPanicInternalError); return ::CompareNoCase(*aLeft.iKey, *aRight.iKey); } @@ -120,13 +115,13 @@ TBuf8 fileNameZ; if(!::UTF16ZToUTF8Z(aFileData.FileNameZ(), fileNameZ)) { - __SQLLEAVE2(KErrGeneral); + __SQLLEAVE(KErrGeneral); } - __SQLLEAVE_IF_ERROR2(::CreateDbHandle8(fileNameZ, aDbHandle)); + __SQLLEAVE_IF_ERROR(::CreateDbHandle8(fileNameZ, aDbHandle)); } else { - __SQLLEAVE_IF_ERROR2(::CreateDbHandle16(aFileData.FileNameZ(), aDbHandle)); + __SQLLEAVE_IF_ERROR(::CreateDbHandle16(aFileData.FileNameZ(), aDbHandle)); } } @@ -158,7 +153,7 @@ //The function is used to read the security policy of the main database. static CSqlSecurityPolicy* LoadDbSecurityPolicyLC(sqlite3* aDbHandle) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicBadArgument); //Create new database security policy object and initialize it with a default security policy TSecurityPolicy defaultPolicy(TSecurityPolicy::EAlwaysFail); CSqlSecurityPolicy* dbPolicy = CSqlSecurityPolicy::NewLC(defaultPolicy); @@ -173,7 +168,7 @@ //The function panics in _DEBUG mode if aSrc is NULL. static TUint8* CreateStrCopyLC(const TUint8* aSrc) { - __ASSERT_DEBUG(aSrc != NULL, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aSrc != NULL, ESqlPanicBadArgument); TInt len = User::StringLength(aSrc) + 1; TUint8* copy = new (ELeave) TUint8[len]; Mem::Copy(copy, aSrc, len); @@ -185,7 +180,7 @@ //during the stack cleanup. static void EnableAuthorizer(void* aAuthorizerDisabled) { - __ASSERT_DEBUG(aAuthorizerDisabled != NULL, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aAuthorizerDisabled != NULL, ESqlPanicBadArgument); TBool* authorizerDisabled = static_cast (aAuthorizerDisabled); *authorizerDisabled = EFalse; } @@ -214,7 +209,7 @@ //CSqlSrvDatabase's ConstructL() method(s) leave (when creating a new database file). static void DbFileCleanup(void* aDbFileCleanup) { - __ASSERT_DEBUG(aDbFileCleanup != NULL, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDbFileCleanup != NULL, ESqlPanicBadArgument); TDbFileCleanup* dbFileCleanup = static_cast (aDbFileCleanup); dbFileCleanup->Cleanup(); } @@ -228,26 +223,23 @@ //During the call the authorizer will be disabled. static TInt ExecPragma(sqlite3* aDbHandle, TBool& aAuthorizerDisabled, const TDesC& aPragma, TInt aValue, const TDesC& aDbName = KMainDb16) { - __SQLTRACE_INTERNALSEXPR(TPtrC pragmaprnptr(aPragma.Left(aPragma.Length() - 1))); - SQL_TRACE_INTERNALS(OstTraceExt4(TRACE_INTERNALS, EXECPRAGMA_ENTRY, "Entry;0;ExecPragma;sqlite3*=0x%X;aPragma=%S;aValue=%d;aDbName=%S", (TUint)aDbHandle, __SQLPRNSTR(pragmaprnptr), aValue, __SQLPRNSTR(aDbName))); - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicBadArgument); TBuf pragmaSql;//(KMaxFileName + 64) characters buffer length is enough for the longest possible PRAGMA statement pragmaSql.Format(aPragma, &aDbName, aValue); TBool authorizerDisabledState = aAuthorizerDisabled; aAuthorizerDisabled = ETrue; TInt err = DbExecStmt16(aDbHandle, pragmaSql); aAuthorizerDisabled = authorizerDisabledState; - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, EXECPRAGMA_EXIT, "Exit;0;ExecPragma;sqlite3*=0x%X;err=%d", (TUint)aDbHandle, err)); return err; } //The journal size limit is set to be at lest 16 pages and no less than 64 Kb. static void SetJournalSizeLimitL(sqlite3* aDbHandle, TBool& aAuthorizerDisabled, TInt aPageSize, const TDesC& aDbName = KMainDb16) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicBadArgument); if(aPageSize == TSqlSrvConfigParams::KConfigPrmValueNotSet) { - __SQLLEAVE_IF_ERROR2(DbPageSize(aDbHandle, aDbName, aPageSize)); + __SQLLEAVE_IF_ERROR(DbPageSize(aDbHandle, aDbName, aPageSize)); } const TInt KPageMultiplier = 16; const TInt KDefaultJournalSizeLimit = 64 * 1024; @@ -255,7 +247,7 @@ const TInt KJournalSizeLimit = Min((aPageSize * KPageMultiplier), KMaxJournalSizeLimit); if(KJournalSizeLimit > KDefaultJournalSizeLimit) { - __SQLLEAVE_IF_ERROR2(::ExecPragma(aDbHandle, aAuthorizerDisabled, KJournalSizeLimitPragma, KJournalSizeLimit)); + __SQLLEAVE_IF_ERROR(::ExecPragma(aDbHandle, aAuthorizerDisabled, KJournalSizeLimitPragma, KJournalSizeLimit)); } } @@ -301,16 +293,15 @@ */ CSqlSrvDatabase* CSqlSrvDatabase::CreateSecureL(const TSqlSrvFileData& aFileData, CSqlSecurityPolicy* aSecurityPolicy) { - SQL_TRACE_INTERNALS(OstTrace0(TRACE_INTERNALS, CSQLSRVDATABASE_CREATESECUREL_ENTRY, "Entry;0;CSqlSrvDatabase::CreateSecureL")); - __ASSERT_DEBUG(aFileData.IsSecureFileNameFmt(), __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aSecurityPolicy != NULL, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aFileData.IsSecureFileNameFmt(), ESqlPanicBadArgument); + __SQLASSERT(aSecurityPolicy != NULL, ESqlPanicBadArgument); if(!::SqlServer().SecurityInspector().Check(aSecurityPolicy->DbPolicy(RSqlSecurityPolicy::ESchemaPolicy))) { //The caller has no "SCHEMA" policy. Then the client is not given a permission to create the database. //Delete aSecurityPolicy since no database object is going to be created and the security policy object //won't be put in the security policies map. delete aSecurityPolicy; - __SQLLEAVE2(KErrPermissionDenied); + __SQLLEAVE(KErrPermissionDenied); } //What does happen with aSecurityPolicy instance? // If the database is created successfully, then a lookup will be made in the security policies map. @@ -333,7 +324,6 @@ CleanupStack::PushL(self); self->ConstructCreateSecureL(aFileData, aSecurityPolicy); CleanupStack::Pop(self); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVDATABASE_CREATESECUREL_EXIT, "Exit;0x%X;CSqlSrvDatabase::CreateSecureL;sqlite3*=0x%X", (TUint)self, (TUint)self->iDbHandle)); return self; } @@ -364,13 +354,11 @@ */ CSqlSrvDatabase* CSqlSrvDatabase::CreateL(const TSqlSrvFileData& aFileData) { - SQL_TRACE_INTERNALS(OstTrace0(TRACE_INTERNALS, CSQLSRVDATABASE_CREATEL_ENTRY, "Entry;0;CSqlSrvDatabase::CreateL")); - __ASSERT_DEBUG(!aFileData.IsSecureFileNameFmt(), __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(!aFileData.IsSecureFileNameFmt(), ESqlPanicBadArgument); CSqlSrvDatabase* self = new (ELeave) CSqlSrvDatabase(); CleanupStack::PushL(self); self->ConstructCreateL(aFileData); CleanupStack::Pop(self); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVDATABASE_CREATEL_EXIT, "Exit;0x%X;CSqlSrvDatabase::CreateL;sqlite3*=0x%X", (TUint)self, (TUint)self->iDbHandle)); return self; } @@ -405,12 +393,10 @@ */ CSqlSrvDatabase* CSqlSrvDatabase::OpenL(const TSqlSrvFileData& aFileData) { - SQL_TRACE_INTERNALS(OstTrace0(TRACE_INTERNALS, CSQLSRVDATABASE_OPENL_ENTRY, "Entry;0;CSqlSrvDatabase::OpenL")); CSqlSrvDatabase* self = new (ELeave) CSqlSrvDatabase(); CleanupStack::PushL(self); aFileData.IsSecureFileNameFmt() ? self->ConstructOpenSecureL(aFileData) : self->ConstructOpenL(aFileData); CleanupStack::Pop(self); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVDATABASE_OPENL_EXIT, "Exit;0x%X;CSqlSrvDatabase::OpenL;sqlite3*=0x%X", (TUint)self, (TUint)self->iDbHandle)); return self; } @@ -419,12 +405,12 @@ */ CSqlSrvDatabase::~CSqlSrvDatabase() { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVDATABASE_CSQLSRVDATABASE2_ENTRY, "Entry;0x%X;CSqlSrvDatabase::~CSqlSrvDatabase;sqlite3*=0x%X", (TUint)this, (TUint)iDbHandle)); + SQLPROFILER_DB_CLOSE((TUint)iDbHandle); TSqlCompactDbMapIterator compactDbIt(iCompactDbMap); TSqlCompactDbPair compactDbPair; while(compactDbIt.Next(compactDbPair)) { - __ASSERT_DEBUG(compactDbPair.iData, __SQLPANIC2(ESqlPanicInvalidObj)); + __SQLASSERT(compactDbPair.iData, ESqlPanicInvalidObj); ::SqlServer().Compactor().ReleaseEntry(*compactDbPair.iData); } iCompactDbMap.Close(); @@ -467,12 +453,11 @@ TSqlAttachDbPair attachDbPair; while(it.Next(attachDbPair)) { - __ASSERT_DEBUG(attachDbPair.iData, __SQLPANIC2(ESqlPanicInvalidObj)); - ::SqlServer().SecurityMap().Remove(attachDbPair.iData); + __SQLASSERT(attachDbPair.iData, ESqlPanicInvalidObj); + ::SqlServer().SecurityMap().Remove(attachDbPair.iData); } iAttachDbMap.Close(); ::CloseDbHandle(iDbHandle); - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, CSQLSRVDATABASE_CSQLSRVDATABASE2_EXIT, "Exit;0x%X;CSqlSrvDatabase::~CSqlSrvDatabase", (TUint)this)); } /** @@ -510,8 +495,6 @@ */ void CSqlSrvDatabase::CreateNewDbFileL(const TSqlSrvFileData& aFileData) { - __SQLTRACE_INTERNALSVAR(TPtrC fname = aFileData.FileName()); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVDATABASE_CREATENEWDBFILEL, "0x%x;CSqlSrvDatabase::CreateNewDbFileL;fname=%S", (TUint)this, __SQLPRNSTR(fname))); if(::FileExists(aFileData.Fs(), aFileData.FileName())) { __SQLLEAVE(KErrAlreadyExists); @@ -547,8 +530,6 @@ */ void CSqlSrvDatabase::OpenExistingDbFileL(const TSqlSrvFileData& aFileData) { - __SQLTRACE_INTERNALSVAR(TPtrC fname = aFileData.FileName()); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVDATABASE_OPENEXISTINGDBFILEL, "0x%x;CSqlSrvDatabase::OpenExistingDbFileL;fname=%S", (TUint)this, __SQLPRNSTR(fname))); if(!aFileData.ContainHandles()) {//This check is valid only if the database is outside application's private data cage if(!::FileExists(aFileData.Fs(), aFileData.FileName())) @@ -673,7 +654,6 @@ */ void CSqlSrvDatabase::AttachDbL(const TSqlSrvFileData& aFileData, const TDesC& aDbName) { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVDATABASE_ATTACHDBL_ENTRY, "Entry;0x%X;CSqlSrvDatabase::AttachDbL;aDbName=%S", (TUint)this, __SQLPRNSTR(aDbName))); if(!aFileData.ContainHandles()) {//This check is valid only if the database is outside application's private data cage if(!::FileExists(aFileData.Fs(), aFileData.FileName())) @@ -716,7 +696,6 @@ __SQLLEAVE(err); } } - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, CSQLSRVDATABASE_ATTACHDBL_EXIT, "Exit;0x%X;CSqlSrvDatabase::AttachDbL", (TUint)this)); } /** @@ -800,7 +779,6 @@ */ void CSqlSrvDatabase::DetachDbL(const TDesC& aDbName) { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVDATABASE_DETACHDBL_ENTRY, "Entry;0x%X;CSqlSrvDatabase::DetachDbL;aDbName=%S", (TUint)this, __SQLPRNSTR(aDbName))); TInt err = FinalizeAttachedDb(aDbName); if(err == KErrNone) { @@ -810,7 +788,6 @@ { __SQLLEAVE(err); } - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, CSQLSRVDATABASE_DETACHDBL_EXIT, "Exit;0x%X;CSqlSrvDatabase::DetachDbL", (TUint)this)); } /** @@ -829,7 +806,7 @@ CleanupStack::PushL(TCleanupItem(&EnableAuthorizer, &iAuthorizerDisabled)); TInt pageCount = 0; __SQLLEAVE_IF_ERROR(::DbPageCount(iDbHandle, aDbName, pageCount)); - __ASSERT_DEBUG(pageCount >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(pageCount >= 0, ESqlPanicInternalError); CleanupStack::PopAndDestroy(); return (TInt64)pageCount * PageSizeL(aDbName); } @@ -851,7 +828,7 @@ TInt freePageCount = 0; __SQLLEAVE_IF_ERROR(::DbFreePageCount(iDbHandle, aDbName, freePageCount)); CleanupStack::PopAndDestroy(); - __ASSERT_DEBUG(freePageCount >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(freePageCount >= 0, ESqlPanicInternalError); return (TInt64)freePageCount * PageSizeL(aDbName); } @@ -915,8 +892,7 @@ */ TInt CSqlSrvDatabase::CompactL(TInt aSize, const TDesC& aDbName) { - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, CSQLSRVDATABASE_COMPACTL_ENTRY, "Entry;0x%X;CSqlSrvDatabase::CompactL;aSize=%d;aDbName=%S", (TUint)this, aSize, __SQLPRNSTR(aDbName))); - __ASSERT_DEBUG(aSize > 0 || aSize == RSqlDatabase::EMaxCompaction, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aSize > 0 || aSize == RSqlDatabase::EMaxCompaction, ESqlPanicBadArgument); TInt pageSize = PageSizeL(aDbName);//PageSizeL() will disable/enable the authorizer TInt pageCount = KMaxTInt; if(aSize > 0) @@ -930,7 +906,6 @@ __SQLLEAVE_IF_ERROR(::DbCompact(iDbHandle, aDbName, pageCount, pageCount)); CleanupStack::PopAndDestroy(); } - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, CSQLSRVDATABASE_COMPACTL_EXIT, "Exit;0x%X;CSqlSrvDatabase::CompactL;pageCount=%d;pageSize=%d", (TUint)this, pageCount, pageSize)); return pageCount * pageSize; } @@ -968,7 +943,7 @@ void CSqlSrvDatabase::AttachCleanup(void* aCleanup) { TAttachCleanup* cleanup = reinterpret_cast (aCleanup); - __ASSERT_DEBUG(cleanup != NULL, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(cleanup != NULL, ESqlPanicBadArgument); (void)cleanup->iSelf.FinalizeAttachedDb(cleanup->iDbName); } @@ -1103,17 +1078,17 @@ { //No, it is not in the map. Read the security policies from the security policies tables and //insert a new item in the map. - __ASSERT_DEBUG(aMapKey != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aMapKey != NULL, ESqlPanicInternalError); aMapKey = ::CreateStrCopyLC(aMapKey); CSqlSecurityPolicy* securityPolicy = aAttachedDb ? ::LoadAttachedDbSecurityPolicyLC(aFileData) : ::LoadDbSecurityPolicyLC(iDbHandle); - __ASSERT_DEBUG(!::SqlServer().SecurityMap().Entry(aMapKey), __SQLPANIC2(ESqlPanicObjExists)); + __SQLASSERT(!::SqlServer().SecurityMap().Entry(aMapKey), ESqlPanicObjExists); __SQLLEAVE_IF_ERROR(::SqlServer().SecurityMap().Insert(aMapKey, securityPolicy)); CleanupStack::Pop(2);//iSecurityMap owns aMapKey and securityPolicy objects aSecurityPolicy = securityPolicy; } - __ASSERT_DEBUG(aMapKey != NULL, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(aSecurityPolicy != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aMapKey != NULL, ESqlPanicInternalError); + __SQLASSERT(aSecurityPolicy != NULL, ESqlPanicInternalError); } /** @@ -1142,7 +1117,6 @@ */ void CSqlSrvDatabase::RemoveFromMapsL(const TDesC& aDbName) { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVDATABASE_REMOVEFROMMAPSL, "0x%X;CSqlSrvDatabase::RemoveFromMapsL;aDbName=%S", (TUint)this, __SQLPRNSTR(aDbName))); TPtr8 ptr(iFileNameBuf, sizeof(iFileNameBuf)); if(!::UTF16ToUTF8Z(aDbName, ptr)) { @@ -1173,7 +1147,6 @@ */ void CSqlSrvDatabase::InsertInAttachDbMapL(const TDesC& aDbFileName, const TDesC& aDbName) { - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, CSQLSRVDATABASE_INSERTINATTACHDBMAPL, "0x%X;CSqlSrvDatabase::InsertInAttachDbMapL;aDbFileName=%S;aDbName=%S", (TUint)this, __SQLPRNSTR(aDbFileName), __SQLPRNSTR(aDbName))); //Convert aDbName to UTF8, zero-terminated name TPtr8 ptr(iFileNameBuf, sizeof(iFileNameBuf)); if(!::UTF16ToUTF8Z(aDbName, ptr)) @@ -1183,7 +1156,7 @@ const TUint8* mapKey = ::CreateStrCopyLC(iFileNameBuf); const TUint8* mapData = SecurityMapKeyL(aDbFileName); mapData = ::CreateStrCopyLC(mapData); - __ASSERT_DEBUG(!iAttachDbMap.Entry(mapKey), __SQLPANIC(ESqlPanicObjExists)); + __SQLASSERT(!iAttachDbMap.Entry(mapKey), ESqlPanicObjExists); __SQLLEAVE_IF_ERROR(iAttachDbMap.Insert(mapKey, mapData)); CleanupStack::Pop(2);//iAttachDbMap owns mapKey amd mapData. } @@ -1205,7 +1178,7 @@ */ void CSqlSrvDatabase::ProcessSettingsL(const TSqlSrvFileData& aFileData, const TDesC& aDbName) { - __ASSERT_DEBUG(!aFileData.IsReadOnly(), __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(!aFileData.IsReadOnly(), ESqlPanicInternalError); #if !defined(__SQL_DISABLE_SYMBIAN_SETTINGS_TABLE__) //Make the journal file persistent - done by SQLite automatically because the locking mode is EXCLUSIVE //__SQLLEAVE_IF_ERROR(::ExecPragma(iDbHandle, iAuthorizerDisabled, KPersistentJournalPragma, KPersist, aDbName)); @@ -1218,7 +1191,7 @@ TSqlCompactionMode compactionMode = currVacuumMode == ESqliteVacuumOff ? ESqlCompactionManual : ESqlCompactionNotSet; TSqlDbSysSettings dbSettings(iDbHandle); dbSettings.LoadSettingsL(aDbName, storedCollationDllName, storedDbConfigFileVer, compactionMode); - __ASSERT_DEBUG(currVacuumMode == ESqliteVacuumOff ? compactionMode == ESqlCompactionManual : 1, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(currVacuumMode == ESqliteVacuumOff ? compactionMode == ESqlCompactionManual : 1, ESqlPanicInternalError); if(aFileData.ContainHandles() && aFileData.IsCreated()) { compactionMode = aFileData.ConfigParams().iCompactionMode; @@ -1262,7 +1235,6 @@ //Check whether reindexing is necessary if(::SqlServer().CollationDllName().CompareF(aStoredCollationDllName) != 0) { - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, CSQLSRVDATABASE_APPLYCONFIGUPDATES2L, "0x%X;CSqlSrvDatabase::ApplyConfigUpdatesL;Reindex db;aStoredCollationDllName=%S;aDbName=%S", (TUint)this, __SQLPRNSTR(aStoredCollationDllName), __SQLPRNSTR(aDbName))); dbSettings.ReindexDatabaseL(aDbName, ::SqlServer().CollationDllName()); } @@ -1273,7 +1245,7 @@ TRAPD(err, dbSettings.ConfigureDatabaseL(aStoredDbConfigFileVersion, aFileData, aDbName)); if(KErrNone != err) { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVDATABASE_APPLYCONFIGUPDATESL, "0x%X;CSqlSrvDatabase::ApplyConfigUpdatesL;ConfigureDatabaseL() failed with error code %d", (TUint)this, err)); + __SQLLOG_ERR(_L("SQLLOG: CSqlSrvDatabase::ApplyConfigUpdatesL() - ConfigureDatabaseL() failed with error code %d"), err); } } @@ -1290,17 +1262,17 @@ */ void CSqlSrvDatabase::SetConfigL(const TSqlSrvConfigParams& aConfigParams, TBool aSetPageSize, const TDesC& aLogicalDbName) { - __ASSERT_DEBUG(aConfigParams.iPageSize == TSqlSrvConfigParams::KConfigPrmValueNotSet || aConfigParams.iPageSize >= 0, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aConfigParams.iCacheSize == TSqlSrvConfigParams::KConfigPrmValueNotSet || aConfigParams.iCacheSize >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aConfigParams.iPageSize == TSqlSrvConfigParams::KConfigPrmValueNotSet || aConfigParams.iPageSize >= 0, ESqlPanicBadArgument); + __SQLASSERT(aConfigParams.iCacheSize == TSqlSrvConfigParams::KConfigPrmValueNotSet || aConfigParams.iCacheSize >= 0, ESqlPanicBadArgument); if(aSetPageSize && aConfigParams.iPageSize != TSqlSrvConfigParams::KConfigPrmValueNotSet) { __SQLLEAVE_IF_ERROR(::ExecPragma(iDbHandle, iAuthorizerDisabled, KPageSizePragma, aConfigParams.iPageSize)); } const TDesC& logicalDbName = aLogicalDbName.Length() > 0 ? aLogicalDbName : KMainDb16; - + ::SetJournalSizeLimitL(iDbHandle, iAuthorizerDisabled, aConfigParams.iPageSize, logicalDbName); - + //Setting the cache size. //Step 1: Check if aConfigParams.iCacheSize value is set. If it is set, then use it. if(aConfigParams.iCacheSize != TSqlSrvConfigParams::KConfigPrmValueNotSet) @@ -1312,8 +1284,8 @@ //Step 2: aConfigParams.iCacheSize value is not set. Then check if aConfigParams.iSoftHeapLimitKb value is set. if(aConfigParams.iSoftHeapLimitKb != TSqlSrvConfigParams::KConfigPrmValueNotSet) { - __ASSERT_DEBUG(aConfigParams.iSoftHeapLimitKb >= TSqlSrvConfigParams::KMinSoftHeapLimitKb && - aConfigParams.iSoftHeapLimitKb <= TSqlSrvConfigParams::KMaxSoftHeapLimitKb, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aConfigParams.iSoftHeapLimitKb >= TSqlSrvConfigParams::KMinSoftHeapLimitKb && + aConfigParams.iSoftHeapLimitKb <= TSqlSrvConfigParams::KMaxSoftHeapLimitKb, ESqlPanicInternalError); //Step 3: aConfigParams.iSoftHeapLimitKb value is set. Then use it to calculate the cache size. But we need the page size first. // aLogicalDbName is used instead of logicalDbName because PageSizeL() if called with non-zero length name, // "thinks" it is the main database name. KMainDb16 will be interpreted as an attached database name. @@ -1354,10 +1326,10 @@ void CSqlSrvDatabase::InitCompactionL(TSqlCompactionMode aCompactionMode, TInt aFreePageThresholdKb, const TDesC& aDbFileName, TSqliteVacuumMode aCurrentVacuumMode, const TDesC& aDbName) { - __ASSERT_DEBUG(aCompactionMode == ESqlCompactionManual || aCompactionMode == ESqlCompactionBackground || aCompactionMode == ESqlCompactionAuto, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aCurrentVacuumMode == ESqliteVacuumOff || aCurrentVacuumMode == ESqliteVacuumAuto || - aCurrentVacuumMode == ESqliteVacuumIncremental, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aFreePageThresholdKb >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aCompactionMode == ESqlCompactionManual || aCompactionMode == ESqlCompactionBackground || aCompactionMode == ESqlCompactionAuto, ESqlPanicBadArgument); + __SQLASSERT(aCurrentVacuumMode == ESqliteVacuumOff || aCurrentVacuumMode == ESqliteVacuumAuto || + aCurrentVacuumMode == ESqliteVacuumIncremental, ESqlPanicBadArgument); + __SQLASSERT(aFreePageThresholdKb >= 0, ESqlPanicBadArgument); TSqliteVacuumMode newSqliteVacuumMode = aCompactionMode == ESqlCompactionAuto ? ESqliteVacuumAuto : ESqliteVacuumIncremental; if(aCurrentVacuumMode == ESqliteVacuumOff) { @@ -1390,7 +1362,6 @@ */ void CSqlSrvDatabase::NewCompactEntryL(TInt aFreePageThresholdKb, const TDesC& aDbFileName, const TDesC& aDbName) { - SQL_TRACE_INTERNALS(OstTraceExt4(TRACE_INTERNALS, CSQLSRVDATABASE_NEWCOMPACTENTRYL_ENTRY, "Entry;0x%X;CSqlSrvDatabase::NewCompactEntryL;aFreePageThresholdKb=%d;aDbFileName=%S;aDbName=%S", (TUint)this, aFreePageThresholdKb, __SQLPRNSTR(aDbFileName), __SQLPRNSTR(aDbName))); TSqlCompactSettings settings; settings.iFreePageThresholdKb = aFreePageThresholdKb; ::SqlServer().Compactor().AddEntryL(aDbFileName, settings); @@ -1399,7 +1370,7 @@ HBufC* data = aDbFileName.Alloc(); if(key && data) { - __ASSERT_DEBUG(!iCompactDbMap.Entry(key), __SQLPANIC(ESqlPanicObjExists)); + __SQLASSERT(!iCompactDbMap.Entry(key), ESqlPanicObjExists); err = iCompactDbMap.Insert(key, data);//returns the index of the new entry } if(err < 0) //If either "key" or "data" or both is NULL, then "err" is KErrNoMemory and the next "if" will be executed. @@ -1408,7 +1379,6 @@ delete key; ::SqlServer().Compactor().ReleaseEntry(aDbFileName); } - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVDATABASE_NEWCOMPACTENTRYL_EXIT, "Exit;0x%X;CSqlSrvDatabase::NewCompactEntryL;err=%d", (TUint)this, err)); __SQLLEAVE_IF_ERROR(err); } @@ -1430,7 +1400,6 @@ { ::SqlServer().Compactor().ReleaseEntry(*compactDbPair.iData); iCompactDbMap.Remove(compactDbPair.iKey); - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, CSQLSRVDATABASE_RELEASECOMPACTENTRY, "0x%X;CSqlSrvDatabase::ReleaseCompactEntry", (TUint)this)); break; } } @@ -1450,7 +1419,7 @@ void CSqlSrvDatabase::CompactCleanup(void* aCleanup) { CSqlSrvDatabase* self = reinterpret_cast (aCleanup); - __ASSERT_DEBUG(self != NULL, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(self != NULL, ESqlPanicBadArgument); self->ReleaseCompactEntry(KMainDb16); } @@ -1478,7 +1447,7 @@ TInt pageSize = 0; __SQLLEAVE_IF_ERROR(::DbPageSize(iDbHandle, aDbName, pageSize)); CleanupStack::PopAndDestroy(); - __ASSERT_DEBUG(pageSize > 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(pageSize > 0, ESqlPanicInternalError); if(aDbName == KNullDesC) { iPageSize = pageSize; @@ -1506,13 +1475,13 @@ */ void CSqlSrvDatabase::ConstructCreateSecureL(const TSqlSrvFileData& aFileData, CSqlSecurityPolicy* aSecurityPolicy) { - __ASSERT_DEBUG(aSecurityPolicy != NULL, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aSecurityPolicy != NULL, ESqlPanicBadArgument); //Insert a new item in the security policies map. CleanupStack::PushL(aSecurityPolicy); const TUint8* mapKey = SecurityMapKeyL(aFileData.FileName()); mapKey = ::CreateStrCopyLC(mapKey); - __ASSERT_DEBUG(!::SqlServer().SecurityMap().Entry(mapKey), __SQLPANIC(ESqlPanicObjExists)); - __SQLLEAVE_IF_ERROR(::SqlServer().SecurityMap().Insert(mapKey, aSecurityPolicy)); + __SQLASSERT(!::SqlServer().SecurityMap().Entry(mapKey), ESqlPanicObjExists); + __SQLLEAVE_IF_ERROR(::SqlServer().SecurityMap().Insert(mapKey, aSecurityPolicy)); CleanupStack::Pop(2);//iSecurityMap owns mapKey and aSecurityPolicy. iSecureDbName = mapKey; iSecurityPolicy = aSecurityPolicy; @@ -1549,8 +1518,8 @@ //If the method fails and the error is not KErrAlreadyExists, the database file will be closed and deleted. void CSqlSrvDatabase::DoCommonConstructCreateL(const TSqlSrvFileData& aFileData, TBool aSecureDb) { - __ASSERT_DEBUG(!iDbHandle, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(aSecureDb ? iSecurityPolicy != NULL : ETrue, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(!iDbHandle, ESqlPanicInternalError); + __SQLASSERT(aSecureDb ? iSecurityPolicy != NULL : ETrue, ESqlPanicInternalError); CreateNewDbFileL(aFileData); TDbFileCleanup dbFileCleanup(aFileData, iDbHandle); CleanupStack::PushL(TCleanupItem(&DbFileCleanup, &dbFileCleanup)); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvDatabase.inl --- a/persistentstorage/sql/SRC/Server/SqlSrvDatabase.inl Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvDatabase.inl Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -144,7 +144,7 @@ */ inline sqlite3* CSqlSrvDatabase::RawDbHandle() const { - __ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iDbHandle != NULL, ESqlPanicInternalError); return iDbHandle; } @@ -224,7 +224,7 @@ */ inline void CSqlSrvDatabase::StoreSettingsL(const TDesC& aCollationDllName, TInt aDbConfigFileVersion, TSqlCompactionMode aCompactionMode) { - __ASSERT_DEBUG(aCompactionMode == ESqlCompactionManual || aCompactionMode == ESqlCompactionBackground || aCompactionMode == ESqlCompactionAuto, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aCompactionMode == ESqlCompactionManual || aCompactionMode == ESqlCompactionBackground || aCompactionMode == ESqlCompactionAuto, ESqlPanicBadArgument); #if !defined(__SQL_DISABLE_SYMBIAN_SETTINGS_TABLE__) TSqlDbSysSettings dbSettings(iDbHandle); dbSettings.StoreSettingsL(KMainDb16, aCollationDllName, aDbConfigFileVersion, aCompactionMode); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.cpp --- a/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -29,11 +29,6 @@ #include "SqlSrvStrings.h" //System table names #include "SqlSrvUtil.h" //Global functions #include "SqlSrvFileData.h" //TSqlSrvFileData -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlSrvDbSysSettingsTraces.h" -#endif -#include "SqlTraceDef.h" extern TBool IsStatementSupported(const TDesC& aStatementIn, const TDesC& aDbName, TDes& aStatementOut); @@ -110,7 +105,7 @@ //Panic SqlDb 4 In _DEBUG mode if aHandle argument is NULL. static void FinalizeStatementHandle(void* aHandle) { - __ASSERT_DEBUG(aHandle != NULL, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aHandle != NULL, ESqlPanicBadArgument); sqlite3_stmt* stmtHandle = static_cast (aHandle); (void)sqlite3_finalize(stmtHandle); } @@ -119,7 +114,7 @@ //Panic SqlDb 4 In _DEBUG mode if aDbHandle argument is NULL. static void RollbackTransaction(void* aDbHandle) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicBadArgument); (void)::DbExecStmt8(reinterpret_cast (aDbHandle), KRollbackTransactionSql); } @@ -137,7 +132,7 @@ TSqlDbSysSettings::TSqlDbSysSettings(sqlite3* aDbHandle) : iDbHandle(aDbHandle) { - __ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(iDbHandle != NULL, ESqlPanicBadArgument); } /** @@ -152,7 +147,7 @@ */ void TSqlDbSysSettings::StoreSecurityPolicyL(const CSqlSecurityPolicy& aSecurityPolicyCon) { - __ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iDbHandle != NULL, ESqlPanicInvalidObj); __SQLLEAVE_IF_ERROR(::DbExecStmt8(iDbHandle, KBeginTransactionSql())); CleanupStack::PushL(TCleanupItem(&RollbackTransaction, iDbHandle)); __SQLLEAVE_IF_ERROR(::DbExecStmt8(iDbHandle, KCreateSecuritySql())); @@ -181,8 +176,8 @@ */ void TSqlDbSysSettings::StoreSettingsL(const TDesC& aDbName, const TDesC& aCollationDllName, TInt aDbConfigFileVersion, TSqlCompactionMode aCompactionMode) { - __ASSERT_DEBUG(aCompactionMode == ESqlCompactionManual || aCompactionMode == ESqlCompactionBackground || aCompactionMode == ESqlCompactionAuto, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(aCompactionMode == ESqlCompactionManual || aCompactionMode == ESqlCompactionBackground || aCompactionMode == ESqlCompactionAuto, ESqlPanicBadArgument); + __SQLASSERT(iDbHandle != NULL, ESqlPanicInvalidObj); HBufC* buf = HBufC::NewLC(Max((TInt)sizeof(KDropSettingsSql), Max((TInt)sizeof(KCreateSettingsSql), (TInt)sizeof(KInsertSettingsSql))) + aDbName.Length() + aCollationDllName.Length() + 10); @@ -221,7 +216,7 @@ */ void TSqlDbSysSettings::LoadSecurityPolicyL(CSqlSecurityPolicy& aSecurityPolicyCon) { - __ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iDbHandle != NULL, ESqlPanicInvalidObj); //Even if the version of the system settings is bigger than the current one (KSqlSystemVersion constant), //I think that all future modifications of the system tables shall not affect the already existing //fields. So it is correct to think that all information available in version 1 should be available @@ -294,7 +289,7 @@ */ void TSqlDbSysSettings::LoadSettingsL(const TDesC& aDbName, TDes& aCollationDllName, TInt& aDbConfigFileVersion, TSqlCompactionMode& aCompactionMode) { - __ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iDbHandle != NULL, ESqlPanicInvalidObj); aCollationDllName.Zero(); aDbConfigFileVersion = KSqlNullDbConfigFileVersion; @@ -324,7 +319,7 @@ StoreSettingsL(aDbName, aCollationDllName, aDbConfigFileVersion, aCompactionMode); // store empty collation dll name, then reindexing will occur } } - __ASSERT_DEBUG(aCompactionMode == ESqlCompactionManual || aCompactionMode == ESqlCompactionBackground || aCompactionMode == ESqlCompactionAuto, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aCompactionMode == ESqlCompactionManual || aCompactionMode == ESqlCompactionBackground || aCompactionMode == ESqlCompactionAuto, ESqlPanicInternalError); } /** @@ -350,7 +345,7 @@ void TSqlDbSysSettings::GetSettingsL(const TDesC& aDbName, TDes& aCollationDllName, TInt& aDbConfigFileVersion, TInt& aSettingsVersion, TSqlCompactionMode& aCompactionMode) { - __ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iDbHandle != NULL, ESqlPanicInvalidObj); HBufC* buf = HBufC::NewLC(sizeof(KGetSettingsSql) + aDbName.Length()); TPtr sql = buf->Des(); @@ -394,7 +389,7 @@ const void* ptr = sqlite3_column_text16(stmtHandle, KCollationDllNameColIdx); //Null column value - this might be an indication of an "out of memory" problem, if the column text //is in UTF8 format. (sqlite3_column_text16() may allocate memory for UTF8->UTF16 conversion) - __SQLLEAVE_IF_NULL(const_cast(ptr)); + __SQLLEAVE_IF_NULL(ptr); TPtrC16 src(reinterpret_cast (ptr)); if(src.Length() > aCollationDllName.MaxLength()) { @@ -428,7 +423,7 @@ */ void TSqlDbSysSettings::ReindexDatabaseL(const TDesC& aDbName, const TDesC& aCurrentCollationDllName) { - __ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iDbHandle != NULL, ESqlPanicInvalidObj); //Allocate memory for the SQL statements HBufC* buf = HBufC::NewLC(Max((TInt)sizeof(KUpdateCollationSettingsSql), (TInt)sizeof(KReindexSql)) + @@ -480,15 +475,12 @@ void TSqlDbSysSettings::ConfigureDatabaseL(TInt aStoredDbConfigFileVersion, const TSqlSrvFileData& aFileData, const TDesC& aDbName) { - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, TSQLDBSYSSETTINGS_CONFIGUREDATABASEL_ENTRY, "Entry;0x%X;TSqlDbSysSettings::ConfigureDatabaseL", (TUint)this)); - - __ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iDbHandle != NULL, ESqlPanicInvalidObj); if(!aFileData.IsSecureFileNameFmt()) { //As a first implementation, config files will only be supported for //shared, secure databases - not for private, secure databases or public databases - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, TSQLDBSYSSETTINGS_CONFIGUREDATABASEL_EXIT1, "Exit;0x%X;TSqlDbSysSettings::ConfigureDatabaseL;Not a secure db", (TUint)this)); return; } @@ -522,13 +514,13 @@ if(fileVersion > aStoredDbConfigFileVersion) { //The latest version of the configuration file has not yet been processed, so do it now - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, TSQLDBSYSSETTINGS_CONFIGUREDATABASEL1, "0x%X;TSqlDbSysSettings::ConfigureDatabaseL;Config file '%S'", (TUint)this, __SQLPRNSTR(configFileName))); + __SQLLOG_STRING(_L("SQLLOG: TSqlDbSysSettings::ConfigureDatabaseL() - Processing config file %S"), configFileName); ExecuteConfigurationUpdateL(aFileData, configFileName, fileVersion, aDbName); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, TSQLDBSYSSETTINGS_CONFIGUREDATABASEL2, "0x%X;TSqlDbSysSettings::ConfigureDatabaseL;Config file '%S' was processed, no errors", (TUint)this, __SQLPRNSTR(configFileName))); + __SQLLOG_STRING(_L("SQLLOG: TSqlDbSysSettings::ConfigureDatabaseL() - SUCCESS! Config file %S was processed"), configFileName); } else { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, TSQLDBSYSSETTINGS_CONFIGUREDATABASEL3, "0x%X;TSqlDbSysSettings::ConfigureDatabaseL;Config file '%S' as this or a later version has already been processed", (TUint)this, __SQLPRNSTR(configFileName))); + __SQLLOG_STRING(_L("SQLLOG: TSqlDbSysSettings::ConfigureDatabaseL() - Not processing config file %S as this or a later version has already been processed"), configFileName); } } else @@ -545,10 +537,9 @@ } else { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, TSQLDBSYSSETTINGS_CONFIGUREDATABASEL4, "0x%X;TSqlDbSysSettings::ConfigureDatabaseL;No config file found for database '%S'", (TUint)this, __SQLPRNSTR(dbFileNameAndExt))); + __SQLLOG_STRING(_L("SQLLOG: TSqlDbSysSettings::ConfigureDatabaseL() - No config file found for database %S"), dbFileNameAndExt); } } - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, TSQLDBSYSSETTINGS_CONFIGUREDATABASEL_EXIT2, "Exit;0x%X;TSqlDbSysSettings::ConfigureDatabaseL", (TUint)this)); } /** @@ -574,7 +565,7 @@ TInt aDbConfigFileVersion, const TDesC& aDbName) { - __ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iDbHandle != NULL, ESqlPanicInvalidObj); //Execute the specified database config file operations that are supported #ifdef SYSLIBS_TEST @@ -618,7 +609,7 @@ */ void TSqlDbSysSettings::DoExecuteDbConfigFileOpsL(RFs& aFs, const TDesC& aConfigFilePath, const TDesC& aDbName) { - __ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iDbHandle != NULL, ESqlPanicInvalidObj); //Open the config file and read it into a buffer RFile64 file; @@ -629,7 +620,7 @@ if(size == 0) { //Config file is empty so just return - SQL_TRACE_INTERNALS(OstTraceExt1(TRACE_INTERNALS, TSQLDBSYSSETTINGS_DOEXECUTEDBCONFIGFILEOPSL, "0;TSqlDbSysSettings::DoExecuteDbConfigFileOpsL();Config file %S is empty", __SQLPRNSTR(aConfigFilePath))); + __SQLLOG_STRING(_L("SQLLOG: TSqlDbSysSettings::DoExecuteDbConfigFileOpsL() - Config file %S is empty"), aConfigFilePath); CleanupStack::PopAndDestroy(); // file return; } @@ -700,12 +691,12 @@ */ void TSqlDbSysSettings::ProcessStatementL(const TDesC& aStmt, const TDesC& aDbName) { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, TSQLDBSYSSETTINGS_PROCESSSTATEMENTL_ENTRY, "Entry;0x%X;TSqlDbSysSettings::ProcessStatementL;Processing statement '%S'", (TUint)this, __SQLPRNSTR(aStmt))); + __SQLLOG_STRING(_L("SQLLOG: TSqlDbSysSettings::ProcessStatementL() - Processing statement '%S'"), aStmt); //If the statement only contained whitespace then just return if(aStmt.Length() == 0) { - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, TSQLDBSYSSETTINGS_PROCESSSTATEMENTL_EXIT1, "Exit;0x%X;TSqlDbSysSettings::ProcessStatementL;The statement ignored because contains only whitespace", (TUint)this)); + __SQLLOG_STRING(_L("SQLLOG: TSqlDbSysSettings::ProcessStatementL() - Statement '%S' only contains whitespace - statement will be ignored"), aStmt); return; } @@ -714,7 +705,7 @@ { //The statement contains '//' which is an unsupported comment style, but rather //than leave here and cause the full file to fail, we just ignore this statement - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, TSQLDBSYSSETTINGS_PROCESSSTATEMENTL_EXIT2, "Exit;0x%X;TSqlDbSysSettings::ProcessStatementL;The statement ignored because contains invalid comment style", (TUint)this)); + __SQLLOG_STRING(_L("SQLLOG: TSqlDbSysSettings::ProcessStatementL() - Statement '%S' contains invalid comment style - statement will be ignored"), aStmt); return; } @@ -726,11 +717,11 @@ TInt err = ::DbExecStmt16(iDbHandle, stmtPtr); if(KErrNone == err) { - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, TSQLDBSYSSETTINGS_PROCESSSTATEMENTL1, "0x%X;TSqlDbSysSettings::ProcessStatementL;Successfully executed statement", (TUint)this)); + __SQLLOG_STRING(_L("SQLLOG: TSqlDbSysSettings::ProcessStatementL() - Successfully executed statement '%S'"), aStmt); } else { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, TSQLDBSYSSETTINGS_PROCESSSTATEMENTL2, "0x%X;TSqlDbSysSettings::ProcessStatementL;Failed to execute the statement;err=%d", (TUint)this, err)); + __SQLLOG_ERR(_L("SQLLOG: TSqlDbSysSettings::ProcessStatementL() - Failed to execute the statement, err=%d"), err); if(err == KErrNoMemory) { __SQLLEAVE(err); @@ -739,10 +730,9 @@ } else { - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, TSQLDBSYSSETTINGS_PROCESSSTATEMENTL3, "0x%X;TSqlDbSysSettings::ProcessStatementL;Non-supported statement, will be ignored", (TUint)this)); + __SQLLOG_STRING(_L("SQLLOG: TSqlDbSysSettings::ProcessStatementL() - Non-supported statement, will be ignored - '%S'"), aStmt); } CleanupStack::PopAndDestroy(); // stmtBuf - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, TSQLDBSYSSETTINGS_PROCESSSTATEMENTL_EXIT3, "Exit;0x%X;TSqlDbSysSettings::ProcessStatementL", (TUint)this)); } @@ -805,7 +795,7 @@ void TSqlDbSysSettings::StoreSecurityPolicyL(sqlite3_stmt* aStmtHandle, TInt aObjType, const TDesC& aObjName, TInt aPolicyType, const TSecurityPolicy& aPolicy) { - __ASSERT_DEBUG(aStmtHandle != NULL, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aStmtHandle != NULL, ESqlPanicBadArgument); __SQLLEAVE_IF_ERROR(::StmtReset(aStmtHandle)); __SQLLEAVE_IF_ERROR(BindSecurityPolicyPrm(aStmtHandle, aObjType, aObjName, aPolicyType, aPolicy)); __SQLLEAVE_IF_ERROR(::StmtExec(aStmtHandle)); @@ -864,7 +854,7 @@ TSecurityPolicy TSqlDbSysSettings::ReadCurrSecurityPolicyL(sqlite3_stmt* aStmtHandle, TInt& aObjType, TPtrC& aObjName, TInt& aPolicyType) { - __ASSERT_DEBUG(aStmtHandle != NULL, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aStmtHandle != NULL, ESqlPanicBadArgument); aObjType = sqlite3_column_int(aStmtHandle, KObjTypeColIdx); //The "ObjectName" column type might be different than SQLITE_TEXT - malformed database. if(sqlite3_column_type(aStmtHandle, KObjNameColIdx) != SQLITE_TEXT) @@ -874,7 +864,7 @@ const void* text = sqlite3_column_text16(aStmtHandle, KObjNameColIdx); //Null column value - this might be an indication of an "out of memory" problem, if the column text //is in UTF8 format. (sqlite3_column_text16() may allocate memory for UTF8->UTF16 conversion) - __SQLLEAVE_IF_NULL(const_cast(text)); + __SQLLEAVE_IF_NULL(text); TInt len = (TUint)sqlite3_column_bytes16(aStmtHandle, KObjNameColIdx) / sizeof(TUint16); aObjName.Set(reinterpret_cast (text), len); aPolicyType = sqlite3_column_int(aStmtHandle, KObjPolicyTypeColIdx); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.h --- a/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,7 +18,7 @@ #ifndef __SQLSRVDBSYSSETTINGS_H__ #define __SQLSRVDBSYSSETTINGS_H__ -#include "SqlAssert.h" // ESqlPanicInternalError +#include "SqlPanic.h" // __SQLASSERT, ESqlPanicInternalError #include "SqlUtil.h" // TSqlCompactionMode //Forward declarations diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvDriveSpace.cpp --- a/persistentstorage/sql/SRC/Server/SqlSrvDriveSpace.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvDriveSpace.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2004-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" @@ -16,12 +16,7 @@ // #include "SqlSrvDriveSpace.h" -#include "SqlAssert.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlSrvDriveSpaceTraces.h" -#endif -#include "SqlTraceDef.h" +#include "SqlPanic.h" /** The amount of the disk space, which will be reserved at the moment of creation of @@ -57,12 +52,10 @@ */ CSqlDriveSpace* CSqlDriveSpace::NewLC(RFs& aFs, TDriveNumber aDrive) { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLDRIVESPACE_NEWLC_ENTRY, "Entry;0;CSqlDriveSpace::NewLC;aFs.Handle()=0x%X;aDrive=%d", (TUint)aFs.Handle(), (TInt)aDrive)); - __ASSERT_DEBUG(aDrive >= EDriveA && aDrive <= EDriveZ, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDrive >= EDriveA && aDrive <= EDriveZ, ESqlPanicBadArgument); CSqlDriveSpace* self = new (ELeave) CSqlDriveSpace(aFs, aDrive); CleanupStack::PushL(self); self->ConstructL(); - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, CSQLDRIVESPACE_NEWLC_EXIT, "Exit;0x%X;CSqlDriveSpace::NewLC", (TUint)self)); return self; } @@ -71,7 +64,6 @@ */ CSqlDriveSpace::~CSqlDriveSpace() { - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, CSQLDRIVESPACE_CSQLDRIVESPACE2, "0x%X;CSqlDriveSpace::~CSqlDriveSpace;iDrive=%d;iGetAccessRefCnt=%d", (TUint)this, (TInt)iDrive, iGetAccessRefCnt)); SQLDRIVESPACE_INVARIANT(); (void)iFs.ReleaseReserveAccess(static_cast (iDrive)); (void)iFs.ReserveDriveSpace(static_cast (iDrive), 0); @@ -90,7 +82,6 @@ */ void CSqlDriveSpace::GetAccessL() { - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, CSQLDRIVESPACE_GETACCESSL_ENTRY, "Entry;0x%X;CSqlDriveSpace::GetAccessL;iDrive=%d;iGetAccessRefCnt=%d", (TUint)this, (TInt)iDrive, iGetAccessRefCnt)); SQLDRIVESPACE_INVARIANT(); //Gets an access only once, there is only one RFs session instance. if(iGetAccessRefCnt == 0) @@ -98,7 +89,6 @@ __SQLLEAVE_IF_ERROR(iFs.GetReserveAccess(static_cast (iDrive))); } ++iGetAccessRefCnt; - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, CSQLDRIVESPACE_GETACCESSL_EXIT, "Exit;0x%X;CSqlDriveSpace::GetAccessL;iDrive=%d;iGetAccessRefCnt=%d", (TUint)this, (TInt)iDrive, iGetAccessRefCnt)); SQLDRIVESPACE_INVARIANT(); } @@ -113,7 +103,6 @@ */ void CSqlDriveSpace::ReleaseAccess() { - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, CSQLDRIVESPACE_RELEASEACCESS, "0x%X;CSqlDriveSpace::ReleaseAccess;iDrive=%d;iGetAccessRefCnt=%d", (TUint)this, (TInt)iDrive, iGetAccessRefCnt)); SQLDRIVESPACE_INVARIANT(); if(iGetAccessRefCnt == 0) { @@ -138,7 +127,7 @@ iFs(aFs), iDrive(aDrive) { - __ASSERT_DEBUG(aDrive >= EDriveA && aDrive <= EDriveZ, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aDrive >= EDriveA && aDrive <= EDriveZ, ESqlPanicBadArgument); } /** @@ -163,8 +152,8 @@ */ void CSqlDriveSpace::Invariant() const { - __ASSERT_DEBUG(iDrive >= EDriveA && iDrive <= EDriveZ, __SQLPANIC(ESqlPanicInternalError)); - __ASSERT_DEBUG(iGetAccessRefCnt >= 0, __SQLPANIC(ESqlPanicMisuse)); + __SQLASSERT(iDrive >= EDriveA && iDrive <= EDriveZ, ESqlPanicInternalError); + __SQLASSERT(iGetAccessRefCnt >= 0, ESqlPanicMisuse); } #endif//_DEBUG @@ -213,7 +202,7 @@ */ CSqlDriveSpace* RSqlDriveSpaceCol::Find(TDriveNumber aDrive) { - __ASSERT_DEBUG(aDrive >= EDriveA && aDrive <= EDriveZ, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aDrive >= EDriveA && aDrive <= EDriveZ, ESqlPanicBadArgument); SQLDRIVESPACECOL_INVARIANT(); for(TInt index=iDriveSpaceCol.Count()-1;index>=0;--index) { @@ -241,8 +230,8 @@ */ CSqlDriveSpace* RSqlDriveSpaceCol::AddL(TDriveNumber aDrive) { - __ASSERT_DEBUG(aDrive >= EDriveA && aDrive <= EDriveZ, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(!Find(aDrive), __SQLPANIC(ESqlPanicMisuse)); + __SQLASSERT(aDrive >= EDriveA && aDrive <= EDriveZ, ESqlPanicBadArgument); + __SQLASSERT(!Find(aDrive), ESqlPanicMisuse); SQLDRIVESPACECOL_INVARIANT(); CSqlDriveSpace* drvSpace = CSqlDriveSpace::NewLC(*iFs, aDrive); __SQLLEAVE_IF_ERROR(iDriveSpaceCol.Append(drvSpace)); @@ -257,7 +246,7 @@ */ void RSqlDriveSpaceCol::Invariant() const { - __ASSERT_DEBUG(iFs != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iFs != NULL, ESqlPanicInternalError); for(TInt index=iDriveSpaceCol.Count()-1;index>=0;--index) { iDriveSpaceCol[index]->Invariant(); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvFileData.cpp --- a/persistentstorage/sql/SRC/Server/SqlSrvFileData.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvFileData.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -15,7 +15,7 @@ #include "SqlSrvFileData.h" #include "SqlSrvUtil.h" -#include "SqlAssert.h" +#include "SqlPanic.h" #include "SqlSrvStrings.h" #include "SqlSrvResourceProfiler.h" @@ -35,13 +35,13 @@ static void CreatePrivateDataPathL(RFs& aFs, TDriveNumber aDriveNumber) { TDriveInfo driveInfo; - __SQLLEAVE_IF_ERROR2(aFs.Drive(driveInfo, aDriveNumber)); + __SQLLEAVE_IF_ERROR(aFs.Drive(driveInfo, aDriveNumber)); if(!(driveInfo.iDriveAtt & KDriveAttRom)) { TInt err = aFs.CreatePrivatePath(aDriveNumber); if(err != KErrNone && err != KErrAlreadyExists) { - __SQLLEAVE2(err); + __SQLLEAVE(err); } } } @@ -114,16 +114,16 @@ static void DoFullFileNameL(TDes& aDbFileName, const TDesC& aSysDrivePrivatePath, TDriveNumber& aDrive) { TParse parse; - __SQLLEAVE_IF_ERROR2(parse.Set(aDbFileName, &aSysDrivePrivatePath, NULL)); + __SQLLEAVE_IF_ERROR(parse.Set(aDbFileName, &aSysDrivePrivatePath, NULL)); if(!parse.NamePresent()) { - __SQLLEAVE2(KErrBadName); + __SQLLEAVE(KErrBadName); } aDbFileName.Copy(parse.FullName()); TPtrC driveName = parse.Drive(); - __ASSERT_DEBUG(driveName.Length() > 0, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(driveName.Length() > 0, ESqlPanicInternalError); TInt driveNumber = -1; - __SQLLEAVE_IF_ERROR2(RFs::CharToDrive(driveName[0], driveNumber)); + __SQLLEAVE_IF_ERROR(RFs::CharToDrive(driveName[0], driveNumber)); aDrive = static_cast (driveNumber); } @@ -143,7 +143,7 @@ //If SQL server private path is in the file name - leave if(::IsPrivatePathInFileName(aDbFileName, aServerPrivatePath)) { - __SQLLEAVE2(KErrArgument); + __SQLLEAVE(KErrArgument); } //Extract database SID from the name aIsSecureFileNameFmt = ::IsSecureFileNameFmt(aDbFileName); @@ -198,8 +198,8 @@ #endif const TDesC8* aConfigStr) { - __ASSERT_DEBUG((TUint)aFileNameArgNum < KMaxMessageArguments, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(iSysDrivePrivatePath.DriveAndPath().Length() > 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT((TUint)aFileNameArgNum < KMaxMessageArguments, ESqlPanicBadArgument); + __SQLASSERT(iSysDrivePrivatePath.DriveAndPath().Length() > 0, ESqlPanicInternalError); if(aFileNameLen < 1 || aFileNameLen > KMaxFileName) { diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvMain.cpp --- a/persistentstorage/sql/SRC/Server/SqlSrvMain.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvMain.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -25,14 +25,10 @@ #include "SqlCompact.h" #include "SqlCompactConn.h" #include "SqlSrvResourceProfiler.h" +#include "UTraceSql.h" #ifdef _DEBUG #include #endif -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlSrvMainTraces.h" -#endif -#include "SqlTraceDef.h" #ifndef SQLSRV_STARTUP_TEST static @@ -70,7 +66,7 @@ //aRight argument is NULL. static TInt Compare(const TSqlSecurityPair& aLeft, const TSqlSecurityPair& aRight) { - __ASSERT_DEBUG(aLeft.iKey != NULL && aRight.iKey != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aLeft.iKey != NULL && aRight.iKey != NULL, ESqlPanicInternalError); return ::CompareNoCase8(TPtrC8(aLeft.iKey), TPtrC8(aRight.iKey)); } @@ -85,7 +81,7 @@ */ CSqlServer& SqlServer(void) { - __ASSERT_ALWAYS(TheServer != NULL, __SQLPANIC2(ESqlPanicInvalidObj)); + __SQLASSERT_ALWAYS(TheServer != NULL, ESqlPanicInvalidObj); return *TheServer; } @@ -99,11 +95,9 @@ */ CSqlServer* CSqlServer::NewLC() { - SQL_TRACE_INTERNALS(OstTrace0(TRACE_INTERNALS, CSQLSERVER_NEWLC_ENTRY, "Entry;0;CSqlServer::NewLC")); CSqlServer* self = new (ELeave) CSqlServer; CleanupStack::PushL(self); self->ConstructL(); - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, CSQLSERVER_NEWLC_EXIT, "Exit;0x%X;CSqlServer::NewLC", (TUint)self)); return self; } @@ -112,7 +106,6 @@ */ CSqlServer::~CSqlServer() { - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, CSQLSERVER_CSQLSERVER2_ENTRY, "Entry;0x%x;CSqlServer::~CSqlServer", (TUint)this)); delete iCompactor; delete iBackupClient; iDriveSpaceCol.ResetAndDestroy(); @@ -124,7 +117,8 @@ delete iDbConfigFiles; sqlite3SymbianLibFinalize(); TheServer = NULL; - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, CSQLSERVER_CSQLSERVER2_EXIT, "Exit;0x%x;CSqlServer::~CSqlServer", (TUint)this)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KSqlSrvClose)); + SQLPROFILER_SERVER_STOP(); } /** @@ -134,7 +128,7 @@ */ RSqlBufFlat& CSqlServer::GetFlatBufL(TInt aMinLen) { - __ASSERT_DEBUG(aMinLen >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aMinLen >= 0, ESqlPanicBadArgument); __SQLLEAVE_IF_ERROR(iFlatBuf.ReAlloc(aMinLen)); SQLPROFILER_REPORT_ALLOC(iFlatBuf.MaxSize()); return iFlatBuf; @@ -150,10 +144,10 @@ */ TDes8& CSqlServer::GetBuf8L(TInt aMinLen) { - __ASSERT_DEBUG(aMinLen >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aMinLen >= 0, ESqlPanicBadArgument); #ifdef _DEBUG - TInt maxBufLen = iBufPtr8.MaxLength(); - maxBufLen = maxBufLen; +TInt maxBufLen = iBufPtr8.MaxLength(); +maxBufLen = maxBufLen; #endif if(iBufPtr8.MaxLength() < aMinLen) { @@ -173,10 +167,10 @@ */ TDes16& CSqlServer::GetBuf16L(TInt aMinLen) { - __ASSERT_DEBUG(aMinLen >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aMinLen >= 0, ESqlPanicBadArgument); #ifdef _DEBUG - TInt maxBufLen = iBufPtr16.MaxLength(); - maxBufLen = maxBufLen; +TInt maxBufLen = iBufPtr16.MaxLength(); +maxBufLen = maxBufLen; #endif if(iBufPtr16.MaxLength() < aMinLen) { @@ -202,7 +196,7 @@ if(iBufPtr8.MaxSize() > KBufLimit) { (void)ReAllocBuf(KBufLimit); - __ASSERT_DEBUG(oldBuf == iBuf, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(oldBuf == iBuf, ESqlPanicInternalError); } } @@ -217,7 +211,7 @@ */ TInt CSqlServer::ReAllocBuf(TInt aNewBufSize) { - __ASSERT_DEBUG(aNewBufSize >= 0, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aNewBufSize >= 0, ESqlPanicBadArgument); #ifdef _DEBUG const TInt KMinBufSize = 8; #else @@ -307,8 +301,7 @@ #endif SQLPROFILER_SERVER_START(); //Configure the SQLite library - TInt sqliteErr = sqlite3_config(SQLITE_CONFIG_LOOKASIDE, KSqliteLookAsideCellSize, KSqliteLookAsideCellCount); - __SQLLEAVE_IF_ERROR(::Sql2OsErrCode(sqliteErr, KErrArgument)); + __SQLLEAVE_IF_ERROR(sqlite3_config(SQLITE_CONFIG_LOOKASIDE, KSqliteLookAsideCellSize, KSqliteLookAsideCellCount)); //Open SQLITE library - this must be the first call after StartL() (os_symbian.cpp, "TheAllocator" initialization rellated). __SQLLEAVE_IF_ERROR(sqlite3SymbianLibInit()); //Create buffers @@ -321,6 +314,7 @@ RFs& fs = sqlite3SymbianFs(); TFileName serverPrivatePath; __SQLLEAVE_IF_ERROR(fs.PrivatePath(serverPrivatePath)); + DeleteTempFilesL(sysDrive, serverPrivatePath); //Load config file parameter values (if config file exists) and initialize iFileData. TParse parse; @@ -334,8 +328,8 @@ const TSqlSrvConfigParams& configParams = iFileData.ConfigParams(); if(configParams.iSoftHeapLimitKb > 0) { - __ASSERT_DEBUG(configParams.iSoftHeapLimitKb >= TSqlSrvConfigParams::KMinSoftHeapLimitKb && - configParams.iSoftHeapLimitKb <= TSqlSrvConfigParams::KMaxSoftHeapLimitKb, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(configParams.iSoftHeapLimitKb >= TSqlSrvConfigParams::KMinSoftHeapLimitKb && + configParams.iSoftHeapLimitKb <= TSqlSrvConfigParams::KMaxSoftHeapLimitKb, ESqlPanicInternalError); sqlite3_soft_heap_limit(configParams.iSoftHeapLimitKb * 1024); } //Enable shared cache @@ -366,7 +360,7 @@ const TInt KGreatSize = 1024; __SQLLEAVE_IF_ERROR(ReAllocBuf(KGreatSize)); #endif //SQLSRV_STARTUP_TEST -#endif //_DEBUG +#endif //_DEBUG } /** @@ -421,7 +415,6 @@ fileName.Set(fname, NULL, NULL); iCollationDllName = fileName.NameAndExt(); } - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, CSQLSERVER_GETCOLLATIONDLLNAMEL, "0x%x;CSqlServer::GetCollationDllNameL;iCollationDllName=%S;err=%d", (TUint)this, __SQLPRNSTR(iCollationDllName), err)); } /** Finds and caches the name of each database configuration file @@ -445,7 +438,7 @@ } else { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSERVER_CACHEDDBCONFIGFILENAMESL, "0x%X;CSqlServer::CacheDbConfigFileNamesL;GetDir() failed with error code %d", (TUint)this, err)); + __SQLLOG_ERR(_L("SQLLOG: CSqlServer::CacheDbConfigFileNamesL() - GetDir() failed with error code %d"), err); } CleanupStack::PopAndDestroy(); // entryList } @@ -501,7 +494,6 @@ */ void CSqlServer::GetBackUpListL(TSecureId aUid, RArray& aFileList) { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSERVER_GETBACKUPLISTL_ENTRY, "Entry;0x%x;CSqlServer::GetBackUpListL;aUid=0x%X", (TUint)this, (TUint)aUid.iId)); aFileList.Reset(); TFindFile findFile(iFileData.Fs()); CDir* fileNameCol = NULL; @@ -515,14 +507,14 @@ //The first set of files, which name is matching "[aUid]*" pattern, is ready. do { - __ASSERT_DEBUG(fileNameCol != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(fileNameCol != NULL, ESqlPanicInternalError); CleanupStack::PushL(fileNameCol); const TDesC& file = findFile.File();//"file" variable contains the drive and the path. the file name in "file" is invalid in this case. //Check that the drive, where the database files are, is not ROM drive TParse parse; (void)parse.Set(file, NULL, NULL);//this call can't file, the file name comes from findFile call. TPtrC driveName = parse.Drive(); - __ASSERT_DEBUG(driveName.Length() > 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(driveName.Length() > 0, ESqlPanicInternalError); TInt driveNumber = -1; __SQLLEAVE_IF_ERROR(RFs::CharToDrive(driveName[0], driveNumber)); TDriveInfo driveInfo; @@ -538,8 +530,6 @@ if(!entry.IsDir()) { (void)parse.Set(entry.iName, &file, NULL);//"parse" variable now contains the full file path - __SQLTRACE_INTERNALSVAR(TPtrC fname = parse.FullName()); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSERVER_GETBACKUPLISTL, "0x%x;CSqlServer::GetBackUpListL;fname=%S", (TUint)this, __SQLPRNSTR(fname))); __SQLLEAVE_IF_ERROR(aFileList.Append(parse)); } } @@ -548,12 +538,11 @@ fileNameCol = NULL; } while((err = findFile.FindWild(fileNameCol)) == KErrNone);//Get the next set of files }//end of "if(err == KErrNone)" - __ASSERT_DEBUG(!fileNameCol, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(!fileNameCol, ESqlPanicInternalError); if(err != KErrNotFound && err != KErrNone) { __SQLLEAVE(err); } - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, CSQLSERVER_GETBACKUPLISTL_EXIT, "Exit;0x%x;CSqlServer::GetBackUpListL;file count=%d;err=%d", (TUint)this, aFileList.Count(), err)); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -572,6 +561,7 @@ CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; CleanupStack::PushL(scheduler); CActiveScheduler::Install(scheduler); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KSqlSrvStart)); TheServer = CSqlServer::NewLC(); RProcess::Rendezvous(KErrNone); CActiveScheduler::Start(); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvMain.h --- a/persistentstorage/sql/SRC/Server/SqlSrvMain.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvMain.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -17,7 +17,7 @@ #define __SQLSRVMAIN_H__ #include -#include "SqlAssert.h" //TSqlPanic +#include "SqlPanic.h" //TSqlPanic #include "SqlSrvFileData.h" //TSqlSrvFileData #include "SqlSrvAuthorizer.h" //MSqlPolicyInspector #include "SqlSrvSecurityMap.h" // @@ -90,7 +90,7 @@ void GetCollationDllNameL(); void CacheDbConfigFileNamesL(RFs& aFs, const TDesC& aServerPrivatePath); TInt ReAllocBuf(TInt aNewBufSize); - void DeleteTempFilesL(TInt aDriveNumber, const TDesC& aServerPrivatePath) const; + void DeleteTempFilesL(TInt aDriveNumber, const TDesC& aServerPrivatePath)const; private: TSqlSrvFileData iFileData; //Used as a temporary storage for file data (file name, drive, path, secure uid) @@ -163,7 +163,7 @@ */ inline CSqlCompactor& CSqlServer::Compactor() { - __ASSERT_DEBUG(iCompactor != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iCompactor != NULL, ESqlPanicInternalError); return *iCompactor; } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvObjContainer.h --- a/persistentstorage/sql/SRC/Server/SqlSrvObjContainer.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvObjContainer.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -17,7 +17,7 @@ #define __SQLSRVOBJCONTAINER_H__ #include -#include "SqlAssert.h" +#include "SqlPanic.h" /** Indexed storage for server sdide objects. diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvObjContainer.inl --- a/persistentstorage/sql/SRC/Server/SqlSrvObjContainer.inl Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvObjContainer.inl Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -55,7 +55,7 @@ template void RDbObjContainer::AllocL() { - __ASSERT_DEBUG(iFree <= iSize, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iFree <= iSize, ESqlPanicInternalError); if(iFree == iSize) { if(iSize >= KMaxSize) @@ -87,15 +87,15 @@ template TInt RDbObjContainer::Add(T* aObj) { - __ASSERT_DEBUG(aObj != NULL, __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(iFree <= iSize, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(aObj != NULL, ESqlPanicBadArgument); + __SQLASSERT(iFree <= iSize, ESqlPanicInternalError); TInt idx = iFree; if(idx < iSize) { /*RDbObjContainer::*/TEntry& entry = iEntries[idx]; - __ASSERT_DEBUG(!entry.iObj, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(!entry.iObj, ESqlPanicInternalError); iFree = entry.iNext; - __ASSERT_DEBUG(iFree <= iSize, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iFree <= iSize, ESqlPanicInternalError); entry.iObj = aObj; return MakeHandle(idx); } @@ -135,7 +135,7 @@ template void RDbObjContainer::Remove(TInt aHandle) { - __ASSERT_DEBUG(iFree <= iSize, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iFree <= iSize, ESqlPanicInternalError); if(aHandle > 0) //It is a handle, sent by the client. It isn't a server's problem if the handle is <= 0. { TInt idx = MakeIndex(aHandle); @@ -148,7 +148,7 @@ iFree = idx; } } - __ASSERT_DEBUG(iFree <= iSize, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iFree <= iSize, ESqlPanicInternalError); } /** diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvResourceProfiler.cpp --- a/persistentstorage/sql/SRC/Server/SqlSrvResourceProfiler.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvResourceProfiler.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -13,8 +13,10 @@ // Description: // +#include +#include #include -#include "SqlAssert.h" +#include "SqlPanic.h" #include "SqlSrvResourceProfiler.h" #include "SqlResourceProfiler.h" #include "SqliteSymbian.h" @@ -138,7 +140,7 @@ { TheSqlSrvProfilerTraceEnabled = ETrue; TInt len = aMessage.Int1(); - __SQLPANIC_CLIENT2((TUint)len < 64, aMessage, ESqlPanicBadArgument); + __SQLPANIC_CLIENT((TUint)len < 64, aMessage, ESqlPanicBadArgument); if(len > 0) { TBuf8<64> prmBuf; @@ -191,7 +193,7 @@ err = KErrNotSupported; break; } - __SQLLEAVE_IF_ERROR2(err); + __SQLLEAVE_IF_ERROR(err); } /** @@ -235,7 +237,7 @@ err = KErrNotSupported; break; } - __SQLLEAVE_IF_ERROR2(err); + __SQLLEAVE_IF_ERROR(err); } /** @@ -276,7 +278,7 @@ err = KErrNotSupported; break; } - __SQLLEAVE_IF_ERROR2(err); + __SQLLEAVE_IF_ERROR(err); } /** @@ -349,7 +351,7 @@ err = KErrNotSupported; break; } - __SQLLEAVE_IF_ERROR2(err); + __SQLLEAVE_IF_ERROR(err); aMessage.WriteL(2, ipcBuf); } @@ -588,7 +590,7 @@ default: return KErrNotSupported; }; - __ASSERT_DEBUG((TUint)rc < KIpcTraceTypeCount || rc == KErrNotFound, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT((TUint)rc < KIpcTraceTypeCount || rc == KErrNotFound, ESqlPanicInternalError); return rc; } @@ -601,7 +603,7 @@ TInt err = HAL::Get(HAL::EFastCounterFrequency, freq); if(err != KErrNone) { - __SQLPANIC2((TSqlPanic)err); + SqlPanic((TSqlPanic)err); } } TInt64 diffTicks = (TInt64)aEndTicks - (TInt64)aStartTicks; @@ -1009,22 +1011,22 @@ void TSqlSrvResourceProfiler::StartL(const RMessage2&) { - __SQLLEAVE2(KErrNotSupported); + __SQLLEAVE(KErrNotSupported); } void TSqlSrvResourceProfiler::StopL(const RMessage2&) { - __SQLLEAVE2(KErrNotSupported); + __SQLLEAVE(KErrNotSupported); } void TSqlSrvResourceProfiler::ResetL(const RMessage2&) { - __SQLLEAVE2(KErrNotSupported); + __SQLLEAVE(KErrNotSupported); } void TSqlSrvResourceProfiler::QueryL(const RMessage2&) { - __SQLLEAVE2(KErrNotSupported); + __SQLLEAVE(KErrNotSupported); } #endif//_SQLPROFILER diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvSession.cpp --- a/persistentstorage/sql/SRC/Server/SqlSrvSession.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvSession.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -24,12 +24,7 @@ #include "SqlSrvBlob.h" #include "SqlResourceProfiler.h" #include "SqlCompact.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlSrvSessionTraces.h" -#endif -#include "SqlTraceDef.h" - +#include "UTraceSql.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -164,7 +159,7 @@ template T& SqlSessObjFind(RDbObjContainer& aContainer, TInt aHandle, const RMessage2& aMessage) { T* obj = aContainer.Find(aHandle); - __SQLPANIC_CLIENT2(obj != NULL, aMessage, ESqlPanicBadArgument); + __SQLPANIC_CLIENT(obj != NULL, aMessage, ESqlPanicBadArgument); return *obj; } @@ -188,7 +183,6 @@ if(aError == KSqlErrFull && !HasFreeDiskSpace(aFs, aDrive)) { aError = KErrDiskFull; - SQL_TRACE_SESSION(OstTrace1(TRACE_INTERNALS, CONVERTSQLFULL2DISKFULLERRROR, "0;ConvertSqlFull2DiskFullErr;aError=KSqlErrFull;!HasFreeDiskSpace();aDrive=%d", (TInt)aDrive)); } return aError; } @@ -212,12 +206,10 @@ */ CSqlSrvSession* CSqlSrvSession::NewL() { - SQL_TRACE_SESSION(OstTrace0(TRACE_INTERNALS, CSQLSRVSESSION_NEWL_ENTRY, "Entry;0;CSqlSrvSession::NewL")); CSqlSrvSession* self = new (ELeave) CSqlSrvSession; CleanupStack::PushL(self); self->ConstructL(); CleanupStack::Pop(self); - SQL_TRACE_SESSION(OstTrace1(TRACE_INTERNALS, CSQLSRVSESSION_NEWL_EXIT, "Exit;0x%X;CSqlSrvSession::NewL", (TUint)self)); return self; } @@ -226,13 +218,11 @@ */ CSqlSrvSession::~CSqlSrvSession() { - SQL_TRACE_SESSION(OstTraceExt2(TRACE_INTERNALS, CSQLSRVSESSION_CSQLSRVSESSION2_ENTRY, "Entry;0x%X;CSqlSrvSession::~CSqlSrvSession;iDatabase=0x%X", (TUint)this, (TUint)iDatabase)); StopDbTestMode(); DbFreeReservedSpace(); iIpcStreams.Close(); iStatements.Close(); delete iDatabase; - SQL_TRACE_SESSION(OstTrace1(TRACE_INTERNALS, CSQLSRVSESSION_CSQLSRVSESSION2_EXIT, "Exit;0x%X;CSqlSrvSession::~CSqlSrvSession", (TUint)this)); } /** @@ -257,9 +247,11 @@ { SQLPROFILER_REPORT_IPC(ESqlIpcRq, 0); } - __SQLTRACE_SESSIONEXPR(++iIpcCallCounter); - SQL_TRACE_SESSION(OstTraceExt4(TRACE_INTERNALS, CSQLSRVSESSION_SERVICEL_ENTRY, "Entry;0x%X;CSqlSrvSession::ServiceL;aMessage.Handle()=0x%X;funcCode=0x%X;iIpcCallCounter=%u", (TUint)this, (TUint)aMessage.Handle(), (TUint)funcCode, iIpcCallCounter)); - SQLPROFILER_IPC_START(iIpcCallCounter, iDatabase ? (TUint)iDatabase->RawDbHandle() : 0); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(TPtrC8 funcName = GetIPCFuncStr(funcCode)); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EBorder), KSrvMsgStr, &funcName)); + + SQLPROFILER_IPC_START(iIpcCounter, iDatabase ? (TUint)iDatabase->RawDbHandle() : 0); + switch(funcCode) { ////////////////////// resource check operations /////////////////////////// @@ -455,7 +447,7 @@ { aMessage.Complete(retCode); } - SQL_TRACE_SESSION(OstTraceExt4(TRACE_INTERNALS, CSQLSRVSESSION_SERVICEL_EXIT, "Exit;0x%X;CSqlSrvSession::ServiceL;funcCode=0x%X;retCode=%d;iIpcCallCounter=%u", (TUint)this, (TUint)funcCode, retCode, iIpcCallCounter)); + SQLPROFILER_IPC_END(iIpcCounter, funcCode, iDatabase ? (TUint)iDatabase->RawDbHandle() : 0, iIpcTraceData, retCode); } /** @@ -465,7 +457,6 @@ */ void CSqlSrvSession::ServiceError(const RMessage2& aMessage, TInt aError) { - SQL_TRACE_SESSION(OstTraceExt4(TRACE_INTERNALS, CSQLSRVSESSION_SERVICEERROR_ENTRY, "Entry;0x%X;CSqlSrvSession::ServiceError;aMessage.Function()=0x%X;aError=%d;iIpcCallCounter=%u", (TUint)this, (TUint)aMessage.Function(), aError, iIpcCallCounter)); Server().MinimizeBuffers(); aError = ::ConvertSqlFull2DiskFullErr(aError, Server().FileData().Fs(), iDrive); if(aError == KErrBadDescriptor) @@ -473,12 +464,15 @@ //The __SQLPANIC_CLIENT() macro cannot be used here because it calls a leaving function. A leaving call //from a leaving call will terminate the server. _LIT(KPanicCategory, "SqlDb"); + + SYMBIAN_TRACE_SQL_ERR_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EError), KSqlSrvPanicClient, aError)); aMessage.Panic(KPanicCategory, ESqlPanicBadDescriptor); } - SQLPROFILER_IPC_ERROR(iIpcCallCounter, static_cast (KSqlSrvFunctionMask & aMessage.Function()), + + SYMBIAN_TRACE_SQL_ERR_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EError), KSqlSrvError, aError)); + SQLPROFILER_IPC_ERROR(iIpcCounter, static_cast (KSqlSrvFunctionMask & aMessage.Function()), iDatabase ? (TUint)iDatabase->RawDbHandle() : 0, aError); CSession2::ServiceError(aMessage, aError); - SQL_TRACE_SESSION(OstTraceExt3(TRACE_INTERNALS, CSQLSRVSESSION_SERVICEERROR_EXIT, "Exit;0x%X;CSqlSrvSession::ServiceError;aMessage.Function()=0x%X;iIpcCallCounter=%u", (TUint)this, (TUint)aMessage.Function(), iIpcCallCounter)); } /////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -732,8 +726,10 @@ __SQLLEAVE(KErrPermissionDenied); } } - __SQLTRACE_SESSIONVAR(TPtrC fname(fileData.FileName())); - SQL_TRACE_SESSION(OstTraceExt2(TRACE_INTERNALS, CSQLSRVSESSION_DBDELETEFILEL, "0x%X;CSqlSrvSession::DbDeleteFileL;file='%S'", (TUint)this, __SQLPRNSTR(fname))); + #ifdef _NOTIFY + TPtrC fname = fileData.FileName(); + RDebug::Print(_L("--SrvSess, delete, fname=\"%S\"\r\n"), &fname); + #endif __SQLLEAVE_IF_ERROR(fileData.Fs().Delete(fileData.FileName())); } @@ -1170,7 +1166,7 @@ __SQLLEAVE(KErrBadName); } } - __ASSERT_DEBUG(len > 0, __SQLPANIC2(ESqlPanicInternalError));//The "if" above should have hanled the case with "len == 0" + __SQLASSERT(len > 0, ESqlPanicInternalError);//The "if" above should have hanled the case with "len == 0" if((TUint)len > KMaxFileName) { __SQLLEAVE(KErrBadName); @@ -1384,7 +1380,7 @@ SQLPROFILER_REPORT_IPC(ESqlIpcWrite, size); } __SQLLEAVE_IF_ERROR(err); - __ASSERT_DEBUG(err == KSqlAtRow || err == KSqlAtEnd, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(err == KSqlAtRow || err == KSqlAtEnd, ESqlPanicInternalError); return err; } @@ -1554,7 +1550,7 @@ aStreamBuf->PushL(); iIpcStreams.AllocL(); TInt size = aStreamBuf->SizeL(); - __ASSERT_DEBUG(size >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(size >= 0, ESqlPanicInternalError); TPckgBuf ipcBuf; // read the first buffer-full TInt len = Min(size, KIpcBufSize); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvSession.h --- a/persistentstorage/sql/SRC/Server/SqlSrvSession.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvSession.h Wed Sep 01 12:39:58 2010 +0100 @@ -135,8 +135,8 @@ TBool iDriveSpaceReserved; //True if this session reserved drive space TBool iDriveSpaceInUse; //True if the client has been given an access to the reserved drive space TDriveNumber iDrive; //the drive number, where the database file is - TUint iIpcCallCounter; #ifdef _SQLPROFILER + TUint iIpcCounter; TSqlSrvIpcTraceData iIpcTraceData[KIpcTraceTypeCount]; #endif }; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvStatement.cpp --- a/persistentstorage/sql/SRC/Server/SqlSrvStatement.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvStatement.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -9,7 +9,7 @@ // Nokia Corporation - initial contribution. // // Contributors: -// NTT DOCOMO, INC - Fix for defect 1915 "SQL server panics when using long column type strings" +// NTT DOCOMO, INC - Fix for Bug 1915 "SQL server panics when using long column type strings" // // Description: // @@ -21,12 +21,7 @@ #include "SqlSrvStatement.h" #include "SqlBufIterator.h" //TSqlBufRIterator #include "SqlSrvResourceProfiler.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlSrvStatementTraces.h" -#endif -#include "SqlTraceDef.h" - +#include "UTraceSql.h" ////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////// local const data //////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -142,16 +137,14 @@ */ CSqlSrvStatement* CSqlSrvStatement::NewLC(sqlite3* aDbHandle, const TDesC16& aSqlStmt, TInt& aColumnCount, TInt& aParamCount) { - __SQLTRACE_INTERNALSEXPR(TPtrC sqlprnptr(aSqlStmt.Left(aSqlStmt.Length() - 1))); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVSTATEMENT_NEWLC_ENTRY, "Entry;0;CSqlSrvStatement::NewLC-16;aDbHandle=0x%X;aSqlStmt=%S", (TUint)aDbHandle, __SQLPRNSTR(sqlprnptr))); - __ASSERT_DEBUG(aSqlStmt.Length() > 0 ? (TInt)aSqlStmt[aSqlStmt.Length() - 1] == 0 : ETrue, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aSqlStmt.Length() > 0 ? (TInt)aSqlStmt[aSqlStmt.Length() - 1] == 0 : ETrue, ESqlPanicBadArgument); CSqlSrvStatement* self = new (ELeave) CSqlSrvStatement; CleanupStack::PushL(self); self->ConstructL(aDbHandle, aSqlStmt); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KSrvStmtCreated, self)); aColumnCount = self->iColumnCount; aParamCount = self->iParamCount; - SQL_TRACE_INTERNALS(OstTraceExt4(TRACE_INTERNALS, CSQLSRVSTATEMENT_NEWLC_EXIT, "Exit;0x%X;CSqlSrvStatement::NewLC-16;iStmtHandle=0x%X;aColumnCount=%d;aParamCount=%d", (TUint)self, (TUint)self->iStmtHandle, aColumnCount, aParamCount)); return self; } @@ -176,17 +169,14 @@ */ CSqlSrvStatement* CSqlSrvStatement::NewLC(sqlite3* aDbHandle, const TDesC8& aSqlStmt, TInt& aColumnCount, TInt& aParamCount) { - __SQLTRACE_INTERNALSEXPR(TPtrC8 sqlprnptr(aSqlStmt.Left(aSqlStmt.Length() - 1))); - __SQLTRACE_INTERNALSVAR(TBuf<100> des16prnbuf); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVSTATEMENT_NEWLC_ENTRY2, "Entry;0;CSqlSrvStatement::NewLC-8;aDbHandle=0x%X;aSqlStmt=%s", (TUint)aDbHandle, __SQLPRNSTR8(sqlprnptr, des16prnbuf))); - __ASSERT_DEBUG(aSqlStmt.Length() > 0 ? (TInt)aSqlStmt[aSqlStmt.Length() - 1] == 0 : ETrue, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aSqlStmt.Length() > 0 ? (TInt)aSqlStmt[aSqlStmt.Length() - 1] == 0 : ETrue, ESqlPanicBadArgument); CSqlSrvStatement* self = new (ELeave) CSqlSrvStatement; CleanupStack::PushL(self); self->ConstructL(aDbHandle, aSqlStmt); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KSrvStmtCreated, self)); aColumnCount = self->iColumnCount; aParamCount = self->iParamCount; - SQL_TRACE_INTERNALS(OstTraceExt4(TRACE_INTERNALS, CSQLSRVSTATEMENT_NEWLC_EXIT2, "Exit;0x%X;CSqlSrvStatement::NewLC-8;iStmtHandle=0x%X;aColumnCount=%d;aParamCount=%d", (TUint)self, (TUint)self->iStmtHandle, aColumnCount, aParamCount)); return self; } @@ -195,19 +185,17 @@ */ CSqlSrvStatement::~CSqlSrvStatement() { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, CSQLSRVSTATEMENT_CSQLSRVSTATEMENT2_ENTRY, "Entry;0x%X;CSqlSrvStatement::~CSqlSrvStatement;iStmtHandle=0x%X", (TUint)this, (TUint)iStmtHandle)); DestroyParamBufArray(); iBufFlat.Close(); if(iStmtHandle) { -#ifdef SYMBIAN_USE_SQLITE_VERSION_3_6_4 - __SQLTRACE_INTERNALSEXPR(TInt scanCount = sqlite3_stmt_status(iStmtHandle, SQLITE_STMTSTATUS_FULLSCAN_STEP, ETrue)); - __SQLTRACE_INTERNALSEXPR(TInt sortCount = sqlite3_stmt_status(iStmtHandle, SQLITE_STMTSTATUS_SORT, ETrue)); - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, CSQLSRVSTATEMENT_CSQLSRVSTATEMENT2, "0x%X;CSqlSrvStatement::~CSqlSrvStatement;scan count=%d;sort count=%d", (TUint)this, scanCount, sortCount)); -#endif +#ifdef SYMBIAN_TRACE_SQL_EVENTS + TInt scanCount = sqlite3_stmt_status(iStmtHandle, SQLITE_STMTSTATUS_FULLSCAN_STEP, ETrue); + TInt sortCount = sqlite3_stmt_status(iStmtHandle, SQLITE_STMTSTATUS_SORT, ETrue); + SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KSrvStmtStatus, this, scanCount, sortCount)); +#endif (void)sqlite3_finalize(iStmtHandle); } - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, CSQLSRVSTATEMENT_CSQLSRVSTATEMENT2_EXIT, "Exit;0x%X;CSqlSrvStatement::~CSqlSrvStatement", (TUint)this)); } /** @@ -226,7 +214,7 @@ */ void CSqlSrvStatement::BindL(const RSqlBufFlat& aParamBuf) { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); (void)sqlite3SymbianLastOsError();//clear last OS error @@ -294,7 +282,7 @@ */ const RSqlBufFlat& CSqlSrvStatement::ColumnNamesL() { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); iBufFlatType = static_cast (-1); __SQLLEAVE_IF_ERROR(iBufFlat.SetCount(iColumnCount)); TSqlBufWIterator it; @@ -323,7 +311,7 @@ */ const RSqlBufFlat& CSqlSrvStatement::ParamNamesL() { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); iBufFlatType = static_cast (-1); __SQLLEAVE_IF_ERROR(iBufFlat.SetCount(iParamCount)); TSqlBufWIterator it; @@ -365,7 +353,7 @@ */ const RSqlBufFlat& CSqlSrvStatement::ColumnValuesL() { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); iBufFlatType = static_cast (-1); iBufFlat.SetCount(iColumnCount); @@ -405,7 +393,7 @@ {//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 (sqlite3_column_text16(iStmtHandle, colIdx)); - __ASSERT_DEBUG(text != NULL, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(text != NULL, ESqlPanicInternalError); __SQLLEAVE_IF_ERROR(it.SetText(TPtrC16(text, charLength))); } } @@ -427,7 +415,7 @@ it.SetNull(); break; default: - __ASSERT_DEBUG(EFalse, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(EFalse, ESqlPanicInternalError); break; }//end of switch(...) }//end of - while(it.Next()) @@ -449,15 +437,15 @@ */ TInt CSqlSrvStatement::ColumnSource(TInt aColumnIndex, TPtrC8& aColumnSource) const { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); TInt colType = sqlite3_column_type(iStmtHandle, aColumnIndex); if(colType == SQLITE_TEXT) {//Since the first called function after the Next() operation is always CSqlSrvStatement::ColumnValuesL(), then //sqlite3_column_bytes16() (called from ColumnValuesL()) 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 void* text = sqlite3_column_text16(iStmtHandle, aColumnIndex); - __ASSERT_DEBUG(text != NULL, __SQLPANIC2(ESqlPanicInternalError)); - TInt length = sqlite3_column_bytes16(iStmtHandle, aColumnIndex); + __SQLASSERT(text != NULL, ESqlPanicInternalError); + TInt length = sqlite3_column_bytes16(iStmtHandle, aColumnIndex); aColumnSource.Set(reinterpret_cast (text), length); } else if(colType == SQLITE_BLOB) @@ -480,7 +468,7 @@ */ void CSqlSrvStatement::DoCommonConstructL() { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); iColumnCount = sqlite3_column_count(iStmtHandle); iParamCount = sqlite3_bind_parameter_count(iStmtHandle); __SQLLEAVE_IF_ERROR(iBufFlat.SetCount(Max(iColumnCount, iParamCount))); @@ -519,10 +507,10 @@ */ void CSqlSrvStatement::BindParamBufL(TInt aParamIndex) { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - __ASSERT_DEBUG(aParamIndex >= 0 && aParamIndex < sqlite3_bind_parameter_count(iStmtHandle), __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aParamIndex < iParamBufArray.Count(), __SQLPANIC(ESqlPanicBadArgument)); - __ASSERT_DEBUG(iParamBufArray[aParamIndex] != NULL, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); + __SQLASSERT(aParamIndex >= 0 && aParamIndex < sqlite3_bind_parameter_count(iStmtHandle), ESqlPanicBadArgument); + __SQLASSERT(aParamIndex < iParamBufArray.Count(), ESqlPanicBadArgument); + __SQLASSERT(iParamBufArray[aParamIndex] != NULL, ESqlPanicBadArgument); (void)sqlite3SymbianLastOsError();//clear last OS error //Bind the parameter value. //SQLITE_STATIC is used as an argument, because the text/blob data will be kept and can be used by the next bind call @@ -558,8 +546,8 @@ */ TInt CSqlSrvStatement::ColumnInt(TInt aColIdx) const { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - __ASSERT_DEBUG((TUint)aColIdx < iColumnCount, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); + __SQLASSERT((TUint)aColIdx < iColumnCount, ESqlPanicBadArgument); TInt colType = sqlite3_column_type(iStmtHandle, aColIdx); switch(colType) { @@ -598,8 +586,8 @@ */ TInt64 CSqlSrvStatement::ColumnInt64(TInt aColIdx) const { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - __ASSERT_DEBUG((TUint)aColIdx < iColumnCount, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); + __SQLASSERT((TUint)aColIdx < iColumnCount, ESqlPanicBadArgument); TInt colType = sqlite3_column_type(iStmtHandle, aColIdx); switch(colType) { @@ -635,8 +623,8 @@ */ TReal CSqlSrvStatement::ColumnReal(TInt aColIdx) const { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - __ASSERT_DEBUG((TUint)aColIdx < iColumnCount, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); + __SQLASSERT((TUint)aColIdx < iColumnCount, ESqlPanicBadArgument); TInt colType = sqlite3_column_type(iStmtHandle, aColIdx); switch(colType) { @@ -669,8 +657,8 @@ */ TPtrC CSqlSrvStatement::ColumnTextL(TInt aColIdx) const { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - __ASSERT_DEBUG((TUint)aColIdx < iColumnCount, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); + __SQLASSERT((TUint)aColIdx < iColumnCount, ESqlPanicBadArgument); TPtrC res; TInt colType = sqlite3_column_type(iStmtHandle, aColIdx); if(colType == SQLITE_TEXT) @@ -685,8 +673,8 @@ //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 (sqlite3_column_text16(iStmtHandle, aColIdx)); - __ASSERT_DEBUG(text != NULL, __SQLPANIC(ESqlPanicInternalError)); - res.Set(text, charLength); + __SQLASSERT(text != NULL, ESqlPanicInternalError); + res.Set(text, charLength); } return res; } @@ -704,8 +692,8 @@ */ TPtrC8 CSqlSrvStatement::ColumnBinary(TInt aColIdx) const { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - __ASSERT_DEBUG((TUint)aColIdx < iColumnCount, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); + __SQLASSERT((TUint)aColIdx < iColumnCount, ESqlPanicBadArgument); TPtrC8 res; TInt colType = sqlite3_column_type(iStmtHandle, aColIdx); if(colType == SQLITE_BLOB) @@ -728,8 +716,8 @@ */ const RSqlBufFlat& CSqlSrvStatement::GetDeclColumnTypesL() { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - iBufFlatType = static_cast (-1); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); + iBufFlatType = static_cast (-1); __SQLLEAVE_IF_ERROR(iBufFlat.SetCount(iColumnCount)); TSqlBufWIterator it; it.Set(iBufFlat); @@ -773,12 +761,12 @@ HSqlSrvStmtParamBuf* CSqlSrvStatement::GetParamBufL(TInt aParamIndex, HSqlSrvStmtParamBuf::TDataType aDataType, HSqlSrvStmtParamBuf::TBufType aBufType) { - __ASSERT_DEBUG(aParamIndex >= 0 && aParamIndex < sqlite3_bind_parameter_count(iStmtHandle), __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aParamIndex >= 0 && aParamIndex < sqlite3_bind_parameter_count(iStmtHandle), ESqlPanicBadArgument); ExtendParamBufArrayL(aParamIndex); HSqlSrvStmtParamBuf*& paramBuf = iParamBufArray[aParamIndex]; if(paramBuf) {//Reset and reuse the existing buffer - __ASSERT_DEBUG(paramBuf->ParamIndex() == aParamIndex, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(paramBuf->ParamIndex() == aParamIndex, ESqlPanicInternalError); paramBuf->Reset(aDataType, aBufType); } else @@ -801,8 +789,8 @@ */ void CSqlSrvStatement::ExtendParamBufArrayL(TInt aParamIndex) { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - __ASSERT_DEBUG(aParamIndex >= 0 && aParamIndex < sqlite3_bind_parameter_count(iStmtHandle), __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); + __SQLASSERT(aParamIndex >= 0 && aParamIndex < sqlite3_bind_parameter_count(iStmtHandle), ESqlPanicBadArgument); TInt ext = aParamIndex - iParamBufArray.Count() + 1; while(ext-- > 0) { @@ -827,8 +815,8 @@ */ TPtrC8 CSqlSrvStatement::CopyAndStoreParamL(TInt aParamIndex, HSqlSrvStmtParamBuf::TDataType aDataType, const TDesC8& aParamValue) { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - __ASSERT_DEBUG(aParamIndex >= 0 && aParamIndex < sqlite3_bind_parameter_count(iStmtHandle), __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); + __SQLASSERT(aParamIndex >= 0 && aParamIndex < sqlite3_bind_parameter_count(iStmtHandle), ESqlPanicBadArgument); HSqlSrvStmtParamBuf* paramBuf = GetParamBufL(aParamIndex, aDataType, HSqlSrvStmtParamBuf::EBufSimpleBind); return paramBuf->SetDataL(aParamValue); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvStatement.h --- a/persistentstorage/sql/SRC/Server/SqlSrvStatement.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvStatement.h Wed Sep 01 12:39:58 2010 +0100 @@ -9,7 +9,7 @@ // Nokia Corporation - initial contribution. // // Contributors: -// NTT DOCOMO, INC - Fix for defect 1915 "SQL server panics when using long column type strings" +// NTT DOCOMO, INC - Fix for Bug 1915 "SQL server panics when using long column type strings" // // Description: // diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvStatement.inl --- a/persistentstorage/sql/SRC/Server/SqlSrvStatement.inl Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvStatement.inl Wed Sep 01 12:39:58 2010 +0100 @@ -33,7 +33,7 @@ inline HSqlSrvStmtParamBuf* HSqlSrvStmtParamBuf::NewL(CSqlSrvStatement& aStatement, TInt aParamIndex, HSqlSrvStmtParamBuf::TDataType aDataType, HSqlSrvStmtParamBuf::TBufType aBufType) { - __ASSERT_DEBUG(aParamIndex >= 0, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aParamIndex >= 0, ESqlPanicBadArgument); HSqlSrvStmtParamBuf* self = new (ELeave) HSqlSrvStmtParamBuf(aStatement, aParamIndex, aDataType, aBufType); self->PushL(); self->ConstructL(); @@ -53,7 +53,7 @@ */ inline void HSqlSrvStmtParamBuf::Reset(HSqlSrvStmtParamBuf::TDataType aDataType, HSqlSrvStmtParamBuf::TBufType aBufType) { - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iBuf != NULL, ESqlPanicInvalidObj); iStatementFinalized = EFalse; iAlive = ETrue; @@ -65,7 +65,7 @@ if(iBuf->Capacity() > (HSqlSrvStmtParamBuf::EExpandSize * 2)) { TRAPD(err, iBuf->SetReserveL(HSqlSrvStmtParamBuf::EExpandSize * 2));//the buffer size is minimized, the call can't fail - __ASSERT_ALWAYS(err == KErrNone, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT_ALWAYS(err == KErrNone, ESqlPanicInternalError); } Set(*iBuf, 0, MStreamBuf::ERead | MStreamBuf::EWrite); } @@ -83,8 +83,8 @@ */ inline const TPtrC8 HSqlSrvStmtParamBuf::SetDataL(const TDesC8& aData) { - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - __ASSERT_DEBUG(iBufType == HSqlSrvStmtParamBuf::EBufSimpleBind, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iBuf != NULL, ESqlPanicInvalidObj); + __SQLASSERT(iBufType == HSqlSrvStmtParamBuf::EBufSimpleBind, ESqlPanicInternalError); iBuf->ResizeL(aData.Length()); iBuf->Write(0, aData); //If the size is 0, then return KNullDesC8, where an empty string is hold, not a null one ("" instead of NULL) @@ -100,7 +100,7 @@ */ inline const TPtrC8 HSqlSrvStmtParamBuf::Data() const { - __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iBuf != NULL, ESqlPanicInvalidObj); //If the size is 0, then return KNullDesC8, where an empty string is hold, not a null one ("" instead of NULL) return iBuf->Size() == 0 ? KNullDesC8() : iBuf->Ptr(0); } @@ -122,7 +122,7 @@ */ inline TInt HSqlSrvStmtParamBuf::ParamIndex() const { - __ASSERT_DEBUG(iParamIndex >= 0, __SQLPANIC(ESqlPanicInternalError)); + __SQLASSERT(iParamIndex >= 0, ESqlPanicInternalError); return iParamIndex; } @@ -182,7 +182,7 @@ */ inline TInt CSqlSrvStatement::Next() { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); TInt err = ::StmtNext(iStmtHandle); iBufFlatType = static_cast (-1); iBufFlat.ResetAndMinimize(); @@ -202,7 +202,7 @@ */ inline TInt CSqlSrvStatement::Reset() { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); iBufFlatType = static_cast (-1); iBufFlat.ResetAndMinimize(); return ::StmtReset(iStmtHandle); @@ -221,7 +221,7 @@ */ inline TInt CSqlSrvStatement::Exec() { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); TInt err = ::StmtExec(iStmtHandle); iBufFlatType = static_cast (-1); iBufFlat.ResetAndMinimize(); @@ -233,7 +233,7 @@ */ inline const RSqlBufFlat& CSqlSrvStatement::BufFlatL(TSqlBufFlatType aWhat) const { - __ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj)); + __SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj); if(aWhat != iBufFlatType) { __SQLLEAVE(KErrArgument); @@ -262,7 +262,7 @@ */ inline void CSqlSrvStatement::ConstructL(sqlite3* aDbHandle, const TDesC16& aSqlStmt) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicBadArgument); iStmtHandle = ::StmtPrepare16L(aDbHandle, aSqlStmt); DoCommonConstructL(); } @@ -282,7 +282,7 @@ */ inline void CSqlSrvStatement::ConstructL(sqlite3* aDbHandle, const TDesC8& aSqlStmt) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC(ESqlPanicBadArgument)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicBadArgument); iStmtHandle = ::StmtPrepare8L(aDbHandle, aSqlStmt); DoCommonConstructL(); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvStatementUtil.cpp --- a/persistentstorage/sql/SRC/Server/SqlSrvStatementUtil.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvStatementUtil.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -18,16 +18,11 @@ #include #include "sqlite3.h" #include "SqlSrvStatementUtil.h" -#include "SqlAssert.h" +#include "SqlPanic.h" #include "SqlSrvUtil.h" #include "SqlUtil.h" #include "SqliteSymbian.h" //sqlite3SymbianLastOsError() -#include "OstTraceDefinitions.h" #include "SqlSrvResourceProfiler.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlSrvStatementUtilTraces.h" -#endif -#include "SqlTraceDef.h" //The database names in all statements are quoted to avoid the "sql injection" threat. _LIT8(KPageCountPragma, "PRAGMA \"%S\".page_count\x0"); @@ -40,6 +35,109 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#ifdef _NOTIFY +static void PrintErrMsg8(TBool aCondition, sqlite3* aDbHandle, const char* aFuncNameZ, const TDesC8& aStmt) + { + if(!aCondition) + { + return; + } + TPtrC8 funcName8(reinterpret_cast (aFuncNameZ)); + TBuf<32> funcName; + funcName.Copy(funcName8); + RDebug::Print(_L("###%S\r\n"), &funcName); + TInt stmtLen = aStmt.Length(); + if(stmtLen > 0) + { + if(aStmt[stmtLen - 1] == 0) + { + --stmtLen; + } + HBufC* buf = HBufC::New(stmtLen); + if(buf) + { + TPtr sqlStmt = buf->Des(); + sqlStmt.Copy(aStmt.Left(stmtLen)); + if(sqlStmt.Length() > 250) + { + sqlStmt.SetLength(250); + } + RDebug::Print(_L("###\"%S\"\r\n"), &sqlStmt); + delete buf; + } + } + TBuf<16> tbuf; + Util::GetTimeStr(tbuf); + const void* errMsg = sqlite3_errmsg16(aDbHandle);//"errMsg" - zero terminated string + if(errMsg) + { + TPtrC msg(reinterpret_cast (errMsg));//terminating zero character excluded. + if(msg.Length() > 230) + { + msg.Set(msg.Left(230)); + } + RDebug::Print(_L("##%S#ErrMsg=%S\r\n"), &tbuf, &msg); + } + else + { + RDebug::Print(_L("##%S#ErrMsg=null\r\n"), &tbuf); + } + } + +static void PrintErrMsg16(TBool aCondition, sqlite3* aDbHandle, const char* aFuncNameZ, const TDesC16& aStmt) + { + if(!aCondition) + { + return; + } + TPtrC8 funcName8(reinterpret_cast (aFuncNameZ)); + TBuf<32> funcName; + funcName.Copy(funcName8); + RDebug::Print(_L("###%S\r\n"), &funcName); + TInt stmtLen = aStmt.Length(); + if(stmtLen > 0) + { + if(aStmt[stmtLen - 1] == 0) + { + --stmtLen; + } + TPtrC sqlStmt(aStmt.Ptr(), stmtLen); + if(sqlStmt.Length() > 250) + { + sqlStmt.Set(sqlStmt.Left(250)); + } + RDebug::Print(_L("###\"%S\"\r\n"), &sqlStmt); + } + TBuf<16> tbuf; + Util::GetTimeStr(tbuf); + const void* errMsg = sqlite3_errmsg16(aDbHandle);//"errMsg" - zero terminated string + if(errMsg) + { + TPtrC msg(reinterpret_cast (errMsg));//terminating zero character excluded. + if(msg.Length() > 230) + { + msg.Set(msg.Left(230)); + } + RDebug::Print(_L("##%S#ErrMsg=%S\r\n"), &tbuf, &msg); + } + else + { + RDebug::Print(_L("##%S#ErrMsg=null\r\n"), &tbuf); + } + } + +#define PRINT_ERRMSG8(Condition, DbHandle, FuncNameZ, Stmt) PrintErrMsg8(Condition, DbHandle, FuncNameZ, Stmt) +#define PRINT_ERRMSG16(Condition, DbHandle, FuncNameZ, Stmt) PrintErrMsg16(Condition, DbHandle, FuncNameZ, Stmt) + +#else //_NOTIFY + +#define PRINT_ERRMSG8(Condition, DbHandle, FuncNameZ, Stmt) +#define PRINT_ERRMSG16(Condition, DbHandle, FuncNameZ, Stmt) + +#endif //_NOTIFY + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////// + //Calls sqlite3_open16() to create or open database file with aFileNameZ. //aFileNameZ is UTF16 encoded, zero-terminated. //The function returns system-wide errors or database specific errors. @@ -48,7 +146,7 @@ { (void)sqlite3SymbianLastOsError();//clear last OS error TInt err = sqlite3_open16(aFileNameZ.Ptr(), &aDbHandle); - __ASSERT_DEBUG(err == SQLITE_OK ? aDbHandle != NULL : ETrue, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(err == SQLITE_OK ? aDbHandle != NULL : ETrue, ESqlPanicInternalError); if(err == SQLITE_OK) { (void)sqlite3_extended_result_codes(aDbHandle, 0); @@ -71,7 +169,7 @@ { (void)sqlite3SymbianLastOsError();//clear last OS error TInt err = sqlite3_open((const char *) aFileNameZ.Ptr(), &aDbHandle); - __ASSERT_DEBUG(err == SQLITE_OK ? aDbHandle != NULL : ETrue, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(err == SQLITE_OK ? aDbHandle != NULL : ETrue, ESqlPanicInternalError); if(err == SQLITE_OK) { (void)sqlite3_extended_result_codes(aDbHandle, 0); @@ -104,15 +202,15 @@ //If the function fails then it returns one of the SQLITE error codes. static TInt DoSingleStmtExec16(sqlite3 *aDbHandle, const TDesC16& aSql) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicInvalidObj)); - __ASSERT_DEBUG(aSql.Length() > 0 ? (TInt)aSql[aSql.Length() - 1] == 0 : ETrue, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicInvalidObj); + __SQLASSERT(aSql.Length() > 0 ? (TInt)aSql[aSql.Length() - 1] == 0 : ETrue, ESqlPanicBadArgument); sqlite3_stmt* stmtHandle = NULL; const void* stmtTail = NULL; //sqlite3_prepare16_v2() expects parameter #3 to be one of the following: // - byte length of the sql statement (parameter #2), excluding terminating zero; // - 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)); + __SQLASSERT(err == SQLITE_OK ? !stmtTail || User::StringLength((const TUint16*)stmtTail) == 0 : !stmtHandle, ESqlPanicInternalError); if(stmtHandle) //stmtHandle can be NULL for statements like this: ";". { if(err == SQLITE_OK) @@ -123,7 +221,7 @@ if(err == SQLITE_ERROR) //It may be "out of memory" problem { err = sqlite3_reset(stmtHandle); - __ASSERT_DEBUG(err != SQLITE_OK, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(err != SQLITE_OK, ESqlPanicInternalError); } } (void)sqlite3_finalize(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed. @@ -202,13 +300,10 @@ @internalComponent */ -TInt DbExecStmt16(sqlite3* aDbHandle, TDes16& aSqlStmt) +TInt DbExecStmt16(sqlite3 *aDbHandle, TDes16& aSqlStmt) { - __SQLTRACE_INTERNALSEXPR(TPtrC sqlprnptr(aSqlStmt.Left(aSqlStmt.Length() - 1))); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, DBEXECSTMT16_ENTRY, "Entry;0x%X;DbExecStmt16;sql=%S", (TUint)aDbHandle, __SQLPRNSTR(sqlprnptr))); - - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aSqlStmt.Length() > 0 ? (TInt)aSqlStmt[aSqlStmt.Length() - 1] == 0: ETrue, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicInternalError); + __SQLASSERT(aSqlStmt.Length() > 0 ? (TInt)aSqlStmt[aSqlStmt.Length() - 1] == 0: ETrue, ESqlPanicBadArgument); (void)sqlite3SymbianLastOsError();//clear last OS error @@ -230,7 +325,7 @@ { err = KErrNone; } - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, DBEXECSTMT16_EXIT, "Exit;0x%X;DbExecStmt16;err=%d", (TUint)aDbHandle, err)); + PRINT_ERRMSG16(err <= KSqlErrGeneral, aDbHandle, "DbExecStmt16()", aSqlStmt); return err; } @@ -254,14 +349,10 @@ @internalComponent */ -TInt DbExecStmt8(sqlite3* aDbHandle, const TDesC8& aSqlStmt) +TInt DbExecStmt8(sqlite3 *aDbHandle, const TDesC8& aSqlStmt) { - __SQLTRACE_INTERNALSEXPR(TPtrC8 sqlprnptr(aSqlStmt.Left(aSqlStmt.Length() - 1))); - __SQLTRACE_INTERNALSVAR(TBuf<100> des16prnbuf); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, DBEXECSTMT8_ENTRY, "Entry;0x%X;DbExecStmt8;sql=%s", (TUint)aDbHandle, __SQLPRNSTR8(sqlprnptr, des16prnbuf))); - - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aSqlStmt.Length() > 0 ? (TInt)aSqlStmt[aSqlStmt.Length() - 1] == 0: ETrue, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicInternalError); + __SQLASSERT(aSqlStmt.Length() > 0 ? (TInt)aSqlStmt[aSqlStmt.Length() - 1] == 0: ETrue, ESqlPanicBadArgument); SQLPROFILER_SQL8_PRINT((TUint)aDbHandle, aSqlStmt.Left(aSqlStmt.Length() - 1), EFalse); @@ -274,7 +365,7 @@ { err = KErrNone; } - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, DBEXECSTMT8_EXIT, "Exit;0x%X;DbExecStmt8;err=%d", (TUint)aDbHandle, err)); + PRINT_ERRMSG8(err <= KSqlErrGeneral, aDbHandle, "DbExecStmt8()", aSqlStmt); return err; } @@ -294,7 +385,8 @@ // - negative value - the sql statement (parameter #2) is zero-terminated; TInt err = sqlite3_prepare16_v2(aDbHandle, aStmt.Ptr(), aStmt.Length() * sizeof(TUint16) - sizeof(TUint16), aStmtHandle, &stmtTail); aHasTail = stmtTail && static_cast (stmtTail)[0] != 0; - __ASSERT_DEBUG(err != SQLITE_OK ? !(*aStmtHandle) : ETrue, __SQLPANIC2(ESqlPanicInternalError)); + PRINT_ERRMSG16(err != SQLITE_OK, aDbHandle, "DoPrepareStmt16()", aStmt); + __SQLASSERT(err != SQLITE_OK ? !(*aStmtHandle) : ETrue, ESqlPanicInternalError); //(*aStmtHandle) is NULL for ";" statements, when err == SQLITE_OK. Since the server should not panic //that situation is handled later (not inside the assert above) return err; @@ -312,7 +404,8 @@ // - negative value - the sql statement (parameter #2) is zero-terminated; TInt err = sqlite3_prepare_v2(aDbHandle, reinterpret_cast (aStmt), -1, aStmtHandle, &stmtTail); aHasTail = stmtTail && stmtTail[0] != 0; - __ASSERT_DEBUG(err != SQLITE_OK ? !(*aStmtHandle) : ETrue, __SQLPANIC2(ESqlPanicInternalError)); + PRINT_ERRMSG8(err != SQLITE_OK, aDbHandle, "DoPrepareStmt8()", TPtrC8(aStmt, aStmt ? User::StringLength(aStmt) : 0)); + __SQLASSERT(err != SQLITE_OK ? !(*aStmtHandle) : ETrue, ESqlPanicInternalError); //(*aStmtHandle) is NULL for ";" statements, when err == SQLITE_OK. Since the server should not panic //that situation is handled later (not inside the assert above) return err; @@ -358,7 +451,7 @@ // static void LeaveIfPrepareErrorL(TInt aSqliteError, TBool aHasTail, sqlite3_stmt* aStmtHandle) { - __SQLLEAVE_IF_ERROR2(ProcessPrepareError(aSqliteError, aHasTail, aStmtHandle)); + __SQLLEAVE_IF_ERROR(ProcessPrepareError(aSqliteError, aHasTail, aStmtHandle)); } /** @@ -376,14 +469,13 @@ */ sqlite3_stmt* StmtPrepare16L(sqlite3* aDbHandle, const TDesC16& aSqlStmt) { - __SQLTRACE_INTERNALSEXPR(TPtrC sqlprnptr(aSqlStmt.Left(aSqlStmt.Length() - 1))); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, STMTPREPARE16L_ENTRY, "Entry;0x%X;StmtPrepare16L;sql=%S", (TUint)aDbHandle, __SQLPRNSTR(sqlprnptr))); + SQLPROFILER_SQL16_PRINT((TUint)aDbHandle, aSqlStmt.Left(aSqlStmt.Length() - 1), ETrue); + (void)sqlite3SymbianLastOsError();//clear last OS error TBool hasTail = EFalse; sqlite3_stmt* stmtHandle = NULL; TInt err = DoPrepareStmt16(aDbHandle, aSqlStmt, &stmtHandle, hasTail); LeaveIfPrepareErrorL(err, hasTail, stmtHandle); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, STMTPREPARE16L_EXIT, "Exit;0x%X;StmtPrepare16L;stmtHandle=0x%X", (TUint)aDbHandle, (TUint)stmtHandle)); return stmtHandle; } @@ -402,15 +494,12 @@ */ TInt StmtPrepare8(sqlite3* aDbHandle, const TDesC8& aSqlStmt, sqlite3_stmt*& aStmtHandle) { - __SQLTRACE_INTERNALSEXPR(TPtrC8 sqlprnptr(aSqlStmt.Left(aSqlStmt.Length() - 1))); - __SQLTRACE_INTERNALSVAR(TBuf<100> des16prnbuf); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, STMTPREPARE8_ENTRY, "Entry;0x%X;StmtPrepare8;sql=%s", (TUint)aDbHandle, __SQLPRNSTR8(sqlprnptr, des16prnbuf))); + SQLPROFILER_SQL8_PRINT((TUint)aDbHandle, aSqlStmt.Left(aSqlStmt.Length() - 1), ETrue); + (void)sqlite3SymbianLastOsError();//clear last OS error TBool hasTail = EFalse; TInt err = DoPrepareStmt8(aDbHandle, aSqlStmt.Ptr(), &aStmtHandle, hasTail); - err = ProcessPrepareError(err, hasTail, aStmtHandle); - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, STMTPREPARE8_EXIT, "Exit;0x%X;StmtPrepare8;aStmtHandle=0x%X;err=%d", (TUint)aDbHandle, (TUint)aStmtHandle, err)); - return err; + return ProcessPrepareError(err, hasTail, aStmtHandle); } /** @@ -428,15 +517,13 @@ */ sqlite3_stmt* StmtPrepare8L(sqlite3* aDbHandle, const TDesC8& aSqlStmt) { - __SQLTRACE_INTERNALSEXPR(TPtrC8 sqlprnptr(aSqlStmt.Left(aSqlStmt.Length() - 1))); - __SQLTRACE_INTERNALSVAR(TBuf<100> des16prnbuf); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, STMTPREPARE8L_ENTRY, "Entry;0x%X;StmtPrepare8L;sql=%s", (TUint)aDbHandle, __SQLPRNSTR8(sqlprnptr, des16prnbuf))); + SQLPROFILER_SQL8_PRINT((TUint)aDbHandle, aSqlStmt.Left(aSqlStmt.Length() - 1), ETrue); + (void)sqlite3SymbianLastOsError();//clear last OS error TBool hasTail = EFalse; sqlite3_stmt* stmtHandle = NULL; TInt err = DoPrepareStmt8(aDbHandle, aSqlStmt.Ptr(), &stmtHandle, hasTail); LeaveIfPrepareErrorL(err, hasTail, stmtHandle); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, STMTPREPARE8L_EXIT, "Exit;0x%X;StmtPrepare8L;stmtHandle=0x%X", (TUint)aDbHandle, (TUint)stmtHandle)); return stmtHandle; } @@ -457,11 +544,10 @@ */ TInt StmtExec(sqlite3_stmt* aStmtHandle) { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, STMTEXEC_ENTRY, "Entry;0x%X;StmtExec;aStmtHandle=0x%X", (TUint)sqlite3_db_handle(aStmtHandle), (TUint)aStmtHandle)); - __ASSERT_DEBUG(aStmtHandle != NULL, __SQLPANIC2(ESqlPanicInvalidObj)); + __SQLASSERT(aStmtHandle != NULL, ESqlPanicInvalidObj); (void)sqlite3SymbianLastOsError();//clear last OS error - + TInt err; while((err = sqlite3_step(aStmtHandle)) == SQLITE_ROW) { @@ -470,7 +556,7 @@ if(err == SQLITE_ERROR) //It may be "out of memory" problem { err = sqlite3_reset(aStmtHandle); - __ASSERT_DEBUG(err != SQLITE_OK, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(err != SQLITE_OK, ESqlPanicInternalError); } err = ::Sql2OsErrCode(err, sqlite3SymbianLastOsError()); @@ -479,7 +565,7 @@ err = KErrNone; } - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, STMTEXEC_EXIT, "Exit;0x%X;StmtExec;aStmtHandle=0x%X;err=%d", (TUint)sqlite3_db_handle(aStmtHandle), (TUint)aStmtHandle, err)); + PRINT_ERRMSG16(err <= KSqlErrGeneral, sqlite3_db_handle(aStmtHandle), "StmtExec()", _L(" ")); return err; } @@ -502,8 +588,7 @@ */ TInt StmtNext(sqlite3_stmt* aStmtHandle) { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, STMTNEXT_ENTRY, "Entry;0x%X;StmtNext;aStmtHandle=0x%X", (TUint)sqlite3_db_handle(aStmtHandle), (TUint)aStmtHandle)); - __ASSERT_DEBUG(aStmtHandle != NULL, __SQLPANIC2(ESqlPanicInvalidObj)); + __SQLASSERT(aStmtHandle != NULL, ESqlPanicInvalidObj); (void)sqlite3SymbianLastOsError();//clear last OS error @@ -511,10 +596,10 @@ if(err == SQLITE_ERROR) //It may be "out of memory" problem { err = sqlite3_reset(aStmtHandle); - __ASSERT_DEBUG(err != SQLITE_OK, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(err != SQLITE_OK, ESqlPanicInternalError); } err = ::Sql2OsErrCode(err, sqlite3SymbianLastOsError()); - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, STMTNEXT_EXIT, "Exit;0x%X;StmtNext;aStmtHandle=0x%X;err=%d", (TUint)sqlite3_db_handle(aStmtHandle), (TUint)aStmtHandle, err)); + PRINT_ERRMSG16(err <= KSqlErrGeneral, sqlite3_db_handle(aStmtHandle), "StmtNext()", _L(" ")); return err; } @@ -532,15 +617,12 @@ */ TInt StmtReset(sqlite3_stmt* aStmtHandle) { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, STMTRESET_ENTRY, "Entry;0x%X;StmtReset;aStmtHandle=0x%X", (TUint)sqlite3_db_handle(aStmtHandle), (TUint)aStmtHandle)); - __ASSERT_DEBUG(aStmtHandle != NULL, __SQLPANIC2(ESqlPanicInvalidObj)); + __SQLASSERT(aStmtHandle != NULL, ESqlPanicInvalidObj); (void)sqlite3SymbianLastOsError();//clear last OS error TInt err = sqlite3_reset(aStmtHandle); - err = ::Sql2OsErrCode(err, sqlite3SymbianLastOsError()); - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, STMTRESET_EXIT, "Exit;0x%X;StmtReset;aStmtHandle=0x%X;err=%d", (TUint)sqlite3_db_handle(aStmtHandle), (TUint)aStmtHandle, err)); - return err; + return ::Sql2OsErrCode(err, sqlite3SymbianLastOsError()); } /** @@ -562,16 +644,12 @@ */ static TInt PreRetrievePragmaValue(sqlite3* aDbHandle, const TDesC& aDbName, const TDesC8& aPragmaSql, sqlite3_stmt*& aStmtHandle) { - __SQLTRACE_INTERNALSEXPR(TPtrC8 sqlprnptr(aPragmaSql.Left(aPragmaSql.Length() - 1))); - __SQLTRACE_INTERNALSVAR(TBuf<100> des16prnbuf); - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, PRERETRIEVEPRAGMAVALUE_ENTRY, "Entry;0x%X;PreRetrievePragmaValue;aDbName=%S;aPragmaSql=%s", (TUint)aDbHandle, __SQLPRNSTR(aDbName), __SQLPRNSTR8(sqlprnptr, des16prnbuf))); - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aPragmaSql.Length() > 0, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aPragmaSql[aPragmaSql.Length() - 1] == 0, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicInternalError); + __SQLASSERT(aPragmaSql.Length() > 0, ESqlPanicBadArgument); + __SQLASSERT(aPragmaSql[aPragmaSql.Length() - 1] == 0, ESqlPanicBadArgument); TBuf8 dbName; if(!UTF16ToUTF8(aDbName, dbName)) { - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, PRERETRIEVEPRAGMAVALUE_EXIT1, "Exit;0x%X;PreRetrievePragmaValue;err=KErrGeneral", (TUint)aDbHandle)); return KErrGeneral; } TBuf8 sql;//64 characters is enough for the longest PRAGMA statement @@ -587,10 +665,10 @@ TInt err = ::StmtPrepare8(aDbHandle, sql, aStmtHandle); if(err == KErrNone) { - __ASSERT_DEBUG(aStmtHandle != NULL, __SQLPANIC2(ESqlPanicInvalidObj)); + __SQLASSERT(aStmtHandle != NULL, ESqlPanicInvalidObj); err = ::StmtNext(aStmtHandle); } - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, PRERETRIEVEPRAGMAVALUE_EXIT2, "Exit;0x%X;PreRetrievePragmaValue;aStmtHandle=0x%X;err=%d", (TUint)aDbHandle, (TUint)aStmtHandle, err)); + PRINT_ERRMSG8(err <= KSqlErrGeneral, aDbHandle, "PreRetrievePragmaValue()", sql); return err; } @@ -613,9 +691,9 @@ */ static TInt RetrievePragmaValue(sqlite3* aDbHandle, const TDesC& aDbName, const TDesC8& aPragmaSql, TInt& aPragmaValue) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aPragmaSql.Length() > 0, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aPragmaSql[aPragmaSql.Length() - 1] == 0, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicInternalError); + __SQLASSERT(aPragmaSql.Length() > 0, ESqlPanicBadArgument); + __SQLASSERT(aPragmaSql[aPragmaSql.Length() - 1] == 0, ESqlPanicBadArgument); sqlite3_stmt* stmtHandle = NULL; TInt err = PreRetrievePragmaValue(aDbHandle, aDbName, aPragmaSql, stmtHandle); if(err == KSqlAtRow) @@ -646,9 +724,9 @@ */ static TInt RetrievePragmaValue(sqlite3* aDbHandle, const TDesC& aDbName, const TDesC8& aPragmaSql, TDes8& aPragmaValue) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicInternalError)); - __ASSERT_DEBUG(aPragmaSql.Length() > 0, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aPragmaSql[aPragmaSql.Length() - 1] == 0, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicInternalError); + __SQLASSERT(aPragmaSql.Length() > 0, ESqlPanicBadArgument); + __SQLASSERT(aPragmaSql[aPragmaSql.Length() - 1] == 0, ESqlPanicBadArgument); sqlite3_stmt* stmtHandle = NULL; TInt err = PreRetrievePragmaValue(aDbHandle, aDbName, aPragmaSql, stmtHandle); if(err == KSqlAtRow) @@ -678,7 +756,7 @@ */ TInt DbPageCount(sqlite3* aDbHandle, const TDesC& aDbName, TInt& aPageCount) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicInternalError); return RetrievePragmaValue(aDbHandle, aDbName, KPageCountPragma, aPageCount); } @@ -699,7 +777,7 @@ */ TInt DbPageSize(sqlite3* aDbHandle, const TDesC& aDbName, TInt& aPageSize) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicInternalError); return RetrievePragmaValue(aDbHandle, aDbName, KPageSizePragma, aPageSize); } @@ -720,7 +798,7 @@ */ TInt DbCacheSize(sqlite3* aDbHandle, const TDesC& aDbName, TInt& aCacheSize) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicInternalError); return RetrievePragmaValue(aDbHandle, aDbName, KCacheSizePragma, aCacheSize); } @@ -741,7 +819,7 @@ */ TInt DbEncoding(sqlite3* aDbHandle, const TDesC& aDbName, TDes8& aEncoding) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicInternalError); return RetrievePragmaValue(aDbHandle, aDbName, KEncodingPragma, aEncoding); } @@ -762,7 +840,7 @@ */ TInt DbFreePageCount(sqlite3* aDbHandle, const TDesC& aDbName, TInt& aPageCount) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicInternalError); return RetrievePragmaValue(aDbHandle, aDbName, KFreePageCountPragma, aPageCount); } @@ -783,13 +861,13 @@ */ TInt DbVacuumMode(sqlite3* aDbHandle, const TDesC& aDbName, TInt& aVacuumMode) { - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aDbHandle != NULL, ESqlPanicInternalError); return RetrievePragmaValue(aDbHandle, aDbName, KVacuumModePragma, aVacuumMode); } static TBool IsCompactTimeLimitReached(TUint32 aStartTicks, TUint32 aCurrTicks, TInt aMaxTime) { - __ASSERT_DEBUG(aMaxTime > 0, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aMaxTime > 0, ESqlPanicBadArgument); TInt64 tickDiff64 = (TInt64)aCurrTicks - (TInt64)aStartTicks; if(tickDiff64 < 0) { @@ -800,7 +878,6 @@ if(freq == 0) { err = HAL::Get(HAL::EFastCounterFrequency, freq); - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, ISCOMPACTTIMELIMITREACHED, "0;IsCompactTimeLimitReached;fast counter frequency=%d;err=%d", freq, err)); } if(err == KErrNone && freq > 0) { @@ -835,14 +912,12 @@ */ TInt DbCompact(sqlite3* aDbHandle, const TDesC& aDbName, TInt aPageCount, TInt& aProcessedPageCount, TInt aMaxTime) { - SQL_TRACE_INTERNALS(OstTraceExt4(TRACE_INTERNALS, DBCOMPACT_ENTRY, "Entry;0x%X;DbCompact;aDbName=%S;aPageCount=%d;aMaxTime=%d", (TUint)aDbHandle, __SQLPRNSTR(aDbName), aPageCount, aMaxTime)); - __ASSERT_DEBUG(aPageCount >= 0, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aMaxTime >= 0, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aPageCount >= 0, ESqlPanicBadArgument); + __SQLASSERT(aMaxTime >= 0, ESqlPanicBadArgument); + __SQLASSERT(aDbHandle != NULL, ESqlPanicInternalError); TBuf8 dbName; if(!UTF16ToUTF8(aDbName, dbName)) { - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, DBCOMPACT_EXIT1, "Exit;0x%X;DbCompact;err=KErrGeneral", (TUint)aDbHandle)); return KErrGeneral; } TBuf8 sql; @@ -866,7 +941,7 @@ // - byte length of the sql statement (parameter #2), excluding terminating zero; // - negative value - the sql statement (parameter #2) is zero-terminated; TInt err = sqlite3_prepare_v2(aDbHandle, (const char*)sql.Ptr(), sql.Length() - sizeof(TUint8), &stmtHandle, &stmtTail); - __ASSERT_DEBUG(err == SQLITE_OK ? !stmtTail || User::StringLength((const TUint8*)stmtTail) == 0 : !stmtHandle, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(err == SQLITE_OK ? !stmtTail || User::StringLength((const TUint8*)stmtTail) == 0 : !stmtHandle, ESqlPanicInternalError); if(stmtHandle) //stmtHandle can be NULL for statements like this: ";". { if(err == SQLITE_OK) @@ -888,7 +963,7 @@ if(err == SQLITE_ERROR) //It may be "out of memory" problem { err = sqlite3_reset(stmtHandle); - __ASSERT_DEBUG(err != SQLITE_OK, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(err != SQLITE_OK, ESqlPanicInternalError); } } (void)sqlite3_finalize(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed. @@ -898,7 +973,7 @@ { err = KErrNone; } - SQL_TRACE_INTERNALS(OstTraceExt3(TRACE_INTERNALS, DBCOMPACT_EXIT2, "Exit;0x%X;DbCompact;aProcessedPageCount=%d;err=%d", (TUint)aDbHandle, aProcessedPageCount, err)); + PRINT_ERRMSG8(err <= KSqlErrGeneral, aDbHandle, "DbCompact()", sql); return err; } @@ -914,7 +989,6 @@ */ TInt FinalizeStmtHandle(sqlite3_stmt* aStmtHandle) { - SQL_TRACE_INTERNALS(OstTraceExt2(TRACE_INTERNALS, FINALIZESTMTHANDLE_ENTRY, "Entry;0x%X;FinalizeStmtHandle;aStmtHandle=0x%X", (TUint)sqlite3_db_handle(aStmtHandle), (TUint)aStmtHandle)); TInt err = KErrNone; if(aStmtHandle) { @@ -922,6 +996,5 @@ err = sqlite3_finalize(aStmtHandle); err = ::Sql2OsErrCode(err, sqlite3SymbianLastOsError()); } - SQL_TRACE_INTERNALS(OstTrace1(TRACE_INTERNALS, FINALIZESTMTHANDLE_EXIT, "Exit;0;FinalizeStmtHandle;err=%d", err)); return err; } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvUtil.cpp --- a/persistentstorage/sql/SRC/Server/SqlSrvUtil.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvUtil.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -14,15 +14,10 @@ // #include //wchar_t -#include "SqlAssert.h" +#include "SqlPanic.h" #include "SqlSrvUtil.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqlSrvUtilTraces.h" -#endif -#include "SqlTraceDef.h" -#ifdef _SQL_AUTHORIZER_TRACE_ENABLED +#ifdef _NOTIFY //Used in PrintAuthorizerArguments() _LIT8(KCreateIndex, "Create index"); //SQLITE_CREATE_INDEX @@ -71,9 +66,9 @@ KCreateVTable(), KDropVTable(), KFunctionCall() }; -#ifdef _DEBUG const TInt KMaxOpCodes = sizeof(KDbOpNames) / sizeof(KDbOpNames[0]); -#endif + +_LIT(KFormatStr, "!!Authorize: %20.20S, %40.40S, %10.10S, %10.10S, %10.10S\r\n"); /** This function has a defined implementaion only in _DEBUG mode and is used to print the authorizer arguments. @@ -83,7 +78,7 @@ void PrintAuthorizerArguments(TInt aDbOpType, const char* aDbObjName1, const char* aDbObjName2, const char* aDbName, const char* aTrgOrViewName) { - __ASSERT_DEBUG(aDbOpType > 0 && aDbOpType <= KMaxOpCodes, __SQLPANIC2(ESqlPanicInternalError)); + __SQLASSERT(aDbOpType > 0 && aDbOpType <= KMaxOpCodes, ESqlPanicInternalError); //TPtrC8 objects cannot be used for the function arguments, because the arguments may not be 16-bit aligned!!! @@ -131,9 +126,9 @@ } } - SQL_TRACE_AUTHORIZER(OstTraceExt5(TRACE_INTERNALS, SQLAUTHORIZER, "0;PrintAuthorizerArguments;%20.20S;%40.40S;%10.10S;%10.10S;%10.10S", __SQLPRNSTR(opName), __SQLPRNSTR(dbObjName1), __SQLPRNSTR(dbObjName2), __SQLPRNSTR(dbName), __SQLPRNSTR(trgOrViewName))); + RDebug::Print(KFormatStr, &opName, &dbObjName1, &dbObjName2, &dbName, &trgOrViewName); } -#endif//_SQL_AUTHORIZER_TRACE_ENABLED +#endif//_NOTIFY /** Converts a UTF16 encoded descriptor to a UTF8 encoded descriptor. @@ -150,8 +145,8 @@ */ TBool UTF16ToUTF8(const TDesC& aIn, TDes8& aOut) { - __ASSERT_DEBUG(aIn.Length() <= KMaxFileName, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aOut.MaxLength() >= KMaxFileName, __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aIn.Length() <= KMaxFileName, ESqlPanicBadArgument); + __SQLASSERT(aOut.MaxLength() >= KMaxFileName, ESqlPanicBadArgument); TBuf16 des; des.Copy(aIn); des.Append(TChar(0)); @@ -180,9 +175,9 @@ */ TBool UTF16ZToUTF8Z(const TDesC& aFileName, TDes8& aFileNameDestBuf) { - __ASSERT_DEBUG(aFileName.Length() <= (KMaxFileName + 1), __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aFileName[aFileName.Length() - 1] == 0, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aFileNameDestBuf.MaxLength() >= (KMaxFileName + 1), __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aFileName.Length() <= (KMaxFileName + 1), ESqlPanicBadArgument); + __SQLASSERT(aFileName[aFileName.Length() - 1] == 0, ESqlPanicBadArgument); + __SQLASSERT(aFileNameDestBuf.MaxLength() >= (KMaxFileName + 1), ESqlPanicBadArgument); const wchar_t* src = reinterpret_cast (aFileName.Ptr()); TInt len = wcstombs((char*)aFileNameDestBuf.Ptr(), src, KMaxFileName); //Check the file name length. If it is longer than KMaxFileName characters, then the file name is not valid. @@ -209,8 +204,8 @@ */ TBool UTF16ToUTF8Z(const TDesC& aFileName, TDes8& aFileNameDestBuf) { - __ASSERT_DEBUG(aFileName.Length() <= KMaxFileName, __SQLPANIC2(ESqlPanicBadArgument)); - __ASSERT_DEBUG(aFileNameDestBuf.MaxLength() >= (KMaxFileName + 1), __SQLPANIC2(ESqlPanicBadArgument)); + __SQLASSERT(aFileName.Length() <= KMaxFileName, ESqlPanicBadArgument); + __SQLASSERT(aFileNameDestBuf.MaxLength() >= (KMaxFileName + 1), ESqlPanicBadArgument); TBool rc = ::UTF16ToUTF8(aFileName, aFileNameDestBuf); if(rc) { @@ -228,6 +223,6 @@ {//Non-existing file return EFalse; } - __SQLLEAVE_IF_ERROR2(err); + __SQLLEAVE_IF_ERROR(err); return entry.IsReadOnly(); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/SRC/Server/SqlSrvUtil.h --- a/persistentstorage/sql/SRC/Server/SqlSrvUtil.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvUtil.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -24,13 +24,10 @@ inline TBool IsSystemTableName(const TDesC8& aTableName); inline TBool IsSqliteTableName(const TDesC8& aTableName); -#ifdef _SQL_AUTHORIZER_TRACE_ENABLED -void PrintAuthorizerArguments(TInt aDbOpType, - const char* aDbObjName1, - const char* aDbObjName2, - const char* aDbName, - const char* aTrgOrViewName); -#endif +#ifdef _NOTIFY +void PrintAuthorizerArguments(TInt aDbOpType, const char* aDbObjName1, const char* aDbObjName2, + const char* aDbName, const char* aTrgOrViewName); +#endif//_NOTIFY TBool UTF16ToUTF8(const TDesC& aIn, TDes8& aOut); TBool UTF16ZToUTF8Z(const TDesC& aFileName, TDes8& aFileNameDestBuf); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/t_sqldbconfigfile.cpp --- a/persistentstorage/sql/TEST/t_sqldbconfigfile.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/TEST/t_sqldbconfigfile.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -85,10 +85,8 @@ _LIT8(KCfgDb1ConfigFileV14CCommentStmt, "CREATE INDEX v14Idx ON table1(i3) /* this is a C comment */;"); //KLongDbName1 is "long" enough to allow "-journal" to be added at the end. -//Also, on simulators/emulators the file names have a prefix with length of about 30 characters -//(something like \epoc\winscw\c\....) -_LIT(KLongDbName1, "c:[1111C1C1]a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a.db"); -_LIT(KLongCfgName1, "c:\\private\\10281e17\\cfg[1111C1C1]a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a.db.01"); +_LIT(KLongDbName1, "c:[1111C1C1]a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a1234.db"); +_LIT(KLongCfgName1, "c:\\private\\10281e17\\cfg[1111C1C1]a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a1234.db.01"); _LIT(KSqlSrvPrivatePath, "\\private\\10281e17\\"); _LIT(KResetCollationDllSql, "UPDATE symbian_settings SET CollationDllName='hjagafsff'"); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/t_sqldefect2.cpp --- a/persistentstorage/sql/TEST/t_sqldefect2.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/TEST/t_sqldefect2.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -377,8 +377,44 @@ // TheDb1.Close(); err = RSqlDatabase::Delete(KTestDatabase1); + TEST2(err, KErrNone); + } + +/** +@SYMTestCaseID PDS-SQL-CT-4214 +@SYMTestCaseDesc Test for the change "After *#7370# Java apps are not preinstalled again" +@SYMTestPriority High +@SYMTestActions The test makes sure there are no issues if the temp folder is removed after the server + has already started. The test performs the following actions - + 1. Delete the 'temp' directory. + 2. Create a transaction which creates temp files. + 3. Check 'temp' folder exists at the end +@SYMTestExpectedResults Test must not fail +*/ +void DeleteTempFolder() + { + //1. Delete 'temp' folder + TInt err = TheFs.RmDir(KServerTempDir); TEST2(err, KErrNone); - } + + //2. Create a transaction which creates temp files. + (void)RSqlDatabase::Delete(KTestDatabase1); + err = TheDb1.Create(KTestDatabase1); + TEST2(err, KErrNone); + + err = TheDb1.Exec(_L("CREATE TABLE t1(x UNIQUE); INSERT INTO t1 VALUES(1)")); + TEST(err >= 0); + err = TheDb1.Exec(_L("BEGIN; UPDATE t1 SET x = 2; UPDATE t1 SET x = 3; COMMIT")); + TEST(err >= 0); + + TheDb1.Close(); + err = RSqlDatabase::Delete(KTestDatabase1); + TEST2(err, KErrNone); + + //3. Check 'temp' folder exists + err = TheFs.MkDir(KServerTempDir); + TEST2(err, KErrAlreadyExists); + } /** @SYMTestCaseID PDS-SQL-CT-4213 @@ -467,42 +503,6 @@ } } -/** -@SYMTestCaseID PDS-SQL-CT-4214 -@SYMTestCaseDesc Test for the change "After *#7370# Java apps are not preinstalled again" -@SYMTestPriority High -@SYMTestActions The test makes sure there are no issues if the temp folder is removed after the server - has already started. The test performs the following actions - - 1. Delete the 'temp' directory. - 2. Create a transaction which creates temp files. - 3. Check 'temp' folder exists at the end -@SYMTestExpectedResults Test must not fail -*/ -void DeleteTempFolder() - { - //1. Delete 'temp' folder - TInt err = TheFs.RmDir(KServerTempDir); - TEST2(err, KErrNone); - - //2. Create a transaction which creates temp files. - (void)RSqlDatabase::Delete(KTestDatabase1); - err = TheDb1.Create(KTestDatabase1); - TEST2(err, KErrNone); - - err = TheDb1.Exec(_L("CREATE TABLE t1(x UNIQUE); INSERT INTO t1 VALUES(1)")); - TEST(err >= 0); - err = TheDb1.Exec(_L("BEGIN; UPDATE t1 SET x = 2; UPDATE t1 SET x = 3; COMMIT")); - TEST(err >= 0); - - TheDb1.Close(); - err = RSqlDatabase::Delete(KTestDatabase1); - TEST2(err, KErrNone); - - //3. Check 'temp' folder exists - err = TheFs.MkDir(KServerTempDir); - TEST2(err, KErrAlreadyExists); - } - void DoTestsL() { TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-4154 DEF143062: SQL, \"CREATE INDEX\" sql crashes SQL server")); @@ -514,16 +514,16 @@ TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-4156 DEF143150: SQL, strftime() returns incorrect result")); DEF143150(); - TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4210 Temp files created during sql operations are not deleted after rebooting the phone - 1")); + TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-4210 Temp files created during sql operations are not deleted after rebooting the phone - 1")); DeleteTempFile(); - TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4211 Temp files created during sql operations are not deleted after rebooting the phone - 2")); + TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-4211 Temp files created during sql operations are not deleted after rebooting the phone - 2")); TempFileTest(); TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4213 No support to store an empty string in symbian's sqlite.")); EmptyTextColumnTest(); - - TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4214 After *#7370# Java apps are not preinstalled again")); + + TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-4214 After *#7370# Java apps are not preinstalled again")); DeleteTempFolder(); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/t_sqlood.cpp --- a/persistentstorage/sql/TEST/t_sqlood.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/TEST/t_sqlood.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -63,10 +63,7 @@ #endif -_LIT8(KDatabasePageSizeConfig, "page_size=1024"); - -const TInt KMaxTestRecordsCount = 350; -TInt TestRecordsCount = 0; +const TInt KTestRecordsCount = 350; /////////////////////////////////////////////////////////////////////////////////////// @@ -205,78 +202,24 @@ RDebug::Print(_L("CreateLargeFile: free space after = %ld\r\n"), diskSpace); } - -// Number of bytes in the default journal header size. -const TInt KJournalHeaderSize = 0x200; - -// Number of bytes added to each database page in the journal. -const TInt KJournalPageOverhead = 8; - -// The default amount of reserved space provided by the ReserveDriveSpace API -const TInt KReserveDriveSpaceAmount = 64*1024; - //Creates and fills with some records a test database void CreateAndFillTestDatabase(RSqlDatabase& aDb) { - TInt err = aDb.Create(KTestDatabase, &KDatabasePageSizeConfig); + TInt err = aDb.Create(KTestDatabase); TEST2(err, KErrNone); err = aDb.Exec(_L("CREATE TABLE A(Id INTEGER, Data TEXT)")); TEST(err >= 0); - - // - // Find the page size of the database on this media - // - TBuf<200> sql; - sql.Copy(_L("PRAGMA page_size")); - TSqlScalarFullSelectQuery q(aDb); - TInt pageSize = 0; - TRAP(err, pageSize = q.SelectIntL(sql);); - //RDebug::Print(_L("Error %d Page Size %d"),err,pageSize); - TEST2(err, KErrNone); - TEST(pageSize > 0); - //RDebug::Print(_L("Page Size %d"),pageSize); - - // - // Find the sector size of this media - // - TDriveInfo driveInfo; - err = TheFs.Drive(driveInfo, KTestDrive); - TEST2(err, KErrNone); - TVolumeIOParamInfo volumeInfo; - err = TheFs.VolumeIOParam(KTestDrive, volumeInfo); - TEST2(err, KErrNone); - TInt sectorSize = volumeInfo.iBlockSize; - //RDebug::Print(_L("Sector Size %d"),sectorSize); - - TInt journalHeaderSize = Max(sectorSize, KJournalHeaderSize); - //RDebug::Print(_L("Journal Header Size %d"),journalHeaderSize); - - // - // Keep adding to database until it is a size such that all the data can still be deleted within the reserved disk space size. - // Do this piece-wise not in a transaction. - // - TInt i; - for(i=0;i= 0); + for(TInt i=0;i sql; sql.Format(_L("INSERT INTO A(Id, Data) VALUES(%d, 'A0123456789B0123456789C0123456789D0123456789E0123456789F0123456789G0123456789H0123456789')"), i + 1); err = aDb.Exec(sql); TEST2(err, 1); - - TInt size = aDb.Size(); - TInt numberOfPages = size/pageSize; - TInt predictedJournalSize = journalHeaderSize + numberOfPages * (pageSize + KJournalPageOverhead); - //RDebug::Print(_L("Size %d, Pages %d, predictedJournalSize %d"),size, numberOfPages, predictedJournalSize); - - // Will another page take us over the limit ? - if ((predictedJournalSize + (pageSize + KJournalPageOverhead)) >= (KReserveDriveSpaceAmount)) - { - break; - } } - TestRecordsCount = i + 1; - - //RDebug::Print(_L("TestRecordsCount %d"),TestRecordsCount); - + err = aDb.Exec(_L("COMMIT TRANSACTION")); + TEST(err >= 0); } //Tries to delete test database records @@ -284,7 +227,7 @@ { TInt err = aDb.Exec(_L("BEGIN TRANSACTION")); TEST(err >= 0); - for(TInt i=0;i sql; sql.Format(_L("DELETE FROM A WHERE Id = %d"), i + 1); @@ -307,7 +250,7 @@ void SimpleCallsTest() { RSqlDatabase db, db2; - TInt err = db.Create(KTestDatabase, &KDatabasePageSizeConfig); + TInt err = db.Create(KTestDatabase); TEST2(err, KErrNone); err = db2.Open(KTestDatabase); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/t_sqloom.h --- a/persistentstorage/sql/TEST/t_sqloom.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/TEST/t_sqloom.h Wed Sep 01 12:39:58 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" diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/t_sqloslayer.cpp --- a/persistentstorage/sql/TEST/t_sqloslayer.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/TEST/t_sqloslayer.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -27,7 +27,6 @@ #ifdef __cplusplus } /* End of the 'extern "C"' block */ #endif -#include "SqliteUtil.h" /////////////////////////////////////////////////////////////////////////////////////// @@ -53,11 +52,6 @@ TInt TheSqlSrvProfilerFileSetSize = 0; #endif -#ifdef _DEBUG -//SQLite panic category. -_LIT(KSqlitePanicCategory, "Sqlite"); -#endif - /////////////////////////////////////////////////////////////////////////////////////// void DeleteTestFiles() @@ -779,71 +773,6 @@ User::Free(osFile); } -/////////////////////////////////////////////////////////////////////////////////////// - -//Panic thread function. -//It will cast aData parameter to a TFunctor pointer and call it. -//The expectation is that the called function will panic and kill the panic thread. -TInt ThreadFunc(void* aData) - { - CTrapCleanup* tc = CTrapCleanup::New(); - TEST(tc != NULL); - - User::SetJustInTime(EFalse); // disable debugger panic handling - - TFunctor* obj = reinterpret_cast (aData); - TEST(obj != NULL); - (*obj)();//call the panic function - - delete tc; - - return KErrNone; - } - -//Panic test. -//PanicTest function will create a new thread - panic thread, giving it a pointer to the function which has to -//be executed and the expectation is that the function will panic and kill the panic thread. -//PanicTest function will check the panic thread exit code, exit category and the panic code. -void PanicTest(TFunctor& aFunctor, TExitType aExpectedExitType, const TDesC& aExpectedCategory, TInt aExpectedPanicCode) - { - RThread thread; - _LIT(KThreadName,"OsLayerPanicThread"); - TEST2(thread.Create(KThreadName, &ThreadFunc, 0x2000, 0x1000, 0x10000, (void*)&aFunctor, EOwnerThread), KErrNone); - - TRequestStatus status; - thread.Logon(status); - TEST2(status.Int(), KRequestPending); - thread.Resume(); - User::WaitForRequest(status); - User::SetJustInTime(ETrue); // enable debugger panic handling - - TEST2(thread.ExitType(), aExpectedExitType); - TEST(thread.ExitCategory() == aExpectedCategory); - TEST2(thread.ExitReason(), aExpectedPanicCode); - - CLOSE_AND_WAIT(thread); - } - -//////////////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////// Panic test functions ///////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifdef _DEBUG - -//Panic when calling COsLayerData::Create() is called and the OS layer data has been already created. -class TOsLayerDataDuplicated : public TFunctor - { -private: - virtual void operator()() - { - (void)sqlite3SymbianLibInit();//This should crash the thread in debug mode (because the Os layer - //data was created already in TestEnvInit()). - } - }; -static TOsLayerDataDuplicated TheOsLayerDataDuplicated; - -#endif //_DEBUG - /** @SYMTestCaseID SYSLIB-SQL-CT-1650 @SYMTestCaseDesc SQL, OS porting layer tests. @@ -877,10 +806,6 @@ VfsOpenTempFileFileIoErrTest(); TheTest.Printf(_L("TVfs::Open(<'delete on close' file>) OOM test\r\n")); VfsCreateDeleteOnCloseFileOomTest(); -#ifdef _DEBUG - TheTest.Printf(_L("'An attempt to create the OS layer data again' panic\r\n")); - PanicTest(TheOsLayerDataDuplicated, EExitPanic, KSqlitePanicCategory, ESqliteOsPanicOsLayerDataExists); -#endif //_DEBUG } TInt E32Main() diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/testexecute/SQLite/config/Robustness.ini.DEVBOARD --- a/persistentstorage/sql/TEST/testexecute/SQLite/config/Robustness.ini.DEVBOARD Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/TEST/testexecute/SQLite/config/Robustness.ini.DEVBOARD Wed Sep 01 12:39:58 2010 +0100 @@ -14,9 +14,9 @@ // Add a small amount of data and check it. NewBlock3=AddBlock10-1 NewBlock4=CheckBlock10-1 -// Fill the disk to within 100K of full. First fill to within 160k so we have -// an easy way of quickly getting 60K of disk back - by deleting 'fillfile'. -NewBlock5=FillDisk160K +// Fill the disk to within 100K of full. First fill to within 150k so we have +// an easy way of quickly getting 50K of disk back - by deleting 'fillfile'. +NewBlock5=FillDisk150K NewBlock6=FillDisk100K NoOperation7= @@ -25,7 +25,7 @@ NewBlock8=FillDisk1 Close9= -// This will return things to 60K of disk free (because we filled to 160K, +// This will return things to 50K of disk free (because we filled to 150K, // then to 100K with this file). Delete10=E:\fillfile.txt @@ -124,11 +124,11 @@ DiskFree=4194304 EndBlock1= -// Fill the disk to within 160K of full. -[FillDisk160K] +// Fill the disk to within 150K of full. +[FillDisk150K] Function0=NearFillDisk FillFile=E:\fillfile2.txt -DiskFree=168960 +DiskFree=153600 EndBlock1= // Fill the disk to within 100K of full. @@ -298,7 +298,7 @@ Exec7=Create Table TheAttached.Sometable(Someint int, Somereal real, Sometext text); // Fill the disk to within 100K of full (with a file..) -NewBlock8=FillDisk160K +NewBlock8=FillDisk150K NewBlock9=FillDisk100K // Fill up the drive with the attached database, first with big records, @@ -330,9 +330,9 @@ ExpectedError22=KErrInUse // Beyond this point we can't expect anything to work (necessarily) because -// there isn't any disk space left. So grab free off 60K to make sure +// there isn't any disk space left. So grab free off 50K to make sure // (the fill to within 100K of full file which was created after filling -// to within 160K of full). +// to within 150K of full). Delete23=E:\fillfile.txt NoOperation24= NoOperation25= diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/testexecute/SQLite/data/{102827c7}sec1.db- AS fred; delete from names; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/testexecute/SQLite/group/bld.inf --- a/persistentstorage/sql/TEST/testexecute/SQLite/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/TEST/testexecute/SQLite/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -13,59 +13,103 @@ // Description: // +PRJ_EXPORTS + +PRJ_MMPFILES PRJ_TESTEXPORTS -te_SQL_suite.iby /epoc32/rom/include/te_sql_suite.iby +te_SQL_suite.iby /epoc32/rom/include/te_sql_suite.iby + +//SQL TestExecute Main scripts -// SQL TestExecute Main scripts -../scripts/te_SQL_suite.script z:/tef_sql/te_sql_suite.script -../scripts/BasicSQL2.script z:/tef_sql/basicsql2.script -../scripts/BasicSQL2-8S.script z:/tef_sql/basicsql2-8s.script -../scripts/Robustness.script z:/tef_sql/robustness.script -../scripts/Panics.script z:/tef_sql/panics.script -../scripts/TypeConversion.script z:/tef_sql/typeconversion.script -../scripts/SomeExceptions.script z:/tef_sql/someexceptions.script -../scripts/BasicSQL.script z:/tef_sql/basicsql.script -../scripts/Configuration.script z:/tef_sql/configuration.script -../scripts/Concurrent.script z:/tef_sql/concurrent.script -../scripts/BUR.script z:/tef_sql/bur.script -../scripts/security.script z:/tef_sql/security.script -../scripts/collation.script z:/tef_sql/collation.script +../scripts/te_SQL_suite.script /epoc32/release/winscw/udeb/z/tef_sql/te_sql_suite.script +../scripts/te_SQL_suite.script /epoc32/release/winscw/urel/z/tef_sql/te_sql_suite.script +../scripts/BasicSQL2.script /epoc32/release/winscw/udeb/z/tef_sql/basicsql2.script +../scripts/BasicSQL2.script /epoc32/release/winscw/urel/z/tef_sql/basicsql2.script +../scripts/BasicSQL2-8S.script /epoc32/release/winscw/udeb/z/tef_sql/basicsql2-8s.script +../scripts/BasicSQL2-8S.script /epoc32/release/winscw/urel/z/tef_sql/basicsql2-8s.script +../scripts/Robustness.script /epoc32/release/winscw/udeb/z/tef_sql/robustness.script +../scripts/Robustness.script /epoc32/release/winscw/urel/z/tef_sql/robustness.script +../scripts/Panics.script /epoc32/release/winscw/udeb/z/tef_sql/panics.script +../scripts/Panics.script /epoc32/release/winscw/urel/z/tef_sql/panics.script +../scripts/TypeConversion.script /epoc32/release/winscw/udeb/z/tef_sql/typeconversion.script +../scripts/TypeConversion.script /epoc32/release/winscw/urel/z/tef_sql/typeconversion.script +../scripts/SomeExceptions.script /epoc32/release/winscw/udeb/z/tef_sql/someexceptions.script +../scripts/SomeExceptions.script /epoc32/release/winscw/urel/z/tef_sql/someexceptions.script +../scripts/BasicSQL.script /epoc32/release/winscw/udeb/z/tef_sql/basicsql.script +../scripts/BasicSQL.script /epoc32/release/winscw/urel/z/tef_sql/basicsql.script +../scripts/Configuration.script /epoc32/release/winscw/udeb/z/tef_sql/configuration.script +../scripts/Configuration.script /epoc32/release/winscw/urel/z/tef_sql/configuration.script +../scripts/Concurrent.script /epoc32/release/winscw/udeb/z/tef_sql/concurrent.script +../scripts/Concurrent.script /epoc32/release/winscw/urel/z/tef_sql/concurrent.script +../scripts/BUR.script /epoc32/release/winscw/udeb/z/tef_sql/bur.script +../scripts/BUR.script /epoc32/release/winscw/urel/z/tef_sql/bur.script +../scripts/security.script /epoc32/release/winscw/udeb/z/tef_sql/security.script +../scripts/security.script /epoc32/release/winscw/urel/z/tef_sql/security.script +../scripts/collation.script /epoc32/release/winscw/udeb/z/tef_sql/collation.script +../scripts/collation.script /epoc32/release/winscw/urel/z/tef_sql/collation.script -// SQL TestExecute config files -../config/APIBasic.ini z:/tef_sql/apibasic.ini -../config/APIBasic2.ini z:/tef_sql/apibasic2.ini -../config/APIBasic2-8S.ini z:/tef_sql/apibasic2-8s.ini -../config/Panics.ini z:/tef_sql/panics.ini -../config/TypeConversion.ini z:/tef_sql/typeconversion.ini -../config/SomeExceptions.ini z:/tef_sql/someexceptions.ini -../config/constraints.ini z:/tef_sql/constraints.ini -../config/views.ini z:/tef_sql/views.ini -../config/robust_size.ini z:/tef_sql/robust_size.ini -../config/Configuration.ini z:/tef_sql/configuration.ini -../config/Concurrent.ini z:/tef_sql/concurrent.ini -../config/BUR.ini z:/tef_sql/bur.ini -../config/security.ini z:/tef_sql/security.ini -../config/collation.ini z:/tef_sql/collation.ini -// Target specific config files -../config/Robustness.ini.EMULATOR /epoc32/release/winscw/udeb/z/tef_sql/robustness.ini -../config/Robustness.ini.EMULATOR /epoc32/release/winscw/urel/z/tef_sql/robustness.ini -../config/Robustness.ini.DEVBOARD /epoc32/data/z/tef_sql/robustness.ini +//SQL TestExecute additional files +../config/APIBasic.ini /epoc32/release/winscw/udeb/z/tef_sql/apibasic.ini +../config/APIBasic.ini /epoc32/release/winscw/urel/z/tef_sql/apibasic.ini +../config/APIBasic2.ini /epoc32/release/winscw/udeb/z/tef_sql/apibasic2.ini +../config/APIBasic2.ini /epoc32/release/winscw/urel/z/tef_sql/apibasic2.ini +../config/APIBasic2-8S.ini /epoc32/release/winscw/udeb/z/tef_sql/apibasic2-8s.ini +../config/APIBasic2-8S.ini /epoc32/release/winscw/urel/z/tef_sql/apibasic2-8s.ini +../config/Robustness.ini.EMULATOR /epoc32/release/winscw/udeb/z/tef_sql/robustness.ini +../config/Robustness.ini.EMULATOR /epoc32/release/winscw/urel/z/tef_sql/robustness.ini +../config/Robustness.ini.DEVBOARD /epoc32/release/armv5/udeb/z/tef_sql/robustness.ini +../config/Robustness.ini.DEVBOARD /epoc32/release/armv5/urel/z/tef_sql/robustness.ini +../config/Panics.ini /epoc32/release/winscw/udeb/z/tef_sql/panics.ini +../config/Panics.ini /epoc32/release/winscw/urel/z/tef_sql/panics.ini +../config/TypeConversion.ini /epoc32/release/winscw/udeb/z/tef_sql/typeconversion.ini +../config/TypeConversion.ini /epoc32/release/winscw/urel/z/tef_sql/typeconversion.ini +../config/SomeExceptions.ini /epoc32/release/winscw/udeb/z/tef_sql/someexceptions.ini +../config/SomeExceptions.ini /epoc32/release/winscw/urel/z/tef_sql/someexceptions.ini +../config/constraints.ini /epoc32/release/winscw/udeb/z/tef_sql/constraints.ini +../config/constraints.ini /epoc32/release/winscw/urel/z/tef_sql/constraints.ini +../config/views.ini /epoc32/release/winscw/udeb/z/tef_sql/views.ini +../config/views.ini /epoc32/release/winscw/urel/z/tef_sql/views.ini +../config/robust_size.ini /epoc32/release/winscw/udeb/z/tef_sql/robust_size.ini +../config/robust_size.ini /epoc32/release/winscw/urel/z/tef_sql/robust_size.ini +../config/Configuration.ini /epoc32/release/winscw/udeb/z/tef_sql/configuration.ini +../config/Configuration.ini /epoc32/release/winscw/urel/z/tef_sql/configuration.ini +../config/Concurrent.ini /epoc32/release/winscw/udeb/z/tef_sql/concurrent.ini +../config/Concurrent.ini /epoc32/release/winscw/urel/z/tef_sql/concurrent.ini +../config/BUR.ini /epoc32/release/winscw/udeb/z/tef_sql/bur.ini +../config/BUR.ini /epoc32/release/winscw/urel/z/tef_sql/bur.ini +../config/security.ini /epoc32/release/winscw/udeb/z/tef_sql/security.ini +../config/security.ini /epoc32/release/winscw/urel/z/tef_sql/security.ini +../config/collation.ini /epoc32/release/winscw/udeb/z/tef_sql/collation.ini +../config/collation.ini /epoc32/release/winscw/urel/z/tef_sql/collation.ini // Reference data for various test cases. -../data/reference1.txt z:/tef_sql/testdata/reference1.txt -../data/reference1.bin z:/tef_sql/testdata/reference1.bin -../data/test1.db z:/tef_sql/testdata/test1.db -../data/ShortNonDb.db z:/tef_sql/testdata/shortnondb.db -../data/LongNonDb.db z:/tef_sql/testdata/longnondb.db -../data/ReadOnly.db z:/tef_sql/testdata/readonly.db -../data/Corrupt.db z:/tef_sql/testdata/corrupt.db -../data/backup_registration.xml z:/tef_sql/testdata/backup_registration.xml -../data/{102827c7}corrupt.db z:/tef_sql/testdata/[102827c7]corrupt.db -../data/ext.pol z:/tef_sql/testdata/ext.pol +../data/reference1.txt /epoc32/release/winscw/udeb/z/tef_sql/testdata/reference1.txt +../data/reference1.txt /epoc32/release/winscw/urel/z/tef_sql/testdata/reference1.txt +../data/reference1.bin /epoc32/release/winscw/udeb/z/tef_sql/testdata/reference1.bin +../data/reference1.bin /epoc32/release/winscw/urel/z/tef_sql/testdata/reference1.bin +../data/test1.db /epoc32/release/winscw/udeb/z/tef_sql/testdata/test1.db +../data/test1.db /epoc32/release/winscw/urel/z/tef_sql/testdata/test1.db +../data/ShortNonDb.db /epoc32/release/winscw/udeb/z/tef_sql/testdata/shortnondb.db +../data/ShortNonDb.db /epoc32/release/winscw/urel/z/tef_sql/testdata/shortnondb.db +../data/LongNonDb.db /epoc32/release/winscw/udeb/z/tef_sql/testdata/longnondb.db +../data/LongNonDb.db /epoc32/release/winscw/urel/z/tef_sql/testdata/longnondb.db +../data/ReadOnly.db /epoc32/release/winscw/udeb/z/tef_sql/testdata/readonly.db +../data/ReadOnly.db /epoc32/release/winscw/urel/z/tef_sql/testdata/readonly.db +../data/Corrupt.db /epoc32/release/winscw/udeb/z/tef_sql/testdata/corrupt.db +../data/Corrupt.db /epoc32/release/winscw/urel/z/tef_sql/testdata/corrupt.db +../data/backup_registration.xml /epoc32/release/winscw/udeb/z/tef_sql/testdata/backup_registration.xml +../data/backup_registration.xml /epoc32/release/winscw/urel/z/tef_sql/testdata/backup_registration.xml +../data/{102827c7}corrupt.db /epoc32/release/winscw/udeb/z/tef_sql/testdata/[102827c7]corrupt.db +../data/{102827c7}corrupt.db /epoc32/release/winscw/urel/z/tef_sql/testdata/[102827c7]corrupt.db +../data/ext.pol /epoc32/release/winscw/udeb/z/tef_sql/testdata/ext.pol +../data/ext.pol /epoc32/release/winscw/urel/z/tef_sql/testdata/ext.pol PRJ_TESTMMPFILES // TestExecute test binaries te_SQL_suite.mmp manual te_SQL_suite_cap1.mmp manual te_SQL_suite_cap2.mmp manual + + + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/testexecute/SQLite/group/te_SQL_suite.iby --- a/persistentstorage/sql/TEST/testexecute/SQLite/group/te_SQL_suite.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/TEST/testexecute/SQLite/group/te_SQL_suite.iby Wed Sep 01 12:39:58 2010 +0100 @@ -1,70 +1,75 @@ -// 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" -// 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: -// - +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ #ifndef __TE_SQL_SUITE_IBY__ #define __TE_SQL_SUITE_IBY__ #include -#include +#include "burtestserver.iby" -file=ABI_DIR\BUILD_DIR\Te_SQL_Suite.exe System\bin\Te_SQL_Suite.exe -file=ABI_DIR\BUILD_DIR\Te_SQL_Suite_cap1.exe System\bin\Te_SQL_Suite_cap1.exe -file=ABI_DIR\BUILD_DIR\Te_SQL_Suite_cap2.exe System\bin\Te_SQL_Suite_cap2.exe +file=ABI_DIR\BUILD_DIR\Te_SQL_Suite.exe System\bin\Te_SQL_Suite.exe +file=ABI_DIR\BUILD_DIR\Te_SQL_Suite_cap1.exe System\bin\Te_SQL_Suite_cap1.exe +file=ABI_DIR\BUILD_DIR\Te_SQL_Suite_cap2.exe System\bin\Te_SQL_Suite_cap2.exe -// Script files -data=DATAZ_\tef_sql\te_SQL_Suite.script tef_sql\te_SQL_Suite.script -data=DATAZ_\tef_sql\BasicSQL2.script tef_sql\BasicSQL2.script -data=DATAZ_\tef_sql\BasicSQL2-8S.script tef_sql\BasicSQL2-8S.script -data=DATAZ_\tef_sql\Robustness.script tef_sql\Robustness.script -data=DATAZ_\tef_sql\Concurrent.script tef_sql\Concurrent.script -data=DATAZ_\tef_sql\TypeConversion.script tef_sql\TypeConversion.script -data=DATAZ_\tef_sql\SomeExceptions.script tef_sql\SomeExceptions.script -data=DATAZ_\tef_sql\BasicSQL.script tef_sql\BasicSQL.script -data=DATAZ_\tef_sql\BUR.script tef_sql\BUR.script -data=DATAZ_\tef_sql\security.script tef_sql\security.script -data=DATAZ_\tef_sql\Configuration.script tef_sql\Configuration.script -data=DATAZ_\tef_sql\Panics.script tef_sql\Panics.script -data=DATAZ_\tef_sql\collation.script tef_sql\collation.script +//script files +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\te_SQL_Suite.script TEF_SQL\te_SQL_Suite.script +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\BasicSQL2.script TEF_SQL\BasicSQL2.script +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\BasicSQL2-8S.script TEF_SQL\BasicSQL2-8S.script +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\Robustness.script TEF_SQL\Robustness.script +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\Concurrent.script TEF_SQL\Concurrent.script +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\TypeConversion.script TEF_SQL\TypeConversion.script +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\SomeExceptions.script TEF_SQL\SomeExceptions.script +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\BasicSQL.script TEF_SQL\BasicSQL.script +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\BUR.script TEF_SQL\BUR.script +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\security.script TEF_SQL\security.script +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\Configuration.script TEF_SQL\Configuration.script +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\Panics.script TEF_SQL\Panics.script +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\collation.script TEF_SQL\collation.script + + +//config files -// Config files -data=DATAZ_\tef_sql\APIBasic.ini tef_sql\APIBasic.ini -data=DATAZ_\tef_sql\APIBasic2.ini tef_sql\APIBasic2.ini -data=DATAZ_\tef_sql\APIBasic2-8S.ini tef_sql\APIBasic2-8S.ini -data=DATAZ_\tef_sql\SomeExceptions.ini tef_sql\SomeExceptions.ini -data=DATAZ_\tef_sql\Robustness.ini tef_sql\Robustness.ini -data=DATAZ_\tef_sql\TypeConversion.ini tef_sql\TypeConversion.ini -data=DATAZ_\tef_sql\constraints.ini tef_sql\constraints.ini -data=DATAZ_\tef_sql\views.ini tef_sql\views.ini -data=DATAZ_\tef_sql\robust_size.ini tef_sql\robust_size.ini -data=DATAZ_\tef_sql\Configuration.ini tef_sql\Configuration.ini -data=DATAZ_\tef_sql\Concurrent.ini tef_sql\Concurrent.ini -data=DATAZ_\tef_sql\Panics.ini tef_sql\Panics.ini -data=DATAZ_\tef_sql\BUR.ini tef_sql\BUR.ini -data=DATAZ_\tef_sql\security.ini tef_sql\security.ini -data=DATAZ_\tef_sql\collation.ini tef_sql\collation.ini +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\APIBasic.ini TEF_SQL\APIBasic.ini +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\APIBasic2.ini TEF_SQL\APIBasic2.ini +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\APIBasic2-8S.ini TEF_SQL\APIBasic2-8S.ini +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\SomeExceptions.ini TEF_SQL\SomeExceptions.ini +data=EPOCROOT##Epoc32\release\armv5\udeb\z\TEF_SQL\Robustness.ini TEF_SQL\Robustness.ini +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\TypeConversion.ini TEF_SQL\TypeConversion.ini +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\constraints.ini TEF_SQL\constraints.ini +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\views.ini TEF_SQL\views.ini +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\robust_size.ini TEF_SQL\robust_size.ini +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\Configuration.ini TEF_SQL\Configuration.ini +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\Concurrent.ini TEF_SQL\Concurrent.ini +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\Panics.ini TEF_SQL\Panics.ini +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\BUR.ini TEF_SQL\BUR.ini +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\security.ini TEF_SQL\security.ini +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\collation.ini TEF_SQL\collation.ini -// Data files -data=DATAZ_\tef_sql\TestData\reference1.txt tef_sql\TestData\reference1.txt -data=DATAZ_\tef_sql\TestData\reference1.bin tef_sql\TestData\reference1.bin -data=DATAZ_\tef_sql\TestData\test1.db tef_sql\TestData\test1.db -data=DATAZ_\tef_sql\TestData\ShortNonDb.db tef_sql\TestData\ShortNonDb.db -data=DATAZ_\tef_sql\TestData\LongNonDb.db tef_sql\TestData\LongNonDb.db -data=DATAZ_\tef_sql\TestData\ReadOnly.db tef_sql\TestData\ReadOnly.db -data=DATAZ_\tef_sql\TestData\Corrupt.db tef_sql\TestData\Corrupt.db -data=DATAZ_\tef_sql\TestData\backup_registration.xml tef_sql\TestData\backup_registration.xml -data=DATAZ_\tef_sql\TestData\[102827c7]corrupt.db tef_sql\TestData\[102827c7]corrupt.db -data=DATAZ_\tef_sql\TestData\ext.pol tef_sql\TestData\ext.pol +//data files + +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\TestData\reference1.txt TEF_SQL\TestData\reference1.txt +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\TestData\reference1.bin TEF_SQL\TestData\reference1.bin +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\TestData\test1.db TEF_SQL\TestData\test1.db +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\TestData\ShortNonDb.db TEF_SQL\TestData\ShortNonDb.db +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\TestData\LongNonDb.db TEF_SQL\TestData\LongNonDb.db +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\TestData\ReadOnly.db TEF_SQL\TestData\ReadOnly.db +data=EPOCROOT##epoc32\release\winscw\udeb\z\TEF_SQL\TestData\Corrupt.db TEF_SQL\TestData\Corrupt.db +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\TestData\backup_registration.xml TEF_SQL\TestData\backup_registration.xml +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\TestData\[102827c7]corrupt.db TEF_SQL\TestData\[102827c7]corrupt.db +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\TestData\ext.pol TEF_SQL\TestData\ext.pol #endif // __TE_SQL_SUITE_IBY__ + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/testexecute/SQLite/scripts/Robustness.script --- a/persistentstorage/sql/TEST/testexecute/SQLite/scripts/Robustness.script Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/TEST/testexecute/SQLite/scripts/Robustness.script Wed Sep 01 12:39:58 2010 +0100 @@ -31,8 +31,6 @@ RUN_UTILS DeleteFile E:\fillfile.txt RUN_UTILS DeleteFile E:\fillfile2.txt RUN_UTILS DeleteFile E:\fillfile4M.txt -RUN_UTILS DeleteFile T:\fillDisk*.txt -RUN_UTILS DeleteFile E:\fillDisk*.txt START_TESTCASE SYSLIB-SQL-CIT-3348 @@ -163,5 +161,3 @@ RUN_UTILS DeleteFile E:\fillfile2.txt RUN_UTILS DeleteFile T:\fillfile4M.txt RUN_UTILS DeleteFile E:\fillfile4M.txt -RUN_UTILS DeleteFile T:\fillDisk*.txt -RUN_UTILS DeleteFile E:\fillDisk*.txt diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/testexecute/SQLite/src/cdtest.cpp --- a/persistentstorage/sql/TEST/testexecute/SQLite/src/cdtest.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/TEST/testexecute/SQLite/src/cdtest.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -312,55 +312,6 @@ return; } -//This function is needed for drives with more free space than KMaxTUint32 (4GB -1) -//This is because in a FAT32 file system, the maximum file size is (4GB-1) -//In the case where the free space is larger than this limit, this function will create additional -//file(s)until the disk is under the (4GB-1) limit. After that CSQLCDT::NearFillDisk will fill the -//disk up to the required amount. -void CSQLCDT::PrepareLargeDisk(const TDesC& /*acfgblk*/, const TDriveUnit atdu, TInt64 &atowrite) - { - _LIT(KTestFunction, "PrepareLargeDisk"); - _LIT(KFillDiskName,"\\FillDisk"); - _LIT(KFillDiskExt,".txt"); - TFileName fname; - TInt count = 1; - TInt err = 0; - - while(atowrite > KMaxTUint32) - { - RFile64 fillDiskFile; - fname.Copy(atdu.Name()); - fname.Append(KFillDiskName); - fname.AppendNum(count); - fname.Append(KFillDiskExt); - - if( (err = fillDiskFile.Create(irfs, fname, EFileWrite)) != KErrNone ) - { - SetTestStepResult(EFail); - INFO_PRINTF1(HTML_RED); - ERR_PRINTF4(_L("%S: Failed to open RFile64 for file %S, err %d"), - &KTestFunction, &fname, err ); - INFO_PRINTF1(HTML_COLOUR_OFF); - return; - } - - if( (err = fillDiskFile.SetSize(KMaxTUint32)) != KErrNone ) - { - SetTestStepResult(EFail); - INFO_PRINTF1(HTML_RED); - ERR_PRINTF4(_L("%S: Failed on RFile64::SetSize for file %S, err %d"), - &KTestFunction, &fname, err ); - INFO_PRINTF1(HTML_COLOUR_OFF); - fillDiskFile.Close(); - return; - } - - fillDiskFile.Close(); - atowrite-=KMaxTUint32; - count++; - } - } - // Create a file specified by 'FillFile' in the config and write to // it until 'DiskFree' bytes remain. Note that because files use whole // sectors (512/1024/2048/4096 or whatever bytes), that attempting to leave @@ -396,33 +347,29 @@ } // So how many bytes do we need to write? - TInt64 towrite = vol.iFree - free; - INFO_PRINTF4(_L("%S: Disk writing %Ld, free %Ld"), &KTestFunction, + TInt towrite = vol.iFree - free; + INFO_PRINTF4(_L("%S: Disk writing %d, free %d"), &KTestFunction, towrite, vol.iFree ); - INFO_PRINTF3(_L("%S: free %Ld"), &KTestFunction, vol.iFree ); - INFO_PRINTF3(_L("%S: writing %Ld"), &KTestFunction, towrite ); + INFO_PRINTF3(_L("%S: free %d"), &KTestFunction, vol.iFree ); + INFO_PRINTF3(_L("%S: writing %d"), &KTestFunction, towrite ); if( towrite < 0 ) { SetTestStepResult(EFail); INFO_PRINTF1(HTML_RED); - ERR_PRINTF3(_L("%S: Disk wanted remaining less than current(%Ld)"), + ERR_PRINTF3(_L("%S: Disk wanted remaining less than current(%d)"), &KTestFunction, vol.iFree ); INFO_PRINTF1(HTML_COLOUR_OFF); return; } - - //In case the disk is large (i.e >4G -1 bytes) we need another function to - //create more files to fill it - PrepareLargeDisk(acfgblk, tdu, towrite); - + // Get a file. - RFile64 myfile; + RFile myfile; if( (err = myfile.Create(irfs, fillfile, EFileWrite)) != KErrNone ) { SetTestStepResult(EFail); INFO_PRINTF1(HTML_RED); - ERR_PRINTF4(_L("%S: Failed to open RFile64 for file %S, err %d"), + ERR_PRINTF4(_L("%S: Failed to open RFile for file %S, err %d"), &KTestFunction, &fillfile, err ); INFO_PRINTF1(HTML_COLOUR_OFF); return; @@ -436,20 +383,18 @@ // remaining space tends to be a kilobyte or two less than requested. // Obviously this is likely to be different between file system types, // between hardware and emulator and so on. - - - TInt64 size = 0; + TInt size = 0; while(towrite > 0) { if(towrite < 1024) break; - TInt64 tow = towrite/2; + TInt tow = towrite/2; if(towrite < 4096) tow = towrite; size += tow; if( (err = myfile.SetSize(size)) != KErrNone ) { SetTestStepResult(EFail); INFO_PRINTF1(HTML_RED); - ERR_PRINTF4(_L("%S: Failed on RFile64::SetSize for file %S, err %d"), + ERR_PRINTF4(_L("%S: Failed on RFile::SetSize for file %S, err %d"), &KTestFunction, &fillfile, err ); INFO_PRINTF1(HTML_COLOUR_OFF); break; @@ -476,7 +421,7 @@ &KTestFunction, err); INFO_PRINTF1(HTML_COLOUR_OFF); } - INFO_PRINTF3(_L("%S: Disk remaining is %Ld"), &KTestFunction, vol.iFree ); + INFO_PRINTF3(_L("%S: Disk remaining is %d"), &KTestFunction, vol.iFree ); myfile.Close(); return; } @@ -538,8 +483,8 @@ actual = asfs->SelectIntL(stmt8); else actual = asfs->SelectIntL(stmt); - - TInt expected; + + TInt expected; if (res.CompareF(_L("DEFAULT_SOFT_HEAP_LIMIT")) == 0) { expected = KDefaultSoftHeapLimitKb; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/testexecute/SQLite/src/cdtest.h --- a/persistentstorage/sql/TEST/testexecute/SQLite/src/cdtest.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/TEST/testexecute/SQLite/src/cdtest.h Wed Sep 01 12:39:58 2010 +0100 @@ -39,9 +39,6 @@ void FilesDifferBySize(const TDesC &, const TInt ); void SecurityPolicyCheck(const TDesC &, const TInt ); void CollationTest(const TDesC &, const TInt ); - -private: - void PrepareLargeDisk(const TDesC&, const TDriveUnit atdu, TInt64 &atowrite); }; #endif // CDTEST_H__ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/testexecute/group/TEF_SQL.iby --- a/persistentstorage/sql/TEST/testexecute/group/TEF_SQL.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/TEST/testexecute/group/TEF_SQL.iby Wed Sep 01 12:39:58 2010 +0100 @@ -1,25 +1,27 @@ -// 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" -// 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: -// - +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ #ifndef __TEF_SQL_IBY__ #define __TEF_SQL_IBY__ #include + +//Main CentralRepository TEF Scripts +data=EPOCROOT##Epoc32\release\winscw\udeb\z\TEF_SQL\TEF_SQL.script TEF_SQL\TEF_SQL.script + #include -//Main SQL TEF Scripts -data=DATAZ_\tef_sql\tef_sql.script tef_sql\tef_sql.script - -#endif // __TEF_SQL_IBY__ +#endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/TEST/testexecute/group/bld.inf --- a/persistentstorage/sql/TEST/testexecute/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sql/TEST/testexecute/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -14,8 +14,10 @@ // PRJ_TESTEXPORTS -TEF_SQL.iby /epoc32/rom/include/tef_sql.iby -../scripts/TEF_SQL.script z:/tef_sql/tef_sql.script +TEF_SQL.iby /epoc32/rom/include/tef_sql.iby +../scripts/TEF_SQL.script /epoc32/release/winscw/urel/z/tef_sql/tef_sql.script +../scripts/TEF_SQL.script /epoc32/release/winscw/udeb/z/tef_sql/tef_sql.script //TEST EXECUTE FRAMEWORK TESTS #include "../SQLite/group/bld.inf" + diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/traces_SqlDb/OstTraceDefinitions.h --- a/persistentstorage/sql/traces_SqlDb/OstTraceDefinitions.h Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -#ifndef __OSTTRACEDEFINITIONS_H__ -#define __OSTTRACEDEFINITIONS_H__ -// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler -// REMOVE BEFORE CHECK-IN TO VERSION CONTROL -//#define OST_TRACE_COMPILER_IN_USE -#include -#endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/traces_SqlDb/fixed_id.definitions --- a/persistentstorage/sql/traces_SqlDb/fixed_id.definitions Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,154 +0,0 @@ -#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. -[GROUP]TRACE_BORDER=0x84 -[GROUP]TRACE_ERROR=0x82 -[GROUP]TRACE_FATAL=0x81 -[GROUP]TRACE_INTERNALS=0x88 -[TRACE]TRACE_BORDER[0x84]_RSQLBLOBREADSTREAM_OPENL_ENTRY=0x3a -[TRACE]TRACE_BORDER[0x84]_RSQLBLOBREADSTREAM_OPENL_EXIT=0x3b -[TRACE]TRACE_BORDER[0x84]_RSQLBLOBREADSTREAM_SIZEL_ENTRY=0x3c -[TRACE]TRACE_BORDER[0x84]_RSQLBLOBREADSTREAM_SIZEL_EXIT=0x3d -[TRACE]TRACE_BORDER[0x84]_RSQLBLOBWRITESTREAM_OPENL_ENTRY=0x3e -[TRACE]TRACE_BORDER[0x84]_RSQLBLOBWRITESTREAM_OPENL_EXIT=0x3f -[TRACE]TRACE_BORDER[0x84]_RSQLBLOBWRITESTREAM_SIZEL_ENTRY=0x40 -[TRACE]TRACE_BORDER[0x84]_RSQLBLOBWRITESTREAM_SIZEL_EXIT=0x41 -[TRACE]TRACE_BORDER[0x84]_RSQLCOLUMNREADSTREAM_COLUMNBINARYL_ENTRY=0x77 -[TRACE]TRACE_BORDER[0x84]_RSQLCOLUMNREADSTREAM_COLUMNBINARYL_EXIT=0x78 -[TRACE]TRACE_BORDER[0x84]_RSQLCOLUMNREADSTREAM_COLUMNBINARY_ENTRY=0x73 -[TRACE]TRACE_BORDER[0x84]_RSQLCOLUMNREADSTREAM_COLUMNBINARY_EXIT=0x74 -[TRACE]TRACE_BORDER[0x84]_RSQLCOLUMNREADSTREAM_COLUMNTEXTL_ENTRY=0x75 -[TRACE]TRACE_BORDER[0x84]_RSQLCOLUMNREADSTREAM_COLUMNTEXTL_EXIT=0x76 -[TRACE]TRACE_BORDER[0x84]_RSQLCOLUMNREADSTREAM_COLUMNTEXT_ENTRY=0x71 -[TRACE]TRACE_BORDER[0x84]_RSQLCOLUMNREADSTREAM_COLUMNTEXT_EXIT=0x72 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_ATTACH_ENTRY=0xf -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_ATTACH_EXIT=0x10 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_CLOSE_ENTRY=0xd -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_CLOSE_EXIT=0xe -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_COMPACTASYNC_ENTRY=0x30 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_COMPACTASYNC_EXIT=0x31 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_COMPACT_ENTRY=0x2e -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_COMPACT_EXIT=0x2f -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_COPY_ENTRY=0x13 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_COPY_EXIT=0x14 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_CREATE2_ENTRY=0x3 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_CREATE2_Exit=0x4 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_CREATEL2_ENTRY=0x9 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_CREATEL2_EXIT=0xa -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_CREATEL_ENTRY=0x7 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_CREATEL_EXIT=0x8 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_CREATE_ENTRY=0x1 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_CREATE_Exit=0x2 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_DELETE_ENTRY=0x15 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_DELETE_EXIT=0x16 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_DETACH_ENTRY=0x11 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_DETACH_EXIT=0x12 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_EXEC16_ENTRY=0x1d -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_EXEC16_EXIT=0x1e -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_EXEC8_ENTRY=0x1f -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_EXEC8_EXIT=0x20 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_EXECASYNC16_ENTRY=0x21 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_EXECASYNC16_EXIT=0x22 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_EXECASYNC8_ENTRY=0x23 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_EXECASYNC8_EXIT=0x24 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_FREERESERVEDSPACE_ENTRY=0x34 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_FREERESERVEDSPACE_EXIT=0x35 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_GETRESERVEACCESS_ENTRY=0x36 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_GETRESERVEACCESS_EXIT=0x37 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_GETSECURITYPOLICYL_ENTRY=0x19 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_GETSECURITYPOLICYL_EXIT=0x1a -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_GETSECURITYPOLICY_ENTRY=0x17 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_GETSECURITYPOLICY_EXIT=0x18 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_INTRABSACTION_ENTRY=0x28 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_INTRABSACTION_EXIT=0x29 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_LASTERRORMESSAGE=0x25 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_LASTINSERTEDROWID_ENTRY=0x26 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_LASTINSERTEDROWID_EXIT=0x27 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_OPENL_ENTRY=0xb -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_OPENL_EXIT=0xc -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_OPEN_ENTRY=0x5 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_OPEN_EXIT=0x6 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_RELEASERESERVEACCESS_ENTRY=0x38 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_RELEASERESERVEACCESS_EXIT=0x39 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_RESERVEDRIVESPACE_ENTRY=0x32 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_RESERVEDRIVESPACE_EXIT=0x33 -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_SETISOLATIONLEVEL_ENTRY=0x1b -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_SETISOLATIONLEVEL_EXIT=0x1c -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_SIZE2_ENTRY=0x2c -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_SIZE2_EXIT=0x2d -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_SIZE_ENTRY=0x2a -[TRACE]TRACE_BORDER[0x84]_RSQLDATABASE_SIZE_EXIT=0x2b -[TRACE]TRACE_BORDER[0x84]_RSQLPARAMWRITESTREAM_BINDBINARYL_ENTRY=0x7f -[TRACE]TRACE_BORDER[0x84]_RSQLPARAMWRITESTREAM_BINDBINARYL_EXIT=0x80 -[TRACE]TRACE_BORDER[0x84]_RSQLPARAMWRITESTREAM_BINDBINARY_ENTRY=0x7b -[TRACE]TRACE_BORDER[0x84]_RSQLPARAMWRITESTREAM_BINDBINARY_EXIT=0x7c -[TRACE]TRACE_BORDER[0x84]_RSQLPARAMWRITESTREAM_BINDTEXTL_ENTRY=0x7d -[TRACE]TRACE_BORDER[0x84]_RSQLPARAMWRITESTREAM_BINDTEXTL_EXIT=0x7e -[TRACE]TRACE_BORDER[0x84]_RSQLPARAMWRITESTREAM_BINDTEXT_ENTRY=0x79 -[TRACE]TRACE_BORDER[0x84]_RSQLPARAMWRITESTREAM_BINDTEXT_EXIT=0x7a -[TRACE]TRACE_BORDER[0x84]_RSQLSECURITYPOLICY_CLOSE_ENTRY=0x85 -[TRACE]TRACE_BORDER[0x84]_RSQLSECURITYPOLICY_CLOSE_EXIT=0x86 -[TRACE]TRACE_BORDER[0x84]_RSQLSECURITYPOLICY_CREATEL_ENTRY=0x83 -[TRACE]TRACE_BORDER[0x84]_RSQLSECURITYPOLICY_CREATEL_EXIT=0x84 -[TRACE]TRACE_BORDER[0x84]_RSQLSECURITYPOLICY_CREATE_ENTRY=0x81 -[TRACE]TRACE_BORDER[0x84]_RSQLSECURITYPOLICY_CREATE_EXIT=0x82 -[TRACE]TRACE_BORDER[0x84]_RSQLSECURITYPOLICY_EXTERNALIZEL_ENTRY=0x87 -[TRACE]TRACE_BORDER[0x84]_RSQLSECURITYPOLICY_EXTERNALIZEL_EXIT=0x88 -[TRACE]TRACE_BORDER[0x84]_RSQLSECURITYPOLICY_INTERNALIZEL_ENTRY=0x89 -[TRACE]TRACE_BORDER[0x84]_RSQLSECURITYPOLICY_INTERNALIZEL_EXIT=0x8a -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_CLOSE_ENTRY=0x67 -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_CLOSE_EXIT=0x68 -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_EXECASYNC_ENTRY=0x6d -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_EXECASYNC_EXIT=0x6e -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_EXEC_ENTRY=0x6b -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_EXEC_EXIT=0x6c -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_NEXT_ENTRY=0x6f -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_NEXT_EXIT=0x70 -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_PREPARE16L_ENTRY=0x63 -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_PREPARE16L_EXIT=0x64 -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_PREPARE16_ENTRY=0x5f -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_PREPARE16_EXIT=0x60 -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_PREPARE8L_ENTRY=0x65 -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_PREPARE8L_EXIT=0x66 -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_PREPARE8_ENTRY=0x61 -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_PREPARE8_EXIT=0x62 -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_RESET_ENTRY=0x69 -[TRACE]TRACE_BORDER[0x84]_RSQLSTATEMENT_RESET_EXIT=0x6a -[TRACE]TRACE_BORDER[0x84]_TSQLBLOB_GETLC_ENTRY=0x42 -[TRACE]TRACE_BORDER[0x84]_TSQLBLOB_GETLC_EXIT=0x43 -[TRACE]TRACE_BORDER[0x84]_TSQLBLOB_GET_ENTRY=0x44 -[TRACE]TRACE_BORDER[0x84]_TSQLBLOB_GET_EXIT=0x45 -[TRACE]TRACE_BORDER[0x84]_TSQLBLOB_SET_ENTRY=0x46 -[TRACE]TRACE_BORDER[0x84]_TSQLBLOB_SET_ENTRYEXT=0x47 -[TRACE]TRACE_BORDER[0x84]_TSQLBLOB_SET_EXIT=0x48 -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTBINARYL_ENTRY16=0x53 -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTBINARYL_ENTRY8=0x5d -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTBINARYL_EXIT16=0x54 -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTBINARYL_EXIT8=0x5e -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTINT64L_ENTRY16=0x4d -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTINT64L_ENTRY8=0x57 -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTINT64L_EXIT16=0x4e -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTINT64L_EXIT8=0x58 -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTINTL_ENTRY16=0x4b -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTINTL_ENTRY8=0x55 -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTINTL_EXIT16=0x4c -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTINTL_EXIT8=0x56 -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTREALL_ENTRY16=0x4f -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTREALL_ENTRY8=0x59 -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTREALL_EXIT16=0x50 -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTREALL_EXIT8=0x5a -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTTEXTL_ENTRY16=0x51 -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTTEXTL_ENTRY8=0x5b -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTTEXTL_EXIT16=0x52 -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SELECTTEXTL_EXIT8=0x5c -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_SETDATABASE=0x4a -[TRACE]TRACE_BORDER[0x84]_TSQLSCALARFULLSELECTQUERY_TSQLSCALARFULLSELECTQUERY=0x49 -[TRACE]TRACE_ERROR[0x82]_TSQLUTIL_LEAVE=0x1 -[TRACE]TRACE_FATAL[0x81]_TSQLUTIL_PANIC=0x1 -[TRACE]TRACE_FATAL[0x81]_TSQLUTIL_PANICCLIENTL=0x2 -[TRACE]TRACE_INTERNALS[0x88]_HIPCBUF_CONSTRUCTL=0x1 -[TRACE]TRACE_INTERNALS[0x88]_HIPCBUF_HIPCBUFL2=0x2 -[TRACE]TRACE_INTERNALS[0x88]_RSQLDBSESSION_CLOSE=0x5 -[TRACE]TRACE_INTERNALS[0x88]_RSQLDBSESSION_CONNECT_ENTRY=0x3 -[TRACE]TRACE_INTERNALS[0x88]_RSQLDBSESSION_CONNECT_EXIT=0x4 -[TRACE]TRACE_INTERNALS[0x88]_RSQLSTATEMENTSESSION_CLOSE=0x8 -[TRACE]TRACE_INTERNALS[0x88]_RSQLSTATEMENTSESSION_PREPARE16=0x6 -[TRACE]TRACE_INTERNALS[0x88]_RSQLSTATEMENTSESSION_PREPARE8=0x7 diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/traces_SqlDb/trace.properties --- a/persistentstorage/sql/traces_SqlDb/trace.properties Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ - - - diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/traces_SqlSrv/OstTraceDefinitions.h --- a/persistentstorage/sql/traces_SqlSrv/OstTraceDefinitions.h Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -#ifndef __OSTTRACEDEFINITIONS_H__ -#define __OSTTRACEDEFINITIONS_H__ -// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler -// REMOVE BEFORE CHECK-IN TO VERSION CONTROL -//#define OST_TRACE_COMPILER_IN_USE -#include -#endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/traces_SqlSrv/fixed_id.definitions --- a/persistentstorage/sql/traces_SqlSrv/fixed_id.definitions Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,174 +0,0 @@ -#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. -[GROUP]TRACE_ERROR=0x82 -[GROUP]TRACE_FATAL=0x81 -[GROUP]TRACE_INTERNALS=0x88 -[TRACE]TRACE_ERROR[0x82]_TSQLUTIL_LEAVE=0x1 -[TRACE]TRACE_FATAL[0x81]_TSQLUTIL_PANIC=0x1 -[TRACE]TRACE_FATAL[0x81]_TSQLUTIL_PANICCLIENTL=0x2 -[TRACE]TRACE_INTERNALS[0x88]_CONVERTSQLFULL2DISKFULLERRROR=0x7d -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_CSQLBACKUPCLIENT2=0x17 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL0=0x1f -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL1=0x20 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL2=0x21 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL3=0x22 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL4=0x24 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_GETBACKUPDATASECTIONL5=0x23 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_GETBACKUPLISTL=0x31 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_GETEXPECTEDDATASIZE=0x1e -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_INITIALIZEGETPROXYBACKUPDATAL=0x26 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_INITIALIZERESTOREPROXYBASEDATAL=0x27 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_NEWLC=0x16 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_NOTIFYCHANGE=0x19 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL0=0x28 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL1=0x29 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL2=0x2a -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL3=0x2b -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL4=0x2c -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL5=0x2d -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTOREBASEDATASECTONL6=0x2e -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RESTORECOMPLETE=0x25 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_RUNERROR=0x18 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_TERMINATEMULTISTAGEOPERATION1=0x2f -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_TERMINATEMULTISTAGEOPERATION2=0x30 -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_TESTBURSTATUSL1=0x1b -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_TESTBURSTATUSL2=0x1c -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_TESTBURSTATUSL_ENTRY=0x1a -[TRACE]TRACE_INTERNALS[0x88]_CSQLBACKUPCLIENT_TESTBURSTATUSL_EXIT=0x1d -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTCONN_CSQLCOMPACTCONN2=0x6 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTCONN_NEWLC_ENTRY=0x4 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTCONN_NEWLC_EXIT=0x5 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTENTRY_ADDREF=0xa -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTENTRY_COMPACT_ENTRY=0xd -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTENTRY_COMPACT_EXIT=0xe -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTENTRY_CSQLCOMPACTENTRY2=0x9 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTENTRY_FREEPAGECALLBACK=0xc -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTENTRY_NEWLC_ENTRY=0x7 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTENTRY_NEWLC_EXIT=0x8 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTENTRY_RELEASE=0xb -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTOR_ADDENTRYL1=0x1 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTOR_ADDENTRYL2=0x2 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTOR_RELEASEENTRY1=0x3 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTTIMER_CSQLCOMPACTTIMER2=0x11 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTTIMER_DEQUEUE=0x13 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTTIMER_NEWL_ENTRY=0xf -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTTIMER_NEWL_EXIT=0x10 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTTIMER_QUEUE=0x12 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTTIMER_RUNL=0x14 -[TRACE]TRACE_INTERNALS[0x88]_CSQLCOMPACTTIMER_RUNL2=0x15 -[TRACE]TRACE_INTERNALS[0x88]_CSQLDRIVESPACE_CSQLDRIVESPACE2=0x70 -[TRACE]TRACE_INTERNALS[0x88]_CSQLDRIVESPACE_GETACCESSL_ENTRY=0x71 -[TRACE]TRACE_INTERNALS[0x88]_CSQLDRIVESPACE_GETACCESSL_EXIT=0x72 -[TRACE]TRACE_INTERNALS[0x88]_CSQLDRIVESPACE_NEWLC_ENTRY=0x6e -[TRACE]TRACE_INTERNALS[0x88]_CSQLDRIVESPACE_NEWLC_EXIT=0x6f -[TRACE]TRACE_INTERNALS[0x88]_CSQLDRIVESPACE_RELEASEACCESS=0x73 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSERVER_CACHEDDBCONFIGFILENAMESL=0x79 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSERVER_CSQLSERVER2_ENTRY=0x76 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSERVER_CSQLSERVER2_EXIT=0x77 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSERVER_GETBACKUPLISTL=0x7b -[TRACE]TRACE_INTERNALS[0x88]_CSQLSERVER_GETBACKUPLISTL_ENTRY=0x7a -[TRACE]TRACE_INTERNALS[0x88]_CSQLSERVER_GETBACKUPLISTL_EXIT=0x7c -[TRACE]TRACE_INTERNALS[0x88]_CSQLSERVER_GETCOLLATIONDLLNAMEL=0x78 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSERVER_NEWLC_ENTRY=0x74 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSERVER_NEWLC_EXIT=0x75 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_APPLYCONFIGUPDATES2L=0x5a -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_APPLYCONFIGUPDATESL=0x5b -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_ATTACHDBL_ENTRY=0x52 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_ATTACHDBL_EXIT=0x53 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_COMPACTL_ENTRY=0x56 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_COMPACTL_EXIT=0x57 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_CREATEL_ENTRY=0x4a -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_CREATEL_EXIT=0x4b -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_CREATENEWDBFILEL=0x50 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_CREATESECUREL_ENTRY=0x48 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_CREATESECUREL_EXIT=0x49 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_CSQLSRVDATABASE2_ENTRY=0x4e -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_CSQLSRVDATABASE2_EXIT=0x4f -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_DETACHDBL_ENTRY=0x54 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_DETACHDBL_EXIT=0x55 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_INSERTINATTACHDBMAPL=0x59 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_NEWCOMPACTENTRYL_ENTRY=0x5c -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_NEWCOMPACTENTRYL_EXIT=0x5d -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_OPENEXISTINGDBFILEL=0x51 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_OPENL_ENTRY=0x4c -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_OPENL_EXIT=0x4d -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_RELEASECOMPACTENTRY=0x5e -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVDATABASE_REMOVEFROMMAPSL=0x58 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSESSION_CSQLSRVSESSION2_ENTRY=0x80 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSESSION_CSQLSRVSESSION2_EXIT=0x81 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSESSION_DBDELETEFILEL=0x86 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSESSION_NEWL_ENTRY=0x7e -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSESSION_NEWL_EXIT=0x7f -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSESSION_SERVICEERROR_ENTRY=0x84 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSESSION_SERVICEERROR_EXIT=0x85 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSESSION_SERVICEL_ENTRY=0x82 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSESSION_SERVICEL_EXIT=0x83 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSTATEMENT_CSQLSRVSTATEMENT2=0x8c -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSTATEMENT_CSQLSRVSTATEMENT2_ENTRY=0x8b -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSTATEMENT_CSQLSRVSTATEMENT2_EXIT=0x8d -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSTATEMENT_NEWLC_ENTRY=0x87 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSTATEMENT_NEWLC_ENTRY2=0x89 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSTATEMENT_NEWLC_EXIT=0x88 -[TRACE]TRACE_INTERNALS[0x88]_CSQLSRVSTATEMENT_NEWLC_EXIT2=0x8a -[TRACE]TRACE_INTERNALS[0x88]_DBCOMPACT_ENTRY=0xa2 -[TRACE]TRACE_INTERNALS[0x88]_DBCOMPACT_EXIT1=0xa3 -[TRACE]TRACE_INTERNALS[0x88]_DBCOMPACT_EXIT2=0xa4 -[TRACE]TRACE_INTERNALS[0x88]_DBEXECSTMT16_ENTRY=0x8e -[TRACE]TRACE_INTERNALS[0x88]_DBEXECSTMT16_EXIT=0x8f -[TRACE]TRACE_INTERNALS[0x88]_DBEXECSTMT8_ENTRY=0x90 -[TRACE]TRACE_INTERNALS[0x88]_DBEXECSTMT8_EXIT=0x91 -[TRACE]TRACE_INTERNALS[0x88]_EXECPRAGMA_ENTRY=0x46 -[TRACE]TRACE_INTERNALS[0x88]_EXECPRAGMA_EXIT=0x47 -[TRACE]TRACE_INTERNALS[0x88]_FINALIZESTMTHANDLE_ENTRY=0xa5 -[TRACE]TRACE_INTERNALS[0x88]_FINALIZESTMTHANDLE_EXIT=0xa6 -[TRACE]TRACE_INTERNALS[0x88]_HBLOBBUF_DOREADL=0x39 -[TRACE]TRACE_INTERNALS[0x88]_HBLOBBUF_DORELEASE_ENTRY=0x36 -[TRACE]TRACE_INTERNALS[0x88]_HBLOBBUF_DORELEASE_EXIT=0x37 -[TRACE]TRACE_INTERNALS[0x88]_HBLOBBUF_DOSEEKL=0x3b -[TRACE]TRACE_INTERNALS[0x88]_HBLOBBUF_DOSYNCHL=0x38 -[TRACE]TRACE_INTERNALS[0x88]_HBLOBBUF_DOWRITEL=0x3a -[TRACE]TRACE_INTERNALS[0x88]_HBLOBBUF_NEWL_ENTRY1=0x32 -[TRACE]TRACE_INTERNALS[0x88]_HBLOBBUF_NEWL_ENTRY2=0x33 -[TRACE]TRACE_INTERNALS[0x88]_HBLOBBUF_NEWL_ENTRY3=0x34 -[TRACE]TRACE_INTERNALS[0x88]_HBLOBBUF_NEWL_EXIT=0x35 -[TRACE]TRACE_INTERNALS[0x88]_ISCOMPACTTIMELIMITREACHED=0xa1 -[TRACE]TRACE_INTERNALS[0x88]_PRERETRIEVEPRAGMAVALUE_ENTRY=0x9e -[TRACE]TRACE_INTERNALS[0x88]_PRERETRIEVEPRAGMAVALUE_EXIT1=0x9f -[TRACE]TRACE_INTERNALS[0x88]_PRERETRIEVEPRAGMAVALUE_EXIT2=0xa0 -[TRACE]TRACE_INTERNALS[0x88]_SQLAUTHORIZER=0xa7 -[TRACE]TRACE_INTERNALS[0x88]_STMTEXEC_ENTRY=0x98 -[TRACE]TRACE_INTERNALS[0x88]_STMTEXEC_EXIT=0x99 -[TRACE]TRACE_INTERNALS[0x88]_STMTNEXT_ENTRY=0x9a -[TRACE]TRACE_INTERNALS[0x88]_STMTNEXT_EXIT=0x9b -[TRACE]TRACE_INTERNALS[0x88]_STMTPREPARE16L_ENTRY=0x92 -[TRACE]TRACE_INTERNALS[0x88]_STMTPREPARE16L_EXIT=0x93 -[TRACE]TRACE_INTERNALS[0x88]_STMTPREPARE8L_ENTRY=0x96 -[TRACE]TRACE_INTERNALS[0x88]_STMTPREPARE8L_EXIT=0x97 -[TRACE]TRACE_INTERNALS[0x88]_STMTPREPARE8_ENTRY=0x94 -[TRACE]TRACE_INTERNALS[0x88]_STMTPREPARE8_EXIT=0x95 -[TRACE]TRACE_INTERNALS[0x88]_STMTRESET_ENTRY=0x9c -[TRACE]TRACE_INTERNALS[0x88]_STMTRESET_EXIT=0x9d -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_CONFIGUREDATABASEL1=0x61 -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_CONFIGUREDATABASEL2=0x62 -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_CONFIGUREDATABASEL3=0x63 -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_CONFIGUREDATABASEL4=0x64 -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_CONFIGUREDATABASEL_ENTRY=0x5f -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_CONFIGUREDATABASEL_EXIT1=0x60 -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_CONFIGUREDATABASEL_EXIT2=0x65 -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_DOEXECUTEDBCONFIGFILEOPSL=0x66 -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_PROCESSSTATEMENTL1=0x6a -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_PROCESSSTATEMENTL2=0x6b -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_PROCESSSTATEMENTL3=0x6c -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_PROCESSSTATEMENTL_ENTRY=0x67 -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_PROCESSSTATEMENTL_EXIT1=0x68 -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_PROCESSSTATEMENTL_EXIT2=0x69 -[TRACE]TRACE_INTERNALS[0x88]_TSQLDBSYSSETTINGS_PROCESSSTATEMENTL_EXIT3=0x6d -[TRACE]TRACE_INTERNALS[0x88]_TSQLSRVCONFIGFILE_GETCONFIGPARAMSL_ENTRY=0x42 -[TRACE]TRACE_INTERNALS[0x88]_TSQLSRVCONFIGFILE_GETCONFIGPARAMSL_EXIT1=0x43 -[TRACE]TRACE_INTERNALS[0x88]_TSQLSRVCONFIGFILE_GETCONFIGPARAMSL_EXIT2=0x44 -[TRACE]TRACE_INTERNALS[0x88]_TSQLSRVCONFIGFILE_GETCONFIGPARAMSL_EXIT3=0x45 -[TRACE]TRACE_INTERNALS[0x88]_TSQLSRVCONFIGFILE_INITL1=0x3d -[TRACE]TRACE_INTERNALS[0x88]_TSQLSRVCONFIGFILE_INITL2=0x3e -[TRACE]TRACE_INTERNALS[0x88]_TSQLSRVCONFIGFILE_INITL_ENTRY=0x3c -[TRACE]TRACE_INTERNALS[0x88]_TSQLSRVCONFIGFILE_INITL_EXIT1=0x3f -[TRACE]TRACE_INTERNALS[0x88]_TSQLSRVCONFIGFILE_INITL_EXIT2=0x40 -[TRACE]TRACE_INTERNALS[0x88]_TSQLSRVCONFIGFILE_INITL_EXIT3=0x41 diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/traces_SqlSrv/trace.properties --- a/persistentstorage/sql/traces_SqlSrv/trace.properties Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ - - - -EBURUnset -EBURNormal -EBURBackupFull -EBURBackupPartial -EBURRestoreFull -EBURRestorePartial - - -EBackupNoFileOpen -EBackupOpenNothingSent -EBackupOpenPartHeaderSent -EBackupOpenAllHeaderSent -EBackupEndOfFile - - -ERestoreExpectChecksum -ERestoreExpectOldFileSize -ERestoreExpectVersion -ERestoreExpectFileSize -ERestoreExpectFileNameSize -ERestoreExpectFileName -ERestoreExpectData -ERestoreComplete - - -EEncNotSet -EEncUtf8 -EEncUtf16 - - diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/traces_sqlite/OstTraceDefinitions.h --- a/persistentstorage/sql/traces_sqlite/OstTraceDefinitions.h Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -#ifndef __OSTTRACEDEFINITIONS_H__ -#define __OSTTRACEDEFINITIONS_H__ -// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler -// REMOVE BEFORE CHECK-IN TO VERSION CONTROL -//#define OST_TRACE_COMPILER_IN_USE -#include -#endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/traces_sqlite/fixed_id.definitions --- a/persistentstorage/sql/traces_sqlite/fixed_id.definitions Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. -[GROUP]TRACE_FATAL=0x81 -[GROUP]TRACE_INTERNALS=0x88 -[TRACE]TRACE_FATAL[0x81]_TSQLUTIL_PANIC=0x1 -[TRACE]TRACE_INTERNALS[0x88]_COSLAYERDATA_COSLAYERDATA2=0x7 -[TRACE]TRACE_INTERNALS[0x88]_COSLAYERDATA_CREATE_ENTRY=0x2 -[TRACE]TRACE_INTERNALS[0x88]_COSLAYERDATA_CREATE_EXIT1=0x3 -[TRACE]TRACE_INTERNALS[0x88]_COSLAYERDATA_CREATE_EXIT2=0x4 -[TRACE]TRACE_INTERNALS[0x88]_COSLAYERDATA_CREATE_EXIT3=0x5 -[TRACE]TRACE_INTERNALS[0x88]_COSLAYERDATA_DESTROY=0x6 -[TRACE]TRACE_INTERNALS[0x88]_COSLAYERDATA_DOCREATE=0x8 -[TRACE]TRACE_INTERNALS[0x88]_OS2SQLITEERR=0x1 -[TRACE]TRACE_INTERNALS[0x88]_SQLITE3SYMBIANLIBFINALIZE=0xa -[TRACE]TRACE_INTERNALS[0x88]_SQLITE3SYMBIANLIBINIT=0x9 -[TRACE]TRACE_INTERNALS[0x88]_TDBFILE_TDBFILE=0xb -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_CLOSE1=0xc -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_FILECONTROL_ENTRY=0x17 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_FILECONTROL_EXIT=0x18 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_FILESIZE_ENTRY=0x15 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_FILESIZE_EXIT=0x16 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_READ_ENTRY=0xd -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_READ_EXIT=0xe -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_SYNC_ENTRY=0x13 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_SYNC_EXIT=0x14 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_TRUNCATE_ENTRY=0x11 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_TRUNCATE_EXIT=0x12 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_WRITE_ENTRY=0xf -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_WRITE_EXIT=0x10 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_ACCESS1=0x23 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_ACCESS_ENTRY=0x24 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_ACCESS_EXIT1=0x25 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_ACCESS_EXIT2=0x26 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_ACCESS_EXIT3=0x27 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DELETE1=0x1f -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DELETE2=0x21 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DELETE_ENTRY=0x20 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DELETE_EXIT=0x22 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DOFILESIZECORRUPTIONCHECK1=0x1b -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DOFILESIZECORRUPTIONCHECK2=0x1c -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DOGETGETDEVICECHARACTERISTICSANDSECTORSIZE=0x1a -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DOGETVOLUMEIOPARAMINFO=0x19 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_FULLPATHNAME1=0x28 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_FULLPATHNAME_ENTRY=0x29 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_FULLPATHNAME_EXIT1=0x2a -[TRACE]TRACE_INTERNALS[0x88]_TVFS_FULLPATHNAME_EXIT2=0x2b -[TRACE]TRACE_INTERNALS[0x88]_TVFS_OPEN_ENTRY=0x1d -[TRACE]TRACE_INTERNALS[0x88]_TVFS_OPEN_EXIT=0x1e diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sql/traces_sqlite/trace.properties --- a/persistentstorage/sql/traces_sqlite/trace.properties Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ - - - diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/GROUP/BLD.INF --- a/persistentstorage/sqlite3api/GROUP/BLD.INF Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/GROUP/BLD.INF Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ PRJ_EXPORTS -../SQLite/sqlite3.h OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/sqlite3.h) +../SQLite/sqlite3.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/sqlite3.h) ../GROUP/sqlite3.iby /epoc32/rom/include/sqlite3.iby ../GROUP/SQLite3_stub.SIS /epoc32/data/z/system/install/sqlite3_stub.sis @@ -441,7 +441,6 @@ ../TEST/TclScript/where5.test z:/private/10285a82/where5.test ../TEST/TclScript/where6.test z:/private/10285a82/where6.test ../TEST/TclScript/zeroblob.test z:/private/10285a82/zeroblob.test -../TEST/t_sqliteapi.txt z:/private/212C3129/t_sqliteapi.txt PRJ_TESTMMPFILES @@ -449,7 +448,6 @@ //tcl.dll is a test library used by the TCL tests ../TEST/TCL/group/tcl84.mmp support ../GROUP/tclsqlite3.mmp manual -../GROUP/t_sqlitetclstarter.mmp manual #endif ../GROUP/t_sqliteapi.mmp ../GROUP/t_sqlitewsd.mmp diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/GROUP/sqlite3.mmp --- a/persistentstorage/sqlite3api/GROUP/sqlite3.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/GROUP/sqlite3.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -19,8 +19,14 @@ @file */ +//#define SYMBIAN_INCLUDE_EXECUTABLE_TRACE +#include #include "sqlite3_macro.mmh" +#ifdef SYMBIAN_INCLUDE_EXECUTABLE_TRACE +MACRO SQLITE_ENABLE_TRACE +#endif + TARGET sqlite3.dll TARGETTYPE dll @@ -72,7 +78,6 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////// -userinclude ../traces_sqlite3 userinclude ../SQLite userinclude ../OsLayer OS_LAYER_LIBC_SYSTEMINCLUDE @@ -141,12 +146,14 @@ SOURCEPATH ../OsLayer SOURCE FileBuf64.cpp SOURCE os_symbian_mt.cpp -SOURCE SqliteUtil.cpp #ifdef WINSCW SOURCE os_symbian_emul.cpp #else SOURCE os_symbian_hrdw.cpp #endif +#ifdef SYMBIAN_INCLUDE_EXECUTABLE_TRACE +SOURCE UTraceSqlite.cpp +#endif LIBRARY euser.lib LIBRARY efsrv.lib diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/GROUP/sqlite3tests.iby --- a/persistentstorage/sqlite3api/GROUP/sqlite3tests.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/GROUP/sqlite3tests.iby Wed Sep 01 12:39:58 2010 +0100 @@ -430,7 +430,6 @@ data=ZPRIVATE\10285a82\where5.test \private\10285a82\where5.test data=ZPRIVATE\10285a82\where6.test \private\10285a82\where6.test data=ZPRIVATE\10285a82\zeroblob.test \private\10285a82\zeroblob.test -data=ZPRIVATE\212C3129\t_sqliteapi.txt \private\212C3129\t_sqliteapi.txt //The next line to be uncommented if the testing is performed locally. Otherwise tests will fail - //the following file is missing and needed by the timezone server. @@ -442,7 +441,6 @@ file=ABI_DIR\BUILD_DIR\t_sqliteperf.exe \test\t_sqliteperf.exe file=ABI_DIR\BUILD_DIR\t_sqliteperf2.exe \test\t_sqliteperf2.exe file=ABI_DIR\BUILD_DIR\tclsqlite3.exe \test\tclsqlite3.exe -file=ABI_DIR\BUILD_DIR\t_sqlitetclstarter.exe \test\t_sqlitetclstarter.exe file=ABI_DIR\BUILD_DIR\t_sqlitedef.exe \test\t_sqlitedef.exe file=ABI_DIR\BUILD_DIR\t_sqlitedb64.exe \test\t_sqlitedb64.exe diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/GROUP/t_sqliteapi.mmp --- a/persistentstorage/sqlite3api/GROUP/t_sqliteapi.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/GROUP/t_sqliteapi.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -32,6 +32,5 @@ LIBRARY efsrv.lib VENDORID 0x70000001 -UID 0 0x212C3129 SMPSAFE diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/GROUP/t_sqlitedef.mmp --- a/persistentstorage/sqlite3api/GROUP/t_sqlitedef.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/GROUP/t_sqlitedef.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -25,7 +25,6 @@ SOURCEPATH ../TEST SOURCE t_sqlitedef.cpp -SOURCE sqliteTestUtl.cpp LIBRARY euser.lib LIBRARY sqlite3.lib diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/GROUP/t_sqliteperf.mmp --- a/persistentstorage/sqlite3api/GROUP/t_sqliteperf.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/GROUP/t_sqliteperf.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,6 @@ SOURCEPATH ../TEST SOURCE t_sqliteperfc.c SOURCE t_sqliteperf.cpp -SOURCE sqliteTestUtl.cpp STATICLIBRARY libcrt0.lib LIBRARY libc.lib diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/GROUP/t_sqliteperf2.mmp --- a/persistentstorage/sqlite3api/GROUP/t_sqliteperf2.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/GROUP/t_sqliteperf2.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -22,7 +22,6 @@ SOURCEPATH ../TEST SOURCE t_sqliteperf2.cpp -SOURCE sqliteTestUtl.cpp STATICLIBRARY libcrt0.lib LIBRARY libc.lib diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/GROUP/t_sqlitetclstarter.mmp --- a/persistentstorage/sqlite3api/GROUP/t_sqlitetclstarter.mmp Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -TARGET t_sqlitetclstarter.exe -TARGETTYPE EXE -CAPABILITY All -Tcb - -USERINCLUDE . -OS_LAYER_SYSTEMINCLUDE_SYMBIAN - -SOURCEPATH ../TEST -SOURCE t_sqlitetclstarter.cpp - -LIBRARY euser.lib -LIBRARY efsrv.lib -LIBRARY bafl.lib - -UID 0 0x1111CCCC -VENDORID 0x70000001 - -SMPSAFE \ No newline at end of file diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/GROUP/t_sqlitewsd.mmp --- a/persistentstorage/sqlite3api/GROUP/t_sqlitewsd.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/GROUP/t_sqlitewsd.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,6 @@ SOURCEPATH ../TEST SOURCE t_sqlitewsd.cpp SOURCE t_sqlitewsdinsert.cpp -SOURCE sqliteTestUtl.cpp LIBRARY libc.lib LIBRARY libpthread.lib diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/GROUP/tclsqlite3.mmp --- a/persistentstorage/sqlite3api/GROUP/tclsqlite3.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/GROUP/tclsqlite3.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -20,7 +20,7 @@ /** @file */ - +#include #include "tclsqlite3_macro.mmh" TARGET tclsqlite3.exe @@ -73,7 +73,6 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////// -USERINCLUDE ../traces_sqlite3 USERINCLUDE ../SQLite USERINCLUDE ../OsLayer OS_LAYER_LIBC_SYSTEMINCLUDE @@ -172,7 +171,6 @@ SOURCEPATH ../OsLayer SOURCE FileBuf64.cpp SOURCE os_symbian_mt.cpp -SOURCE SqliteUtil.cpp #ifdef WINSCW SOURCE os_symbian_emul.cpp #else diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/OsLayer/FileBuf64.cpp --- a/persistentstorage/sqlite3api/OsLayer/FileBuf64.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/OsLayer/FileBuf64.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -13,13 +13,58 @@ // Description: // #include "FileBuf64.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "FileBuf64Traces.h" -#endif -#include "SqliteTraceDef.h" ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////// PROFILER //////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef _SQLPROFILER + +#define PROFILE_READ(pos,amount) \ + do \ + { \ + ++iFileReadCount; iFileReadAmount += (amount); \ + RDebug::Print(_L(" -- FRead this=%X, Cnt=%d, Pos=%ld, Amt=%d, Ttl=%ld\r\n"), (TUint32)this, iFileReadCount, pos, amount, iFileReadAmount); \ + } while(0) + +#define PROFILE_WRITE(pos,amount) \ + do \ + { \ + ++iFileWriteCount; iFileWriteAmount += (amount); \ + RDebug::Print(_L(" -- FWrite this=%X, Cnt=%d, Pos=%ld, Amt=%d, Ttl=%ld\r\n"), (TUint32)this, iFileWriteCount, pos, amount, iFileWriteAmount); \ + } while(0) + +#define PROFILE_SIZE() \ + do \ + { \ + ++iFileSizeCount; \ + RDebug::Print(_L(" -- FSize this=%X, Cnt=%d\r\n"), (TUint32)this, iFileSizeCount); \ + } while(0) + +#define PROFILE_SETSIZE() \ + do \ + { \ + ++iFileSetSizeCount; \ + RDebug::Print(_L(" -- FSetSize this=%X, Cnt=%d\r\n"), (TUint32)this, iFileSetSizeCount); \ + } while(0) + +#define PROFILE_FLUSH() \ + do \ + { \ + ++iFileFlushCount; \ + RDebug::Print(_L(" -- FFlush this=%X, Cnt=%d\r\n"), (TUint32)this, iFileFlushCount); \ + } while(0) + +#else + +#define PROFILE_READ(pos,amount) void(0) +#define PROFILE_WRITE(pos,amount) void(0) + +#define PROFILE_SIZE() void(0) +#define PROFILE_SETSIZE() void(0) +#define PROFILE_FLUSH() void(0) + +#endif//_SQLPROFILER /** This constant is used for initializing the RFileBuf64::iFileSize data member and means that @@ -37,17 +82,90 @@ static const TInt KNextReadFilePosNotSet = -1; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////// FBUF INVARIANT /////////////////////////////////////////////////////////////// +/////////////////////////// ASSERTS & INVARIANT ////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #ifdef _DEBUG #define __FILEBUF64_INVARIANT() Invariant() +/** +String literal used in _DEBUG mode for indicating that the reported panic happened inside the RFileBuf64 implementation. + +@see TFileBufPanic64 +@internalComponent +*/ +_LIT(KPanicCategory, "FBuf64"); + +/** +Set of numeric constants used together with the KPanicCategory string literal in _DEBUG mode for providing more detailed +information about the reason of the panic. + +@see KPanicCategory +@internalComponent +*/ +enum TFileBufPanic64 + { + EFBufPanicCapacity = 1, //1 + EFBufPanicNullBuf, + EFBufPanicBufLen, + EFBufPanicFilePos, + EFBufPanicFileSize, //5 + EFBufPanicFileHandle, + EFBufPanicFsHandle, + EFBufPanicMsgHandle, + EFBufPanicMsgIndex, + EFBufPanicFileNameLen, //10 + EFBufPanicNullThis, + EFBufPanicDirty, + EFBufPanicNextReadFilePos, + EFBufPanicNextReadFilePosHits, + EFBufPanicFileBlockSize, //15 + }; + +/** +Helper function used in the implementation of the __FBUF64_ASSERT() macro. +In case if the expression in __FBUF64_ASSERT() macro evaluates to false, +PanicFileBuf64() will use the supplied aLine and aPanicCode arguments together with the KPanicCategory string literal +to prepare and print out a line (including the time of the panic) to the default log. The calling thread will be panic'ed +after that. + +@see TFileBufPanic64 +@see KPanicCategory +@internalComponent +*/ +static void PanicFileBuf64(TInt aLine, TFileBufPanic64 aPanicCode) + { + 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()); + + TBuf<64> buf; + _LIT(KFormat,"**%S:RFileBuf64 panic %d, at line(%d)"); + buf.Format(KFormat, &tbuf, aPanicCode, aLine); + RDebug::Print(buf); + User::Panic(KPanicCategory, aPanicCode); + } + +/** +This macro should be used when there is a need to panic the client/server if "expr" condition is not satisfied. +Works in only in debug mode. In release mode evaluates to nothing. + +@see TFileBufPanic64 +@see KPanicCategory +@see PanicFileBuf64() +@internalComponent +*/ +#define __FBUF64_ASSERT(expr, panicCode) (void)(!(expr) ? ::PanicFileBuf64(__LINE__, panicCode) : void(0)) + #else //_DEBUG #define __FILEBUF64_INVARIANT() void(0) +#define __FBUF64_ASSERT(expr, panicCode) void(0) + #endif//_DEBUG ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -59,15 +177,13 @@ @param aSize Max file buffer size (capacity) in bytes. -@panic Sqlite3 1 In _DEBUG mode - aSize is 0 or negative. +@panic FBuf64 1 In _DEBUG mode - aSize is 0 or negative. */ RFileBuf64::RFileBuf64(TInt aSize) : iCapacity(aSize), - iBase(NULL), iReadAheadSize(RFileBuf64::KDefaultReadAheadSize) { - SQLITE_TRACE_FBUF(OstTraceExt3(TRACE_INTERNALS, RFILEBUF64_RFILEBUF64, "FBuf;0x%X;RFileBuf64::RFileBuf64;aSize=%d;iReadAheadSize=%d", (TUint)this, aSize, iReadAheadSize)); - __ASSERT_DEBUG(aSize > 0, __SQLITEPANIC(EFBufPanicCapacity)); + __FBUF64_ASSERT(aSize > 0, EFBufPanicCapacity); } /** @@ -86,22 +202,20 @@ @see TFileMode @see RFile64::Create() -@panic Sqlite3 7 In _DEBUG mode - Invalid aFs object (null file session handle). -@panic Sqlite3 10 In _DEBUG mode - Invalid file name length (zero file name length). +@panic FBuf64 7 In _DEBUG mode - Invalid aFs object (null file session handle). +@panic FBuf64 10 In _DEBUG mode - Invalid file name length (zero file name length). */ TInt RFileBuf64::Create(RFs& aFs, const TDesC& aFileName, TUint aFileMode) { - __ASSERT_DEBUG(aFs.Handle() != 0, __SQLITEPANIC(EFBufPanicFsHandle)); - __ASSERT_DEBUG(aFileName.Length() > 0, __SQLITEPANIC(EFBufPanicFileNameLen)); + __FBUF64_ASSERT(aFs.Handle() != 0, EFBufPanicFsHandle); + __FBUF64_ASSERT(aFileName.Length() > 0, EFBufPanicFileNameLen); - TInt err = DoPreInit(); - if(err == KErrNone) - { - err = iFile.Create(aFs, aFileName, aFileMode); - } - SQLITE_TRACE_FBUF(OstTraceExt5(TRACE_INTERNALS, RFILEBUF64_CREATE, "FBuf;0x%X;RFileBuf64::Create;aFs.Handle()=0x%X;aFileName=%S;iFile.SubSessionHandle()=0x%X;err=%d", (TUint)this, (TUint)aFs.Handle(), __SQLITEPRNSTR(aFileName), (TUint)iFile.SubSessionHandle(), err)); - DoPostInit(err); - return err; + TInt err = DoPreInit(); + if(err == KErrNone) + { + err = iFile.Create(aFs, aFileName, aFileMode); + } + return DoPostInit(err); } /** @@ -119,22 +233,20 @@ @see TFileMode @see RFile64::Open() -@panic Sqlite3 7 In _DEBUG mode - Invalid aFs object (null file session handle). -@panic Sqlite3 10 In _DEBUG mode - Invalid file name length (zero file name length). +@panic FBuf64 7 In _DEBUG mode - Invalid aFs object (null file session handle). +@panic FBuf64 10 In _DEBUG mode - Invalid file name length (zero file name length). */ TInt RFileBuf64::Open(RFs& aFs, const TDesC& aFileName, TUint aFileMode) { - __ASSERT_DEBUG(aFs.Handle() != 0, __SQLITEPANIC(EFBufPanicFsHandle)); - __ASSERT_DEBUG(aFileName.Length() > 0, __SQLITEPANIC(EFBufPanicFileNameLen)); - + __FBUF64_ASSERT(aFs.Handle() != 0, EFBufPanicFsHandle); + __FBUF64_ASSERT(aFileName.Length() > 0, EFBufPanicFileNameLen); + TInt err = DoPreInit(); if(err == KErrNone) { err = iFile.Open(aFs, aFileName, aFileMode); } - SQLITE_TRACE_FBUF(OstTraceExt5(TRACE_INTERNALS, RFILEBUF64_OPEN, "FBuf;0x%X;RFileBuf64::Open;aFs.Handle()=0x%X;aFileName=%S;iFile.SubSessionHandle()=0x%X;err=%d", (TUint)this, (TUint)aFs.Handle(), __SQLITEPRNSTR(aFileName), (TUint)iFile.SubSessionHandle(), err)); - DoPostInit(err); - return err; + return DoPostInit(err); } /** @@ -154,20 +266,18 @@ @see TFileMode @see RFile64::Temp() -@panic Sqlite3 7 In _DEBUG mode - Invalid aFs object (null file session handle). +@panic FBuf64 7 In _DEBUG mode - Invalid aFs object (null file session handle). */ TInt RFileBuf64::Temp(RFs& aFs, const TDesC& aPath, TFileName& aFileName, TUint aFileMode) { - __ASSERT_DEBUG(aFs.Handle() != 0, __SQLITEPANIC(EFBufPanicFsHandle)); - + __FBUF64_ASSERT(aFs.Handle() != 0, EFBufPanicFsHandle); + TInt err = DoPreInit(); if(err == KErrNone) { err = iFile.Temp(aFs, aPath, aFileName, aFileMode); } - SQLITE_TRACE_FBUF(OstTraceExt5(TRACE_INTERNALS, RFILEBUF64_TEMP, "FBuf;0x%X;RFileBuf64::Temp;aFs.Handle()=0x%X;aFileName=%S;iFile.SubSessionHandle()=0x%X;err=%d", (TUint)this, (TUint)aFs.Handle(), __SQLITEPRNSTR(aFileName), (TUint)iFile.SubSessionHandle(), err)); - DoPostInit(err); - return err; + return DoPostInit(err); } /** @@ -180,7 +290,6 @@ */ void RFileBuf64::Close() { - SQLITE_TRACE_FBUF(OstTraceExt2(TRACE_INTERNALS, RFILEBUF64_CLOSE, "FBuf;0x%X;RFileBuf64::Close;iFile.SubSessionHandle()=0x%X", (TUint)this, (TUint)iFile.SubSessionHandle())); if(iFile.SubSessionHandle() != 0 && iBase != 0) { (void)DoFileWrite2(); @@ -212,15 +321,14 @@ TInt RFileBuf64::SetReadAheadSize(TInt aBlockSize, TInt aReadRecBufSize) { __FILEBUF64_INVARIANT(); - if((aReadRecBufSize & (aReadRecBufSize - 1)) == 0 && aReadRecBufSize > RFileBuf64::KDefaultReadAheadSize) + if(aReadRecBufSize > 0 && (aReadRecBufSize & (aReadRecBufSize - 1)) == 0 && aReadRecBufSize > RFileBuf64::KDefaultReadAheadSize) { iReadAheadSize = aReadRecBufSize > iCapacity ? iCapacity : aReadRecBufSize; } - else if((aBlockSize & (aBlockSize - 1)) == 0 && aBlockSize > RFileBuf64::KDefaultReadAheadSize) + else if(aBlockSize > 0 && (aBlockSize & (aBlockSize - 1)) == 0 && aBlockSize > RFileBuf64::KDefaultReadAheadSize) { iReadAheadSize = aBlockSize > iCapacity ? iCapacity : aBlockSize; } - SQLITE_TRACE_FBUF(OstTraceExt4(TRACE_INTERNALS, RFILEBUF64_SETREADAHEADSIZE, "FBuf;0x%X;RFileBuf64::SetReadAheadSize;aBlockSize=%d;aReadRecBufSize=%d;iReadAheadSize=%d", (TUint)this, aBlockSize, aReadRecBufSize, iReadAheadSize)); __FILEBUF64_INVARIANT(); return iReadAheadSize; } @@ -239,14 +347,14 @@ @return KErrNone if successful, otherwise one of the other system-wide error codes. -@panic Sqlite3 4 In _DEBUG mode - negative aFilePos value. +@panic FBuf64 4 In _DEBUG mode - negative aFilePos value. See RFileBuf64::Invariant() for other possible panics that may occur when this method is called. @see RFileBuf64::Invariant() */ TInt RFileBuf64::Read(TInt64 aFilePos, TDes8& aDes) { - __ASSERT_DEBUG(aFilePos >= 0, __SQLITEPANIC(EFBufPanicFilePos)); + __FBUF64_ASSERT(aFilePos >= 0, EFBufPanicFilePos); __FILEBUF64_INVARIANT(); aDes.SetLength(0); //1. The output buffer max len is 0 @@ -266,14 +374,14 @@ TInt len = aDes.MaxLength(); if(len > iCapacity) { - if((aFilePos + len) > iFilePos && aFilePos < (iFilePos + iLength)) + if((aFilePos + len) > iFilePos && !(aFilePos >= (iFilePos + iLength))) {//Write the pending data if the iDirty flag is set, otherwise preserve the buffer content. err = DoFileWrite1(aFilePos); } if(err == KErrNone) { err = iFile.Read(aFilePos, aDes); - SQLITE_TRACE_FBUF(OstTraceExt5(TRACE_INTERNALS, RFILEBUF64_READ1, "FBuf;0x%X;RFileBuf64::Read;TooBigRq;iFileSize=%lld;aFilePos=%lld;len=%d;err=%d", (TUint)this, iFileSize, aFilePos, len, err)); + PROFILE_READ(aFilePos, aDes.Size()); } __FILEBUF64_INVARIANT(); return err; @@ -304,7 +412,7 @@ iNextReadFilePosHits = 0; TPtr8 ptr2(outptr, len); err = iFile.Read(aFilePos, ptr2); - SQLITE_TRACE_FBUF(OstTraceExt5(TRACE_INTERNALS, RFILEBUF64_READ2, "FBuf;0x%X;RFileBuf64::Read;Read;iFileSize=%lld;aFilePos=%lld;len=%d;err=%d", (TUint)this, iFileSize, aFilePos, len, err)); + PROFILE_READ(aFilePos, ptr2.Size()); if(err == KErrNone) { iNextReadFilePos = aFilePos + len; @@ -328,7 +436,7 @@ } TPtr8 ptr(iBase, Min(iCapacity, (len + readahead))); err = iFile.Read(aFilePos, ptr); - SQLITE_TRACE_FBUF(OstTraceExt5(TRACE_INTERNALS, RFILEBUF64_READ3, "FBuf;0x%X;RFileBuf64::Read;ReadAhead;iFileSize=%lld;aFilePos=%lld;len=%d;err=%d", (TUint)this, iFileSize, aFilePos, ptr.MaxLength(), err)); + PROFILE_READ(aFilePos, ptr.Size()); if(err == KErrNone) { iFilePos = aFilePos; @@ -364,14 +472,14 @@ @return KErrNone if successful, otherwise one of the other system-wide error codes. -@panic Sqlite3 4 In _DEBUG mode - negative aFilePos value. +@panic FBuf64 4 In _DEBUG mode - negative aFilePos value. See RFileBuf64::Invariant() for other possible panics that may occur when this method is called. @see RFileBuf64::Invariant() */ TInt RFileBuf64::Write(TInt64 aFilePos, const TDesC8& aData) { - __ASSERT_DEBUG(aFilePos >= 0, __SQLITEPANIC(EFBufPanicFilePos)); + __FBUF64_ASSERT(aFilePos >= 0, EFBufPanicFilePos); __FILEBUF64_INVARIANT(); if(aData.Length() == 0) { @@ -500,14 +608,14 @@ @return KErrNone if successful, otherwise one of the other system-wide error codes. -@panic Sqlite3 5 In _DEBUG mode - negative aFileSize value. +@panic FBuf64 5 In _DEBUG mode - negative aFileSize value. See RFileBuf64::Invariant() for other possible panics that may occur when this method is called. @see RFileBuf64::Invariant() */ TInt RFileBuf64::SetSize(TInt64 aFileSize) { - __ASSERT_DEBUG(aFileSize >= 0, __SQLITEPANIC(EFBufPanicFileSize)); + __FBUF64_ASSERT(aFileSize >= 0, EFBufPanicFileSize); __FILEBUF64_INVARIANT(); return DoSetFileSize(aFileSize); } @@ -526,9 +634,7 @@ TInt RFileBuf64::Lock(TInt64 aFilePos, TInt64 aLength) const { __FILEBUF64_INVARIANT(); - TInt err = iFile.Lock(aFilePos, aLength); - SQLITE_TRACE_FBUF(OstTraceExt5(TRACE_INTERNALS, RFILEBUF64_LOCK, "FBuf;0x%X;RFileBuf64::Lock;iFileSize=%lld;aFilePos=%lld;aLength=%lld;err=%d", (TUint)this, iFileSize, aFilePos, aLength, err)); - return err; + return iFile.Lock(aFilePos, aLength); } /** @@ -544,9 +650,7 @@ TInt RFileBuf64::UnLock(TInt64 aFilePos, TInt64 aLength) const { __FILEBUF64_INVARIANT(); - TInt err = iFile.UnLock(aFilePos, aLength); - SQLITE_TRACE_FBUF(OstTraceExt5(TRACE_INTERNALS, RFILEBUF64_UNLOCK, "FBuf;0x%X;RFileBuf64::UnLock;iFileSize=%lld;aFilePos=%lld;aLength=%lld;err=%d", (TUint)this, iFileSize, aFilePos, aLength, err)); - return err; + return iFile.UnLock(aFilePos, aLength); } /** @@ -595,9 +699,7 @@ TInt RFileBuf64::Drive(TInt& aDriveNumber, TDriveInfo& aDriveInfo) const { __FILEBUF64_INVARIANT(); - TInt err = iFile.Drive(aDriveNumber, aDriveInfo); - SQLITE_TRACE_FBUF(OstTraceExt5(TRACE_INTERNALS, RFILEBUF64_DRIVE, "FBuf;0x%X;RFileBuf64::Drive;aDriveNumber=%d;driveAtt=0x%X;mediaAtt=0x%X;err=%d", (TUint)this, aDriveNumber, (TUint)aDriveInfo.iDriveAtt, (TUint)aDriveInfo.iMediaAtt, err)); - return err; + return iFile.Drive(aDriveNumber, aDriveInfo); } /** @@ -618,16 +720,20 @@ /** Performs post-initialization of the RFileBuf64 object. If aInitErr is not KErrNone, then the buffer memory will be released. +The function returns the aInitErr value to the caller. @param aInitErr The result of the performed before the call RFileBuf64 initialization. + +@return KErrNone if successful, otherwise one of the other system-wide error codes. */ -void RFileBuf64::DoPostInit(TInt aInitErr) +TInt RFileBuf64::DoPostInit(TInt aInitErr) { if(aInitErr != KErrNone) { User::Free(iBase); iBase = 0; } + return aInitErr; } /** @@ -662,8 +768,8 @@ __FILEBUF64_INVARIANT(); return KErrNone; } + PROFILE_SIZE(); TInt err = iFile.Size(iFileSize); - SQLITE_TRACE_FBUF(OstTraceExt3(TRACE_INTERNALS, RFILEBUF64_DOFILESIZE, "FBuf;0x%X;RFileBuf64::DoFileSize;iFileSize=%lld;err=%d", (TUint)this, iFileSize, err)); if(err != KErrNone) { DoDiscard(); @@ -681,14 +787,14 @@ @return KErrNone if successful, otherwise one of the other system-wide error codes. -@panic Sqlite3 5 In _DEBUG mode - negative aFileSize value. +@panic FBuf64 5 In _DEBUG mode - negative aFileSize value. See RFileBuf64::Invariant() for other possible panics that may occur when this method is called. @see RFileBuf64::Invariant() */ TInt RFileBuf64::DoSetFileSize(TInt64 aFileSize) { - __ASSERT_DEBUG(aFileSize >= 0, __SQLITEPANIC(EFBufPanicFileSize)); + __FBUF64_ASSERT(aFileSize >= 0, EFBufPanicFileSize); __FILEBUF64_INVARIANT(); if(aFileSize < iFilePos) { @@ -700,8 +806,8 @@ { iLength = aFileSize - iFilePos; } + PROFILE_SETSIZE(); TInt err = iFile.SetSize(aFileSize); - SQLITE_TRACE_FBUF(OstTraceExt4(TRACE_INTERNALS, RFILEBUF64_DOSETFILESIZE, "FBuf;0x%X;RFileBuf64::DoSetFileSize;iFileSize=%lld;aFileSize=%lld;err=%d", (TUint)this, iFileSize, aFileSize, err)); if(err != KErrNone) { DoDiscard(); @@ -732,8 +838,8 @@ __FILEBUF64_INVARIANT(); return err; } + PROFILE_FLUSH(); err = iFile.Flush(); - SQLITE_TRACE_FBUF(OstTraceExt3(TRACE_INTERNALS, RFILEBUF64_DOFILEFLUSH, "FBuf;0x%X;RFileBuf64::DoFileFlush;iFileSize=%lld;err=%d", (TUint)this, iFileSize, err)); if(err != KErrNone) { DoDiscard(); @@ -764,9 +870,9 @@ __FILEBUF64_INVARIANT(); return KErrNone; } + PROFILE_WRITE(iFilePos, iLength); TPtrC8 data(iBase, iLength); TInt err = iFile.Write(iFilePos, data); - SQLITE_TRACE_FBUF(OstTraceExt5(TRACE_INTERNALS, RFILEBUF64_DOFILEWRITE, "FBuf;0x%X;RFileBuf64::DoFileWrite;iFileSize=%lld;iFilePos=%lld;iLength=%d;err=%d", (TUint)this, iFileSize, iFilePos, iLength, err)); if(err == KErrNone) { iFileSize = Max(iFileSize, (iFilePos + iLength)); @@ -796,7 +902,7 @@ See RFileBuf64::Invariant() for other possible panics that may occur when this method is called. -@panic Sqlite3 4 In _DEBUG mode - negative aNewFilePos value. +@panic FBuf64 4 In _DEBUG mode - negative aNewFilePos value. @see RFileBuf64::Read() @see RFileBuf64::DoFileWrite() @@ -805,7 +911,7 @@ */ TInt RFileBuf64::DoFileWrite1(TInt64 aNewFilePos) { - __ASSERT_DEBUG(aNewFilePos >= 0, __SQLITEPANIC(EFBufPanicFilePos)); + __FBUF64_ASSERT(aNewFilePos >= 0, EFBufPanicFilePos); __FILEBUF64_INVARIANT(); TInt err = KErrNone; if(iDirty) @@ -843,7 +949,7 @@ See RFileBuf64::Invariant() for other possible panics that may occur when this method is called. -@panic Sqlite3 4 In _DEBUG mode - negative aNewFilePos value. +@panic FBuf64 4 In _DEBUG mode - negative aNewFilePos value. @see RFileBuf64::Write() @see RFileBuf64::DoFileWrite() @@ -852,7 +958,7 @@ */ TInt RFileBuf64::DoFileWrite2(TInt64 aNewFilePos) { - __ASSERT_DEBUG(aNewFilePos >= 0, __SQLITEPANIC(EFBufPanicFilePos)); + __FBUF64_ASSERT(aNewFilePos >= 0, EFBufPanicFilePos); __FILEBUF64_INVARIANT(); TInt err = KErrNone; if(iDirty) @@ -903,29 +1009,29 @@ RFileBuf64 invariant. Called in _DEBUG mode at the beginning and before the end of every RFileBuf64 method (except the init/destroy methods). -@panic Sqlite3 11 In _DEBUG mode - null "this" pointer. -@panic Sqlite3 1 In _DEBUG mode - negative iCapacity value. -@panic Sqlite3 2 In _DEBUG mode - the buffer pointer is null (possible the buffer is not allocated or already destroyed). -@panic Sqlite3 3 In _DEBUG mode - invalid iLength value (negative or bigger than iCapacity). -@panic Sqlite3 4 In _DEBUG mode - negative iFilePos value. -@panic Sqlite3 5 In _DEBUG mode - set but negative iFileSize value. -@panic Sqlite3 6 In _DEBUG mode - null file handle (the RFile64 object is not created or already destroyed). -@panic Sqlite3 13 In _DEBUG mode - set but negative iNextReadFilePos value. -@panic Sqlite3 14 In _DEBUG mode - negative iNextReadFilePosHits value. -@panic Sqlite3 15 In _DEBUG mode - iReadAheadSize is negative or is not power of two. +@panic FBuf64 11 In _DEBUG mode - null "this" pointer. +@panic FBuf64 1 In _DEBUG mode - negative iCapacity value. +@panic FBuf64 2 In _DEBUG mode - the buffer pointer is null (possible the buffer is not allocated or already destroyed). +@panic FBuf64 3 In _DEBUG mode - invalid iLength value (negative or bigger than iCapacity). +@panic FBuf64 4 In _DEBUG mode - negative iFilePos value. +@panic FBuf64 5 In _DEBUG mode - set but negative iFileSize value. +@panic FBuf64 6 In _DEBUG mode - null file handle (the RFile64 object is not created or already destroyed). +@panic FBuf64 13 In _DEBUG mode - set but negative iNextReadFilePos value. +@panic FBuf64 14 In _DEBUG mode - negative iNextReadFilePosHits value. +@panic FBuf64 15 In _DEBUG mode - iReadAheadSize is negative or is not power of two. */ void RFileBuf64::Invariant() const { - __ASSERT_DEBUG(this != 0, __SQLITEPANIC(EFBufPanicNullThis)); - __ASSERT_DEBUG(iCapacity > 0, __SQLITEPANIC(EFBufPanicCapacity)); - __ASSERT_DEBUG(iBase != 0, __SQLITEPANIC(EFBufPanicNullBuf)); - __ASSERT_DEBUG(iLength >= 0 && iLength <= iCapacity, __SQLITEPANIC(EFBufPanicBufLen)); - __ASSERT_DEBUG(iFilePos >= 0, __SQLITEPANIC(EFBufPanicFilePos)); - __ASSERT_DEBUG(iFileSize == KFileSizeNotSet || iFileSize >= 0, __SQLITEPANIC(EFBufPanicFileSize)); - __ASSERT_DEBUG(iFile.SubSessionHandle() != 0, __SQLITEPANIC(EFBufPanicFileHandle)); - __ASSERT_DEBUG(iNextReadFilePos == KNextReadFilePosNotSet || iNextReadFilePos >= 0, __SQLITEPANIC(EFBufPanicNextReadFilePos)); - __ASSERT_DEBUG(iNextReadFilePosHits >= 0, __SQLITEPANIC(EFBufPanicNextReadFilePosHits)); - __ASSERT_DEBUG(iReadAheadSize > 0 && (iReadAheadSize & (iReadAheadSize - 1)) == 0, __SQLITEPANIC(EFBufPanicFileBlockSize)); + __FBUF64_ASSERT(this != 0, EFBufPanicNullThis); + __FBUF64_ASSERT(iCapacity > 0, EFBufPanicCapacity); + __FBUF64_ASSERT(iBase != 0, EFBufPanicNullBuf); + __FBUF64_ASSERT(iLength >= 0 && iLength <= iCapacity, EFBufPanicBufLen); + __FBUF64_ASSERT(iFilePos >= 0, EFBufPanicFilePos); + __FBUF64_ASSERT(iFileSize == KFileSizeNotSet || iFileSize >= 0, EFBufPanicFileSize); + __FBUF64_ASSERT(iFile.SubSessionHandle() != 0, EFBufPanicFileHandle); + __FBUF64_ASSERT(iNextReadFilePos == KNextReadFilePosNotSet || iNextReadFilePos >= 0, EFBufPanicNextReadFilePos); + __FBUF64_ASSERT(iNextReadFilePosHits >= 0, EFBufPanicNextReadFilePosHits); + __FBUF64_ASSERT(iReadAheadSize > 0 && (iReadAheadSize & (iReadAheadSize - 1)) == 0, EFBufPanicFileBlockSize); } #endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/OsLayer/FileBuf64.h --- a/persistentstorage/sqlite3api/OsLayer/FileBuf64.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/OsLayer/FileBuf64.h Wed Sep 01 12:39:58 2010 +0100 @@ -151,7 +151,7 @@ private: void Invariant() const; TInt DoPreInit(); - void DoPostInit(TInt aInitErr); + TInt DoPostInit(TInt aInitErr); void DoDiscard(); TInt DoFileSize(); TInt DoSetFileSize(TInt64 aFileSize); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/OsLayer/SqliteTraceDef.h --- a/persistentstorage/sqlite3api/OsLayer/SqliteTraceDef.h Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -// 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 SQLITETRACEDEF_H -#define SQLITETRACEDEF_H - -#include -#include "SqliteUtil.h" - -////////////////////////////////////////////////////////////////////////////////////// - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_OS_TRACE_ENABLED - #define __SQLITETRACE_OSVAR(var) var - #define __SQLITETRACE_OSEXPR(expr) expr -#else - #define __SQLITETRACE_OSVAR(var) - #define __SQLITETRACE_OSEXPR(expr) -#endif - -////////////////////////////////////////////////////////////////////////////////////// - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_RDEBUG_PRINT - #undef OstTrace0 - #undef OstTrace1 - #undef OstTraceExt1 - #undef OstTraceExt2 - #undef OstTraceExt3 - #undef OstTraceExt4 - #undef OstTraceExt5 - - void SqlitePrintf(TInt aGroupName, TInt aTraceName, const char* aFormat, ...); - - #define OstTrace0 SqlitePrintf - #define OstTrace1 SqlitePrintf - #define OstTraceExt1 SqlitePrintf - #define OstTraceExt2 SqlitePrintf - #define OstTraceExt3 SqlitePrintf - #define OstTraceExt4 SqlitePrintf - #define OstTraceExt5 SqlitePrintf -#endif//defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_RDEBUG_PRINT - -////////////////////////////////////////////////////////////////////////////////////// - -#endif//SQLITETRACEDEF_H diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/OsLayer/SqliteUtil.cpp --- a/persistentstorage/sqlite3api/OsLayer/SqliteUtil.cpp Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,167 +0,0 @@ -// 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 -#include "SqliteUtil.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SqliteUtilTraces.h" -#endif -#include "SqliteTraceDef.h" - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#define UNUSED_ARG(arg) arg = arg -#define UNUSED_DES(arg) arg - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_RDEBUG_PRINT - -/** -This class has been added here to avoid the crashes when _SQLITE_RDEBUG_PRINT macro is defined but the -data to be printed out is too big and cannot fit into the buffer with size KSqliteMaxPrnStrLen. -@internalComponent -*/ -class TSqliteDes16Overflow : public TDes16Overflow - { -public: - virtual void Overflow(TDes16& /*aDes*/) - { - } - }; - -//Replaces: -// "%lld" with "%ld" -//These are the differences in format specification between RDebig::Print and OST functions. -//The new format spec length should be less or equal than the old format spec length. -static void ReplaceFmtSpec(TDes& aFormat, const TDesC& aFmtSpec, const TDesC& aNewFmtSpec) - { - TInt fmtLength = aFormat.Length(); - const TInt KDiff = aFmtSpec.Length() - aNewFmtSpec.Length(); - TPtr ptr((TText*)aFormat.Ptr(), fmtLength, fmtLength); - TInt pos; - while((pos = ptr.Find(aFmtSpec)) >= 0) - { - ptr.Replace(pos, aFmtSpec.Length(), aNewFmtSpec); - fmtLength -= KDiff; - ptr.Set(ptr.MidTPtr(pos)); - } - aFormat.SetLength(fmtLength); - } - -void SqlitePrintf(TInt /*aGroupName*/, TInt /*aTraceName*/, const char* aFormat, ...) - { - VA_LIST list; - VA_START(list, aFormat); - TBuf<128> format; - _LIT(KTraceIdent, "Sqlite3;"); - format.Copy(TPtrC8((const TUint8*)aFormat)); - format.Insert(0, KTraceIdent); - format.Append(_L("\r\n")); - _LIT(KOstI64Fmt, "%lld"); - _LIT(KDbgPrnI64Fmt, "%ld"); - ReplaceFmtSpec(format, KOstI64Fmt, KDbgPrnI64Fmt); - TBuf buf; - TSqliteDes16Overflow overflowHandler; - buf.AppendFormatList(format, list, &overflowHandler); -#ifdef _SQLITE_RDEBUG_PRINT - RDebug::RawPrint(buf); -#endif - } - -#endif//defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_RDEBUG_PRINT - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -SQLite panic category. - -@internalComponent -*/ -_LIT(KSqlitePanicCategory, "Sqlite3"); - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -Panics the caller with aPanicCode panic code. -The call will terminate the thread where it is called from. - -@param aPanicCode Panic code. - -@internalComponent -*/ -static void SqlitePanic(TSqlitePanic aPanicCode) - { - User::Panic(KSqlitePanicCategory, aPanicCode); - } - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -The function prints out a "SQLite" panic message to the console and panics the thread where it is called from. -It gives a useful information about the found error together with the source file name and line number where -it occurred. - -Note: this function will output information regarding the panic only if _SQLITE_PANIC_TRACE_ENABLED macro is defined - -@param aFile Source file name -@param aLine Source line number -@param aPanicCode Panic code -@param aHandle Numeric value, uniquely identfying the leaving location (the "this" pointer for example) - -@return KErrNone - -@internalComponent -*/ -TInt TSqliteUtil::Panic(const TText* aFile, TInt aLine, TInt aPanicCode, TUint aHandle) - { -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_PANIC_TRACE_ENABLED - TPtrC fname(FileName(aFile)); - OstTraceExt5(TRACE_FATAL, TSQLUTIL_PANIC, "Panic;0x%X;%S;%d;%S;%d", aHandle, __SQLITEPRNSTR(fname), aLine, __SQLITEPRNSTR(KSqlitePanicCategory), aPanicCode); -#else - UNUSED_ARG(aFile); - UNUSED_ARG(aLine); - UNUSED_ARG(aHandle); -#endif - ::SqlitePanic(static_cast (aPanicCode)); - return KErrNone; - } - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#if defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_PANIC_TRACE_ENABLED - -/** -The function creates and returns TPtrC object which points to aFile parameter. - -@param aFile File name -@return TPtrC object pointing to aFile parameter. - -@internalComponent -*/ -TPtrC TSqliteUtil::FileName(const TText* aFile) - { - TPtrC p(aFile); - TInt ix = p.LocateReverse('\\'); - if(ix<0) - ix=p.LocateReverse('/'); - if(ix>=0) - p.Set(p.Mid(1+ix)); - return p; - } - -#endif //defined OST_TRACE_COMPILER_IN_USE && defined _SQLITE_PANIC_TRACE_ENABLED - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/OsLayer/SqliteUtil.h --- a/persistentstorage/sqlite3api/OsLayer/SqliteUtil.h Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,144 +0,0 @@ -// 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 SQLITEUTIL_H -#define SQLITEUTIL_H - -#include - -/** -Panic codes - used by asserts in the OS porting layer and the file buffer. - -@see KPanicCategory - -@internalComponent -*/ -enum TSqlitePanic - { - ESqliteOsPanicFsCreationError = 1, - ESqliteOsPanicMutexCreationError = 2, - ESqliteOsPanicInvalidFs = 3, - ESqliteOsPanicNullPls1 = 4, - ESqliteOsPanicNullPls2 = 5, - ESqliteOsPanicNullPls3 = 6, - ESqliteOsPanicNullPls4 = 7, - ESqliteOsPanicAssert = 8, - ESqliteOsPanicMaxKeysExceeded = 9, - ESqliteOsPanicBufferSizeExceeded =10, - ESqliteOsPanicNullKey =11, - ESqliteOsPanicWsdBufSize =12, - ESqliteOsPanicWsdEntryCount =13, - ESqliteOsPanicInternalError =19, - ESqliteOsPanicNullDbFilePtr =20, - ESqliteOsPanicInvalidLock =21, - ESqliteOsPanicInvalidMutexType =22, - ESqliteOsPanicMutexLockCounter =23, - ESqliteOsPanicMutexOwner =24, - // - EFBufPanicCapacity =101, - EFBufPanicNullBuf =102, - EFBufPanicBufLen =103, - EFBufPanicFilePos =104, - EFBufPanicFileSize =105, - EFBufPanicFileHandle =106, - EFBufPanicFsHandle =107, - EFBufPanicMsgHandle =108, - EFBufPanicMsgIndex =109, - EFBufPanicFileNameLen =110, - EFBufPanicNullThis =111, - EFBufPanicDirty =112, - EFBufPanicNextReadFilePos =113, - EFBufPanicNextReadFilePosHits =114, - EFBufPanicFileBlockSize =115, - }; - -//////////////////////////////////////////////////////////////////////////////////////////// - -//All macros in this header will have a non-void definition only if the OST_TRACE_COMPILER_IN_USE macro -//is defined. -//In order to get the traces enabled, the OST_TRACE_COMPILER_IN_USE macro has to be defined in -//OstTraceDefinitions.h file. -//After that, the trace output can be redirected by defining _SQL_RDEBUG_PRINT or specific categories -//of traces can be enabled/disabled. - -//Enable _SQLITE_RDEBUG_PRINT if you want to redirect the OS porting layer and file buffer tracing output via RDebug::Print() -//#define _SQLITE_RDEBUG_PRINT - -//Enable _SQLITE_OS_TRACE_ENABLED if you get the OS porting layer traces compiled in the binary -//#define _SQLITE_OS_TRACE_ENABLED - -//Enable _SQLITE_FBUF_TRACE_ENABLED if you get the file buffer traces compiled in the binary -//#define _SQLITE_FBUF_TRACE_ENABLED - -#ifdef _DEBUG - //Enable _SQLITE_PANIC_TRACE_ENABLED if you want to get more detailed output regarding panics - //#define _SQLITE_PANIC_TRACE_ENABLED -#endif - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -//Wrap every string (file name, file path, etc.) you want to trace, in a __SQLITEPRNSTR()/__SQLITEPRNSTR8() macro. -//There is a difference how RDebug::Print() and OstTraceExt() work. -#if defined _SQLITE_RDEBUG_PRINT - const TInt KSqliteMaxPrnStrLen = 512; - #define __SQLITEPRNSTR(des) &des -#else - #define __SQLITEPRNSTR(des) des -#endif - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -Set of useful functions to print diagnostic messages on the console when a panic occurs. - -@internalComponent -*/ -class TSqliteUtil - { -public: - static TInt Panic(const TText* aFile, TInt aLine, TInt aPanicCode, TUint aHandle); - -private: - static TPtrC FileName(const TText* aFile); - - }; - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#define __SQLITESTRING(str) _S(str) - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -//__SQLITEPANIC/__SQLITEPANIC2 macro is used for printing out additional information when panic occurs in SQLite OS porting layer and the file buffer: -//source file name, line number, "this" pointer, panic category. -#define __SQLITEPANIC(aPanicCode) TSqliteUtil::Panic(__SQLITESTRING(__FILE__), __LINE__, aPanicCode, (TUint)this) -#define __SQLITEPANIC2(aPanicCode) TSqliteUtil::Panic(__SQLITESTRING(__FILE__), __LINE__, aPanicCode, 0) - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifdef _SQLITE_OS_TRACE_ENABLED - #define SQLITE_TRACE_OS(trace) trace -#else - #define SQLITE_TRACE_OS(trace) do {} while(0) -#endif - -#ifdef _SQLITE_FBUF_TRACE_ENABLED - #define SQLITE_TRACE_FBUF(trace) trace -#else - #define SQLITE_TRACE_FBUF(trace) do {} while(0) -#endif - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#endif //SQLITEUTIL_H diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/OsLayer/UTraceSqlite.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/sqlite3api/OsLayer/UTraceSqlite.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,51 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +//The file is used only to compile and include in the image only a single +//copy of the trace strings. +#define __SQLITETRACE_STRINGS__ +#include "UTraceSqlite.h" + +#ifdef SYMBIAN_TRACE_SQLITE_FUNC + +/** +Create the TSqlUTraceProfiler object which inserts a UTF trace, used to signal a function entry + +@param aFunctionStr A "const char" pointer describing the function to be profiled. + Currently this is the type signature of the function returned by + the __PRETTY_FUNCTION__ macro. +@param aObj A object pointer used to provide context for the function. + +@internalComponent +*/ +TSqlUTraceProfiler::TSqlUTraceProfiler(const TAny* aObj, const char* aFunctionStr): +iObj(aObj), iFunctionStr(reinterpret_cast(aFunctionStr)) + { + UTF::Printf(UTF::TTraceContext(UTF::ESystemCharacteristicMetrics), KProfilerBegin, &iFunctionStr, iObj); + } + +/** +Destroys TSqlUTraceProfiler object which inserts a UTF trace, used to signal a function exit + +@internalComponent +*/ +TSqlUTraceProfiler::~TSqlUTraceProfiler() + { + UTF::Printf(UTF::TTraceContext(UTF::ESystemCharacteristicMetrics), KProfilerEnd, &iFunctionStr, iObj); + } + +#endif //SYMBIAN_TRACE_SQLITE_FUNC diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/OsLayer/UTraceSqlite.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/sqlite3api/OsLayer/UTraceSqlite.h Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,117 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef UTRACESQLITE_H_ +#define UTRACESQLITE_H_ + +#if defined SQLITE_ENABLE_TRACE + +// UID3 of sqlite3.dll +#define EXECUTABLE_DEFAULT_MODULEUID 0x10285A79 + +//The UTF header can only be included after EXECUTABLE_DEFAULT_MODULEUID is defined +#include + +/** +Enable this macro to compile in the SQLite trace points that certain porting layer functions entry and exit. +From the timestamps of these trace, the total time spent in these functions can be worked out. +These traces are particularly useful for performance investigations. + +@SymTraceMacro +*/ +#undef SYMBIAN_TRACE_SQLITE_FUNC + +/** +Enable this macro to compile in the SQLite trace points that trace the following internal events. + - Extra internal information for certain porting layer functions +These traces can be used to assist performance and debug investigations + +@SymTraceMacro +*/ +#undef SYMBIAN_TRACE_SQLITE_EVENTS + +#endif //SQLITE_ENABLE_TRACE + + +//////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////// UTrace Related Strings /////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#if defined SQLITE_ENABLE_TRACE +#ifdef __SQLITETRACE_STRINGS__ + #define CONST_LIT8(var, val) extern const TLitC8 var = {sizeof(val) - 1, val} + #define CONST_LIT16(var, val) extern const TLitC16 var = {sizeof(L##val)/2 - 1, L##val} +#else + #define CONST_LIT8(var, val) extern const TLitC8 var + #define CONST_LIT16(var, val) extern const TLitC16 var +#endif + +//File I/O trace format strings +CONST_LIT8(KFileRead, "Sqlite: Size - %d bytes, File Offset Position - %d,"); +CONST_LIT8(KFileWrite, "Sqlite: Size - %d bytes, File Offset Position - %d,"); +CONST_LIT8(KFileTruncate, "Sqlite: Size - %d bytes"); +CONST_LIT8(KFileFileCtr, "Sqlite: Opeartion Called - %d"); +CONST_LIT16(KFileOpen, "Sqlite: Sqlite3_file - 0x%x, Filename - \"%S\""); +CONST_LIT16(KFileName, "Sqlite: Filename - \"%S\""); + +//TSqlUTraceProfiler trace format strings, used to display function entry and exit +CONST_LIT8(KProfilerBegin, "Function Entry:\"%S\", Address - 0x%x"); +CONST_LIT8(KProfilerEnd, "Function Exit:\"%S\", Address - 0x%x"); + +#endif //SQLITE_ENABLE_TRACE + +//////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////// UTrace Related Macro Functions and Class Declarations //////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#ifdef SYMBIAN_TRACE_SQLITE_FUNC + +/** +This class is used to help trace function entry and exits within sqlite3.dll +Exist only when SYMBIAN_TRACE_SQLITE_FUNC is enabled. + +@internalComponent +*/ +class TSqlUTraceProfiler + { + public: + TSqlUTraceProfiler(const TAny* aObj, const char* aFunctionStr); + ~TSqlUTraceProfiler(); + private: + const TAny* iObj; + TPtrC8 iFunctionStr; + }; + +//This macro should be used to trace function entry and exits within Symbian SQL +//Works only when SYMBIAN_TRACE_SQLITE_FUNC is enabled. Otherwise it evaluates to zero +#define SQLUTRACE_PROFILER(x) TSqlUTraceProfiler _profiler(x, __PRETTY_FUNCTION__) + +#else + +#define SQLUTRACE_PROFILER(x) void(0) +#endif //SYMBIAN_TRACE_SQLITE_FUNC + +#ifdef SYMBIAN_TRACE_SQLITE_EVENTS + +//This macro should be used to trace events occuring within Symbian SQL. +//To use the macro, insert the full UTF statement as the macro parameter +//Works only when SYMBIAN_TRACE_SQLITE_EVENTS is enabled. Otherwise it evaluates to zero +#define SYMBIAN_TRACE_SQLITE_EVENTS_ONLY(c) c +const TPtrC8 GetFuncString(TInt aFunction); + +#else + +#define SYMBIAN_TRACE_SQLITE_EVENTS_ONLY(c) void(0) +#endif //SYMBIAN_TRACE_SQLITE_EVENTS +//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#endif /* UTRACESQLITE_H_ */ diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/OsLayer/os_symbian.h --- a/persistentstorage/sqlite3api/OsLayer/os_symbian.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/OsLayer/os_symbian.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,5 +1,5 @@ /** -* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-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" @@ -30,6 +30,45 @@ #ifdef SQLITE_OS_SYMBIAN +/** +Multi-threaded Symbian OS porting layer panic category. + +@see TPanicCodes + +@internalComponent +*/ +_LIT(KPanicCategory, "SqliteMt"); + +/** +Panic codes - used by asserts in the multi-threaded OS porting layer. + +@see KPanicCategory + +@internalComponent +*/ +enum TPanicCodes + { + EPanicFsCreationError = 1, + EPanicMutexCreationError = 2, + EPanicInvalidFs = 3, + EPanicNullPls1 = 4, + EPanicNullPls2 = 5, + EPanicNullPls3 = 6, + EPanicNullPls4 = 7, + EPanicAssert = 8, + EPanicMaxKeysExceeded = 9, + EPanicBufferSizeExceeded =10, + EPanicNullKey =11, + EPanicWsdBufSize =12, + EPanicWsdEntryCount =13, + EPanicInternalError =19, + EPanicNullDbFilePtr =20, + EPanicInvalidLock =21, + EPanicInvalidMutexType =22, + EPanicMutexLockCounter =23, + EPanicMutexOwner =24 + }; + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////// TStaticFs ///////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -302,7 +341,6 @@ static TInt DoGetDeviceCharacteristics(const TDriveInfo& aDriveInfo, const TVolumeIOParamInfo& aVolumeInfo); static TInt DoGetSectorSize(const TDriveInfo& aDriveInfo, const TVolumeIOParamInfo& aVolumeInfo); static TInt DoGetDeviceCharacteristicsAndSectorSize(TDbFile& aDbFile, TInt& aRecReadBufSize); - static TInt DoFileSizeCorruptionCheck(TDbFile& aDbFile, const TDesC& aFname, TInt aFmode); }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/OsLayer/os_symbian_emul.cpp --- a/persistentstorage/sqlite3api/OsLayer/os_symbian_emul.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/OsLayer/os_symbian_emul.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -22,12 +22,6 @@ #include "os_symbian.h" #include #include -#include "SqliteUtil.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "os_symbian_emulTraces.h" -#endif -#include "SqliteTraceDef.h" #ifdef SQLITE_OS_SYMBIAN @@ -84,7 +78,7 @@ { idx = ++idx % KMaxEntries; } - __ASSERT_ALWAYS(cnt < KMaxEntries, __SQLITEPANIC2(ESqliteOsPanicMaxKeysExceeded)); + __ASSERT_ALWAYS(cnt < KMaxEntries, User::Panic(KPanicCategory, EPanicMaxKeysExceeded)); if(!iTable[idx].iKey) { Add(idx, aKey, aLength); @@ -111,7 +105,7 @@ */ void Add(TInt aIdx, const TUint8* aKey, TInt aLength) { - __ASSERT_ALWAYS((iSize + aLength) <= KBufferSize, __SQLITEPANIC2(ESqliteOsPanicBufferSizeExceeded)); + __ASSERT_ALWAYS((iSize + aLength) <= KBufferSize, User::Panic(KPanicCategory, EPanicBufferSizeExceeded)); //Add new entry to the hash table and the intial value to the WSD buffer iTable[aIdx].iKey = aKey; iTable[aIdx].iData = iNext; @@ -165,20 +159,16 @@ */ static TInt PlsInitialize(TPls* aPls) { - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, PLSINITIALIZE_ENTRY, "OS-Entry;0;PlsInitialize")); - __ASSERT_ALWAYS(aPls != NULL, __SQLITEPANIC2(ESqliteOsPanicNullPls1)); + __ASSERT_ALWAYS(aPls != NULL, User::Panic(KPanicCategory, EPanicNullPls1)); //Global RFs object TInt err = aPls->iStaticFs.Connect(); - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, PLSINITIALIZE1, "OS;0;PlsInitialize;iStaticFs.Connect() err=%d", err)); - __ASSERT_ALWAYS(err == KErrNone, __SQLITEPANIC2(ESqliteOsPanicFsCreationError)); + __ASSERT_ALWAYS(err == KErrNone , User::Panic(KPanicCategory, EPanicFsCreationError)); //Static mutexes - TInt idx = 0; - for(;idx<(sizeof(aPls->iStaticMutex)/sizeof(aPls->iStaticMutex[0])) && err==KErrNone;++idx) + for(TInt i=0;i<(sizeof(aPls->iStaticMutex)/sizeof(aPls->iStaticMutex[0])) && err==KErrNone;++i) { - err = aPls->iStaticMutex[idx].Create(); + err = aPls->iStaticMutex[i].Create(); } - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, PLSINITIALIZE2, "OS;0;PlsInitialize;iStaticMutex[%d].Create() err=%d", idx, err)); - __ASSERT_ALWAYS(err == KErrNone , __SQLITEPANIC2(ESqliteOsPanicMutexCreationError)); + __ASSERT_ALWAYS(err == KErrNone , User::Panic(KPanicCategory, EPanicMutexCreationError)); //WSD map //...already initialized by its constructor //sqlite3_vfs object @@ -201,7 +191,6 @@ aPls->iVfsApi.xCurrentTime = &TVfs::CurrentTime; aPls->iVfsApi.xGetLastError = &TVfs::GetLastError; - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, PLSINITIALIZE_EXIT, "OS-Exit;0;PlsInitialize")); return KErrNone; } @@ -224,8 +213,8 @@ RFs& TStaticFs::Fs() { TPls* pls = ::Pls(KSqliteUid, &PlsInitialize); - __ASSERT_ALWAYS(pls != 0, __SQLITEPANIC2(ESqliteOsPanicNullPls2)); - __ASSERT_DEBUG(pls->iStaticFs.iFs.Handle() != KNullHandle, __SQLITEPANIC2(ESqliteOsPanicInvalidFs)); + __ASSERT_ALWAYS(pls != 0, User::Panic(KPanicCategory, EPanicNullPls2)); + __ASSERT_DEBUG(pls->iStaticFs.iFs.Handle() != KNullHandle, User::Panic(KPanicCategory, EPanicInvalidFs)); return pls->iStaticFs.iFs; } @@ -240,8 +229,8 @@ sqlite3_mutex* StaticMutex(TInt aType) { TPls* pls = ::Pls(KSqliteUid, &PlsInitialize); - __ASSERT_ALWAYS(pls != 0, __SQLITEPANIC2(ESqliteOsPanicNullPls3)); - __ASSERT_ALWAYS((TUint)aType < (sizeof(pls->iStaticMutex)/sizeof(pls->iStaticMutex[0])), __SQLITEPANIC2(ESqliteOsPanicInvalidMutexType)); + __ASSERT_ALWAYS(pls != 0, User::Panic(KPanicCategory, EPanicNullPls3)); + __ASSERT_ALWAYS((TUint)aType < (sizeof(pls->iStaticMutex)/sizeof(pls->iStaticMutex[0])), User::Panic(KPanicCategory, EPanicInvalidMutexType)); return &pls->iStaticMutex[aType]; } @@ -264,8 +253,8 @@ */ int sqlite3_wsd_init(int aWsdBufSize, int aWsdEntryCount) { - __ASSERT_ALWAYS(aWsdBufSize <= TWsdMap::KBufferSize, __SQLITEPANIC2(ESqliteOsPanicWsdBufSize)); - __ASSERT_ALWAYS(aWsdEntryCount <= TWsdMap::KMaxEntries, __SQLITEPANIC2(ESqliteOsPanicWsdEntryCount)); + __ASSERT_ALWAYS(aWsdBufSize <= TWsdMap::KBufferSize, User::Panic(KPanicCategory, EPanicWsdBufSize)); + __ASSERT_ALWAYS(aWsdEntryCount <= TWsdMap::KMaxEntries, User::Panic(KPanicCategory, EPanicWsdEntryCount)); return SQLITE_OK; } @@ -283,7 +272,7 @@ */ void* sqlite3_wsd_find(void* aKey, int aLength) { - __ASSERT_ALWAYS(aKey != NULL, __SQLITEPANIC2(ESqliteOsPanicNullKey)); + __ASSERT_ALWAYS(aKey != NULL, User::Panic(KPanicCategory, EPanicNullKey)); return ::Pls(KSqliteUid, &PlsInitialize)->iWsdMap.Find(static_cast (aKey), aLength); } @@ -294,7 +283,7 @@ sqlite3_vfs* VfsApi() { TPls* pls = ::Pls(KSqliteUid, &PlsInitialize); - __ASSERT_ALWAYS(pls != 0, __SQLITEPANIC2(ESqliteOsPanicNullPls4)); + __ASSERT_ALWAYS(pls != 0, User::Panic(KPanicCategory, EPanicNullPls4)); return &pls->iVfsApi; } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/OsLayer/os_symbian_hrdw.cpp --- a/persistentstorage/sqlite3api/OsLayer/os_symbian_hrdw.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/OsLayer/os_symbian_hrdw.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -20,12 +20,6 @@ @file */ #include "os_symbian.h" -#include "SqliteUtil.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "os_symbian_hrdwTraces.h" -#endif -#include "SqliteTraceDef.h" #ifdef SQLITE_OS_SYMBIAN @@ -53,7 +47,7 @@ TInt err = Connect(); if(err != KErrNone) { - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TSTATICFS_TSTATICFS, "OS;0x%X;TStaticFs::TStaticFs;err=%d", (TUint)this, err)); + RDebug::Print(_L("===SQLITE OS porting layer, file session creation has failed with err=%d.\r\n"), err); User::Exit(err); } } @@ -69,7 +63,7 @@ */ RFs& TStaticFs::Fs() { - __ASSERT_DEBUG(TheFs.iFs.Handle() != KNullHandle, __SQLITEPANIC2(ESqliteOsPanicInvalidFs)); + __ASSERT_DEBUG(TheFs.iFs.Handle() != KNullHandle, User::Panic(KPanicCategory, EPanicInvalidFs)); return TheFs.iFs; } @@ -97,14 +91,14 @@ TInt err = Create(); if(err != KErrNone) { - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TSTATICMUTEX_TSTATICMUTEX, "OS;0x%X;TStaticMutex::TStaticMutex;err=%d", (TUint)this, err)); + RDebug::Print(_L("===SQLITE OS porting layer, static mutex creation has failed with err=%d.\r\n"), err); User::Exit(err); } } sqlite3_mutex* StaticMutex(TInt aType) { - __ASSERT_ALWAYS((TUint)aType < (sizeof(TheStaticMutex)/sizeof(TheStaticMutex[0])), __SQLITEPANIC2(ESqliteOsPanicInvalidMutexType)); + __ASSERT_ALWAYS((TUint)aType < (sizeof(TheStaticMutex)/sizeof(TheStaticMutex[0])), User::Panic(KPanicCategory, EPanicInvalidMutexType)); return &TheStaticMutex[aType]; } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/OsLayer/os_symbian_mt.cpp --- a/persistentstorage/sqlite3api/OsLayer/os_symbian_mt.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/OsLayer/os_symbian_mt.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -36,16 +36,7 @@ } #include #include "os_symbian.h" -#include "SqliteUtil.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "os_symbian_mtTraces.h" -#endif -#include "SqliteTraceDef.h" - -//Bit-mask constant. If xOpen()'s "aFlag" parameter contains one of these bits set, then the the file top be -//opened or created is a journal file. -const TUint KJournalFileTypeBitMask = SQLITE_OPEN_MAIN_JOURNAL | SQLITE_OPEN_TEMP_JOURNAL | SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_MASTER_JOURNAL; +#include "UTraceSqlite.h" #ifdef SQLITE_TEST @@ -105,7 +96,7 @@ return SQLITE_FULL; default: #ifdef _DEBUG - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, OS2SQLITEERR, "OS;0;Os2SqliteErr;aOsErr=%d", aOsErr)); + RDebug::Print(_L("SQLite3 C API, Os2SqliteErr(), err=%d\n"), aOsErr); #endif break; } @@ -134,7 +125,6 @@ { iFs.Close(); } - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TSTATICFS_CONNECT, "OS;0;TStaticFs::Connect;iFs.Handle()=0x%X;err=%d", iFs.Handle(), err)); return err; } @@ -149,7 +139,6 @@ iRefCount(0), iOwnerThreadId(KMaxTUint64) { - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, SQLITE3_MUTEX_SQLITE3_MUTEX, "OS;0x%X;sqlite3_mutex::sqlite3_mutex", (TUint)this)); } /** @@ -157,7 +146,6 @@ */ sqlite3_mutex::~sqlite3_mutex() { - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, SQLITE3_MUTEX_SQLITE3_MUTEX2, "OS;0x%X;sqlite3_mutex::~sqlite3_mutex", (TUint)this)); iMutex.Close(); } @@ -171,7 +159,7 @@ */ void sqlite3_mutex::Enter() { - __ASSERT_DEBUG(iRefCount >= 0, __SQLITEPANIC(ESqliteOsPanicMutexLockCounter)); + __ASSERT_DEBUG(iRefCount >= 0, User::Panic(KPanicCategory, EPanicMutexLockCounter)); iMutex.Wait(); RThread currThread; iOwnerThreadId = currThread.Id(); @@ -189,10 +177,10 @@ */ void sqlite3_mutex::Leave() { - __ASSERT_DEBUG(iRefCount > 0, __SQLITEPANIC(ESqliteOsPanicMutexLockCounter)); + __ASSERT_DEBUG(iRefCount > 0, User::Panic(KPanicCategory, EPanicMutexLockCounter)); #ifdef _DEBUG RThread currThread; - __ASSERT_DEBUG(iOwnerThreadId == currThread.Id(), __SQLITEPANIC(ESqliteOsPanicMutexOwner)); + __ASSERT_DEBUG(iOwnerThreadId == currThread.Id(), User::Panic(KPanicCategory, EPanicMutexOwner)); #endif --iRefCount; iMutex.Signal(); @@ -217,9 +205,7 @@ */ TInt sqlite3_mutex::Create() { - TInt err = iMutex.CreateLocal(); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, SQLITE3_MUTEX_CREATE, "OS;0x%X;sqlite3_mutex::Create;err=%d", (TUint)this, err)); - return err; + return iMutex.CreateLocal(); } /** @@ -238,7 +224,6 @@ self = NULL; } } - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, CRECURSIVEMUTEX_NEWL, "OS;0x%X;CRecursiveMutex::New", (TUint)self)); return self; } @@ -258,6 +243,7 @@ */ int TMutexApi::Init() { + SQLUTRACE_PROFILER(0); return SQLITE_OK; } @@ -269,6 +255,7 @@ */ int TMutexApi::End() { + SQLUTRACE_PROFILER(0); return SQLITE_OK; } @@ -281,6 +268,7 @@ */ sqlite3_mutex* TMutexApi::Alloc(int aType) { + SQLUTRACE_PROFILER(0); sqlite3_mutex* mutex = NULL; switch(aType) { @@ -293,7 +281,6 @@ //value is 2 (SQLITE_MUTEX_FAST is 0, SQLITE_MUTEX_RECURSIVE is 1). break; } - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TMUTEXAPI_ALLOC, "OS;0;TMutexApi::Alloc;aType=%d;mutex=0x%X", aType, (TUint)mutex)); return mutex; } @@ -303,7 +290,7 @@ */ void TMutexApi::Free(sqlite3_mutex* aMutex) { - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TMUTEXAPI_FREE, "OS;0;TMutexApi::Free;mutex=0x%X", (TUint)aMutex)); + SQLUTRACE_PROFILER(0); delete aMutex; } @@ -317,6 +304,7 @@ */ void TMutexApi::Enter(sqlite3_mutex* aMutex) { + SQLUTRACE_PROFILER(0); aMutex->Enter(); } @@ -327,6 +315,7 @@ */ int TMutexApi::Try(sqlite3_mutex*) { + SQLUTRACE_PROFILER(0); return SQLITE_BUSY; } @@ -340,6 +329,7 @@ */ void TMutexApi::Leave(sqlite3_mutex* aMutex) { + SQLUTRACE_PROFILER(0); aMutex->Leave(); } @@ -355,6 +345,7 @@ */ int TMutexApi::Held(sqlite3_mutex* aMutex) { + SQLUTRACE_PROFILER(0); return aMutex->IsHeld(); } @@ -370,6 +361,7 @@ */ int TMutexApi::Notheld(sqlite3_mutex* aMutex) { + SQLUTRACE_PROFILER(0); return !aMutex->IsHeld(); } @@ -382,9 +374,7 @@ */ extern "C" SQLITE_EXPORT int sqlite3_os_init(void) { - TInt err = sqlite3_vfs_register(VfsApi(), 1); - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, SQLITE3_OS_INIT, "OS;0;sqlite3_os_init;err=%d", err)); - return err; + return sqlite3_vfs_register(VfsApi(), 1); } /** @@ -392,9 +382,7 @@ */ extern "C" SQLITE_EXPORT int sqlite3_os_end(void) { - TInt err = sqlite3_vfs_unregister(VfsApi()); - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, SQLITE3_OS_END, "OS;0;sqlite3_os_end;err=%d", err)); - return err; + return sqlite3_vfs_unregister(VfsApi()); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -533,7 +521,6 @@ iDeviceCharacteristics(-1) { pMethods = 0; - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TDBFILE_TDBFILE, "OS;0x%X;TDbFile::TDbFile", (TUint)this)); } /** @@ -554,7 +541,7 @@ */ static inline TDbFile& DbFile(sqlite3_file* aDbFile) { - __ASSERT_DEBUG(aDbFile != 0, __SQLITEPANIC2(ESqliteOsPanicNullDbFilePtr)); + __ASSERT_DEBUG(aDbFile != 0, User::Panic(KPanicCategory, EPanicNullDbFilePtr)); return *(static_cast (aDbFile)); } @@ -576,14 +563,13 @@ */ /* static */ int TFileIo::Close(sqlite3_file* aDbFile) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TFILEIO_CLOSE1, "OS;0x%X;TFileIo::Close", (TUint)&dbFile)); dbFile.iFileBuf.Close(); if(dbFile.iFullName) {//"iFullName" will not be NULL only when TVfs::Open() is called with SQLITE_OPEN_DELETEONCLOSE flag. //That means - SQlite expects the file to be deleted after the file close operation. - __SQLITETRACE_OSEXPR(TInt err = ) TStaticFs::Fs().Delete(*dbFile.iFullName); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_CLOSE2, "OS;0x%X;TFileIo::Close;delete fileName=%S;err=%d", (TUint)&dbFile, __SQLITEPRNSTR(*dbFile.iFullName), err)); + (void)TStaticFs::Fs().Delete(*dbFile.iFullName); delete dbFile.iFullName; dbFile.iFullName = NULL; } @@ -612,9 +598,10 @@ */ /* static */ int TFileIo::Read(sqlite3_file* aDbFile, void* aBuf, int aAmt, sqlite3_int64 aOffset) { + SQLUTRACE_PROFILER(aDbFile); + SYMBIAN_TRACE_SQLITE_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileRead, aAmt, aOffset)); SimulateIOError(return SQLITE_IOERR_READ); TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_READ_ENTRY, "OS-Entry;0x%X;TFileIo::Read;aAmt=%d;aOffset=%lld", (TUint)&dbFile, aAmt, aOffset)); TPtr8 ptr((TUint8*)aBuf, 0, aAmt); TInt err = dbFile.iFileBuf.Read(aOffset, ptr); TInt cnt = ptr.Length(); @@ -624,7 +611,6 @@ Mem::FillZ(static_cast (aBuf) + cnt, aAmt - cnt); sqliteErr = SQLITE_IOERR_SHORT_READ; } - SQLITE_TRACE_OS(OstTraceExt4(TRACE_INTERNALS, TFILEIO_READ_EXIT, "OS-Exit;0x%X;TFileIo::Read;cnt=%d;err=%d;sqliteErr=%d", (TUint)&dbFile, cnt, err, sqliteErr)); return sqliteErr; } @@ -648,19 +634,18 @@ */ /* static */ int TFileIo::Write(sqlite3_file* aDbFile, const void* aData, int aAmt, sqlite3_int64 aOffset) { + SQLUTRACE_PROFILER(aDbFile); + SYMBIAN_TRACE_SQLITE_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileWrite, aAmt, aOffset)); SimulateIOError(return SQLITE_IOERR_WRITE); SimulateDiskfullError(return SQLITE_FULL); TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_WRITE_ENTRY, "OS-Entry;0x%X;TFileIo::Write;aAmt=%d;aOffset=%lld", (TUint)&dbFile, aAmt, aOffset)); TInt err = KErrAccessDenied; if(!dbFile.iReadOnly) { TPtrC8 ptr((const TUint8*)aData, aAmt); err = dbFile.iFileBuf.Write(aOffset, ptr); } - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_IOERR_WRITE); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_WRITE_EXIT, "OS-Exit;0x%X;TFileIo::Write;err=%d;sqliteErr=%d", (TUint)&dbFile, err, sqliteErr)); - return sqliteErr; + return ::Os2SqliteErr(err, SQLITE_IOERR_WRITE); } /** @@ -681,17 +666,16 @@ */ /* static */ int TFileIo::Truncate(sqlite3_file* aDbFile, sqlite3_int64 aLength) { + SQLUTRACE_PROFILER(aDbFile); + SYMBIAN_TRACE_SQLITE_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileTruncate, aLength)); SimulateIOError(return SQLITE_IOERR_TRUNCATE); TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_TRUNCATE_ENTRY, "OS-Entry;0x%X;TFileIo::Truncate;aLength=%lld", (TUint)&dbFile, aLength)); TInt err = KErrAccessDenied; if(!dbFile.iReadOnly) { err = dbFile.iFileBuf.SetSize(aLength); } - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_IOERR_TRUNCATE); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_TRUNCATE_EXIT, "OS-Exit;0x%X;TFileIo::Truncate;err=%d;sqliteErr=%d", (TUint)&dbFile, err, sqliteErr)); - return sqliteErr; + return ::Os2SqliteErr(err, SQLITE_IOERR_TRUNCATE); } /** @@ -712,9 +696,9 @@ */ /* static */int TFileIo::Sync(sqlite3_file* aDbFile, int aFlags) { + SQLUTRACE_PROFILER(aDbFile); SimulateIOError(return SQLITE_IOERR_FSYNC); TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TFILEIO_SYNC_ENTRY, "OS-Entry;0x%X;TFileIo::Sync", (TUint)&dbFile)); #ifdef SQLITE_TEST if(aFlags & SQLITE_SYNC_FULL) { @@ -729,9 +713,7 @@ { err = dbFile.iFileBuf.Flush(); } - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_IOERR_FSYNC); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_SYNC_EXIT, "OS-Exit;0x%X;TFileIo::Sync;err=%d;sqliteErr=%d", (TUint)&dbFile, err, sqliteErr)); - return sqliteErr; + return ::Os2SqliteErr(err, SQLITE_IOERR_FSYNC); } /** @@ -750,13 +732,11 @@ */ /* static */ int TFileIo::FileSize(sqlite3_file* aDbFile, sqlite3_int64* aSize) { + SQLUTRACE_PROFILER(aDbFile); SimulateIOError(return SQLITE_IOERR_FSTAT); TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TFILEIO_FILESIZE_ENTRY, "OS-Entry;0x%X;TFileIo::FileSize", (TUint)&dbFile)); TInt err = dbFile.iFileBuf.Size(*aSize); - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_IOERR_FSTAT); - SQLITE_TRACE_OS(OstTraceExt4(TRACE_INTERNALS, TFILEIO_FILESIZE_EXIT, "OS-Exit;0x%X;TFileIo::FileSize;aSize=%lld;err=%d;sqliteErr=%d", (TUint)&dbFile, *aSize, err, sqliteErr)); - return sqliteErr; + return ::Os2SqliteErr(err, SQLITE_IOERR_FSTAT); } /** @@ -799,7 +779,6 @@ break; } } - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_GETREADLOCK, "OS;0x%X;TFileIo::GetReadLock;rc=%d", (TUint)&aDbFile, rc)); return rc; } @@ -816,9 +795,7 @@ */ /* static */TInt TFileIo::UnlockReadLock(TDbFile& aDbFile) { - TInt err = aDbFile.iFileBuf.UnLock(SHARED_FIRST + aDbFile.iSharedLockByte, 1); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_UNLOCKREADLOCK, "OS;0x%X;TFileIo::UnlockReadLock;err=%d", (TUint)&aDbFile, err)); - return err; + return aDbFile.iFileBuf.UnLock(SHARED_FIRST + aDbFile.iSharedLockByte, 1); } /** @@ -855,11 +832,11 @@ */ /* static */ int TFileIo::Lock(sqlite3_file* aDbFile, int aLockType) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); //If there is already a lock of this type or more restrictive on the aDbFile, then - do nothing. if(dbFile.iLockType >= aLockType) { - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_LOCK1, "OS;0x%X;TFileIo::Lock;dbFile.iLockType=%d;aLockType=%d", (TUint)&dbFile, dbFile.iLockType, aLockType)); return SQLITE_OK; } @@ -871,15 +848,14 @@ TInt err = dbFile.iFileBuf.Flush(ETrue); if(err != KErrNone) { - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_LOCK2, "OS;0x%X;TFileIo::Lock;iFileBuf.Flush() failed, err=%d", (TUint)&dbFile, err)); return ::Os2SqliteErr(err, SQLITE_IOERR_LOCK); } } //Make sure the locking sequence is correct - __ASSERT_DEBUG(dbFile.iLockType != SQLITE_LOCK_NONE || aLockType == SQLITE_LOCK_SHARED, __SQLITEPANIC2(ESqliteOsPanicInvalidLock)); - __ASSERT_DEBUG(aLockType != SQLITE_LOCK_PENDING, __SQLITEPANIC2(ESqliteOsPanicInvalidLock)); - __ASSERT_DEBUG(aLockType != SQLITE_LOCK_RESERVED || dbFile.iLockType == SQLITE_LOCK_SHARED, __SQLITEPANIC2(ESqliteOsPanicInvalidLock)); + __ASSERT_DEBUG(dbFile.iLockType != SQLITE_LOCK_NONE || aLockType == SQLITE_LOCK_SHARED, User::Panic(KPanicCategory, EPanicInvalidLock)); + __ASSERT_DEBUG(aLockType != SQLITE_LOCK_PENDING, User::Panic(KPanicCategory, EPanicInvalidLock)); + __ASSERT_DEBUG(aLockType != SQLITE_LOCK_RESERVED || dbFile.iLockType == SQLITE_LOCK_SHARED, User::Panic(KPanicCategory, EPanicInvalidLock)); TInt rc = SQLITE_OK; //Return code from subroutines TBool locked = ETrue; //Result of a file lock call (the default value means: "lock accuired") @@ -916,11 +892,10 @@ //Acquire a shared lock if(aLockType == SQLITE_LOCK_SHARED && locked) { - __ASSERT_DEBUG(dbFile.iLockType == SQLITE_LOCK_NONE, __SQLITEPANIC2(ESqliteOsPanicInvalidLock)); + __ASSERT_DEBUG(dbFile.iLockType == SQLITE_LOCK_NONE, User::Panic(KPanicCategory, EPanicInvalidLock)); TInt err = TFileIo::GetReadLock(dbFile); if(err != KErrNone && err != KErrLocked) { - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_LOCK3, "OS;0x%X;TFileIo::Lock;TFileIo::GetReadLock() failed, err=%d", (TUint)&dbFile, err)); return ::Os2SqliteErr(err, SQLITE_IOERR_LOCK); } locked = (err == KErrNone); @@ -933,11 +908,10 @@ //Acquire a RESERVED lock if(aLockType == SQLITE_LOCK_RESERVED && locked) { - __ASSERT_DEBUG(dbFile.iLockType == SQLITE_LOCK_SHARED, __SQLITEPANIC2(ESqliteOsPanicInvalidLock)); + __ASSERT_DEBUG(dbFile.iLockType == SQLITE_LOCK_SHARED, User::Panic(KPanicCategory, EPanicInvalidLock)); TInt err = dbFile.iFileBuf.Lock(RESERVED_BYTE, 1); if(err != KErrNone && err != KErrLocked) { - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_LOCK4, "OS;0x%X;TFileIo::Lock;iFileBuf.Lock() failed, err=%d", (TUint)&dbFile, err)); return ::Os2SqliteErr(err, SQLITE_IOERR_LOCK); } locked = (err == KErrNone); @@ -957,12 +931,11 @@ //Acquire an EXCLUSIVE lock if(aLockType == SQLITE_LOCK_EXCLUSIVE && locked) { - __ASSERT_DEBUG(dbFile.iLockType >= SQLITE_LOCK_SHARED, __SQLITEPANIC2(ESqliteOsPanicInvalidLock)); + __ASSERT_DEBUG(dbFile.iLockType >= SQLITE_LOCK_SHARED, User::Panic(KPanicCategory, EPanicInvalidLock)); (void)TFileIo::UnlockReadLock(dbFile); TInt err = dbFile.iFileBuf.Lock(SHARED_FIRST, SHARED_SIZE); if(err != KErrNone && err != KErrLocked) { - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_LOCK5, "OS;0x%X;TFileIo::Lock;iFileBuf.Lock()-2 failed, err=%d", (TUint)&dbFile, err)); return ::Os2SqliteErr(err, SQLITE_IOERR_LOCK); } locked = (err == KErrNone); @@ -976,15 +949,13 @@ // release it now. if(gotPendingLock && aLockType == SQLITE_LOCK_SHARED) { - __SQLITETRACE_OSEXPR(TInt err =) dbFile.iFileBuf.UnLock(PENDING_BYTE, 1); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_LOCK6, "OS;0x%X;TFileIo::Lock;iFileBuf.UnLock()=%d", (TUint)&dbFile, err)); + (void)dbFile.iFileBuf.UnLock(PENDING_BYTE, 1); } // Update the state of the lock has held in the file descriptor then // return the appropriate result code. rc = locked ? SQLITE_OK : SQLITE_BUSY; dbFile.iLockType = newLockType; - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_LOCK7, "OS;0x%X;TFileIo::Lock;rc=%d;newLockType=%d", (TUint)&dbFile, rc, newLockType)); return rc; } @@ -1015,22 +986,21 @@ */ /* static */ int TFileIo::Unlock(sqlite3_file* aDbFile, int aLockType) { - __ASSERT_DEBUG(aLockType <= SQLITE_LOCK_SHARED, __SQLITEPANIC2(ESqliteOsPanicInvalidLock)); + __ASSERT_DEBUG(aLockType <= SQLITE_LOCK_SHARED, User::Panic(KPanicCategory, EPanicInvalidLock)); + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); TInt rc = SQLITE_OK; TInt currLockType = dbFile.iLockType; if(currLockType >= SQLITE_LOCK_EXCLUSIVE) { - __SQLITETRACE_OSEXPR(TInt err2 =) dbFile.iFileBuf.UnLock(SHARED_FIRST, SHARED_SIZE); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_UNLOCK1, "OS;0x%X;TFileIo::Unlock;iFileBuf.UnLock()=%d", (TUint)&dbFile, err2)); + (void)dbFile.iFileBuf.UnLock(SHARED_FIRST, SHARED_SIZE); if(aLockType == SQLITE_LOCK_SHARED) { TInt err = TFileIo::GetReadLock(dbFile); if(err != KErrNone && err != KErrLocked) { - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_UNLOCK2, "OS;0x%X;TFileIo::Unlock;TFileIo::GetReadLock() failed, err=%d", (TUint)&dbFile, err)); return ::Os2SqliteErr(err, SQLITE_IOERR_UNLOCK); } if(err == KErrLocked) @@ -1042,22 +1012,18 @@ } if(currLockType >= SQLITE_LOCK_RESERVED) { - __SQLITETRACE_OSEXPR(TInt err2 =) dbFile.iFileBuf.UnLock(RESERVED_BYTE, 1); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_UNLOCK3, "OS;0x%X;TFileIo::Unlock;iFileBuf.UnLock()-2=%d", (TUint)&dbFile, err2)); + (void)dbFile.iFileBuf.UnLock(RESERVED_BYTE, 1); } if(aLockType == SQLITE_LOCK_NONE && currLockType >= SQLITE_LOCK_SHARED) { - __SQLITETRACE_OSEXPR(TInt err2 =) TFileIo::UnlockReadLock(dbFile); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_UNLOCK4, "OS;0x%X;TFileIo::Unlock;TFileIo::UnlockReadLock()=%d", (TUint)&dbFile, err2)); + (void)TFileIo::UnlockReadLock(dbFile); } if(currLockType>= SQLITE_LOCK_PENDING) { - __SQLITETRACE_OSEXPR(TInt err2 =) dbFile.iFileBuf.UnLock(PENDING_BYTE, 1); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_UNLOCK5, "OS;0x%X;TFileIo::Unlock;iFileBuf.UnLock()-3=%d", (TUint)&dbFile, err2)); + (void)dbFile.iFileBuf.UnLock(PENDING_BYTE, 1); } dbFile.iLockType = aLockType; - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_UNLOCK6, "OS;0x%X;TFileIo::Unlock;rc=%d;newLockType=%d", (TUint)&dbFile, rc, aLockType)); return rc; } @@ -1080,6 +1046,7 @@ */ /* static */ int TFileIo::CheckReservedLock(sqlite3_file* aDbFile, int *aResOut) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); TInt rc; if(dbFile.iLockType >= SQLITE_LOCK_RESERVED) @@ -1091,19 +1058,16 @@ TInt err = dbFile.iFileBuf.Lock(RESERVED_BYTE, 1); if(err != KErrNone && err != KErrLocked) { - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_CHECKRESERVEDLOCK1, "OS;0x%X;TFileIo::CheckReservedLock;iFileBuf.Lock(), err=%d", (TUint)&dbFile, err)); return ::Os2SqliteErr(err, SQLITE_IOERR_CHECKRESERVEDLOCK); } rc = (err == KErrNone); if(rc) //non-zero rc means: the lock has been successful (there wasn't a reserved lock on this file) { - __SQLITETRACE_OSEXPR(TInt err2 =) dbFile.iFileBuf.UnLock(RESERVED_BYTE, 1); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_CHECKRESERVEDLOCK2, "OS;0x%X;TFileIo::CheckReservedLock;iFileBuf.UnLock()=%d", (TUint)&dbFile, err2)); + (void)dbFile.iFileBuf.UnLock(RESERVED_BYTE, 1); } rc = !rc; } *aResOut = rc; - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TFILEIO_CHECKRESERVEDLOCK3, "OS;0x%X;TFileIo::CheckReservedLock;rc=%d", (TUint)&dbFile, rc)); return SQLITE_OK; } @@ -1128,7 +1092,9 @@ */ /* static */ int TFileIo::FileControl(sqlite3_file* aDbFile, int aOp, void* aArg) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); + SYMBIAN_TRACE_SQLITE_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileFileCtr, aOp, dbFile.iFullName)); TInt err = KErrNone; switch(aOp) { @@ -1139,9 +1105,7 @@ err = KErrArgument; break; } - TInt sqliteErr = err == KErrNone ? SQLITE_OK : SQLITE_ERROR; - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TFILEIO_FILECONTROL, "OS;0x%X;TFileIo::FileControl;err=%d;sqliteErr=%d", (TUint)&dbFile, err, sqliteErr)); - return sqliteErr; + return err == KErrNone ? SQLITE_OK : SQLITE_ERROR; } /** @@ -1163,8 +1127,9 @@ */ /* static */ int TFileIo::SectorSize(sqlite3_file* aDbFile) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); - __ASSERT_DEBUG(dbFile.iSectorSize > 0, __SQLITEPANIC2(ESqliteOsPanicInternalError)); + __ASSERT_DEBUG(dbFile.iSectorSize > 0, User::Panic(KPanicCategory, EPanicInternalError)); if(dbFile.iSectorSize > 0) { return dbFile.iSectorSize; @@ -1191,8 +1156,9 @@ */ /* static */ int TFileIo::DeviceCharacteristics(sqlite3_file* aDbFile) { + SQLUTRACE_PROFILER(aDbFile); TDbFile& dbFile = ::DbFile(aDbFile); - __ASSERT_DEBUG(dbFile.iDeviceCharacteristics >= 0, __SQLITEPANIC2(ESqliteOsPanicInternalError)); + __ASSERT_DEBUG(dbFile.iDeviceCharacteristics >= 0, User::Panic(KPanicCategory, EPanicInternalError)); if(dbFile.iDeviceCharacteristics >= 0) { return dbFile.iDeviceCharacteristics; @@ -1219,9 +1185,7 @@ */ /* static */ inline TInt TVfs::DoGetVolumeIoParamInfo(RFs& aFs, TInt aDriveNo, TVolumeIOParamInfo& aVolumeInfo) { - TInt err = aFs.VolumeIOParam(aDriveNo, aVolumeInfo); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TVFS_DOGETVOLUMEIOPARAMINFO, "OS;0;TVfs::DoGetVolumeIoParamInfo;aDriveNo=%d;err=%d", aDriveNo, err)); - return err; + return aFs.VolumeIOParam(aDriveNo, aVolumeInfo); } /** @@ -1313,7 +1277,7 @@ sectorSize = aVolumeInfo.iBlockSize; } } - __ASSERT_DEBUG(sectorSize > 0 && (sectorSize & (sectorSize - 1)) == 0, __SQLITEPANIC2(ESqliteOsPanicInternalError)); + __ASSERT_DEBUG(sectorSize > 0 && (sectorSize & (sectorSize - 1)) == 0, User::Panic(KPanicCategory, EPanicInternalError)); return sectorSize; } @@ -1342,8 +1306,8 @@ */ /* static */ TInt TVfs::DoGetDeviceCharacteristicsAndSectorSize(TDbFile& aDbFile, TInt& aRecReadBufSize) { - __ASSERT_DEBUG(aDbFile.iDeviceCharacteristics < 0, __SQLITEPANIC2(ESqliteOsPanicInternalError)); - __ASSERT_DEBUG(aDbFile.iSectorSize <= 0, __SQLITEPANIC2(ESqliteOsPanicInternalError)); + __ASSERT_DEBUG(aDbFile.iDeviceCharacteristics < 0, User::Panic(KPanicCategory, EPanicInternalError)); + __ASSERT_DEBUG(aDbFile.iSectorSize <= 0, User::Panic(KPanicCategory, EPanicInternalError)); TInt driveNo; TDriveInfo driveInfo; TInt err = aDbFile.iFileBuf.Drive(driveNo, driveInfo); @@ -1360,7 +1324,6 @@ aDbFile.iDeviceCharacteristics = TVfs::DoGetDeviceCharacteristics(driveInfo, volumeInfo); aDbFile.iSectorSize = TVfs::DoGetSectorSize(driveInfo, volumeInfo); aRecReadBufSize = volumeInfo.iRecReadBufSize; - SQLITE_TRACE_OS(OstTraceExt5(TRACE_INTERNALS, TVFS_DOGETGETDEVICECHARACTERISTICSANDSECTORSIZE, "OS;0x%X;TVfs::DoGetDeviceCharacteristicsAndSectorSize;driveNo=%d;sectorSize=%d;devCharact=0x%X;readBufSize=%d", (TUint)&aDbFile, driveNo, aDbFile.iSectorSize, (TUint)aDbFile.iDeviceCharacteristics, volumeInfo.iRecReadBufSize)); return KErrNone; } @@ -1398,64 +1361,6 @@ /** SQLite OS porting layer API. -The behaviour of the RFile/RFile64::SetSize operation is not atomic for non-rugged drives. -When RFile/RFile64::SetSize() is called 2 operations occurs:- - -1)The cluster chain of the file is updated. -2)The new file size is added to the file cache. - -If a power loss occurs after a SetSize there is a chance that the cluster chain was updated -but the new file size is not yet flushed to the file. This puts the file into an inconsistent state. -This is most likely to occur in the journal file where the time between a SetSize and Flush can -be long. - -For this reason this check is added when the file is opened to see if the end of the file can -be read straight away, if an error is returned then it is assumed that the SetSize has not be -completed previously. In this case the file is deleted and re-created. - -@param aDbFile A pointer to a TDbFile instance, that contains the file handle. -@param aFname A string of 16-bit wide characters containing name of the file to be checked. -@param aFmode The mode in which the file is opened. These mode are documented in TFileMode. - -@return KErrNone, The operation has completed succesfully; - Note that other system-wide error codes may also be returned. -@see TFileMode -@see TVfs::Open() -@see TDbFile -*/ -/* static */ TInt TVfs::DoFileSizeCorruptionCheck(TDbFile& aDbFile, const TDesC& aFname, TInt aFmode) - { - const TInt KMinSize = 16; - TInt64 size; - TInt err = KErrNone ; - TBuf8 buf; - - err = aDbFile.iFileBuf.Size(size); - if (err != KErrNone) - { - return err; - } - TBool IsMinFileSize = (size >= KMinSize); - - if (IsMinFileSize) - { - err = aDbFile.iFileBuf.Read(size - KMinSize, buf); - } - - if (err == KErrCorrupt || err == KErrEof || !IsMinFileSize) - { - aDbFile.iFileBuf.Close(); - __SQLITETRACE_OSEXPR(TInt err2 =) TStaticFs::Fs().Delete(aFname); - SQLITE_TRACE_OS(OstTraceExt4(TRACE_INTERNALS, TVFS_DOFILESIZECORRUPTIONCHECK1, "OS;0x%X;TVfs::DoFileSizeCorruptionCheck;size=%lld;err=%d;deleteErr=%d", (TUint)&aDbFile, size, err, err2)); - err = aDbFile.iFileBuf.Create(TStaticFs::Fs(), aFname, aFmode); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TVFS_DOFILESIZECORRUPTIONCHECK2, "OS;0x%X;TVfs::DoFileSizeCorruptionCheck;createErr=%d", (TUint)&aDbFile, err)); - } - return err; - } - -/** -SQLite OS porting layer API. - Opens or creates a file which name is in the aFileName parameter. If the function succeeds, the file handle and other related information will be stored in the place pointed by the aDbFile parameter, a memory block of sizeof(TDbFile) size for which is allocated by the caller. @@ -1483,21 +1388,20 @@ */ /* static */ int TVfs::Open(sqlite3_vfs* aVfs, const char* aFileName, sqlite3_file* aDbFile, int aFlags, int* aOutFlags) { + SQLUTRACE_PROFILER(aVfs); TFileName fname; if(aFileName && !::ConvertToUnicode(aFileName, fname)) { - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_OPEN1, "OS;0;TVfs::Open;ConvertToUnicode() failed")); return SQLITE_CANTOPEN; } + SYMBIAN_TRACE_SQLITE_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileOpen, aDbFile, &fname)); new (aDbFile) TDbFile; TDbFile& dbFile = ::DbFile(aDbFile); - SQLITE_TRACE_OS(OstTraceExt3(TRACE_INTERNALS, TVFS_OPEN_ENTRY, "OS-Entry;0x%X;TVfs::Open;fname=%S;aFlags=0x%X", (TUint)&aDbFile, __SQLITEPRNSTR(fname), (TUint)aFlags)); if(aFileName && (aFlags & SQLITE_OPEN_DELETEONCLOSE)) { dbFile.iFullName = fname.Alloc(); if(!dbFile.iFullName) { - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_OPEN2, "OS;0;TVfs::Open;fname.Alloc() failed")); return SQLITE_IOERR_NOMEM; } } @@ -1523,31 +1427,22 @@ } else { - err = KErrAccessDenied;//The error has to be set here, because, there is a case where none of the file create/open operations will be executed - TInt prevErr = KErrNone; + err = KErrGeneral;//The error has to be set here, because, there is case where none of the file create/open operations will be executed if(aFlags & SQLITE_OPEN_CREATE) { - prevErr = err = dbFile.iFileBuf.Create(TStaticFs::Fs(), fname, fmode); + err = dbFile.iFileBuf.Create(TStaticFs::Fs(), fname, fmode); } - if(err != KErrNone && err != KErrNoMemory && err != KErrDiskFull) + if(err != KErrNone && err != KErrNoMemory) { err = dbFile.iFileBuf.Open(TStaticFs::Fs(), fname, fmode); - if(err == KErrNone && (aFlags & KJournalFileTypeBitMask)) - { - err = TVfs::DoFileSizeCorruptionCheck(dbFile, fname, fmode); - } } - if((err != KErrNone && err != KErrNoMemory && err != KErrDiskFull) && (aFlags & SQLITE_OPEN_READWRITE)) + if((err != KErrNone && err != KErrNoMemory) && (aFlags & SQLITE_OPEN_READWRITE)) { aFlags &= ~SQLITE_OPEN_READWRITE; aFlags |= SQLITE_OPEN_READONLY; fmode &= ~EFileWrite; err = dbFile.iFileBuf.Open(TStaticFs::Fs(), fname, fmode); } - if(err != KErrNone && prevErr == KErrAccessDenied) - { - err = KErrAccessDenied; - } } if(err == KErrNone) { @@ -1558,11 +1453,6 @@ dbFile.iFileBuf.Close(); delete dbFile.iFullName; dbFile.iFullName = NULL; - if(!aFileName && fname.Length() > 0) - {//temporary file, the error is not KErrNone. Then delete the file (after a successfull - //temporary file creation there could be a failed memory allocation) - (void)TStaticFs::Fs().Delete(fname); - } } else { @@ -1575,9 +1465,7 @@ (void)dbFile.iFileBuf.SetReadAheadSize(dbFile.iSectorSize, recReadBufSize); OpenCounter(+1); } - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_CANTOPEN); - SQLITE_TRACE_OS(OstTraceExt4(TRACE_INTERNALS, TVFS_OPEN_EXIT, "OS-Exit;0x%X;TVfs::Open;outFlags=0x%X;err=%d;sqliteErr=%d", (TUint)&aDbFile, aOutFlags ? (TUint)*aOutFlags : 0, err, sqliteErr)); - return sqliteErr; + return ::Os2SqliteErr(err, SQLITE_CANTOPEN); } /** @@ -1595,17 +1483,16 @@ */ /* static */ int TVfs::Delete(sqlite3_vfs* aVfs, const char* aFileName, int /*aSyncDir*/) { + SQLUTRACE_PROFILER(aVfs); SimulateIOError(return SQLITE_IOERR_DELETE); TFileName fname; if(!::ConvertToUnicode(aFileName, fname)) { - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_DELETE1, "OS;0;TVfs::Delete;ConvertToUnicode() failed")); return SQLITE_ERROR; } + SYMBIAN_TRACE_SQLITE_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileName, &fname)); TInt err = TStaticFs::Fs().Delete(fname); - TInt sqliteErr = ::Os2SqliteErr(err, SQLITE_IOERR_DELETE); - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TVFS_DELETE2, "OS;0;TVfs::Delete;err=%d;sqliteErr=%d", err, sqliteErr)); - return sqliteErr; + return ::Os2SqliteErr(err, SQLITE_IOERR_DELETE); } /** @@ -1624,24 +1511,22 @@ */ /* static */ int TVfs::Access(sqlite3_vfs* aVfs, const char* aFileName, int aFlags, int* aResOut) { + SQLUTRACE_PROFILER(aVfs); TFileName fname; if(!::ConvertToUnicode(aFileName, fname)) { - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_ACCESS1, "OS;0;TVfs::Access;ConvertToUnicode() failed")); return SQLITE_IOERR_ACCESS; } - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TVFS_ACCESS_ENTRY, "OS-Entry;0;TVfs::Access;fname=%S;aFlags=0x%X", __SQLITEPRNSTR(fname), (TUint)aFlags)); + SYMBIAN_TRACE_SQLITE_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileName, &fname)); TEntry entry; TInt err = TStaticFs::Fs().Entry(fname, entry); if(aFlags == SQLITE_ACCESS_EXISTS && err == KErrNotFound) { *aResOut = 0; - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_ACCESS_EXIT1, "OS-Exit;0;TVfs::Access;Exists-NoFound")); return SQLITE_OK; } if(err != KErrNone) { - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TVFS_ACCESS_EXIT2, "OS-Exit;0;TVfs::Access;err=%d", err)); return err == KErrNoMemory ? SQLITE_IOERR_NOMEM : SQLITE_IOERR_ACCESS; } *aResOut = 0; @@ -1659,7 +1544,6 @@ default: break; } - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TVFS_ACCESS_EXIT3, "OS-Exit;0;TVfs::Access;aResOut=%d", *aResOut)); return SQLITE_OK; } @@ -1691,19 +1575,18 @@ */ /* static */ int TVfs::FullPathName(sqlite3_vfs* aVfs, const char* aRelative, int aBufLen, char* aBuf) { + SQLUTRACE_PROFILER(aVfs); if(!aRelative) //NULL argument { - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_FULLPATHNAME1, "OS;0;TVfs::FullPathName;err=SQLITE_ERROR")); return SQLITE_ERROR; } //Convert the received file name to UTF16 TBuf fname; if(!::ConvertToUnicode(aRelative, fname)) { - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_FULLPATHNAME_EXIT1, "OS-Exit;0;TVfs::FullPathName;ConvertToUnicode() failed")); return SQLITE_ERROR; } - SQLITE_TRACE_OS(OstTraceExt2(TRACE_INTERNALS, TVFS_FULLPATHNAME_ENTRY, "OS-Entry;0;TVfs::FullPathName;fname=%S;aBufLen=%d", __SQLITEPRNSTR(fname), aBufLen)); + SYMBIAN_TRACE_SQLITE_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileName, &fname)); //Search if the file name begins with ".\" - current directory if(fname.Find(KCwd) == 0) { @@ -1714,7 +1597,6 @@ TInt err = TStaticFs::Fs().SessionPath(defaultPath); if(err != KErrNone) { - SQLITE_TRACE_OS(OstTrace1(TRACE_INTERNALS, TVFS_FULLPATHNAME_EXIT4, "OS-Exit;0;TVfs::FullPathName;SessionPath() failed, err=%d", err)); return SQLITE_ERROR; } TParse parse; @@ -1722,10 +1604,8 @@ TPtr8 dest8(reinterpret_cast (aBuf), aBufLen); if(!::ConvertFromUnicode(parse.FullName(), dest8)) { - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_FULLPATHNAME_EXIT2, "OS-Exit;0;TVfs::FullPathName;ConvertFromUnicode() failed")); return SQLITE_ERROR; } - SQLITE_TRACE_OS(OstTrace0(TRACE_INTERNALS, TVFS_FULLPATHNAME_EXIT3, "OS-Exit;0;TVfs::FullPathName;err=SQLITE_OK")); return SQLITE_OK; } @@ -1741,6 +1621,7 @@ */ /* static */ int TVfs::Randomness(sqlite3_vfs* aVfs, int aBufLen, char* aBuf) { + SQLUTRACE_PROFILER(aVfs); const TInt KRandIterations = aBufLen / sizeof(int); for(TInt i=0;iiSeek = sqlite3_blob_bytes(p->pBlob) + offset; break; - default: assert(0); /* Bad seekMode */ + default: assert(!"Bad seekMode"); } return p->iSeek; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/SRC/test6.c --- a/persistentstorage/sqlite3api/TEST/SRC/test6.c Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/TEST/SRC/test6.c Wed Sep 01 12:39:58 2010 +0100 @@ -321,7 +321,7 @@ } default: - assert(0); /* Cannot happen */ + assert(!"Cannot happen"); } if( pWrite==pFinal ) break; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/TCL/tcldistribution/generic/tclMain.c --- a/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/generic/tclMain.c Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/generic/tclMain.c Wed Sep 01 12:39:58 2010 +0100 @@ -32,9 +32,7 @@ */ #if !defined(MAC_TCL) -# if !defined(__SYMBIAN32__) extern int isatty _ANSI_ARGS_((int fd)); -# endif #else #include #endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/TCL/tcldistribution/unix/tclUnixPort.h --- a/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/unix/tclUnixPort.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/unix/tclUnixPort.h Wed Sep 01 12:39:58 2010 +0100 @@ -508,9 +508,7 @@ #if defined(_sgi) || defined(__sgi) || (defined(__APPLE__) && defined(__DYNAMIC__)) # define environ _environ #endif -#ifndef __SYMBIAN32__ // added to prevent RVCT warnings on armv5 extern char **environ; -#endif /* * At present (12/91) not all stdlib.h implementations declare strtod. @@ -519,9 +517,8 @@ * an int. There's no ANSI prototype for it because there would end * up being too many conflicts with slightly-different prototypes. */ -#ifndef __SYMBIAN32__ // added to prevent RVCT warnings on armv5 + extern double strtod(); -#endif /* * There is no platform-specific panic routine for Unix in the Tcl internals. diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/TclScript/misc7.test --- a/persistentstorage/sqlite3api/TEST/TclScript/misc7.test Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/TEST/TclScript/misc7.test Wed Sep 01 12:39:58 2010 +0100 @@ -1,6 +1,6 @@ # 2006 September 4 # -# Portions Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiaries. All rights reserved. +# Portions Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiaries. All rights reserved. # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: @@ -97,7 +97,7 @@ execsql { CREATE TABLE abc(a PRIMARY KEY, b, c); } db close -if {$tcl_platform(platform)!="windows" && $tcl_platform(platform)!="symbian"} { +if {$tcl_platform(platform)!="windows"} { do_fileopen_test misc7-6.1 { BEGIN; INSERT INTO abc VALUES(1, 2, 3); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/TclScript/tester.tcl --- a/persistentstorage/sqlite3api/TEST/TclScript/tester.tcl Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/TEST/TclScript/tester.tcl Wed Sep 01 12:39:58 2010 +0100 @@ -1,6 +1,6 @@ # 2001 September 15 # -# Portions Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiaries. All rights reserved. +# Portions Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiaries. All rights reserved. # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: @@ -250,17 +250,14 @@ puts "\nError: $result" # Symbian OS: Set and increase error count with do_fail procedure (definition in Tester.tcl) do_fail $name - print_text $name "FAILED" if {$nErr>$maxErr} {puts "*** Giving up..."; finalize_testing} } elseif {[string compare $result $expected]} { puts "\nExpected: \[$expected\]\n Got: \[$result\]" # Symbian OS: Set and increase error count with do_fail procedure (definition in Tester.tcl) do_fail $name - print_text $name "FAILED" if {$nErr>=$maxErr} {puts "*** Giving up..."; finalize_testing} } else { puts " Ok" - print_text $name "OK" } flush stdout if {[info exists ::tester_do_binarylog]} { diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/sqliteTestUtl.cpp --- a/persistentstorage/sqlite3api/TEST/sqliteTestUtl.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/TEST/sqliteTestUtl.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -21,65 +21,40 @@ static TBuf8<500> TheBuf8; static TBuf16<500> TheBuf16; -static RTest* TheTest; +static RTest TheTest(_L("t_sqliteapi test")); -extern "C" void TestOpen(const char* title) +extern "C" void TestTitle(void) { - TPtrC8 p((const unsigned char*)title); - TheBuf16.Copy(p); - TheTest = new RTest(TheBuf16); - } - -extern "C" void TestTitle() - { - TheTest->Title(); + TheTest.Title(); } extern "C" void TestStart(const char* title) { TPtrC8 p((const unsigned char*)title); TheBuf16.Copy(p); - TheTest->Start(TheBuf16); + TheTest.Start(TheBuf16); } extern "C" void TestNext(const char* title) { TPtrC8 p((const unsigned char*)title); TheBuf16.Copy(p); - TheTest->Next(TheBuf16); + TheTest.Next(TheBuf16); } extern "C" void TestClose(void) { - TheTest->Close(); - delete TheTest; + TheTest.Close(); } extern "C" void TestEnd(void) { - TheTest->End(); + TheTest.End(); } extern "C" void TestAbort(int aLine) { - TheTest->operator()(0, aLine); - } - -extern "C" void TestTestLine(int aResult, int aLine) - { - TheTest->operator()(aResult, aLine); - } - -extern "C" void TestTest(int aResult) - { - TheTest->operator()(aResult); - } - -extern "C" void TestPrintf(const char* title) - { - TPtrC8 p((const unsigned char*)title); - TheBuf16.Copy(p); - TheTest->Printf(TheBuf16); + TheTest(0, aLine); } extern "C" void TestHeapMark(void) @@ -140,9 +115,9 @@ { RFs TheFs; TInt err = TheFs.Connect(); - TheTest->operator()(err == KErrNone); + TheTest(err == KErrNone); err = TheFs.CreatePrivatePath(EDriveC); TheFs.Close(); - TheTest->operator()(err == KErrNone || err == KErrAlreadyExists); + TheTest(err == KErrNone || err == KErrAlreadyExists); } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/sqliteTestUtl.h --- a/persistentstorage/sqlite3api/TEST/sqliteTestUtl.h Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/TEST/sqliteTestUtl.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,16 +24,12 @@ extern "C" { #endif -void TestOpen(const char* title); void TestTitle(void); void TestStart(const char* title); void TestNext(const char* title); void TestClose(void); void TestEnd(void); void TestAbort(TInt aLine); -void TestTestLine(int aResult, int aLine); -void TestTest(int aResult); -void TestPrintf(const char* title); void TestHeapMark(void); void TestHeapMarkEnd(void); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/t_sqliteapi.c --- a/persistentstorage/sqlite3api/TEST/t_sqliteapi.c Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/TEST/t_sqliteapi.c Wed Sep 01 12:39:58 2010 +0100 @@ -942,8 +942,6 @@ } } - srand((unsigned)&ThreadFunc); - PrintS("Thread \"%s\" - begin\r\n", (char*)pname); err = sqlite3_open(TheTestDbName, &db); TEST2(err, SQLITE_OK); @@ -951,10 +949,6 @@ while(records < KRecordsCount) { - if((records % 10) == 0) - { - PrintSI("Thread \"%s\", %d records.\r\n", (char*)pname, records); - } err = sqlite3_exec(db, "BEGIN", 0, 0, &errmsg); if(err == SQLITE_OK) { @@ -972,7 +966,7 @@ if(err == SQLITE_OK) { TheInsertRecCnt[threadIdx] += KCommitRecordsCount; - records += KCommitRecordsCount; + records += 2; } else if(err == SQLITE_BUSY) { @@ -980,15 +974,11 @@ (void)sqlite3_exec(db, "ROLLBACK", 0, 0, 0); if(errmsg) { - char fmt[100]; - strcpy(fmt, "Thread \""); - strcat(fmt, (char*)pname); - strcat(fmt, "\". Err msg: %s. Err: %d.\r\n"); - PrintSI(fmt, errmsg, err); + PrintSI("Err msg: %s. Err: %d.\r\n", errmsg, err); sqlite3_free(errmsg); errmsg = 0; } - usleep((rand() % 3000) + 500); + usleep(100); } } @@ -1357,7 +1347,6 @@ UNUSED_ARG(argc); UNUSED_ARG(argv); - TestOpen("t_sqliteapi test"); TestTitle(); TestHeapMark(); diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/t_sqliteapi.txt --- a/persistentstorage/sqlite3api/TEST/t_sqliteapi.txt Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -This file is not used by any of the SQLite tests. -The only purpose of this file is: to create a private branch -on Z: drive for t_sqliteapi test and copy the file there. diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/t_sqlitedef.cpp --- a/persistentstorage/sqlite3api/TEST/t_sqlitedef.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/TEST/t_sqlitedef.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -20,10 +20,10 @@ #include #include -#include "sqliteTestUtl.h" +#include "e32des16.h" -const char* const KTestName = "t_sqlitedef"; +static RTest TheTest(_L("t_sqlitedef")); static RFs TheFs; static sqlite3* TheDb = NULL; @@ -46,15 +46,15 @@ static void CreateTestEnv() { TInt err = TheFs.Connect(); - TestTestLine(err == KErrNone, __LINE__); + TheTest(err == KErrNone); err = TheFs.ShareAuto(); - TestTestLine(err == KErrNone,__LINE__); + TheTest(err == KErrNone); TFileName testDir; testDir.Copy(TPtrC8((const TUint8*)KTestDir)); err = TheFs.MkDir(testDir); - TestTestLine(err == KErrNone || err == KErrAlreadyExists, __LINE__); + TheTest(err == KErrNone || err == KErrAlreadyExists); TFileName fname; fname.Copy(TPtrC8((const TUint8*)KTestDb)); @@ -110,7 +110,7 @@ { PrintErrMsg(); DestroyTestEnv(); - TestTestLine(EFalse, aLine); + TheTest(EFalse, aLine); } } static void Check(TInt aValue, TInt aExpected, TInt aLine) @@ -120,7 +120,7 @@ PrintErrMsg(); DestroyTestEnv(); RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue); - TestTestLine(EFalse, aLine); + TheTest(EFalse, aLine); } } #define TEST(arg) ::Check((arg), __LINE__) @@ -420,18 +420,8 @@ DeleteFile(KTestDb); dtstr1.Format(_L("%04d-%02d-%02d,%02d:%02d:%02d"), dt.Year(), dt.Month() + 1, dt.Day() + 1, dt.Hour(), dt.Minute(), dt.Second()); - - // For the C-Style printout - _LIT8(KUniversalTimeText,"Universal date&time="); - _LIT8(KSQLiteTimeText, "SQLite date&time="); - TBuf8<96> dtstr1print; - TBuf8<96> dtstr2print; - dtstr1print.Copy(dtstr1); - dtstr2print.Copy(dtstr2); - dtstr1print.Insert(0,KUniversalTimeText); - dtstr2print.Insert(0,KSQLiteTimeText); - TestPrintf((const char*)(dtstr1print.PtrZ())); - TestPrintf((const char*)(dtstr2print.PtrZ())); + TheTest.Printf(_L("Universal date&time=\"%S\"\n"), &dtstr1); + TheTest.Printf(_L("SQLite date&time=\"%S\"\n"), &dtstr2); //Comapare and fail if dates are not equal (+- 1 second) TLex lex; @@ -475,19 +465,19 @@ void DoTest() { - TestStart("@SYMTestCaseID:PDS-SQLITE3-UT-4029: SQLite file handle test"); + TheTest.Start(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4029: SQLite file handle test")); FileHandleTest(); - TestNext("@SYMTestCaseID:PDS-SQLITE3-CT-4028: DEF121506 test"); + TheTest.Next(_L("@SYMTestCaseID:PDS-SQLITE3-CT-4028: DEF121506 test")); DEF121506(); - TestNext("@SYMTestCaseID:PDS-SQLITE3-CT-4046: DEF140020 test"); + TheTest.Next(_L("@SYMTestCaseID:PDS-SQLITE3-CT-4046: DEF140020 test")); DEF140020(); - TestNext("@SYMTestCaseID:PDS-SQLITE3-CT-4047: SQLITE, \"CREATE INDEX\" sql crashes the SQLite library"); + TheTest.Next(_L("@SYMTestCaseID:PDS-SQLITE3-CT-4047: SQLITE, \"CREATE INDEX\" sql crashes the SQLite library")); DEF143066(); - TestNext(" @SYMTestCaseID:SYSLIB-SQL-CT-4048 DEF143151: SQLite, strftime() returns incorrect result"); + TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-4048 DEF143151: SQLite, strftime() returns incorrect result")); DEF143151(); } @@ -495,8 +485,7 @@ TInt E32Main() { - TestOpen(KTestName); - TestTitle(); + TheTest.Title(); CTrapCleanup* tc = CTrapCleanup::New(); __UHEAP_MARK; @@ -507,8 +496,8 @@ __UHEAP_MARKEND; - TestEnd(); - TestClose(); + TheTest.End(); + TheTest.Close(); delete tc; User::Heap().Check(); return KErrNone; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/t_sqliteperf.cpp --- a/persistentstorage/sqlite3api/TEST/t_sqliteperf.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/TEST/t_sqliteperf.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -18,13 +18,11 @@ #include #include #include -#include "sqliteTestUtl.h" #include "t_sqliteperf.h" /////////////////////////////////////////////////////////////////////////////////////// -const char* const KTestName = "t_sqliteperf test"; - +static RTest TheTest(_L("t_sqliteperf test")); _LIT(KTestDir, "c:\\test\\"); _LIT(KTestDbName, "c:\\test\\t_sqliteperf.db"); _LIT8(KTestDbName8, "c:\\test\\t_sqliteperf.db\x0"); @@ -67,11 +65,37 @@ /////////////////////////////////////////////////////////////////////////////////////// +extern "C" void TestAbort(TInt aLine) + { + TheTest(0, aLine); + } + extern "C" const char* TestDbName(void) { return (const char*)KTestDbName8().Ptr(); } +extern "C" void PrintS(const char* aFmt, const char* aMsg) + { + TheSqlBuf.Format(TPtrC8((const TUint8*)aFmt), aMsg); + ThePrintBuf.Copy(TheSqlBuf); + TheTest.Printf(ThePrintBuf); + } + +extern "C" void PrintI(const char* aFmt, int a1) + { + TheSqlBuf.Format(TPtrC8((const TUint8*)aFmt), a1); + ThePrintBuf.Copy(TheSqlBuf); + TheTest.Printf(ThePrintBuf); + } + +extern "C" void PrintIII(const char* aFmt, int a1, int a2, int a3) + { + TheSqlBuf.Format(TPtrC8((const TUint8*)aFmt), a1, a2, a3); + ThePrintBuf.Copy(TheSqlBuf); + TheTest.Printf(ThePrintBuf); + } + static void DeleteTestFiles() { TheDb.Close(); @@ -85,7 +109,7 @@ if(!aValue) { DeleteTestFiles(); - TestTestLine(EFalse, aLine); + TheTest(EFalse, aLine); } } static void Check(TInt aValue, TInt aExpected, TInt aLine) @@ -94,7 +118,7 @@ { DeleteTestFiles(); RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue); - TestTestLine(EFalse, aLine); + TheTest(EFalse, aLine); } } #define TEST(arg) ::Check((arg), __LINE__) @@ -151,9 +175,7 @@ static void GetFastCounterFrequency() { TEST2(HAL::Get(HAL::EFastCounterFrequency, TheCounterFreq), KErrNone); - TBuf8<32> printString; - printString.Format(_L8("Counter frequency=%d\r\n"), TheCounterFreq); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("Counter frequency=%d\r\n"), TheCounterFreq); } extern "C" unsigned int FastCounterValue(void) @@ -171,71 +193,62 @@ static void PrintPerfTestResults() { - TBuf8<256> printString; TInt r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode] [EPerfTestMultiInsert]); TInt r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode] [EPerfTestMultiInsert]); TInt r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestMultiInsert]); TInt r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1); TInt r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1); - TestPrintf("### SQL SQLITE-SQL SQLITE-DEFAULT\r\n"); - printString.Format(_L8("###Multi Insert: %8dus %8dus %8dus %8d%%%% %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("### SQL SQLITE-SQL SQLITE-DEFAULT\r\n")); + TheTest.Printf(_L("###Mutli Insert: %8dus %8dus %8dus %8d%% %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode] [EPerfTestMultiUpdate]); r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode] [EPerfTestMultiUpdate]); r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestMultiUpdate]); r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1); r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1); - printString.Format(_L8("###Multi Update: %8dus %8dus %8dus %8d%%%% %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("###Mutli Update: %8dus %8dus %8dus %8d%% %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode] [EPerfTestMultiDelete]); r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode] [EPerfTestMultiDelete]); r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestMultiDelete]); r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1); r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1); - printString.Format(_L8("###Multi Delete: %8dus %8dus %8dus %8d%%%% %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("###Mutli Delete: %8dus %8dus %8dus %8d%% %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode] [EPerfTestMultiSelect]); r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode] [EPerfTestMultiSelect]); r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestMultiSelect]); r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1); r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1); - printString.Format(_L8("###Multi Select: %8dus %8dus %8dus %8d%%%% %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("###Mutli Select: %8dus %8dus %8dus %8d%% %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode] [EPerfTestSingleInsert]); r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode] [EPerfTestSingleInsert]); r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestSingleInsert]); r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1); r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1); - printString.Format(_L8("##Single Insert: %8dus %8dus %8dus %8d%%%% %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("##Single Insert: %8dus %8dus %8dus %8d%% %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode] [EPerfTestSingleUpdate]); r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode] [EPerfTestSingleUpdate]); r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestSingleUpdate]); r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1); r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1); - printString.Format(_L8("##Single Update: %8dus %8dus %8dus %8d%%%% %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("##Single Update: %8dus %8dus %8dus %8d%% %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode] [EPerfTestSingleDelete]); r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode] [EPerfTestSingleDelete]); r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestSingleDelete]); r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1); r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1); - printString.Format(_L8("##Single Delete: %8dus %8dus %8dus %8d%%%% %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("##Single Delete: %8dus %8dus %8dus %8d%% %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); r1 = FcDiff2Us(ThePerfTestResult[EPerfTestSqlMode] [EPerfTestSingleSelect]); r2 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteSqlMode] [EPerfTestSingleSelect]); r3 = FcDiff2Us(ThePerfTestResult[EPerfTestSqliteDefaultMode][EPerfTestSingleSelect]); r4 = (TInt)((Abs(r2 - r1) * 100.0) / r1); r5 = (TInt)((Abs(r3 - r1) * 100.0) / r1); - printString.Format(_L8("##Single Select: %8dus %8dus %8dus %8d%%%% %8d%%%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("##Single Select: %8dus %8dus %8dus %8d%% %8d%%\r\n"), r1, r2, r3, r2 > r1 ? -r4 : +r4, r3 > r1 ? -r5 : +r5); } /////////////////////////////////////////////////////////////////////////////////////// @@ -287,7 +300,7 @@ */ static void SqlServerMultiInsertTest(const char aInsertSql[], TInt aInsertRecCnt) { - TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4010 "); + TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4010 ")); (void)KillProcess(KSqlSrvName); TInt err = TheDb.Open(KTestDbName); @@ -344,7 +357,7 @@ */ static void SqlServerMultiUpdateTest(const char aUpdateSql[], TInt aUpdateRecIds[], TInt aUpdateRecCnt) { - TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4011 "); + TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4011 ")); (void)KillProcess(KSqlSrvName); TInt err = TheDb.Open(KTestDbName); @@ -372,7 +385,7 @@ */ static void SqlServerMultiDeleteTest(const char aDeleteSql[], TInt aDeleteRecIds[], TInt aDeleteRecCnt) { - TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4012 "); + TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4012 ")); (void)KillProcess(KSqlSrvName); TInt err = TheDb.Open(KTestDbName); @@ -400,7 +413,7 @@ */ static void SqlServerMultiSelectTest(const char aSelectSql[], TInt aSelectRecIds[], TInt aSelectRecCnt) { - TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4013 "); + TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4013 ")); (void)KillProcess(KSqlSrvName); TInt err = TheDb.Open(KTestDbName); @@ -449,7 +462,7 @@ */ static void SqlServerSingleInsertTest(const char aSingleInsertSql[], TInt aInsertRecId) { - TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4014 "); + TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4014 ")); (void)KillProcess(KSqlSrvName); TInt err = TheDb.Open(KTestDbName); @@ -476,7 +489,7 @@ */ static void SqlServerSingleUpdateTest(const char aSingleUpdateSql[], TInt aUpdateRecId) { - TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4015 "); + TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4015 ")); (void)KillProcess(KSqlSrvName); TInt err = TheDb.Open(KTestDbName); @@ -504,7 +517,7 @@ */ static void SqlServerSingleDeleteTest(const char aSingleDeleteSql[], TInt aDeleteRecId) { - TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4016 "); + TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4016 ")); (void)KillProcess(KSqlSrvName); TInt err = TheDb.Open(KTestDbName); @@ -532,7 +545,7 @@ */ static void SqlServerSingleSelectTest(const char aSingleSelectSql[], TInt aSelectRecId) { - TestNext(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4017 "); + TheTest.Next( _L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4017 ")); (void)KillProcess(KSqlSrvName); TInt err = TheDb.Open(KTestDbName); @@ -576,38 +589,37 @@ static void DoSqlServerTests() { - TestNext("SQL: Create the test database"); + TheTest.Next(_L("SQL: Create the test database")); CreateTestDatabase(); - TBuf8<100> msgbuf; + TBuf<100> msgbuf; - msgbuf.Format(_L8("SQL: insert %d records in a single transaction"), KInsertRecCnt); - TestNext((const char*)msgbuf.PtrZ()); + msgbuf.Format(_L("SQL: insert %d records in a single transaction"), KInsertRecCnt); + TheTest.Next(msgbuf); SqlServerMultiInsertTest(KMultiInsertSql, KInsertRecCnt); - msgbuf.Format(_L8("SQL: update %d records in a single transaction"), KUpdateRecCnt); - TestNext((const char*)msgbuf.PtrZ()); + msgbuf.Format(_L("SQL: update %d records in a single transaction"), KUpdateRecCnt); + TheTest.Next(msgbuf); SqlServerMultiUpdateTest(KMultiUpdateSql, TheUpdateRecIds, KUpdateRecCnt); - msgbuf.Format(_L8("SQL: delete %d records in a single transaction"), KDeleteRecCnt); - TestNext((const char*)msgbuf.PtrZ()); + msgbuf.Format(_L("SQL: delete %d records in a single transaction"), KDeleteRecCnt); + TheTest.Next(msgbuf); SqlServerMultiDeleteTest(KMultiDeleteSql, TheDeleteRecIds, KDeleteRecCnt); - msgbuf.Format(_L8("SQL: select %d records"), KSelectRecCnt); - msgbuf.Copy(msgbuf); - TestNext((const char*)msgbuf.PtrZ()); + msgbuf.Format(_L("SQL: select %d records"), KSelectRecCnt); + TheTest.Next(msgbuf); SqlServerMultiSelectTest(KMultiSelectSql, TheSelectRecIds, KSelectRecCnt); - TestNext("SQL: insert a single record"); + TheTest.Next(_L("SQL: insert a single record")); SqlServerSingleInsertTest(KSingleInsertSql, TheInsertRecId); - TestNext("SQL: update a single record"); + TheTest.Next(_L("SQL: update a single record")); SqlServerSingleUpdateTest(KSingleUpdateSql, TheUpdateRecId); - TestNext("SQL: delete a single record"); + TheTest.Next(_L("SQL: delete a single record")); SqlServerSingleDeleteTest(KSingleDeleteSql, TheDeleteRecId); - TestNext("SQL: select a single record"); + TheTest.Next(_L("SQL: select a single record")); SqlServerSingleSelectTest(KSingleSelectSql, TheSelectRecId); (void)RSqlDatabase::Delete(KTestDbName); @@ -619,51 +631,51 @@ SqliteInitialize(aPerfTestMode); - TestNext("SQLite: Create the test database"); + TheTest.Next( _L("SQLite: Create the test database")); CreateTestDatabase(); - TBuf8<200> msgbuf; - _LIT8(KSqliteConfigSql, "\"SQL\""); - _LIT8(KSqliteConfigDefault, "\"Default\""); + TBuf<200> msgbuf; + _LIT(KSqliteConfigSql, "\"SQL\""); + _LIT(KSqliteConfigDefault, "\"Default\""); - msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4018: SQLite, configuration: %S: insert %d records in a single transaction"), + msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4018: SQLite, configuration: %S: insert %d records in a single transaction"), aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault, KInsertRecCnt); - TestNext((const char*)msgbuf.PtrZ()); + TheTest.Next(msgbuf); SqliteMultiInsertTest(aPerfTestMode, KMultiInsertSql, KInsertRecCnt); - msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4019: SQLite, configuration: %S: update %d records in a single transaction"), + msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4019: SQLite, configuration: %S: update %d records in a single transaction"), aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault, KUpdateRecCnt); - TestNext((const char*)msgbuf.PtrZ()); + TheTest.Next(msgbuf); SqliteMultiUpdateTest(aPerfTestMode, KMultiUpdateSql, TheUpdateRecIds, KUpdateRecCnt); - msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4020: SQLite, configuration: %S: delete %d records in a single transaction"), + msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4020: SQLite, configuration: %S: delete %d records in a single transaction"), aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault, KDeleteRecCnt); - TestNext((const char*)msgbuf.PtrZ()); + TheTest.Next(msgbuf); SqliteMultiDeleteTest(aPerfTestMode, KMultiDeleteSql, TheDeleteRecIds, KDeleteRecCnt); - msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4021: SQLite, configuration: %S: select %d records"), + msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4021: SQLite, configuration: %S: select %d records"), aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault, KSelectRecCnt); - TestNext((const char*)msgbuf.PtrZ()); + TheTest.Next(msgbuf); SqliteMultiSelectTest(aPerfTestMode, KMultiSelectSql, TheSelectRecIds, KSelectRecCnt); - msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4022: SQLite, configuration: %S: insert a single record"), + msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4022: SQLite, configuration: %S: insert a single record"), aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault); - TestNext((const char*)msgbuf.PtrZ()); + TheTest.Next(msgbuf); SqliteSingleInsertTest(aPerfTestMode, KSingleInsertSql, TheInsertRecId); - msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4023: SQLite, configuration: %S: update a single record"), + msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4023: SQLite, configuration: %S: update a single record"), aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault); - TestNext((const char*)msgbuf.PtrZ()); + TheTest.Next(msgbuf); SqliteSingleUpdateTest(aPerfTestMode, KSingleUpdateSql, TheUpdateRecId); - msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4024: SQLite, configuration: %S: delete a single record"), + msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4024: SQLite, configuration: %S: delete a single record"), aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault); - TestNext((const char*)msgbuf.PtrZ()); + TheTest.Next(msgbuf); SqliteSingleDeleteTest(aPerfTestMode, KSingleDeleteSql, TheDeleteRecId); - msgbuf.Format(_L8("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4025: SQLite, configuration: %S: select a single record"), + msgbuf.Format(_L("@SYMTestCaseID:SYSLIB-SQLITE3-UT-4025: SQLite, configuration: %S: select a single record"), aPerfTestMode == EPerfTestSqliteSqlMode ? &KSqliteConfigSql : &KSqliteConfigDefault); - TestNext((const char*)msgbuf.PtrZ()); + TheTest.Next(msgbuf); SqliteSingleSelectTest(aPerfTestMode, KSingleSelectSql, TheSelectRecId); (void)RSqlDatabase::Delete(KTestDbName); @@ -807,13 +819,13 @@ static void DoTests() { - TestStart("Get fast counter frequency"); + TheTest.Start(_L("Get fast counter frequency")); GetFastCounterFrequency(); - TestNext("Generate test record ids"); + TheTest.Next( _L("Generate test record ids")); GenerateTestRecIds(); - TestNext("Verify generated test record ids"); + TheTest.Next( _L("Verify generated test record ids")); VerifyGeneratedRecIds(); DoSqlServerTests(); @@ -828,8 +840,7 @@ TInt E32Main() { - TestOpen(KTestName); - TestTitle(); + TheTest.Title(); CTrapCleanup* tc = CTrapCleanup::New(); @@ -842,8 +853,8 @@ __UHEAP_MARKEND; - TestEnd(); - TestClose(); + TheTest.End(); + TheTest.Close(); delete tc; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/t_sqliteperf2.cpp --- a/persistentstorage/sqlite3api/TEST/t_sqliteperf2.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/TEST/t_sqliteperf2.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -20,7 +20,6 @@ #include #include #include -#include "sqliteTestUtl.h" /////////////////////////////////////////////////////////////////////////////////////// @@ -41,7 +40,7 @@ //The performance test case results are stored in the ThePerfTestResult array. static TUint32 ThePerfTestResult[EPerfTestTypeCnt]; -const char* const KTestName = "t_sqliteperf2 test"; +static RTest TheTest(_L("t_sqliteperf2 test")); _LIT(KTestDir, "c:\\test\\"); _LIT(KTestDbName, "c:\\test\\t_sqliteperf2.db"); @@ -174,8 +173,9 @@ if(TheDb) { const char* msg = sqlite3_errmsg(TheDb); - TestPrintf("*** SQLite error message:"); - TestPrintf(msg); + TBuf<200> buf; + buf.Copy(TPtrC8((const TUint8*)msg)); + TheTest.Printf(_L("*** SQLite error message: \"%S\"\r\n"), &buf); } } @@ -186,7 +186,7 @@ { DeleteTestFiles(); PrintSqliteErrMsg(); - TestTestLine(EFalse, aLine); + TheTest(EFalse, aLine); } } static void Check(TInt aValue, TInt aExpected, TInt aLine) @@ -196,7 +196,7 @@ DeleteTestFiles(); RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue); PrintSqliteErrMsg(); - TestTestLine(EFalse, aLine); + TheTest(EFalse, aLine); } } #define TEST(arg) ::Check((arg), __LINE__) @@ -218,9 +218,7 @@ static void GetFastCounterFrequency() { TEST2(HAL::Get(HAL::EFastCounterFrequency, TheCounterFreq), KErrNone); - TBuf8<32> printString; - printString.Format(_L8("Counter frequency=%d\r\n"), TheCounterFreq); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("Counter frequency=%d\r\n"), TheCounterFreq); } TUint32 FastCounterValue(void) @@ -240,40 +238,30 @@ static void PrintPerfTestResults() { - TBuf8<256> printString; - TInt r = FcDiff2Us(ThePerfTestResult[EPerfTestMultiInsert]); - printString.Format(_L8("###Mutli Insert: %8dus\r\n"), r); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("###Mutli Insert: %8dus\r\n"), r); r = FcDiff2Us(ThePerfTestResult[EPerfTestMultiUpdate]); - printString.Format(_L8("###Mutli Update: %8dus\r\n"), r); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("###Mutli Update: %8dus\r\n"), r); r = FcDiff2Us(ThePerfTestResult[EPerfTestMultiSelect]); - printString.Format(_L8("###Mutli Select: %8dus\r\n"), r); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("###Mutli Select: %8dus\r\n"), r); r = FcDiff2Us(ThePerfTestResult[EPerfTestMultiDelete]); - printString.Format(_L8("###Mutli Delete: %8dus\r\n"), r); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("###Mutli Delete: %8dus\r\n"), r); r = FcDiff2Us(ThePerfTestResult[EPerfTestSingleInsert]); - printString.Format(_L8("##Single Insert: %8dus\r\n"), r); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("##Single Insert: %8dus\r\n"), r); r = FcDiff2Us(ThePerfTestResult[EPerfTestSingleUpdate]); - printString.Format(_L8("##Single Update: %8dus\r\n"), r); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("##Single Update: %8dus\r\n"), r); r = FcDiff2Us(ThePerfTestResult[EPerfTestSingleSelect]); - printString.Format(_L8("##Single Select: %8dus\r\n"), r); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("##Single Select: %8dus\r\n"), r); r = FcDiff2Us(ThePerfTestResult[EPerfTestSingleDelete]); - printString.Format(_L8("##Single Delete: %8dus\r\n"), r); - TestPrintf((const char*)printString.PtrZ()); + TheTest.Printf(_L("##Single Delete: %8dus\r\n"), r); } /////////////////////////////////////////////////////////////////////////////////////// @@ -289,8 +277,9 @@ (void)TheFs.Delete(KTestDbName); const char* ver = sqlite3_libversion(); - TestPrintf("*** SQLite library version:"); - TestPrintf(ver); + TBuf<20> buf; + buf.Copy(TPtrC8((const TUint8*)ver)); + TheTest.Printf(_L("*** SQLite library version: \"%S\"\r\n"), &buf); TInt err = sqlite3_open(KTestDbName8, &TheDb); TEST2(err, SQLITE_OK); @@ -654,44 +643,44 @@ static void DoTests() { - TestStart("Get fast counter frequency"); + TheTest.Start(_L("Get fast counter frequency")); GetFastCounterFrequency(); - TestNext("SQLite: Create the test database"); + TheTest.Next( _L("SQLite: Create the test database")); CreateTestDatabase(); - TBuf8<100> msgbuf; + TBuf<100> msgbuf; - msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4030: Insert %d records in a single transaction"), KInsertRecCnt); - TestNext((const char*)msgbuf.PtrZ()); + msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4030: Insert %d records in a single transaction"), KInsertRecCnt); + TheTest.Next(msgbuf); SqliteMultiInsertTest(); - msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4031: Update %d records in a single transaction"), KUpdateRecCnt); - TestNext((const char*)msgbuf.PtrZ()); + msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4031: Update %d records in a single transaction"), KUpdateRecCnt); + TheTest.Next(msgbuf); SqliteMultiUpdateTest(); - msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4032: Select %d records"), KSelectRecCnt); - TestNext((const char*)msgbuf.PtrZ()); + msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4032: Select %d records"), KSelectRecCnt); + TheTest.Next(msgbuf); SqliteMultiSelectTest(); - msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4033: Delete %d records in a single transaction"), KDeleteRecCnt); - TestNext((const char*)msgbuf.PtrZ()); + msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4033: Delete %d records in a single transaction"), KDeleteRecCnt); + TheTest.Next(msgbuf); SqliteMultiDeleteTest(); - msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4034: Insert a single record")); - TestNext((const char*)msgbuf.PtrZ()); + msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4034: Insert a single record")); + TheTest.Next(msgbuf); SqliteSingleInsertTest(); - msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4035: Update a single record")); - TestNext((const char*)msgbuf.PtrZ()); + msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4035: Update a single record")); + TheTest.Next(msgbuf); SqliteSingleUpdateTest(); - msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4036: Select a single record")); - TestNext((const char*)msgbuf.PtrZ()); + msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4036: Select a single record")); + TheTest.Next(msgbuf); SqliteSingleSelectTest(); - msgbuf.Format(_L8("@SYMTestCaseID:PDS-SQLITE3-UT-4037: Delete a single record")); - TestNext((const char*)msgbuf.PtrZ()); + msgbuf.Format(_L("@SYMTestCaseID:PDS-SQLITE3-UT-4037: Delete a single record")); + TheTest.Next(msgbuf); SqliteSingleDeleteTest(); (void)TheFs.Delete(KTestDbName); @@ -701,15 +690,14 @@ TInt E32Main() { - TestOpen(KTestName); - TestTitle(); + TheTest.Title(); CTrapCleanup* tc = CTrapCleanup::New(); __UHEAP_MARK; TInt err = TheFs.Connect(); - TestTest(err == KErrNone); + TheTest(err == KErrNone); CreateTestDir(); DeleteTestFiles(); @@ -719,8 +707,8 @@ __UHEAP_MARKEND; TheFs.Close(); - TestEnd(); - TestClose(); + TheTest.End(); + TheTest.Close(); delete tc; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/t_sqlitetclstarter.cpp --- a/persistentstorage/sqlite3api/TEST/t_sqlitetclstarter.cpp Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#include -#include -#include -#include - - -/////////////////////////////////////////////////////////////////////////////////////// - -RTest TheTest(_L("t_sqlitetclstarter")); - -_LIT(KTclExecutableName,"tclsqlite3.exe"); -_LIT(KTclScriptName,"all.test"); - -_LIT(KStdioConfigFilePath, "C:\\system\\data\\"); -_LIT(KStdioConfigFile, "C:\\system\\data\\config.ini"); - -_LIT(KLogsFilePath, "C:\\logs\\testexecute\\"); - -RFs theFs; - -/////////////////////////////////////////////////////////////////////////////////////// - -// -// Creates the appropriate stdio ini file to redirect stdio output to a file -// - -void CreateIniFileForStdoutRedirection(void) - { - TInt err(KErrNone); - - // check path exists otherwise create - if (!BaflUtils::FolderExists(theFs, KStdioConfigFilePath)) - { - err = theFs.MkDirAll(KStdioConfigFilePath); - TheTest(err == KErrNone, __LINE__); - } - - - // create file - RFile file; - err = file.Create(theFs, KStdioConfigFile, EFileRead | EFileWrite); - TheTest(err == KErrNone, __LINE__); - - TheTest(KErrNone == file.Write(_L8("[STDIO]\r\n")), __LINE__); - TheTest(KErrNone == file.Write(_L8("STDIN = MEDIA1\r\n")), __LINE__); - TheTest(KErrNone == file.Write(_L8("STDOUT = MEDIA2\r\n")), __LINE__); - TheTest(KErrNone == file.Write(_L8("[MEDIA1]\r\n")), __LINE__); - TheTest(KErrNone == file.Write(_L8("type = console\r\n")), __LINE__); - TheTest(KErrNone == file.Write(_L8("width = -1\r\n")), __LINE__); - TheTest(KErrNone == file.Write(_L8("height = -1\r\n")), __LINE__); - TheTest(KErrNone == file.Write(_L8("[MEDIA2]\r\n")), __LINE__); - TheTest(KErrNone == file.Write(_L8("type = file\r\n")), __LINE__); - TheTest(KErrNone == file.Write(_L8("path = C:\\logs\\testexecute\\t_sqlitetclstarter.htm\r\n")), __LINE__); - TheTest(KErrNone == file.Flush(),__LINE__); - - file.Close(); - - } - -/////////////////////////////////////////////////////////////////////////////////////// - -// -// Deletes the stdio ini file -// - -void DeleteIniFileForStdoutRedirection(void) - { - TInt err = theFs.Delete(KStdioConfigFile); - TheTest(err == KErrNone || err==KErrNotFound || err==KErrPathNotFound, __LINE__); - } - -/////////////////////////////////////////////////////////////////////////////////////// - -// -// Ensure the directory for the Logs file exists -// - -void EnsureLogsDirectoryExists(void) - { - TInt err(KErrNone); - - // check path exists otherwise create - if (!BaflUtils::FolderExists(theFs, KLogsFilePath)) - { - err = theFs.MkDirAll(KLogsFilePath); - TheTest(err == KErrNone, __LINE__); - } - } - -/////////////////////////////////////////////////////////////////////////////////////// - -// -// Start the tcl process with a script -// - -void StartTclProcess(void) - { - RProcess process; - TInt err = process.Create(KTclExecutableName,KTclScriptName); - TheTest(err==KErrNone, __LINE__); - - TRequestStatus processStatus; - process.Logon(processStatus); - - process.Resume(); - - TheTest.Printf(_L("Wait for TCL tests to finish\r\n")); - - User::WaitForRequest(processStatus); - - TheTest.Printf(_L("TCL tests finished %d\r\n"),processStatus.Int()); - - TheTest(processStatus.Int() == KErrNone, __LINE__); - } - -/////////////////////////////////////////////////////////////////////////////////////// - -TInt E32Main() - { - TheTest.Title(); - TheTest.Start(_L("TCL tests")); - - CTrapCleanup* tc = CTrapCleanup::New(); - - __UHEAP_MARK; - - TInt err = theFs.Connect(); - TheTest(err == KErrNone, __LINE__); - - DeleteIniFileForStdoutRedirection(); - - CreateIniFileForStdoutRedirection(); - - EnsureLogsDirectoryExists(); - - StartTclProcess(); - - DeleteIniFileForStdoutRedirection(); - - theFs.Close(); - - __UHEAP_MARKEND; - - TheTest.End(); - TheTest.Close(); - - delete tc; - - User::Heap().Check(); - return KErrNone; - } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/TEST/t_sqlitewsd.cpp --- a/persistentstorage/sqlite3api/TEST/t_sqlitewsd.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/sqlite3api/TEST/t_sqlitewsd.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -19,14 +19,13 @@ #include #include #include "t_sqlitewsd.h" -#include "sqliteTestUtl.h" #include #include /////////////////////////////////////////////////////////////////////////////////////// -const char* const KTestName = "t_sqlitewsd"; +static RTest TheTest(_L("t_sqlitewsd test")); static RFs TheFs; static pid_t TheKSqliteWsdProc2Pid = 0; @@ -63,7 +62,7 @@ if(!aValue) { DestroyTestEnv(); - TestTestLine(EFalse, aLine); + TheTest(EFalse, aLine); } } @@ -80,7 +79,7 @@ RDebug::Print(_L("*** SQLITE error msg: \"%S\".\r\n"), &msgBuf); } DestroyTestEnv(); - TestTestLine(EFalse, aLine); + TheTest(EFalse, aLine); } } @@ -183,14 +182,14 @@ */ static void DoWsdTests() { - TestStart(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4026 Create the test database "); + TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQLITE3-UT-4026 Create the test database ")); CreateDb(); - TestNext("Run the second process: t_sqlitewsd2"); + TheTest.Next(_L("Run the second process: t_sqlitewsd2")); RunSqliteWsd2(); - TestNext("Insert the records"); + TheTest.Next(_L("Insert the records")); DoInserts(KWsdProc1Id, KWsdProc1RecId1, KWsdProc1RecId2); DestroySqliteWsd2(); - TestNext("Verify the inserted records"); + TheTest.Next(_L("Verify the inserted records")); DoVerify(); } @@ -198,8 +197,7 @@ TInt E32Main() { - TestOpen(KTestName); - TestTitle(); + TheTest.Title(); CTrapCleanup* tc = CTrapCleanup::New(); @@ -211,8 +209,8 @@ __UHEAP_MARKEND; - TestEnd(); - TestClose(); + TheTest.End(); + TheTest.Close(); delete tc; diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/traces_sqlite3/OstTraceDefinitions.h --- a/persistentstorage/sqlite3api/traces_sqlite3/OstTraceDefinitions.h Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -#ifndef __OSTTRACEDEFINITIONS_H__ -#define __OSTTRACEDEFINITIONS_H__ -// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler -// REMOVE BEFORE CHECK-IN TO VERSION CONTROL -//#define OST_TRACE_COMPILER_IN_USE -#include -#endif diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/traces_sqlite3/fixed_id.definitions --- a/persistentstorage/sqlite3api/traces_sqlite3/fixed_id.definitions Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. -[GROUP]TRACE_FATAL=0x81 -[GROUP]TRACE_INTERNALS=0x88 -[TRACE]TRACE_FATAL[0x81]_TSQLUTIL_PANIC=0x1 -[TRACE]TRACE_INTERNALS[0x88]_CRECURSIVEMUTEX_NEWL=0x1a -[TRACE]TRACE_INTERNALS[0x88]_OS2SQLITEERR=0x15 -[TRACE]TRACE_INTERNALS[0x88]_PLSINITIALIZE1=0x12 -[TRACE]TRACE_INTERNALS[0x88]_PLSINITIALIZE2=0x13 -[TRACE]TRACE_INTERNALS[0x88]_PLSINITIALIZE_ENTRY=0x11 -[TRACE]TRACE_INTERNALS[0x88]_PLSINITIALIZE_EXIT=0x14 -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_CLOSE=0x5 -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_CREATE=0x2 -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_DOFILEFLUSH=0xf -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_DOFILESIZE=0xd -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_DOFILEWRITE=0x10 -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_DOSETFILESIZE=0xe -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_DRIVE=0xc -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_LOCK=0xa -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_OPEN=0x3 -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_READ1=0x7 -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_READ2=0x8 -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_READ3=0x9 -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_RFILEBUF64=0x1 -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_SETREADAHEADSIZE=0x6 -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_TEMP=0x4 -[TRACE]TRACE_INTERNALS[0x88]_RFILEBUF64_UNLOCK=0xb -[TRACE]TRACE_INTERNALS[0x88]_SQLITE3_MUTEX_CREATE=0x19 -[TRACE]TRACE_INTERNALS[0x88]_SQLITE3_MUTEX_SQLITE3_MUTEX=0x17 -[TRACE]TRACE_INTERNALS[0x88]_SQLITE3_MUTEX_SQLITE3_MUTEX2=0x18 -[TRACE]TRACE_INTERNALS[0x88]_SQLITE3_OS_END=0x1e -[TRACE]TRACE_INTERNALS[0x88]_SQLITE3_OS_INIT=0x1d -[TRACE]TRACE_INTERNALS[0x88]_TDBFILE_TDBFILE=0x1f -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_CHECKRESERVEDLOCK1=0x3b -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_CHECKRESERVEDLOCK2=0x3c -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_CHECKRESERVEDLOCK3=0x3d -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_CLOSE1=0x20 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_CLOSE2=0x21 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_FILECONTROL=0x3e -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_FILESIZE_ENTRY=0x2a -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_FILESIZE_EXIT=0x2b -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_GETREADLOCK=0x2c -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_LOCK1=0x2e -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_LOCK2=0x2f -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_LOCK3=0x30 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_LOCK4=0x31 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_LOCK5=0x32 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_LOCK6=0x33 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_LOCK7=0x34 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_READ_ENTRY=0x22 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_READ_EXIT=0x23 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_SYNC_ENTRY=0x28 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_SYNC_EXIT=0x29 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_TRUNCATE_ENTRY=0x26 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_TRUNCATE_EXIT=0x27 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_UNLOCK1=0x35 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_UNLOCK2=0x36 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_UNLOCK3=0x37 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_UNLOCK4=0x38 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_UNLOCK5=0x39 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_UNLOCK6=0x3a -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_UNLOCKREADLOCK=0x2d -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_WRITE_ENTRY=0x24 -[TRACE]TRACE_INTERNALS[0x88]_TFILEIO_WRITE_EXIT=0x25 -[TRACE]TRACE_INTERNALS[0x88]_TMUTEXAPI_ALLOC=0x1b -[TRACE]TRACE_INTERNALS[0x88]_TMUTEXAPI_FREE=0x1c -[TRACE]TRACE_INTERNALS[0x88]_TSTATICFS_CONNECT=0x16 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_ACCESS1=0x49 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_ACCESS_ENTRY=0x4a -[TRACE]TRACE_INTERNALS[0x88]_TVFS_ACCESS_EXIT1=0x4b -[TRACE]TRACE_INTERNALS[0x88]_TVFS_ACCESS_EXIT2=0x4c -[TRACE]TRACE_INTERNALS[0x88]_TVFS_ACCESS_EXIT3=0x4d -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DELETE1=0x47 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DELETE2=0x48 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DOFILESIZECORRUPTIONCHECK1=0x41 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DOFILESIZECORRUPTIONCHECK2=0x42 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DOGETGETDEVICECHARACTERISTICSANDSECTORSIZE=0x40 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_DOGETVOLUMEIOPARAMINFO=0x3f -[TRACE]TRACE_INTERNALS[0x88]_TVFS_FULLPATHNAME1=0x4e -[TRACE]TRACE_INTERNALS[0x88]_TVFS_FULLPATHNAME_ENTRY=0x50 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_FULLPATHNAME_EXIT1=0x4f -[TRACE]TRACE_INTERNALS[0x88]_TVFS_FULLPATHNAME_EXIT2=0x52 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_FULLPATHNAME_EXIT3=0x53 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_FULLPATHNAME_EXIT4=0x51 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_OPEN1=0x43 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_OPEN2=0x45 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_OPEN_ENTRY=0x44 -[TRACE]TRACE_INTERNALS[0x88]_TVFS_OPEN_EXIT=0x46 diff -r 26645d81f48d -r cc28652e0254 persistentstorage/sqlite3api/traces_sqlite3/trace.properties --- a/persistentstorage/sqlite3api/traces_sqlite3/trace.properties Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ - - - diff -r 26645d81f48d -r cc28652e0254 persistentstorage/store/INC/S32FILE.INL --- a/persistentstorage/store/INC/S32FILE.INL Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/store/INC/S32FILE.INL Wed Sep 01 12:39:58 2010 +0100 @@ -378,7 +378,7 @@ @param aFs Handle to a file server session. @param aName The full path name of the file to be replaced. @param aFileMode The mode in which the file is to be accessed. The mode is -defined by the TFileMode type. +defined by the TFileMode type. @return A pointer to the new permanent file store object. @see TFileMode */ { @@ -401,7 +401,7 @@ @param aFs Handle to a file server session. @param aName The full path name of the file to be replaced. @param aFileMode The mode in which the file is to be accessed. The mode is -defined by the TFileMode type. +defined by the TFileMode type. @return A pointer to the new permanent file store object. @see TFileMode */ { @@ -477,8 +477,6 @@ order of file write operations is not guaranteed. This could cause data inconsistency in some circumstances, for example, when the power is lost in the middle of database transaction. Therefore, the file write caching should be switched off to maintain integrity. - - The file must already be open before calling this function. @@ -510,7 +508,7 @@ The file must already be open before calling this function. The existing content of the file is discarded. It is strongly recommended to set EFileWriteDirectIO -bit when opening the file. It is because that when the file write caching in file server is on, the +bit when opening the file. It is because that when file server file write cachingis on, the order of file writing is not guaranteed which could cause data inconsistency in some circumstances, for example, when the power is lost in the middle of data transaction. Therefore, the file write caching should be switched off to maintain the file integrity. @@ -527,10 +525,10 @@ The file must already be open before calling this function.The existing content of the file is discarded. It is strongly recommended to set EFileWriteDirectIO -bit when opening the file. It is because that when the write caching in file server is on, the +bit when opening the file. It is because that when the file write caching in file server is on, the order of file writing is not guaranteed which could cause data inconsistency in some circumstances, for example, when the power is lost in the middle of data transaction. -Therefore, the file write caching should be switched off to maintain the file integrity. +Therefore, the file file write caching should be switched off to maintain the file integrity. Note that ownership of the file passes to the store. The referenced RFile is cleared and is no longer valid. diff -r 26645d81f48d -r cc28652e0254 persistentstorage/store/TSTOR/T_BMStreams.inl --- a/persistentstorage/store/TSTOR/T_BMStreams.inl Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/store/TSTOR/T_BMStreams.inl Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -25,7 +25,7 @@ // Internalize CCompound object from the stream LOCAL_C void doInternalizeL(const TDesC& aName); -#define STREAMRUNSIZE 500 +#define STREAMRUNSIZE 1000 // Declare a class used by the example class CStreamA { diff -r 26645d81f48d -r cc28652e0254 persistentstorage/store/TSTRM/t_storstreamperf.cpp --- a/persistentstorage/store/TSTRM/t_storstreamperf.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/store/TSTRM/t_storstreamperf.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -510,7 +510,7 @@ store = CPermanentFileStore::OpenLC(TheFs, TheTestFile, EFileWrite | EFileRead); RPermanentFileStoreIter it4; it4.ResetLC(*store); - TStreamId id(KNullStreamIdValue); + TStreamId id; TInt cnt = 0; fc = User::FastCounter(); while((id = it4.NextL()) != KNullStreamIdValue) diff -r 26645d81f48d -r cc28652e0254 persistentstorage/store/UFILE/UF_DICT.CPP --- a/persistentstorage/store/UFILE/UF_DICT.CPP Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/store/UFILE/UF_DICT.CPP Wed Sep 01 12:39:58 2010 +0100 @@ -154,7 +154,7 @@ for (TInt wait=KLockoutLimit;;) { RFile file; - // When the file server write caching is enabled, the order of file write operations is not guaranteed. + // When the file server write caching is enabled, the order of file write operations is not guaranteed. // This could cause data inconsistency in some circumstances,for example, when the power is lost in the // middle of a database transaction.Therefore, the file write caching is disabled for this file to maintain integrity. @@ -179,11 +179,11 @@ } if (r==KErrCorrupt) { - // silently replace the entire file if it is corrupt - // When the file server write caching is enabled, the order of file write operations is not guaranteed. - // This could cause data inconsistency in some circumstances,for example, when the power is lost in the - // middle of a database transaction.Therefore, the file write caching is disabled for this file to maintain integrity. - // + // silently replace the entire file if it is corrupt + // When the file server write caching is enabled, the order of file write operations is not guaranteed. + // This could cause data inconsistency in some circumstances,for example, when the power is lost in the + // middle of a database transaction.Therefore, the file write caching is disabled for this file to maintain integrity. + r=file.Replace(aFs,aName,EFileShareExclusive|EFileWrite|EFileWriteDirectIO); if (r==KErrInUse) break; // try again later... @@ -205,9 +205,10 @@ return; } case KErrNotFound: - // When the file server write caching is enabled, the order of file write operations is not guaranteed. - // This could cause data inconsistency in some circumstances,for example, when the power is lost in the - // middle of a database transaction.Therefore, the file write caching is disabled for this file to maintain integrity. + // When the file server write caching is enabled, the order of file write operations is not guaranteed. + // This could cause data inconsistency in some circumstances,for example, when the power is lost in the + // middle of a database transaction.Therefore, the file write caching is disabled for this file to maintain integrity. + r=file.Create(aFs,aName,EFileShareExclusive|EFileWrite|EFileWriteDirectIO); if (r==KErrNone) { diff -r 26645d81f48d -r cc28652e0254 persistentstorage/store/USTOR/UT_COLL.CPP --- a/persistentstorage/store/USTOR/UT_COLL.CPP Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/store/USTOR/UT_COLL.CPP Wed Sep 01 12:39:58 2010 +0100 @@ -903,7 +903,7 @@ } return ::ExtentL(Host(),iMark,Coord().Base(),aStream); } - + /* relocate a stream into [iFree, aExtent) During compaction, for each string which is to be moved from position A1 to B1, the sequence of operations is: @@ -942,14 +942,15 @@ when writing to the file. */ void CPermanentStoreCollector::RelocateStreamL(const CPermanentStoreCollector::TEntry& aReloc, TInt aExtent) + { if (Coord().Accessed()) // must have exclusive access to relocate the stream __LEAVE(KErrInUse); // TInt end=RelocateL(aReloc.entry.ref,aReloc.len,aReloc.entry.handle == KHandleTocBase ? EFrameDescriptive16 : EFrameData16, aExtent); - //Step 1, 4,.... + //Step 1 Coord().RelocateL(aReloc.entry.handle, iFree); - // Step 2 & 3, 5 & 6,... + // Step 2 & 3 iCoordGen=Coord().Generation(); // changed by relocation iFree = end; } diff -r 26645d81f48d -r cc28652e0254 persistentstorage/store/group/BLD.INF --- a/persistentstorage/store/group/BLD.INF Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/store/group/BLD.INF Wed Sep 01 12:39:58 2010 +0100 @@ -26,36 +26,36 @@ PRJ_EXPORTS -../INC/S32BTREE.H OS_LAYER_PUBLIC_EXPORT_PATH(s32btree.h) -../INC/S32BTREE.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32btree.inl) -../INC/S32BUF.H OS_LAYER_PUBLIC_EXPORT_PATH(s32buf.h) -../INC/S32BUF.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32buf.inl) -../INC/S32CONT.H OS_LAYER_PUBLIC_EXPORT_PATH(s32cont.h) -../INC/S32CONT.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32cont.inl) -../INC/S32CRYPT.H OS_LAYER_PLATFORM_EXPORT_PATH(s32crypt.h) -../INC/S32CRYPT.INL OS_LAYER_PLATFORM_EXPORT_PATH(s32crypt.inl) -../INC/S32FILE.H OS_LAYER_PUBLIC_EXPORT_PATH(s32file.h) -../INC/S32FILE.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32file.inl) +../INC/S32BTREE.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32btree.h) +../INC/S32BTREE.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32btree.inl) +../INC/S32BUF.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32buf.h) +../INC/S32BUF.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32buf.inl) +../INC/S32CONT.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32cont.h) +../INC/S32CONT.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32cont.inl) +../INC/S32CRYPT.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(s32crypt.h) +../INC/S32CRYPT.INL SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(s32crypt.inl) +../INC/S32FILE.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32file.h) +../INC/S32FILE.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32file.inl) #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS #ifdef SYMBIAN_OLD_EXPORT_LOCATION ../INC/S32FILEBUFSIZE.H /epoc32/include/s32filebufsize.h #endif #endif -../INC/S32MEM.H OS_LAYER_PUBLIC_EXPORT_PATH(s32mem.h) -../INC/S32MEM.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32mem.inl) -../INC/S32PAGE.H OS_LAYER_PUBLIC_EXPORT_PATH(s32page.h) -../INC/S32PAGE.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32page.inl) -../INC/S32SHARE.H OS_LAYER_PUBLIC_EXPORT_PATH(s32share.h) -../INC/S32SHARE.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32share.inl) -../INC/S32STD.H OS_LAYER_PUBLIC_EXPORT_PATH(s32std.h) -../INC/S32STD.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32std.inl) -../INC/S32STOR.H OS_LAYER_PUBLIC_EXPORT_PATH(s32stor.h) -../INC/S32STOR.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32stor.inl) -../INC/S32STRM.H OS_LAYER_PUBLIC_EXPORT_PATH(s32strm.h) -../INC/S32STRM.INL OS_LAYER_PUBLIC_EXPORT_PATH(s32strm.inl) -../INC/S32UCMP.H OS_LAYER_PUBLIC_EXPORT_PATH(s32ucmp.h) -../INC/S32FileIter.h OS_LAYER_PLATFORM_EXPORT_PATH(s32fileiter.h) -../INC/S32FileIter.inl OS_LAYER_PLATFORM_EXPORT_PATH(s32fileiter.inl) +../INC/S32MEM.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32mem.h) +../INC/S32MEM.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32mem.inl) +../INC/S32PAGE.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32page.h) +../INC/S32PAGE.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32page.inl) +../INC/S32SHARE.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32share.h) +../INC/S32SHARE.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32share.inl) +../INC/S32STD.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32std.h) +../INC/S32STD.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32std.inl) +../INC/S32STOR.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32stor.h) +../INC/S32STOR.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32stor.inl) +../INC/S32STRM.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32strm.h) +../INC/S32STRM.INL SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32strm.inl) +../INC/S32UCMP.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(s32ucmp.h) +../INC/S32FileIter.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(s32fileiter.h) +../INC/S32FileIter.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(s32fileiter.inl) ../ROM/Store.iby /epoc32/rom/include/store.iby diff -r 26645d81f48d -r cc28652e0254 persistentstorage/store/pcstore/group/bld.inf --- a/persistentstorage/store/pcstore/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/store/pcstore/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -21,16 +21,16 @@ TOOLS2 PRJ_EXPORTS -../inc/descriptors.h OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/descriptors.h) -../inc/directfilestore.h OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/directfilestore.h) -../inc/storewritestream.h OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/storewritestream.h) -../inc/storereadstream.h OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/storereadstream.h) -../inc/storeexception.h OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/storeexception.h) -../inc/pcstoredef.h OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/pcstoredef.h) -../inc/streamid.h OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/streamid.h) -../inc/uid.h OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/uid.h) -../inc/pcstore.h OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/pcstore.h) -../inc/checkeduid.h OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/checkeduid.h) +../inc/descriptors.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/descriptors.h) +../inc/directfilestore.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/directfilestore.h) +../inc/storewritestream.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/storewritestream.h) +../inc/storereadstream.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/storereadstream.h) +../inc/storeexception.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/storeexception.h) +../inc/pcstoredef.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/pcstoredef.h) +../inc/streamid.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/streamid.h) +../inc/uid.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/uid.h) +../inc/pcstore.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/pcstore.h) +../inc/checkeduid.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(pcstore/checkeduid.h) PRJ_MMPFILES #ifdef TOOLS2 diff -r 26645d81f48d -r cc28652e0254 traceservices/commsdebugutility/TE_commsdebugutility/group/designexample.mmp --- a/traceservices/commsdebugutility/TE_commsdebugutility/group/designexample.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/commsdebugutility/TE_commsdebugutility/group/designexample.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -25,7 +25,7 @@ USERINCLUDE ../inc OS_LAYER_SYSTEMINCLUDE_SYMBIAN -#include "../group/commsdebugutility.mmh" +#include "comms-infras/commsdebugutility.mmh" SOURCEPATH ../src SOURCE designexample.cpp diff -r 26645d81f48d -r cc28652e0254 traceservices/commsdebugutility/TE_commsdebugutility/group/tlog1.mmp --- a/traceservices/commsdebugutility/TE_commsdebugutility/group/tlog1.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/commsdebugutility/TE_commsdebugutility/group/tlog1.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -22,7 +22,7 @@ CAPABILITY ALL -Tcb SMPSAFE -#include "../group/commsdebugutility.mmh" +#include "comms-infras/commsdebugutility.mmh" USERINCLUDE ../inc OS_LAYER_SYSTEMINCLUDE_SYMBIAN diff -r 26645d81f48d -r cc28652e0254 traceservices/commsdebugutility/TE_commsdebugutility/group/tlog3.mmp --- a/traceservices/commsdebugutility/TE_commsdebugutility/group/tlog3.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/commsdebugutility/TE_commsdebugutility/group/tlog3.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ CAPABILITY ALL -Tcb SMPSAFE -#include "../group/commsdebugutility.mmh" +#include "comms-infras/commsdebugutility.mmh" USERINCLUDE ../inc OS_LAYER_SYSTEMINCLUDE_SYMBIAN diff -r 26645d81f48d -r cc28652e0254 traceservices/commsdebugutility/TE_commsdebugutility/group/tlog4.mmp --- a/traceservices/commsdebugutility/TE_commsdebugutility/group/tlog4.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/commsdebugutility/TE_commsdebugutility/group/tlog4.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ #define __FLOGGER_UREL MACRO __FLOG_SUPPRESS_REL_WARNING -#include "../group/commsdebugutility.mmh" +#include "comms-infras/commsdebugutility.mmh" USERINCLUDE ../inc OS_LAYER_SYSTEMINCLUDE_SYMBIAN diff -r 26645d81f48d -r cc28652e0254 traceservices/commsdebugutility/TE_commsdebugutility/src/step_024_xx.cpp --- a/traceservices/commsdebugutility/TE_commsdebugutility/src/step_024_xx.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/commsdebugutility/TE_commsdebugutility/src/step_024_xx.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2003-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" @@ -75,10 +75,8 @@ INFO_PRINTF1(_L("Step 024.01 called ")); if ( executeStepL() == KErrNone ) SetTestStepResult(EPass); - else SetTestStepResult(EFail); - return TestStepResult(); } @@ -288,10 +286,8 @@ { if ( executeStepL() == KErrNone ) SetTestStepResult(EPass); - else SetTestStepResult(EFail); - return TestStepResult(); } @@ -411,10 +407,8 @@ { if ( executeStepL() == KErrNone ) SetTestStepResult(EPass); - else SetTestStepResult(EFail); - return TestStepResult(); } @@ -564,10 +558,8 @@ { if ( executeStepL() == KErrNone ) SetTestStepResult(EPass); - else SetTestStepResult(EFail); - return TestStepResult(); } @@ -679,10 +671,8 @@ { if ( executeStepL() == KErrNone ) SetTestStepResult(EPass); - else SetTestStepResult(EFail); - return TestStepResult(); } @@ -792,10 +782,8 @@ { if ( executeStepL() == KErrNone ) SetTestStepResult(EPass); - else SetTestStepResult(EFail); - return TestStepResult(); } @@ -914,10 +902,8 @@ INFO_PRINTF1(_L("Step 027.13 called ")); if ( executeStepL() == KErrNone ) SetTestStepResult(EPass); - else SetTestStepResult(EFail); - INFO_PRINTF1(_L("leaving Step 027.13")); User::After(KTimeForDisplay); @@ -1081,10 +1067,8 @@ { if ( executeStepL() == KErrNone ) SetTestStepResult(EPass); - else SetTestStepResult(EFail); - User::After(KTimeForDisplay); @@ -1143,7 +1127,9 @@ User::SetHomeTime(time); TTime currentMicrosecs; + TTimeIntervalDays newDate; currentMicrosecs.HomeTime(); + newDate = currentMicrosecs.DaysFrom(TTime(0)); RFileLogger ::Write(KStdSubsysTag16, KStdCompTag16,EFileLoggingModeAppend, KTestMessage); User::After(KTimeToLog); diff -r 26645d81f48d -r cc28652e0254 traceservices/commsdebugutility/group/BLD.INF --- a/traceservices/commsdebugutility/group/BLD.INF Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/commsdebugutility/group/BLD.INF Wed Sep 01 12:39:58 2010 +0100 @@ -16,12 +16,12 @@ PRJ_EXPORTS -commsdebugutility.mmh OS_LAYER_PUBLIC_EXPORT_PATH(comms-infras/commsdebugutility.mmh) +commsdebugutility.mmh SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(comms-infras/commsdebugutility.mmh) ../tools/splitlog.bat /epoc32/tools/splitlog.bat ../tools/extractlog.pl /epoc32/tools/extractlog.pl -../INC/commsdebugutility.h OS_LAYER_PUBLIC_EXPORT_PATH(comms-infras/commsdebugutility.h) +../INC/commsdebugutility.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(comms-infras/commsdebugutility.h) ../group/commsdebugutility.iby /epoc32/rom/include/commsdebugutility.iby ../group/commslog.iby /epoc32/rom/include/commslog.iby diff -r 26645d81f48d -r cc28652e0254 traceservices/commsdebugutility/group/commsdebugutility.iby --- a/traceservices/commsdebugutility/group/commsdebugutility.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/commsdebugutility/group/commsdebugutility.iby Wed Sep 01 12:39:58 2010 +0100 @@ -27,7 +27,7 @@ file=ABI_DIR\DEBUG_DIR\comsdbgsvr.exe System\bin\comsdbgsvr.exe #if (!USE_FLOGGER_STUB) file=ABI_DIR\DEBUG_DIR\comsdbgsvr.dll System\bin\comsdbgsvr.dll - data=EPOCROOT##epoc32\data\z\resource\commsdbg.ini resource\commsdbg.ini + data=EPOCROOT##Epoc32\data\z\resource\commsdbg.ini resource\commsdbg.ini #else file=ABI_DIR\DEBUG_DIR\comsdbgstub.dll System\bin\comsdbgsvr.dll #endif diff -r 26645d81f48d -r cc28652e0254 traceservices/commsdebugutility/group/te_commsdebugutility.iby --- a/traceservices/commsdebugutility/group/te_commsdebugutility.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/commsdebugutility/group/te_commsdebugutility.iby Wed Sep 01 12:39:58 2010 +0100 @@ -25,14 +25,14 @@ file=ABI_DIR\DEBUG_DIR\tlog4.dll System\bin\tlog4.dll -data=EPOCROOT##epoc32\data\z\testdata\scripts\te_comsdbg.script testdata\scripts\te_comsdbg.script -data=EPOCROOT##epoc32\data\z\testdata\scripts\te_comsdbg_urel.script testdata\scripts\te_comsdbg_urel.script +data=EPOCROOT##epoc32\data\z\TestData\Scripts\te_comsdbg.script testdata\scripts\te_comsdbg.script +data=EPOCROOT##epoc32\data\z\TestData\Scripts\te_comsdbg_urel.script testdata\scripts\te_comsdbg_urel.script -data=EPOCROOT##epoc32\data\z\testdata\scripts\te_comsdbg_performance.script testdata\scripts\te_comsdbg_performance.script +data=EPOCROOT##epoc32\data\z\TestData\Scripts\te_comsdbg_performance.script testdata\scripts\te_comsdbg_performance.script -data=EPOCROOT##epoc32\data\z\testdata\scripts\te_comsdbg_file.ini testdata\scripts\te_comsdbg_file.ini -data=EPOCROOT##epoc32\data\z\testdata\scripts\te_comsdbg_serial1.ini testdata\scripts\te_comsdbg_serial1.ini -data=EPOCROOT##epoc32\data\z\testdata\scripts\te_comsdbg_serial2.ini testdata\scripts\te_comsdbg_serial2.ini +data=EPOCROOT##epoc32\data\z\TestData\Scripts\te_comsdbg_file.ini testdata\scripts\te_comsdbg_file.ini +data=EPOCROOT##epoc32\data\z\TestData\Scripts\te_comsdbg_serial1.ini testdata\scripts\te_comsdbg_serial1.ini +data=EPOCROOT##epoc32\data\z\TestData\Scripts\te_comsdbg_serial2.ini testdata\scripts\te_comsdbg_serial2.ini #endif //__TE_COMMSDEBUGUTILITY_IBY__ diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/group/bld.inf --- a/traceservices/tracefw/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -// 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: -// TraceFw -// -// - -#include "../ulogger/group/bld.inf" -#include "../utf_trace_api/unit_test/group/bld.inf" -#include "../ost_trace_api/unit_test/group/bld.inf" -#include "../ulogger/unit_test/group/bld.inf" -#include "../integ_test/ulogger/TEF/group/bld.inf" -#include "../integ_test/ost/TEF/group/bld.inf" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/group/bld.inf --- a/traceservices/tracefw/integ_test/ost/TEF/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -13,60 +13,75 @@ // Description: // + + +/** + @file bld.inf + @internalTechnology +*/ + #include "../perfdevicedriver/group/bld.inf" #include "../tracecontroltestplugin/group/bld.inf" PRJ_PLATFORMS DEFAULT +PRJ_EXPORTS + PRJ_TESTEXPORTS //iby's te_ostv2integsuite.iby /epoc32/rom/include/te_ostv2integsuite.iby //scripts -../te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient.script z:/testdata/scripts/te_integ_tracecollectorclient.script -../te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient_disabled.script z:/testdata/scripts/te_integ_tracecollectorclient_disabled.script -../te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient_enabled.script z:/testdata/scripts/te_integ_tracecollectorclient_enabled.script -../te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorsysstart.script z:/testdata/scripts/te_integ_tracecollectorsysstart.script -../te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorconfigfile.script z:/testdata/scripts/te_integ_tracecollectorconfigfile.script -../te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorconfigfile_winscw.script z:/testdata/scripts/te_integ_tracecollectorconfigfile_winscw.script +../te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_integ_tracecollectorclient.script +../te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient_disabled.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_integ_tracecollectorclient_disabled.script +../te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient_enabled.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_integ_tracecollectorclient_enabled.script +../te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorsysstart.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_integ_tracecollectorsysstart.script +../te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorconfigfile.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_integ_tracecollectorconfigfile.script +../te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorconfigfile_winscw.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_integ_tracecollectorconfigfile_winscw.script -../te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity.script z:/testdata/scripts/te_perf_sanity.script -../te_ostv2integsuite_performance/testdata/scripts/te_perf_outputcsvsanity.script z:/testdata/scripts/te_perf_outputcsvsanity.script -../te_ostv2integsuite_performance/testdata/scripts/te_perf_default.script z:/testdata/scripts/te_perf_default.script -../te_ostv2integsuite_performance/testdata/scripts/te_perf_sanityloop.script z:/testdata/scripts/te_perf_sanityloop.script -../te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity_disabled.script z:/testdata/scripts/te_perf_sanity_disabled.script -../te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity_enabled.script z:/testdata/scripts/te_perf_sanity_enabled.script -../te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines.script z:/testdata/scripts/te_perf_guidelines.script -../te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines_disabled.script z:/testdata/scripts/te_perf_guidelines_disabled.script -../te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines_enabled.script z:/testdata/scripts/te_perf_guidelines_enabled.script +../te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_perf_sanity.script +../te_ostv2integsuite_performance/testdata/scripts/te_perf_outputcsvsanity.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_perf_outputcsvsanity.script +../te_ostv2integsuite_performance/testdata/scripts/te_perf_default.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_perf_default.script +../te_ostv2integsuite_performance/testdata/scripts/te_perf_sanityloop.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_perf_sanityloop.script +../te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity_disabled.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_perf_sanity_disabled.script +../te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity_enabled.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_perf_sanity_enabled.script +../te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_perf_guidelines.script +../te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines_disabled.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_perf_guidelines_disabled.script +../te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines_enabled.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_perf_guidelines_enabled.script //configs -../te_ostv2integsuite_functional/testdata/configs/te_integ_tracecollectorconfigfile_winscw.ini z:/testdata/configs/te_integ_tracecollectorconfigfile_winscw.ini -../te_ostv2integsuite_functional/testdata/configs/te_integ_tracecollectorconfigfile.ini z:/testdata/configs/te_integ_tracecollectorconfigfile.ini -../te_ostv2integsuite_functional/testdata/configs/te_integ_tracecollectorsysstart.ini z:/testdata/configs/te_integ_tracecollectorsysstart.ini -../te_ostv2integsuite_functional/testdata/configs/te_integ_tracecollectorclient.ini z:/testdata/configs/te_integ_tracecollectorclient.ini +../te_ostv2integsuite_functional/testdata/configs/te_integ_tracecollectorconfigfile_winscw.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_integ_tracecollectorconfigfile_winscw.ini +../te_ostv2integsuite_functional/testdata/configs/te_integ_tracecollectorconfigfile.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_integ_tracecollectorconfigfile.ini +../te_ostv2integsuite_functional/testdata/configs/te_integ_tracecollectorsysstart.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_integ_tracecollectorsysstart.ini +../te_ostv2integsuite_functional/testdata/configs/te_integ_tracecollectorclient.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_integ_tracecollectorclient.ini -../te_ostv2integsuite_functional/testdata/configs/configfiletracecontrolconfig.ini z:/testdata/configs/configfiletracecontrolconfig.ini -../te_ostv2integsuite_performance/testdata/configs/te_perf_default.ini z:/testdata/configs/te_perf_default.ini -../te_ostv2integsuite_performance/testdata/referencedata/ost_baseline_h4.csv z:/testdata/referencedata/ost_baseline_h4.csv -../te_ostv2integsuite_performance/testdata/referencedata/ost_baseline_h6.csv z:/testdata/referencedata/ost_baseline_h6.csv -../te_ostv2integsuite_performance/testdata/referencedata/ost_baseline_winscw.csv z:/testdata/referencedata/ost_baseline_winscw.csv -../te_ostv2integsuite_performance/testdata/configs/te_perf_gon_con_gmatch_cmatch.ini z:/testdata/configs/te_perf_gon_con_gmatch_cmatch.ini -../te_ostv2integsuite_performance/testdata/configs/te_perf_gon_con_gmatch_cmismatch.ini z:/testdata/configs/te_perf_gon_con_gmatch_cmismatch.ini -../te_ostv2integsuite_performance/testdata/configs/te_perf_gon_con_gmismatch_cmatch.ini z:/testdata/configs/te_perf_gon_con_gmismatch_cmatch.ini -../te_ostv2integsuite_performance/testdata/configs/te_perf_gon_coff_gmatch_cmismatch.ini z:/testdata/configs/te_perf_gon_coff_gmatch_cmismatch.ini -../te_ostv2integsuite_performance/testdata/configs/te_perf_gon_coff_gmismatch_cmatch.ini z:/testdata/configs/te_perf_gon_coff_gmismatch_cmatch.ini -../te_ostv2integsuite_performance/testdata/configs/te_perf_goff_con_gmismatch_cmatch.ini z:/testdata/configs/te_perf_goff_con_gmismatch_cmatch.ini -../te_ostv2integsuite_performance/testdata/configs/te_perf_goff_con_gmatch_cmismatch.ini z:/testdata/configs/te_perf_goff_con_gmatch_cmismatch.ini -../te_ostv2integsuite_performance/testdata/configs/te_perf_goff_coff_gmatch_cmatch.ini z:/testdata/configs/te_perf_goff_coff_gmatch_cmatch.ini -../te_ostv2integsuite_performance/testdata/configs/te_perf_sanity.ini z:/testdata/configs/te_perf_sanity.ini -../te_ostv2integsuite_performance/testdata/configs/te_perf_guidelines.ini z:/testdata/configs/te_perf_guidelines.ini -../te_ostv2integsuite_performance/testdata/configs/te_perf_outputcsvsanity.ini z:/testdata/configs/te_perf_outputcsvsanity.ini +../te_ostv2integsuite_functional/testdata/configs/configfiletracecontrolconfig.ini /epoc32/release/winscw/udeb/z/testdata/configs/configfiletracecontrolconfig.ini +../te_ostv2integsuite_performance/testdata/configs/te_perf_default.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_perf_default.ini +../te_ostv2integsuite_performance/testdata/referencedata/ost_baseline_h4.csv /epoc32/release/winscw/udeb/z/testdata/referencedata/ost_baseline_h4.csv +../te_ostv2integsuite_performance/testdata/referencedata/ost_baseline_h6.csv /epoc32/release/winscw/udeb/z/testdata/referencedata/ost_baseline_h6.csv +../te_ostv2integsuite_performance/testdata/referencedata/ost_baseline_winscw.csv /epoc32/release/winscw/udeb/z/testdata/referencedata/ost_baseline_winscw.csv +../te_ostv2integsuite_performance/testdata/configs/te_perf_gon_con_gmatch_cmatch.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_perf_gon_con_gmatch_cmatch.ini +../te_ostv2integsuite_performance/testdata/configs/te_perf_gon_con_gmatch_cmismatch.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_perf_gon_con_gmatch_cmismatch.ini +../te_ostv2integsuite_performance/testdata/configs/te_perf_gon_con_gmismatch_cmatch.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_perf_gon_con_gmismatch_cmatch.ini +../te_ostv2integsuite_performance/testdata/configs/te_perf_gon_coff_gmatch_cmismatch.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_perf_gon_coff_gmatch_cmismatch.ini +../te_ostv2integsuite_performance/testdata/configs/te_perf_gon_coff_gmismatch_cmatch.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_perf_gon_coff_gmismatch_cmatch.ini +../te_ostv2integsuite_performance/testdata/configs/te_perf_goff_con_gmismatch_cmatch.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_perf_goff_con_gmismatch_cmatch.ini +../te_ostv2integsuite_performance/testdata/configs/te_perf_goff_con_gmatch_cmismatch.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_perf_goff_con_gmatch_cmismatch.ini +../te_ostv2integsuite_performance/testdata/configs/te_perf_goff_coff_gmatch_cmatch.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_perf_goff_coff_gmatch_cmatch.ini +../te_ostv2integsuite_performance/testdata/configs/te_perf_sanity.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_perf_sanity.ini +../te_ostv2integsuite_performance/testdata/configs/te_perf_guidelines.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_perf_guidelines.ini +../te_ostv2integsuite_performance/testdata/configs/te_perf_outputcsvsanity.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_perf_outputcsvsanity.ini + +//export header files for the tcl branch +../te_ostv2integsuite_common/inc/te_dataparameters.h /epoc32/include/tracecontrol_integrationtest/te_dataparameters.h +../te_ostv2integsuite_common/inc/te_ostv2integsuite_defs.h /epoc32/include/tracecontrol_integrationtest/te_ostv2integsuite_defs.h +../../../../common_utils/lightlogger/inc/lightlogger.h /epoc32/include/tracecontrol_integrationtest/lightlogger.h +../../../../common_utils/lightlogger/inc/te_lightlogger.h /epoc32/include/tracecontrol_integrationtest/te_lightlogger.h PRJ_TESTMMPFILES -te_ostv2integsuite_enabled.mmp manual -te_ostv2integsuite_disabled.mmp manual +te_ostv2integsuite_enabled.mmp +te_ostv2integsuite_disabled.mmp //above mmp's and configs/scripts etc will eventually just be below bld.infs when binary split done. //#include "../te_ostv2integsuite_common/group/bld.inf" @@ -75,3 +90,6 @@ //move the folder tracefw/integ_test/ost/TEF/traces/... to tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/traces/... when the binary //split is done for the three test binaries: te_ostv2integsuite_common.dll, te_ostv2integsuite_functional.exe. te_ostv2integsuite_perfromance.exe. //Update all mmp's and bld.infs accordingly + + + diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/group/te_ostv2integsuite.iby --- a/traceservices/tracefw/integ_test/ost/TEF/group/te_ostv2integsuite.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/group/te_ostv2integsuite.iby Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/group/te_ostv2integsuite_disabled.mmp --- a/traceservices/tracefw/integ_test/ost/TEF/group/te_ostv2integsuite_disabled.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/group/te_ostv2integsuite_disabled.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,31 +13,21 @@ // Description: // + + +/** + @file te_ostv2integsuite_disabled.mmp + @internalTechnology +*/ TARGET te_ostv2integsuite_disabled.exe TARGETTYPE exe UID 0x1000007A 0x1028722F -CAPABILITY CommDD NetworkControl LocalServices - -EPOCHEAPSIZE 1048576 4194304 //ask why this epocsize MACRO TE_UPT_TRACE_DISABLED //could remove this and just #ifdef on SYMBIAN_TRACE_ENABLE #include epocprocesspriority high -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../te_ostv2integsuite_common/inc/ -USERINCLUDE ../traces -USERINCLUDE ../te_ostv2integsuite_functional/inc/ -USERINCLUDE ../te_ostv2integsuite_performance/inc/ -USERINCLUDE ../te_ostv2integsuite_performance/inc/timer -USERINCLUDE ../te_ostv2integsuite_performance/inc/sanity -USERINCLUDE ../te_ostv2integsuite_performance/inc/csvoutput -USERINCLUDE ../te_ostv2integsuite_functional/inc/record_content -USERINCLUDE ../perfdevicedriver/inc/ -USERINCLUDE ../../../../common_utils/lightlogger/inc - SOURCEPATH ../te_ostv2integsuite_common/src/ SOURCE te_ostv2integsuite_server.cpp SOURCE te_ostv2integsuite_controller.cpp @@ -48,7 +38,6 @@ SOURCE te_tracecontrolclearconfig.cpp SOURCE te_tracecontrolcmds.cpp SOURCE te_tracecontroldefaultconfig.cpp -SOURCE te_ctor_disabled.cpp SOURCEPATH ../te_ostv2integsuite_functional/src/ SOURCE te_tracecollectorclient.cpp @@ -84,6 +73,7 @@ SOURCE te_perfsanityhelpers.cpp SOURCE te_perfsanitytimer.cpp + SOURCEPATH ../perfdevicedriver/src/ SOURCE te_d32perfdrv.cpp @@ -94,6 +84,24 @@ SOURCEPATH ../te_ostv2integsuite_functional/src/record_content SOURCE te_parser.cpp SOURCE te_tracerecord.cpp + +USERINCLUDE ../te_ostv2integsuite_common/inc/ +USERINCLUDE ../traces +USERINCLUDE ../te_ostv2integsuite_functional/inc/ +USERINCLUDE ../te_ostv2integsuite_performance/inc/ +USERINCLUDE ../te_ostv2integsuite_performance/inc/timer +USERINCLUDE ../te_ostv2integsuite_performance/inc/sanity +USERINCLUDE ../te_ostv2integsuite_performance/inc/csvoutput +USERINCLUDE ../te_ostv2integsuite_functional/inc/record_content +USERINCLUDE ../perfdevicedriver/inc/ +USERINCLUDE ../../../../common_utils/lightlogger/inc + + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/platform + LIBRARY euser.lib LIBRARY testexecuteutils.lib @@ -106,4 +114,9 @@ MACRO __TEST_LIGHTLOGGER_ENABLED MACRO __LIGHTLOGGER_ENABLED + +EPOCHEAPSIZE 1048576 4194304 //ask why this epocsize + +CAPABILITY CommDD NetworkControl LocalServices + SMPSAFE diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/group/te_ostv2integsuite_enabled.mmp --- a/traceservices/tracefw/integ_test/ost/TEF/group/te_ostv2integsuite_enabled.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/group/te_ostv2integsuite_enabled.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,12 +13,15 @@ // Description: // + + +/** + @file te_ostv2integsuite_enabled.mmp + @internalTechnology +*/ TARGET te_ostv2integsuite_enabled.exe TARGETTYPE exe UID 0x1000007A 0x1028722E -CAPABILITY CommDD NetworkControl LocalServices - -EPOCHEAPSIZE 1048576 4194304 //ask why this epocsize #define SYMBIAN_INCLUDE_EXECUTABLE_TRACE #include @@ -30,19 +33,6 @@ epocprocesspriority high -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../te_ostv2integsuite_common/inc/ -USERINCLUDE ../traces -USERINCLUDE ../te_ostv2integsuite_functional/inc/ -USERINCLUDE ../te_ostv2integsuite_performance/inc/ -USERINCLUDE ../te_ostv2integsuite_performance/inc/timer -USERINCLUDE ../te_ostv2integsuite_performance/inc/sanity -USERINCLUDE ../te_ostv2integsuite_performance/inc/csvoutput -USERINCLUDE ../te_ostv2integsuite_functional/inc/record_content -USERINCLUDE ../perfdevicedriver/inc/ -USERINCLUDE ../../../../common_utils/lightlogger/inc - SOURCEPATH ../te_ostv2integsuite_common/src/ SOURCE te_ostv2integsuite_server.cpp SOURCE te_ostv2integsuite_controller.cpp @@ -53,7 +43,7 @@ SOURCE te_tracecontrolclearconfig.cpp SOURCE te_tracecontrolcmds.cpp SOURCE te_tracecontroldefaultconfig.cpp -SOURCE te_ctor.cpp + SOURCEPATH ../te_ostv2integsuite_functional/src/ SOURCE te_tracecollectorclient.cpp @@ -89,6 +79,7 @@ SOURCE te_perfsanityhelpers.cpp SOURCE te_perfsanitytimer.cpp + SOURCEPATH ../perfdevicedriver/src/ SOURCE te_d32perfdrv.cpp @@ -99,6 +90,24 @@ SOURCEPATH ../te_ostv2integsuite_functional/src/record_content SOURCE te_parser.cpp SOURCE te_tracerecord.cpp + +USERINCLUDE ../te_ostv2integsuite_common/inc/ +USERINCLUDE ../traces +USERINCLUDE ../te_ostv2integsuite_functional/inc/ +USERINCLUDE ../te_ostv2integsuite_performance/inc/ +USERINCLUDE ../te_ostv2integsuite_performance/inc/timer +USERINCLUDE ../te_ostv2integsuite_performance/inc/sanity +USERINCLUDE ../te_ostv2integsuite_performance/inc/csvoutput +USERINCLUDE ../te_ostv2integsuite_functional/inc/record_content +USERINCLUDE ../perfdevicedriver/inc/ +USERINCLUDE ../../../../common_utils/lightlogger/inc + + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/platform + LIBRARY euser.lib LIBRARY testexecuteutils.lib @@ -113,4 +122,8 @@ MACRO OST_TRACE_COMPILER_IN_USE +EPOCHEAPSIZE 1048576 4194304 //ask why this epocsize + +CAPABILITY CommDD NetworkControl LocalServices + SMPSAFE diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/lauterbach_perftimer_tester/group/test_timer_temp.mmp --- a/traceservices/tracefw/integ_test/ost/TEF/lauterbach_perftimer_tester/group/test_timer_temp.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/lauterbach_perftimer_tester/group/test_timer_temp.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -15,22 +15,27 @@ // This is the project specification file for test_timer_temp. // + + TARGET test_timer_temp.exe TARGETTYPE exe UID 0 0xE48A1B8A -OS_LAYER_SYSTEMINCLUDE +USERINCLUDE ..\inc +SYSTEMINCLUDE \epoc32\include +SYSTEMINCLUDE \epoc32\include\platform -USERINCLUDE ../inc -USERINCLUDE ../../../performance - -SOURCEPATH ../src +SOURCEPATH ..\src SOURCE test_timer_temp.cpp SOURCEPATH ../../../performance SOURCE te_upttimer.cpp -LIBRARY euser.lib +USERINCLUDE ../../../performance + +LIBRARY euser.lib LIBRARY hal.lib SMPSAFE + + diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/eabi/te_optostdddisabledu.def --- a/traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/eabi/te_optostdddisabledu.def Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -EXPORTS - _Z19CreateLogicalDevicev @ 1 NONAME - _ZTI17DUptUTraceChannel @ 2 NONAME - _ZTI17DUptUTraceFactory @ 3 NONAME - _ZTV17DUptUTraceChannel @ 4 NONAME - _ZTV17DUptUTraceFactory @ 5 NONAME - diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/eabi/te_optostddenabledu.def --- a/traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/eabi/te_optostddenabledu.def Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -EXPORTS - _Z19CreateLogicalDevicev @ 1 NONAME - _ZTI17DUptUTraceChannel @ 2 NONAME - _ZTI17DUptUTraceFactory @ 3 NONAME - _ZTV17DUptUTraceChannel @ 4 NONAME - _ZTV17DUptUTraceFactory @ 5 NONAME - diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/group/bld.inf --- a/traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -16,7 +16,10 @@ PRJ_PLATFORMS DEFAULT - +PRJ_EXPORTS +PRJ_MMPFILES PRJ_TESTMMPFILES -te_perfdrvenabled.mmp manual -te_perfdrvdisabled.mmp manual +te_perfdrvenabled.mmp +te_perfdrvdisabled.mmp + +PRJ_TESTEXPORTS diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/group/te_perfdrvdisabled.mmp --- a/traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/group/te_perfdrvdisabled.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/group/te_perfdrvdisabled.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -25,7 +25,10 @@ VENDORID 0x70000001 capability all -OS_LAYER_SYSTEMINCLUDE +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/kernel + USERINCLUDE ../inc/ USERINCLUDE ../../te_ostv2integsuite_common/inc/ @@ -50,9 +53,13 @@ SOURCE te_stackinfo.s #endif + +EPOCALLOWDLLDATA + start wins win32_headers end SMPSAFE -epocallowdlldata + + diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/group/te_perfdrvenabled.mmp --- a/traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/group/te_perfdrvenabled.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/group/te_perfdrvenabled.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -14,6 +14,7 @@ // e32\drivers\trace\tracek.mmp // + #include #define SYMBIAN_TRACE_EXECUTABLE_INCLUDE @@ -29,7 +30,9 @@ VENDORID 0x70000001 capability all -OS_LAYER_SYSTEMINCLUDE +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/kernel USERINCLUDE ../inc/ USERINCLUDE ../../te_ostv2integsuite_common/inc/ @@ -54,9 +57,12 @@ SOURCE te_stackinfo.s #endif + + +EPOCALLOWDLLDATA + start wins win32_headers end SMPSAFE -epocallowdlldata diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/src/te_drv.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/src/te_drv.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/perfdevicedriver/src/te_drv.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -48,7 +48,7 @@ * and loose our state. So we solve this by running the device driver as * as it's own separate thread in the kernel (DLogicalChannelBase runs a user thread in kernel mode, * DLogicalChannel runs a kernel thread called from a user thread). - * We also solve the long timing issue by making an asynchrounous call by using the DoRequestL call. + * We also solve the long timing issue by making an asynchrounous call by using the DoRequest call. * For this to work we need to create a DfcQ, i.e. a queue of all the incoming calls from the user side. * These then get's run in turn. */ @@ -68,7 +68,7 @@ // Inherited from DLogicalChannel virtual TInt DoCreate(TInt aUnit, const TDesC8* anInfo, const TVersion& aVer); //Make an asynchronous call... - virtual TInt DoRequestL(TInt aReqNo, TRequestStatus* aStatus, TAny* a1, TAny* a2); + virtual TInt DoRequest(TInt aReqNo, TRequestStatus* aStatus, TAny* a1, TAny* a2); void TestUptTraces(const TApiRunConfig& aApiRunConfig, TApiRunResults& aApiRunResults); void TimeUptTraces(const TApiRunConfig& aApiRunConfig, TApiRunResults& aApiRunResults); @@ -80,7 +80,7 @@ TDfcQue* iDfcQ; TKernelTimer iTimer; - //This is used to signal when one of the async calls (to DoRequestL) is finished. + //This is used to signal when one of the async calls (to DoRequest) is finished. TRequestStatus iStatus; }; @@ -164,10 +164,10 @@ message.Complete(KErrNone, ETrue); return; } - if(id < 0 ) //it was a call for DoRequestL() + if(id < 0 ) //it was a call for DoRequest() { TRequestStatus* status = (TRequestStatus*)message.Ptr0(); - DoRequestL(~id, status, message.Ptr1(), message.Ptr2()); + DoRequest(~id, status, message.Ptr1(), message.Ptr2()); message.Complete(KErrNone, ETrue); } else //it was a call for DoControl, we dont implement that now so just fall through @@ -178,7 +178,7 @@ } } -TInt DUptUTraceChannel::DoRequestL(TInt aReqNo, TRequestStatus* aStatus, TAny* a1, TAny* a2) +TInt DUptUTraceChannel::DoRequest(TInt aReqNo, TRequestStatus* aStatus, TAny* a1, TAny* a2) { TInt error = KErrNone; @@ -258,11 +258,11 @@ { TTestTimer timer; if(aReqNo == RUptUTrace::ESanityTestTimer) - results.iPass = timer.TestKernelTimerL(results.iTime); + results.iPass = timer.TestKernelTimer(results.iTime); if(aReqNo == RUptUTrace::ESanityTestLongTimer) - results.iPass = timer.TestKernelLongTimerL(results.iTime); + results.iPass = timer.TestKernelLongTimer(results.iTime); if(aReqNo == RUptUTrace::ESanityUtraceTimer) - results.iPass = timer.TestUTraceKernelTimerL(results.iTime); + results.iPass = timer.TestUTraceKernelTimer(results.iTime); } if(!error) error = Kern::ThreadRawWrite(iClient, a1, (TUint8 *)&results, sizeof(TSanityResults)); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ctor.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ctor.h Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef TE_CTOR -#define TE_CTOR -#include -#include "te_dataparameters.h" - -// dummy/unimportant value, only used for initialisation -_LIT(KTestCtorString, "ABCDE" ); - -class TTestCtor - { -public: - TTestCtor( TUint32 aArg1, TUint32 aArg2 ); - - TTestCtor( TUint32 aArg1 ); - -private: - // define arbitrary data members - TUint32 iNum1; - TUint32 iNum2; - TBuf<10> iStr; - }; - -#endif //TE_CTOR diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_instrumentation_enum.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_instrumentation_enum.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_instrumentation_enum.h Wed Sep 01 12:39:58 2010 +0100 @@ -90,38 +90,36 @@ EOstTraceFunctionEntry0, EOstTraceFunctionEntry1, EOstTraceFunctionEntryExt, - EOstTraceFunctionEntryExtCtorInitList,//40 - EOstTraceFunctionEntryExtCtorNoInitList, - EOstTraceFunctionExit0, + EOstTraceFunctionExit0,//40 EOstTraceFunctionExit1, EOstTraceFunctionExitExt, - EOstTraceEventStart0,//45 + EOstTraceEventStart0, EOstTraceEventStart1, - EOstTraceState0, + EOstTraceState0,//45 EOstTraceState1, EOstTraceEventStop, - EOstTraceData96,//50 + EOstTraceData96, EOstTraceData1000, - EUptIsTraceActive, + EUptIsTraceActive,//50 //kernel side //printf EUptKernelPrintfchar, EUptKernelPrintfTRefByValueTDesC8, - EUptKernelPrintfDesc8_big,//55 + EUptKernelPrintfDesc8_big, EUptKernelPrintfDesc8_huge, //trace - EUptKernelTrace, + EUptKernelTrace,//55 EUptKernelTraceTUint32, EUptKernelTraceTUint32TUint32, - EUptKernelTraceTAnySmallStruct,//60 + EUptKernelTraceTAnySmallStruct, EUptKernelTraceTAnyBigStruct, - EUptKernelTraceTAnyHugeStruct, + EUptKernelTraceTAnyHugeStruct,//60 EUptKernelTraceTemplatedSmallStruct, EUptKernelTraceTemplatedBigStruct, - EUptKernelTraceTemplatedHugeStruct,//65 + EUptKernelTraceTemplatedHugeStruct, EUptKernelIsTraceActive, - EUptKernelTraceDesc8_big, + EUptKernelTraceDesc8_big,//65 EUptKernelTraceDesc8_huge, @@ -134,22 +132,22 @@ * Stackbase: 400 byte */ UPTTraceTest, - UPTKernelTraceTest,//70 + UPTKernelTraceTest, UPTKernelNegativeFunctionalityTest, - UPTKernelMultipleFunctionalityTest, + UPTKernelMultipleFunctionalityTest,//70 //btrace BTraceFiltered4,//equivalent of EUptTrace BTraceFiltered8,// equivalent of EUptTraceTUint32 - BTraceFiltered12,//75 // equivalent of EUptTraceTUint32TUint32 + BTraceFiltered12,// equivalent of EUptTraceTUint32TUint32 BTraceFilteredBig,//equivalent of EUptTraceTemplatedHugeStruct - BTrace0, + BTrace0,//75 BTrace4, BTrace8, - BTrace12,//80 + BTrace12, //baseline UPTBaseline, - UPTKernelBaseline, + UPTKernelBaseline,//80 //foo definitions UPTFooUserTime, diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ostv2integsuite_basewrapper.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ostv2integsuite_basewrapper.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ostv2integsuite_basewrapper.h Wed Sep 01 12:39:58 2010 +0100 @@ -22,10 +22,9 @@ #if (!defined TE_ULOGGER_MCL_STEP_BASE) #define TE_ULOGGER_MCL_STEP_BASE -#include +#include #include #include - #include "te_tracerecord.h" #include "te_dataparameters.h" #include "te_parser.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ostv2integsuite_controller.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ostv2integsuite_controller.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ostv2integsuite_controller.h Wed Sep 01 12:39:58 2010 +0100 @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include class CTe_MCLSuiteController : public CTestBlockController { diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ostv2integsuite_defs.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ostv2integsuite_defs.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ostv2integsuite_defs.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -15,11 +15,11 @@ // + /** @file te_uloggerostv2integsuite_defs.h @internalTechnology */ - #if (!defined TE_ULOGGER_MCL_SUITEDEFS_H) #define TE_ULOGGER_MCL_SUITEDEFS_H @@ -31,8 +31,8 @@ public: ~CClearConfig(); CClearConfig(); - void ClearL(RULogger& loggerSession); - void DefaultL(RULogger& loggerSession); + void Clear(RULogger& loggerSession); + void Default(RULogger& loggerSession); //private: }; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ostv2integsuite_server.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ostv2integsuite_server.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_ostv2integsuite_server.h Wed Sep 01 12:39:58 2010 +0100 @@ -19,7 +19,7 @@ #include #include -#include +#include #include "te_ostv2integsuite_controller.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_tracecontrolclearconfig.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_tracecontrolclearconfig.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_tracecontrolclearconfig.h Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ */ #if (!defined TE_ULOGGERCLEARCONFIGSTEP_H) #define TE_ULOGGERCLEARCONFIGSTEP_H -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_tracecontrolcmds.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_tracecontrolcmds.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_tracecontrolcmds.h Wed Sep 01 12:39:58 2010 +0100 @@ -51,7 +51,7 @@ TInt StopAndDeleteFile(RULogger& aLogger); TInt Stop(RULogger& aLogger); TInt DeleteFile(); - void SetFilterL(CArrayFixFlat* aFilters); + void SetFilter(CArrayFixFlat* aFilters); TInt Test(); private: diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_tracecontroldefaultconfig.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_tracecontroldefaultconfig.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/inc/te_tracecontroldefaultconfig.h Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ */ #if (!defined TE_ULOGGERDEFAULTCONFIGSTEP_H) #define TE_ULOGGERDEFAULTCONFIGSTEP_H -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_ctor.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_ctor.cpp Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Test class generating trace data from contructor with/without initialiser list. -// - -#include "te_ctor.h" -#include "te_ctorTraces.h" - -/** - * Constructor - * - * Trace producing constructor with initialiser list. - * - * Previous versions of the TraceCompiler do not handle initialiser lists correctly. - * For such a TC the following code will not compile. - */ - -TTestCtor::TTestCtor( TUint32 aArg1, TUint32 aArg2 ) -: - iNum1( aArg1 ), - iNum2( aArg2 ), - iStr( KTestCtorString ) - { - OstTraceFunctionEntryExt( CTESTCTOR_INITLIST_TRACE, KData1 ); - } - -/** - * Constructor - * - * Trace producing constructor without initialiser list. - */ - -TTestCtor::TTestCtor( TUint32 aArg1 ) - { - iNum1 = aArg1; - iNum2 = 0; - iStr = KTestCtorString; - - OstTraceFunctionEntryExt( CTESTCTOR_NO_INITLIST_TRACE, KData1 ); - } diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_ctor_disabled.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_ctor_disabled.cpp Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Test class generating trace data from contructor with/without initialiser list. -// used in (logging) disabled mode. -// - -#include "te_ctor.h" -#include "te_ctor_disabledTraces.h" - -TTestCtor::TTestCtor( TUint32 aArg1, TUint32 aArg2 ) -: - iNum1( aArg1 ), - iNum2( aArg2 ), - iStr( KTestCtorString ) - { - OstTraceFunctionEntryExt( CTESTCTOR_INITLIST_TRACE, KData1 ); - } - -TTestCtor::TTestCtor( TUint32 aArg1 ) - { - iNum1 = aArg1; - iNum2 = 0; - iStr = KTestCtorString; - - OstTraceFunctionEntryExt( CTESTCTOR_NO_INITLIST_TRACE, KData1 ); - } diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_instrumentationpoints_disabled.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_instrumentationpoints_disabled.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_instrumentationpoints_disabled.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -32,7 +32,7 @@ #include "te_perfstackinfo.h" #include "te_dataparameters.h" #include "sanity/te_perfsanityhelpers.h" -#include "te_ctor.h" + @@ -661,7 +661,7 @@ { __MARK_INITIAL_STACK(aApiRunConfig.iDoStack, stackbase, before); OstTraceFunctionEntry0( TEST_OSTTraceFunctionalityEntry0 ); - logged = EFalse; + logged = ETrue; __RETURN_STACK_SIZE(aApiRunConfig.iDoStack, stackbase, before, aApiRunResults.iApiStackUsage); } break; @@ -687,26 +687,6 @@ } break; - case EOstTraceFunctionEntryExtCtorInitList: - { - __MARK_INITIAL_STACK(aApiRunConfig.iDoStack, stackbase, before); - TTestCtor testCtorA( 1, 2 ); - logged = EFalse; - __RETURN_STACK_SIZE(aApiRunConfig.iDoStack, stackbase, before, aApiRunResults.iApiStackUsage); - - } - break; - - case EOstTraceFunctionEntryExtCtorNoInitList: - { - __MARK_INITIAL_STACK(aApiRunConfig.iDoStack, stackbase, before); - TTestCtor testCtorB( 3 ); - logged = EFalse; - __RETURN_STACK_SIZE(aApiRunConfig.iDoStack, stackbase, before, aApiRunResults.iApiStackUsage); - - } - break; - case EOstTraceFunctionExit0: { __MARK_INITIAL_STACK(aApiRunConfig.iDoStack, stackbase, before); @@ -770,7 +750,7 @@ { __MARK_INITIAL_STACK(aApiRunConfig.iDoStack, stackbase, before); OstTraceState0( TEST_OSTTRACESTATE0, "Test State Name", "Test State Value" ); - logged = EFalse; + logged = ETrue; __RETURN_STACK_SIZE(aApiRunConfig.iDoStack, stackbase, before, aApiRunResults.iApiStackUsage); } break; @@ -781,7 +761,7 @@ __MARK_INITIAL_STACK(aApiRunConfig.iDoStack, stackbase, before); OstTraceState1( TEST_OSTTRACESTATE1, "Test State Name", "Test State Value", KData1 ); - logged = EFalse; + logged = ETrue; __RETURN_STACK_SIZE(aApiRunConfig.iDoStack, stackbase, before, aApiRunResults.iApiStackUsage); } diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_instrumentationpoints_enabled.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_instrumentationpoints_enabled.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_instrumentationpoints_enabled.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -32,7 +32,7 @@ #include "te_perfstackinfo.h" #include "te_dataparameters.h" #include "sanity/te_perfsanityhelpers.h" -#include "te_ctor.h" + @@ -690,26 +690,6 @@ } break; - case EOstTraceFunctionEntryExtCtorInitList: - { - __MARK_INITIAL_STACK(aApiRunConfig.iDoStack, stackbase, before); - TTestCtor testCtorA( 1, 2 ); - logged = ETrue; - __RETURN_STACK_SIZE(aApiRunConfig.iDoStack, stackbase, before, aApiRunResults.iApiStackUsage); - - } - break; - - case EOstTraceFunctionEntryExtCtorNoInitList: - { - __MARK_INITIAL_STACK(aApiRunConfig.iDoStack, stackbase, before); - TTestCtor testCtorB( 3 ); - logged = ETrue; - __RETURN_STACK_SIZE(aApiRunConfig.iDoStack, stackbase, before, aApiRunResults.iApiStackUsage); - - } - break; - case EOstTraceFunctionExit0: { __MARK_INITIAL_STACK(aApiRunConfig.iDoStack, stackbase, before); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_ostv2integsuite_basewrapper.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_ostv2integsuite_basewrapper.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_ostv2integsuite_basewrapper.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -697,39 +697,13 @@ ASSERT(trace); TTraceConfigsOperator::Init(*trace); TTraceConfigsOperator::SetOptions(*trace, aApi, ETrue, ETrue); - TTraceConfigsOperator::SetHeader(*trace, TRACE_FLOW, KComponentId, EAddThreadIdentification, ENoProgramCounter, (0x8a0005&TRACEIDMASK)>>TRACEIDSHIFT); + TTraceConfigsOperator::SetHeader(*trace, TRACE_FLOW, KComponentId, EAddThreadIdentification, ENoProgramCounter, (0x8a0003&TRACEIDMASK)>>TRACEIDSHIFT); //fix this - should be a list of the function arguments of this method all these traces are insturmented in TTraceConfigsOperator::SetData(*trace, KData1); setThreadId = aHasContext; aTraceObjects.Append(trace); } break; - case EOstTraceFunctionEntryExtCtorInitList: - { - TTraceConfigs* trace = new TTraceConfigs; - ASSERT(trace); - TTraceConfigsOperator::Init(*trace); - TTraceConfigsOperator::SetOptions(*trace, aApi, ETrue, ETrue); - TTraceConfigsOperator::SetHeader(*trace, TRACE_FLOW, KComponentId, EAddThreadIdentification, ENoProgramCounter, (0x8a0001&TRACEIDMASK)>>TRACEIDSHIFT); - //fix this - should be a list of the function arguments of this method all these traces are insturmented in - TTraceConfigsOperator::SetData(*trace,1,2,KData1); - setThreadId = aHasContext; - aTraceObjects.Append(trace); - } - break; - case EOstTraceFunctionEntryExtCtorNoInitList: - { - TTraceConfigs* trace = new TTraceConfigs; - ASSERT(trace); - TTraceConfigsOperator::Init(*trace); - TTraceConfigsOperator::SetOptions(*trace, aApi, ETrue, ETrue); - TTraceConfigsOperator::SetHeader(*trace, TRACE_FLOW, KComponentId, EAddThreadIdentification, ENoProgramCounter, (0x8a0002&TRACEIDMASK)>>TRACEIDSHIFT); - //fix this - should be a list of the function arguments of this method all these traces are insturmented in - TTraceConfigsOperator::SetData(*trace,3, KData1); - setThreadId = aHasContext; - aTraceObjects.Append(trace); - } - break; case EOstTraceFunctionExit0: { TTraceConfigs* trace = new TTraceConfigs; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_ostv2integsuite_defs.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_ostv2integsuite_defs.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_ostv2integsuite_defs.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -36,7 +36,7 @@ /*Constructor*/ } -void CClearConfig::ClearL(RULogger& loggerSession) +void CClearConfig::Clear(RULogger& loggerSession) { loggerSession.Stop();//C.A. previously:loggerSession.StopOutputting(); loggerSession.DeActivateInputPlugin(); @@ -63,9 +63,9 @@ } //NB: currently this method does not set the default values for serial and usb! hanging the server -void CClearConfig::DefaultL(RULogger& loggerSession) +void CClearConfig::Default(RULogger& loggerSession) { - ClearL(loggerSession); + Clear(loggerSession); //Now set default configurations shipped with ulogger CArrayFixFlat *setfilter=new (ELeave)CArrayFixFlat(1);//CA:added so can use old ulogger api setfilter->AppendL(3);//CA:added so can use old ulogger api diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_tracecontrolclearconfig.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_tracecontrolclearconfig.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_tracecontrolclearconfig.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -85,7 +85,7 @@ } } CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); SetBlockResult(EPass); return ETrue; } diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_tracecontrolcmds.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_tracecontrolcmds.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_tracecontrolcmds.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -93,7 +93,7 @@ //clear any configurations stored in the ULogger configuration file CClearConfig configIni; - configIni.ClearL(aLogger); + configIni.Clear(aLogger); //prepare arrays for storing the filter settings to configure ULogger (and push any heap objects on the cleanup stack) CArrayFixFlat *setPrimFilter = new (ELeave)CArrayFixFlat(256); @@ -139,7 +139,7 @@ if(aGroupIdFilterMatch==1) { //if the user specifies that ULogger should have classifiaction filter settings which match the test trace points, then fill the filter arrays with the test trace point identifiers accordingly - SetFilterL(setPrimFilter); + SetFilter(setPrimFilter); } else { @@ -190,7 +190,7 @@ /** This user-side method sets the filter for OSTv2 */ -void CUptULogger::SetFilterL(CArrayFixFlat* aSetPrimFilter) +void CUptULogger::SetFilter(CArrayFixFlat* aSetPrimFilter) { aSetPrimFilter->AppendL(KGroupId); } diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_tracecontroldefaultconfig.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_tracecontroldefaultconfig.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_common/src/te_tracecontroldefaultconfig.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -84,7 +84,7 @@ } } CClearConfig configIni; - configIni.DefaultL(logger); + configIni.Default(logger); SetBlockResult(EPass); return ETrue; } diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_advancedfiltering.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_advancedfiltering.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_advancedfiltering.h Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ */ #if (!defined TE_ULOGGERADPAPITESTSTEP_H) #define TE_ULOGGERADPAPITESTSTEP_H -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include @@ -45,7 +45,7 @@ TBool DoCommandL( const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex); - TVerdict TestGroupIdFilteringL(RULogger& aLogger, const TBool aFilter, const TBool aFiltering); + TVerdict TestGroupIdFiltering(RULogger& aLogger, const TBool aFilter, const TBool aFiltering); private: CTCMAdvancedGroupIDFilteringWrapper(); @@ -62,7 +62,7 @@ TBool DoCommandL( const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex); - TVerdict TestComponentIdFilteringL(RULogger& aLogger, const TBool aFilter, const TBool aFiltering); + TVerdict TestComponentIdFiltering(RULogger& aLogger, const TBool aFilter, const TBool aFiltering); // Please add/modify your class members here: private: diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_buffermode.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_buffermode.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_buffermode.h Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ */ #if (!defined TE_ULOGGERBUFFERMODESTEP_H) #define TE_ULOGGERBUFFERMODESTEP_H -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_buffersizing.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_buffersizing.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_buffersizing.h Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ */ #if (!defined TE_ULOGGERBUFFERSIZINGSTEP_H) #define TE_ULOGGERBUFFERSIZINGSTEP_H -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_configfile.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_configfile.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_configfile.h Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ */ #if (!defined TE_ULOGGERCONFIGFILESTEP_H) #define TE_ULOGGERCONFIGFILESTEP_H -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_filepluginerr.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_filepluginerr.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_filepluginerr.h Wed Sep 01 12:39:58 2010 +0100 @@ -22,7 +22,7 @@ #ifndef __TE_ULOGGERFILEPLUGINTESTERR_H__ #define __TE_ULOGGERFILEPLUGINTESTERR_H__ -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_ostv2tracetestwrapper.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_ostv2tracetestwrapper.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_ostv2tracetestwrapper.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -21,7 +21,7 @@ */ #if (!defined TE_OSTV2TRACETESTWRAPPER_H) #define TE_OSTV2TRACETESTWRAPPER_H -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include @@ -46,7 +46,6 @@ TInt CheckResults(const TDesC& aLogFilename); void TestDuplicatesL(); void TestOstDebugOnlyWrapL(); - void TestOstCompileTimeMacroL(); TInt OpenUlogger(RULogger& aLogger); }; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_tracecollectorclient.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_tracecollectorclient.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_tracecollectorclient.h Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ */ #if (!defined TE_ULOGGERAPITESTSTEP_H) #define TE_ULOGGERAPITESTSTEP_H -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_tracecollectorfile.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_tracecollectorfile.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_tracecollectorfile.h Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ */ #if (!defined __TE_ULOGGERFILEPLUGNSTEP_H__) #define __TE_ULOGGERFILEPLUGNSTEP_H__ -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_tracecollectorserial.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_tracecollectorserial.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/inc/te_tracecollectorserial.h Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ */ #if (!defined TE_ULOGGERSERIALPLUGINSTEP_H) #define TE_ULOGGERSERIALPLUGINSTEP_H -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_advancedfiltering.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_advancedfiltering.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_advancedfiltering.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -108,7 +108,7 @@ } } CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); INFO_PRINTF2(_L("connect err %d"), result); INFO_PRINTF1(_L("Test setting a single primary filter with the filter, rather than an array")); @@ -187,7 +187,7 @@ INFO_PRINTF1(_L(" Testing GroupId filtering enabled/ disabled ")); //reset config file - configIni.ClearL(logger); + configIni.Clear(logger); /***********************************************************/ @@ -195,7 +195,7 @@ /***********************************************************/ INFO_PRINTF1(_L("\n\n Enable test GroupId, enable GroupId filtering.\n Testing error returns and ensuring a trace statement IS carried out ")); - SetBlockResult(TestGroupIdFilteringL(logger, ETrue, ETrue)); + SetBlockResult(TestGroupIdFiltering(logger, ETrue, ETrue)); /***********************************************************/ /***enable GroupId, disable GroupId filtering*/ @@ -204,7 +204,7 @@ if(BlockResult()==EPass) { INFO_PRINTF1(_L("\n\n Enable test GroupId, disable GroupId filtering.\n Testing error returns and ensuring a trace statement IS carried out + lots of kernel traces ")); - SetBlockResult(TestGroupIdFilteringL(logger, ETrue, EFalse)); + SetBlockResult(TestGroupIdFiltering(logger, ETrue, EFalse)); } /***********************************************************/ @@ -214,7 +214,7 @@ if(BlockResult()==EPass) { INFO_PRINTF1(_L("\n\n Disable test GroupId, disable GroupId filtering.\n Testing error returns and ensuring a trace statement IS carried out + lots of kernel traces")); - SetBlockResult(TestGroupIdFilteringL(logger, EFalse, EFalse)); + SetBlockResult(TestGroupIdFiltering(logger, EFalse, EFalse)); } /***********************************************************/ @@ -224,7 +224,7 @@ if(BlockResult()==EPass) { INFO_PRINTF1(_L("\n\n Disable test GroupId, enable GroupId filtering.\n Testing error returns and ensuring a trace statement IS NOT carried out ")); - SetBlockResult(TestGroupIdFilteringL(logger, EFalse, ETrue)); + SetBlockResult(TestGroupIdFiltering(logger, EFalse, ETrue)); } } @@ -249,7 +249,7 @@ // ************** Block end **************** - configIni.ClearL(logger); + configIni.Clear(logger); logger.Close(); CleanupStack::Pop(3); if(getfilter) @@ -263,7 +263,7 @@ } -TVerdict CTCMAdvancedGroupIDFilteringWrapper::TestGroupIdFilteringL(RULogger& aLogger, const TBool aFilter, const TBool aFiltering) +TVerdict CTCMAdvancedGroupIDFilteringWrapper::TestGroupIdFiltering(RULogger& aLogger, const TBool aFilter, const TBool aFiltering) /** * @return - TVerdict code * standard function to test error returns and GroupId filtering @@ -497,7 +497,7 @@ } } CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); result = logger.SetSecondaryFiltersEnabled(setfilterarray,ETrue);//CA previously:Result = logger.EnableModuleUid(setfilter); INFO_PRINTF2(_L("Setting single Secondary filter with filter rather than array has been set with single filter, %d, check log"), setfilter); INFO_PRINTF2(_L("code: %d"), result); @@ -558,7 +558,7 @@ INFO_PRINTF1(_L(" Testing ComponentId filtering enabled/ disabled ")); //reset config file - configIni.ClearL(logger); + configIni.Clear(logger); /***********************************************************/ @@ -566,7 +566,7 @@ /***********************************************************/ INFO_PRINTF1(_L("\n\n Enable test ComponentID, enable ComponentID filtering.\n Testing error returns and ensuring a trace statement IS carried out ")); - SetBlockResult(TestComponentIdFilteringL(logger, ETrue, ETrue)); + SetBlockResult(TestComponentIdFiltering(logger, ETrue, ETrue)); /***********************************************************/ /***enable ComponentId, disable ComponentId filtering*/ @@ -575,7 +575,7 @@ if(BlockResult()==EPass) { INFO_PRINTF1(_L("\n\n Enable test ComponentId, disable ComponentId filtering.\n Testing error returns and ensuring a trace statement IS carried out ")); - SetBlockResult(TestComponentIdFilteringL(logger, ETrue, EFalse)); + SetBlockResult(TestComponentIdFiltering(logger, ETrue, EFalse)); } /***********************************************************/ @@ -585,7 +585,7 @@ if(BlockResult()==EPass) { INFO_PRINTF1(_L("\n\n Disable test ComponentId, disable ComponentId filtering.\n Testing error returns and ensuring a trace statement IS carried out ")); - SetBlockResult(TestComponentIdFilteringL(logger, EFalse, EFalse)); + SetBlockResult(TestComponentIdFiltering(logger, EFalse, EFalse)); } /***********************************************************/ @@ -595,7 +595,7 @@ if(BlockResult()==EPass) { INFO_PRINTF1(_L("\n\n Disable test ComponentId, enable ComponentId filtering.\n Testing error returns and ensuring a trace statement IS NOT carried out ")); - SetBlockResult(TestComponentIdFilteringL(logger, EFalse, ETrue)); + SetBlockResult(TestComponentIdFiltering(logger, EFalse, ETrue)); } } @@ -621,7 +621,7 @@ // ************** Block end **************** - configIni.ClearL(logger); + configIni.Clear(logger); logger.Close(); } return ETrue; @@ -629,7 +629,7 @@ -TVerdict CTCMAdvancedComponentIDFilteringWrapper::TestComponentIdFilteringL(RULogger& aLogger, const TBool aFilter, const TBool aFiltering) +TVerdict CTCMAdvancedComponentIDFilteringWrapper::TestComponentIdFiltering(RULogger& aLogger, const TBool aFilter, const TBool aFiltering) /** * @return - TVerdict code * standard function to test error returns and ComponentId filtering diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_buffermode.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_buffermode.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_buffermode.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -157,7 +157,7 @@ } } CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); logger.SetSecondaryFilteringEnabled(EFalse);//C.A. previously:logger.DisableModuleUidFiltering(); // C.A. previously: /* TBufferMode bufferCircular = ECircular; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_buffersizing.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_buffersizing.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_buffersizing.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -136,7 +136,7 @@ } } CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); logger.SetSecondaryFilteringEnabled(EFalse);//C.A. previously:logger.DisableModuleUidFiltering(); CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(1); setprimfilter->AppendL(KGroupId); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_configfile.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_configfile.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_configfile.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -229,7 +229,7 @@ Result=logger.Connect(); INFO_PRINTF2(_L("connect err %d"), Result); CClearConfig configIni; - configIni.DefaultL(logger); + configIni.Default(logger); /**************First get primary filter*************/ diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_filepluginerr.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_filepluginerr.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_filepluginerr.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -87,7 +87,7 @@ } } CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); _LIT8(KTextmedia,"te_fileplugin"); const TPtrC8 mediaptr(KTextmedia); INFO_PRINTF1(_L("Setting test plugin as active...")); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_ostv2tracetestwrapper.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_ostv2tracetestwrapper.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_ostv2tracetestwrapper.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -34,8 +34,6 @@ _LIT(KTestOstDebugOnlyWrap, "TestOstDebugOnlyWrap"); -_LIT(KTestOstCompileTimeMacro, "TestOstCompileTimeMacro"); - //macro wrapper that works only in _DEBUG mode #ifndef OST_DEBUG_ONLY #ifdef _DEBUG @@ -97,10 +95,6 @@ { TestOstDebugOnlyWrapL(); } - else if (aCommand == KTestOstCompileTimeMacro()) - { - TestOstCompileTimeMacroL(); - } else { ret = EFalse; @@ -150,7 +144,7 @@ User::LeaveIfError(OpenUlogger(logger)); // clear the config file CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); // extract the user ids from the values generated by tracecompiler const TUint8 USER_DEFINED_GID_1 = TEST_OSTTRACEWRAPPER7 >> 16; @@ -269,7 +263,7 @@ void CTOstv2TraceTestWrapper::TestOstDebugOnlyWrapL() { - INFO_PRINTF1(_L("CTOstv2TraceTestWrapper::TestOstDebugOnlyWrap")); + INFO_PRINTF1(_L("CTOstv2TraceTestWrapper::TestDuplicates")); RULogger logger; @@ -277,7 +271,7 @@ User::LeaveIfError(OpenUlogger(logger)); // clear the config file CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); // extract the user ids from the values generated by tracecompiler const TUint8 USER_DEFINED_GID_1w = TEST_OSTTRACEWRAPPER7w >> 16; @@ -394,141 +388,6 @@ } -void CTOstv2TraceTestWrapper::TestOstCompileTimeMacroL() - { - INFO_PRINTF1(_L("CTOstv2TraceTestWrapper::TestOstCompileTimeMacro")); - - RULogger logger; - - - User::LeaveIfError(OpenUlogger(logger)); - // clear the config file - CClearConfig configIni; - configIni.ClearL(logger); - - // switch on primary filtering mechanism - CArrayFixFlat *setprimfilter = - new (ELeave) CArrayFixFlat (22); - setprimfilter->AppendL(KGroupId); - setprimfilter->AppendL(TRACE_NORMAL); - TInt result = logger.SetPrimaryFiltersEnabled(*setprimfilter, ETrue); - - if (result != KErrNone) - { - ERR_PRINTF2(_L("Failed to set Ulogger primary filters result(%d"), result); - SetBlockResult(EFail); - } - - // switch off secondary filtering - result = logger.SetSecondaryFilteringEnabled(EFalse); - if (result != KErrNone) - { - ERR_PRINTF2(_L("Failed to set Ulogger secondary filters result(%d"), result); - SetBlockResult(EFail); - } - - delete setprimfilter; - setprimfilter = NULL; - // setup output file - _LIT(KLogFilename, "C:\\logs\\macro_trace_test.utf"); - EmptyFile(KLogFilename); - // setup ulogger to write to the file using its output plugin - _LIT8(KTextmedia,"uloggerfileplugin"); - TPtrC8 mediaptr(KTextmedia); - result = logger.ActivateOutputPlugin(mediaptr); - if (result == KErrNone) - { - INFO_PRINTF1(_L("file set as active output plugin ok")); - TPluginConfiguration pluginConfig; - _LIT(KTextsetting, "output_path"); - pluginConfig.SetKey(KTextsetting); - pluginConfig.SetValue(KLogFilename()); - result = logger.SetPluginConfigurations(mediaptr, pluginConfig); - if (result == KErrNone) - { - INFO_PRINTF1(_L("output plugin settings set ok")); - - result = logger.Start(); - if (result == KErrNone) - { - // now try some traces with compile time Macros - //OST_TRACE_CATEGORY_DEBUG - #if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_DEBUG) - AddTraceHelper((TGroupId) TRACE_NORMAL, (TTraceId) TEST_OSTTRACEWRAPPER1m, 0); // should be in UDEB only - #endif - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_NORMAL, TEST_OSTTRACEWRAPPER1m, "Foo"); - - #ifdef _DEBUG - AddTraceHelper((TGroupId) TRACE_NORMAL, (TTraceId) TEST_OSTTRACEWRAPPER2m, 0); - #endif - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_NORMAL, TEST_OSTTRACEWRAPPER2m, "Foo"); // should be in UBED only - - - //OST_TRACE_CATEGORY_PRODUCTION - #if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_PRODUCTION) - AddTraceHelper((TGroupId) TRACE_NORMAL, (TTraceId) TEST_OSTTRACEWRAPPER3m, 0); - #endif - OstTraceDef0(OST_TRACE_CATEGORY_PRODUCTION, TRACE_NORMAL, TEST_OSTTRACEWRAPPER3m, "Foo"); // should be in UREL and UDEB - - //OST_TRACE_CATEGORY_RND - #if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_RND) - AddTraceHelper((TGroupId) TRACE_NORMAL, (TTraceId) TEST_OSTTRACEWRAPPER4m, 0); - #endif - OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, TEST_OSTTRACEWRAPPER4m, "Foo"); // should be in UREL and UDEB - - #if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_PERFORMANCE_MEASUREMENT) - AddTraceHelper((TGroupId) TRACE_NORMAL, (TTraceId) TEST_OSTTRACEWRAPPER5m, 0); - #endif - OstTraceDef0(OST_TRACE_CATEGORY_PERFORMANCE_MEASUREMENT, TRACE_NORMAL, TEST_OSTTRACEWRAPPER5m, "Foo"); // should be in neither UREL nor UDEB - - #if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_NONE) - AddTraceHelper((TGroupId) TRACE_NORMAL, (TTraceId) TEST_OSTTRACEWRAPPER6m, 0); - #endif - OstTraceDef0(OST_TRACE_CATEGORY_NONE, TRACE_NORMAL, TEST_OSTTRACEWRAPPER6m, "Foo"); // should be in neither UREL nor UDEB - - #if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_ALL) - AddTraceHelper((TGroupId) TRACE_NORMAL, (TTraceId) TEST_OSTTRACEWRAPPER7m, 0); - #endif - OstTraceDef0(OST_TRACE_CATEGORY_ALL, TRACE_NORMAL, TEST_OSTTRACEWRAPPER7m, "Foo"); // should be in UREL and UDEB - - #if (OST_TRACE_CATEGORY & (OST_TRACE_CATEGORY_PRODUCTION | OST_TRACE_CATEGORY_DEBUG)) - AddTraceHelper((TGroupId) TRACE_NORMAL, (TTraceId) TEST_OSTTRACEWRAPPER8m, 0); - #endif - OstTraceDef0(OST_TRACE_CATEGORY_PRODUCTION | OST_TRACE_CATEGORY_DEBUG, TRACE_NORMAL, TEST_OSTTRACEWRAPPER8m, "Foo"); // should be in UREL and UDEB - - #if (OST_TRACE_CATEGORY & (OST_TRACE_CATEGORY_PRODUCTION)) || defined (_DEBUG) - AddTraceHelper((TGroupId) TRACE_NORMAL, (TTraceId) TEST_OSTTRACEWRAPPER9m, 0); - #endif - OstTraceDef0(OST_TRACE_CATEGORY_PRODUCTION | OST_TRACE_CATEGORY_DEBUG, TRACE_NORMAL, TEST_OSTTRACEWRAPPER9m, "Foo"); // should be in UREL and UDEB - - - result = logger.Stop(); - - if (result == KErrNone) - { - SetBlockResult( - CheckResults(KLogFilename()) == KErrNone - ? EPass - : EFail); - } - } - else - { - INFO_PRINTF2(_L("ulogger start returns error %d"), result); - } - } - else - { - INFO_PRINTF2(_L("setting output plugin settings failed with err %d"), result); - } - } - else - { - INFO_PRINTF2(_L("add file as output plugin failed with err %d"), result); - } - } - - TInt CTOstv2TraceTestWrapper::CheckResults(const TDesC& aLogFilename) { // read the logged traces from the log file diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_tracecollectorclient.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_tracecollectorclient.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_tracecollectorclient.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -103,7 +103,7 @@ } } CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); INFO_PRINTF2(_L("connect err %d"), result); result=logger.SetPrimaryFiltersEnabled(*setfilter,ETrue);//C.A. previously:result=logger.EnableClassifications(*setfilter); @@ -320,7 +320,7 @@ // ************** Block end **************** - configIni.ClearL(logger); + configIni.Clear(logger); logger.Close(); if(setfilter) delete setfilter; @@ -414,7 +414,7 @@ } CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); result = logger.SetSecondaryFiltersEnabled(setfilter,ETrue);//C.A. previously:result = logger.EnableModuleUids(setfilter); INFO_PRINTF2(_L("Secondary filter has been set with single filter, %d, check log"), setfilter[0]); INFO_PRINTF2(_L("code: %d"), result); @@ -600,7 +600,7 @@ } } INFO_PRINTF1(_L("Now call clear config to check removing multiple second filters performance")); - configIni.ClearL(logger); + configIni.Clear(logger); INFO_PRINTF1(_L("after clear config- multiple second filters performance")); if(result==1) @@ -694,7 +694,7 @@ #endif #ifndef SysStartTest CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); #endif CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(22); setprimfilter->AppendL(KGroupId); @@ -993,7 +993,7 @@ { INFO_PRINTF1(_L("Now do some multiple type logging testing.")); //CClearConfig configIni; - //configIni.ClearL(logger); + //configIni.Clear(logger); if(result==0) { @@ -1205,7 +1205,7 @@ multsetprimfilter=NULL; } } - configIni.ClearL(logger); + configIni.Clear(logger); } else INFO_PRINTF1(_L("adding file as output plugin failed")); @@ -1310,7 +1310,7 @@ } } CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(1); setprimfilter->AppendL(KGroupId); RArray setsecondfilter; @@ -1580,7 +1580,7 @@ else SetBlockResult(EFail); INFO_PRINTF1(_L("Multiple logging to file with kernel side tracing has been tested - check output log. It should contain four lines of tracing of type, (sec,prim), (sec+2, prim), (sec, prim+2), (sec+2, prim+2)")); - configIni.ClearL(logger); + configIni.Clear(logger); } if(setprimfilter) { @@ -1668,7 +1668,7 @@ } } CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(1); setprimfilter->AppendL(KGroupId); RArray setsecondfilter; @@ -1885,7 +1885,7 @@ } } - configIni.ClearL(logger); + configIni.Clear(logger); CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(1); setprimfilter->AppendL(KGroupId); RArray setsecondfilter; @@ -1977,7 +1977,7 @@ SetBlockResult(EFail); INFO_PRINTF1(_L("Simple printf logging to file has been tested with kernel side tracing- check output log")); - configIni.ClearL(logger); + configIni.Clear(logger); if(setprimfilter) { diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_tracecollectorfile.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_tracecollectorfile.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_tracecollectorfile.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -92,7 +92,7 @@ } CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); _LIT8(KTextmedia,"uloggerfileplugin"); const TPtrC8 mediaptr(KTextmedia); if(result==0||result==-11) diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_tracecollectorserial.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_tracecollectorserial.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/src/te_tracecollectorserial.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -91,7 +91,7 @@ } } CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(1); setprimfilter->AppendL(KGroupId); RArray setsecondfilter; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName te-integ-tracecollectorclient.script //! @SYMScriptTestEnvironment TEF @@ -48,22 +48,3 @@ -START_TESTCASE DT-DEBUG-TRACE-OSTv2-TraceControlCompileTimeSelector-0001 -//! @SYMTestCaseID DT-DEBUG-TRACE-OSTv2-TraceControlCompileTimeSelector-0001 -//! @SYMTestCaseDesc Test DEBUG only compile time selector using OST_TRACE_CATEGORY_DEBUG -//! @SYMTestPriority Critical -//! @SYMTestActions -//! @SYMTestExpectedResults Verify that the errors returned are as expected -//! @SYMTestType CT -//! @SYMTestStatus Implemented -//! @SYMPREQ PREQ2390 -//! @SYMREQ - -PRINT Run OstTrace with OST_TRACE_CATEGORY_DEBUG compile time Macro -START_TEST_BLOCK 20000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini - CREATE_OBJECT OstTraceTestWrapper OstTraceTestWrapper - COMMAND OstTraceTestWrapper TestOstCompileTimeMacro -END_TEST_BLOCK -END_TESTCASE DT-DEBUG-TRACE-OSTv2-TraceControlCompileTimeSelector-0001 - - diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient_disabled.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient_disabled.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient_disabled.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -14,7 +14,7 @@ // -//! @file +//! @File //! @SYMTestSuiteName te-integ-tracecollectorclient_disabled.script //! @SYMScriptTestEnvironment TEF @@ -31,7 +31,7 @@ //! @SYMTestActions Run a combination of single and multiple group ID filter set() methods and check the contents of the get() methods on server return the filters as expected //! @SYMTestExpectedResults Verify that the values returned by get methods match those expected from settings (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 START_TEST_BLOCK 1000 te_ostv2integsuite_disabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -48,7 +48,7 @@ //! @SYMTestActions Run a combination of single and multiple component ID filter set() methods and check the contents of the get() methods on server return the filters as expected //! @SYMTestExpectedResults Verify that the values returned by get methods match those expected from settings (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 START_TEST_BLOCK 20000 te_ostv2integsuite_disabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -65,7 +65,7 @@ //! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument user-side trace points accordingly for positive, begative and multiple setting tests //! @SYMTestExpectedResults Verify that no returned trace data and no output trace log files accordingly //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 12823 12824 12825 12128 12974 12975 START_TEST_BLOCK 20000 te_ostv2integsuite_disabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -82,7 +82,7 @@ //! @SYMTestActions Run a combination of single and multiple group ID filter and filtering set() methods and check the contents of the get() methods on server return the filters as expected //! @SYMTestExpectedResults Verify that the values returned by get methods match those expected from settings (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 START_TEST_BLOCK 1000 te_ostv2integsuite_disabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -105,7 +105,7 @@ //! @SYMTestActions Run a combination of single and multiple component ID filter and filtering set() methods and check the contents of the get() methods on server return the filters as expected //! @SYMTestExpectedResults Verify that the values returned by get methods match those expected from settings (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 START_TEST_BLOCK 1000 te_ostv2integsuite_disabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -128,7 +128,7 @@ //! @SYMTestActions Run a combination of buffer resizing methods and run over various stress testing trace instrumentations. Check the contents of the output file is as expected //! @SYMTestExpectedResults Verify that output file contains no #traces as expected //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12152 START_TEST_BLOCK 1000 te_ostv2integsuite_disabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -145,7 +145,7 @@ //! @SYMTestActions Run a combination of buffer mode change methods and run over various stress testing trace instrumentations. check the contents of the output file is as expected //! @SYMTestExpectedResults Verify that output file contains no //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12152 START_TEST_BLOCK 1000 te_ostv2integsuite_disabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -163,7 +163,7 @@ //! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument kernel-side trace points accordingly for positive, negative and multiple setting tests //! @SYMTestExpectedResults Verify that no returned trace data and no output trace log files accordingly //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 12823 12824 12825 12128 12974 12975 // START_TEST_BLOCK 1000 te_ostv2integsuite_disabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -180,7 +180,7 @@ //! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument user-side trace printf-style points accordingly for positive, negative and multiple setting tests //! @SYMTestExpectedResults Verify that no returned trace data and no output trace log files accordingly //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 12823 12824 12825 12128 12974 12975 START_TEST_BLOCK 1000 te_ostv2integsuite_disabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -198,7 +198,7 @@ //! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument kernel-side trace printf-style points accordingly for positive, negative and multiple setting tests //! @SYMTestExpectedResults Verify that no returned trace data and no output trace log files accordingly //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 12823 12824 12825 12128 12974 12975 // START_TEST_BLOCK 1000 te_ostv2integsuite_disabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -218,7 +218,7 @@ //! @SYMTestActions Run a combination of plugin configuration methods for the file plugin and log over trace instrumentation //! @SYMTestExpectedResults Verify that the trace data is not output as expected to the file plugin //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12129 12153 START_TEST_BLOCK 1000 te_ostv2integsuite_disabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -235,7 +235,7 @@ //! @SYMTestActions Run a combination of plugin configuration methods for the serial plugin and log over trace instrumentation //! @SYMTestExpectedResults Verify that trace data is not output as expected to the serial plugin //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12129 12153 12147 START_TEST_BLOCK 1000 te_ostv2integsuite_disabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -252,7 +252,7 @@ //! @SYMTestActions Run a combination of plugin configuration methods for the file plugin and test on the return errors //! @SYMTestExpectedResults Verify that the errors returned are as expected //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12129 12153 12147 START_TEST_BLOCK 1000 te_ostv2integsuite_disabled \testdata\configs\te_integ_tracecollectorclient.ini diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient_enabled.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient_enabled.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorclient_enabled.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -14,7 +14,7 @@ // -//! @file +//! @File //! @SYMTestSuiteName te-integ-tracecollectorclient_enabled.script //! @SYMScriptTestEnvironment TEF @@ -31,7 +31,7 @@ //! @SYMTestActions Run a combination of single and multiple group ID filter set() methods and check the contents of the get() methods on server return the filters as expected //! @SYMTestExpectedResults Verify that the values returned by get methods match those expected from settings (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 START_TEST_BLOCK 1000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -48,7 +48,7 @@ //! @SYMTestActions Run a combination of single and multiple component ID filter set() methods and check the contents of the get() methods on server return the filters as expected //! @SYMTestExpectedResults Verify that the values returned by get methods match those expected from settings (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 START_TEST_BLOCK 20000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -65,7 +65,7 @@ //! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument user-side trace points accordingly for positive, negative and multiple setting tests //! @SYMTestExpectedResults Verify that the returned trace data and the output trace log files match the settings in the TraceControl accordingly //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 12823 12824 12825 12128 12974 12975 START_TEST_BLOCK 20000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -82,7 +82,7 @@ //! @SYMTestActions Run a combination of single and multiple group ID filter and filtering set() methods and check the contents of the get() methods on server return the filters as expected //! @SYMTestExpectedResults Verify that the values returned by get methods match those expected from settings (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 START_TEST_BLOCK 1000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -105,7 +105,7 @@ //! @SYMTestActions Run a combination of single and multiple component ID filter and filtering set() methods and check the contents of the get() methods on server return the filters as expected //! @SYMTestExpectedResults Verify that the values returned by get methods match those expected from settings (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 START_TEST_BLOCK 1000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -128,7 +128,7 @@ //! @SYMTestActions Run a combination of buffer resizing methods and run over various stress testing trace instrumentations. check the contents of the output file is as expected //! @SYMTestExpectedResults Verify that output file contains #traces as expected //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12152 START_TEST_BLOCK 1000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -145,7 +145,7 @@ //! @SYMTestActions Run a combination of buffer mode change methods and run over various stress testing trace instrumentations. check the contents of the output file is as expected //! @SYMTestExpectedResults Verify that output file contains a trace pattern as expected from buffer mode type //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12152 START_TEST_BLOCK 1000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -163,7 +163,7 @@ //! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument kernel-side trace points accordingly for positive, negative and multiple setting tests //! @SYMTestExpectedResults Verify that the returned trace data and the output trace log files match the settings in the TraceControl accordingly //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 12823 12824 12825 12128 12974 12975 // START_TEST_BLOCK 1000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -180,7 +180,7 @@ //! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument user-side trace printf-style points accordingly for positive, negative and multiple setting tests //! @SYMTestExpectedResults Verify that the returned trace data and the output trace log files match the settings in the TraceControl accordingly //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 12823 12824 12825 12128 12974 12975 START_TEST_BLOCK 1000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -198,7 +198,7 @@ //! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument kernel-side trace printf-style points accordingly for positive, negative and multiple setting tests //! @SYMTestExpectedResults Verify that the returned trace data and the output trace log files match the settings in the TraceControl accordingly //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12974 12975 12823 12824 12825 12128 12974 12975 // START_TEST_BLOCK 1000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -218,7 +218,7 @@ //! @SYMTestActions Run a combination of plugin configuration methods for the file plugin and log over trace instrumentation //! @SYMTestExpectedResults Verify that the trace data is output as expected to the file plugin //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12129 12153 START_TEST_BLOCK 1000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -235,7 +235,7 @@ //! @SYMTestActions Run a combination of plugin configuration methods for the serial plugin and log over trace instrumentation //! @SYMTestExpectedResults Verify that the trace data is output as expected to the serial plugin //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12129 12153 12147 START_TEST_BLOCK 1000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini @@ -252,7 +252,7 @@ //! @SYMTestActions Run a combination of plugin configuration methods for the file plugin and test on the return errors //! @SYMTestExpectedResults Verify that the errors returned are as expected //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12129 12153 12147 START_TEST_BLOCK 1000 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorclient.ini diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorconfigfile.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorconfigfile.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorconfigfile.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,5 +1,5 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -14,7 +14,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName te_integ_tracecollectorconfigfile.script //! @SYMScriptTestEnvironment TEF @@ -39,7 +39,7 @@ //! @SYMTestActions Compare the settings in the TraceControl server with that specified in the test config file in \testdata\configs\configfiletracecontrolconfig.ini //! @SYMTestExpectedResults Verify that the returned settings match those expected (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12129 START_TEST_BLOCK 100 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorconfigfile.ini @@ -63,7 +63,7 @@ //! @SYMTestActions Having deleted c:\ulogger\uloggerconfig.ini in the public path, now compare the settings in the TraceControl server with that specified by default in the private path //! @SYMTestExpectedResults Verify that the returned settings match those expected (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12129 START_TEST_BLOCK 100 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorconfigfile.ini @@ -88,7 +88,7 @@ //! @SYMTestActions Having reinstated a config file on the public path, now compare the settings in the TraceControl server with that specified in the public path //! @SYMTestExpectedResults Verify that the returned settings match those expected (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12129 START_TEST_BLOCK 100 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorconfigfile.ini diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorconfigfile_winscw.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorconfigfile_winscw.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorconfigfile_winscw.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -14,7 +14,7 @@ // -//! @file +//! @File //! @SYMTestSuiteName te_integ_tracecollectorconfigfile_winscw.script //! @SYMScriptTestEnvironment TEF @@ -36,7 +36,7 @@ //! @SYMTestActions Compare the settings in the TraceControl server with that specified in the test config file in \testdata\configs\configfiletracecontrolconfig.ini //! @SYMTestExpectedResults Verify that the returned settings match those expected (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12129 START_TEST_BLOCK 100 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorconfigfile_winscw.ini @@ -60,7 +60,7 @@ //! @SYMTestActions Having deleted c:\ulogger\uloggerconfig.ini in the public path, now compare the settings in the TraceControl server with that specified by default in the private path //! @SYMTestExpectedResults Verify that the returned settings match those expected (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12129 START_TEST_BLOCK 100 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorconfigfile_winscw.ini @@ -83,7 +83,7 @@ //! @SYMTestActions Having reinstated a config file on the public path, now compare the settings in the TraceControl server with that specified in the public path //! @SYMTestExpectedResults Verify that the returned settings match those expected (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12128 12129 START_TEST_BLOCK 100 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorconfigfile_winscw.ini diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorsysstart.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorsysstart.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_functional/testdata/scripts/te_integ_tracecollectorsysstart.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -14,7 +14,7 @@ // -//! @file +//! @File //! @SYMTestSuiteName te_integ_tracecollectorsysstart.script //! @SYMScriptTestEnvironment TEF @@ -32,7 +32,7 @@ //! @SYMTestActions Compile a rom with uloggersysstart.exe compiled into startup sequence and uncomment #define sysstart in TCMLogging datawrapper. Run test step. //! @SYMTestExpectedResults Verify that the output log contains btrace output from boot sequence as well as trace points enabled in TCMLogging datawrapper //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12825 12976 12978 START_TEST_BLOCK 100 te_ostv2integsuite_enabled \testdata\configs\te_integ_tracecollectorsysstart.ini diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/sanity/te_perfsanitytimer.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/sanity/te_perfsanitytimer.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/sanity/te_perfsanitytimer.h Wed Sep 01 12:39:58 2010 +0100 @@ -43,17 +43,17 @@ }; public: - TBool TestUserTimerL(TUint32& aTestTime); - TBool TestUserLongTimerL(TUint32& aTestTime); - TBool TestKernelTimerL(TUint32& aTestTime); - TBool TestKernelLongTimerL(TUint32& aTestTime); - TBool TestUTraceUserTimerL(TUint32& aTestTime); - TBool TestUTraceKernelTimerL(TUint32& aTestTime); + TBool TestUserTimer(TUint32& aTestTime); + TBool TestUserLongTimer(TUint32& aTestTime); + TBool TestKernelTimer(TUint32& aTestTime); + TBool TestKernelLongTimer(TUint32& aTestTime); + TBool TestUTraceUserTimer(TUint32& aTestTime); + TBool TestUTraceKernelTimer(TUint32& aTestTime); TUint32 Count(){return iCount;} private: TBool VerifyTime(TUint32 aTime); TBool DoTestUTraceTimer(const TInt aApi, TUint32& aTestTime); - TBool DoTestTraceL(const TTestMethodType aMethod, TUint32& aTestTime); + TBool DoTestTrace(const TTestMethodType aMethod, TUint32& aTestTime); private: #ifndef __KERNEL_MODE__ CUptTimer iTimer; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perf.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perf.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perf.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -14,15 +14,14 @@ // + /** @file te_perf.h @internalTechnology */ - #if (!defined TE_ULOGGERMCLPERFSTEP_H) #define TE_ULOGGERMCLPERFSTEP_H - -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include @@ -54,9 +53,9 @@ private: //private run config members + }; - class CTCMPerformanceWrapper : public CTe_MCLSuiteBaseWrapper { public: @@ -70,14 +69,17 @@ private: CTCMPerformanceWrapper(); void ConstructL(); - TVerdict DoApiTestsL(const TTEFSectionName& aSection); - TVerdict DoPluginTestsL(const TInt& aPluginOnly, const TTEFSectionName& aSection); //tried TBool - didn't work for some reason + TVerdict DoApiTests(const TTEFSectionName& aSection); + TVerdict DoPluginTests(const TInt& aPluginOnly, const TTEFSectionName& aSection); //tried TBool - didn't work for some reason TVerdict DoBufferSizeTests();//to be implemented TVerdict DoBufferModeTests();//to be implemented TApiRunConfig iApiRunConfig; CPluginRunConfig* iPluginRunConfig; }; + + + _LIT(KTCMPerformanceWrapper,"TCMPerformance"); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfapicall.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfapicall.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfapicall.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -15,6 +15,7 @@ // + /** @file te_perfapicall.h @internalTechnology @@ -33,6 +34,8 @@ #include "te_apirunconfig.h" + + class CApiCallTest: public CBase { public: @@ -40,9 +43,9 @@ ~CApiCallTest(); //could get rid of this now if you want... TInt DoTestL(const TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult); - TInt CachedTraceTimeL(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult); - TInt NonCachedTraceTimeL(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult); - TInt StackUsageL(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult); + TInt CachedTraceTime(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult); + TInt NonCachedTraceTime(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult); + TInt StackUsage(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult); TInt Test(); private: @@ -56,12 +59,12 @@ //TInt TraceBaselineTime(const TApiRunConfig& aApiRunConfig, TUint64& aBaselineTime, TBool aDoTrace); //TInt TraceTime(const TApiRunConfig& aApiRunConfig, TUint64& aTime, const TUint64& aBaselineTime, TBool aDoTrace); - TInt CachedTraceBaselineTimeL(TApiRunConfig& aApiRunConfig, TInt32& aMinimumExecutionBaselineTime); - TInt CachedTraceTimeL(TApiRunConfig& aApiRunConfig, TInt32& aMinimumExecutionTime, TInt32& aMinimumExecutionBaselineTime); - TInt NonCachedTraceBaselineTimeL(TApiRunConfig& aApiRunConfig, TInt32& aTypicalExecutionBaselineTime); - TInt NonCachedTraceTimeL(TApiRunConfig& aApiRunConfig, TInt32& aTypicalExecutionTime, TInt32& aTypicalExecutionBaselineTime); + TInt CachedTraceBaselineTime(TApiRunConfig& aApiRunConfig, TInt32& aMinimumExecutionBaselineTime); + TInt CachedTraceTime(TApiRunConfig& aApiRunConfig, TInt32& aMinimumExecutionTime, TInt32& aMinimumExecutionBaselineTime); + TInt NonCachedTraceBaselineTime(TApiRunConfig& aApiRunConfig, TInt32& aTypicalExecutionBaselineTime); + TInt NonCachedTraceTime(TApiRunConfig& aApiRunConfig, TInt32& aTypicalExecutionTime, TInt32& aTypicalExecutionBaselineTime); - TInt StackUsageL(TApiRunConfig& aApiRunConfig, TInt& aApiStackUsage); + TInt StackUsage(TApiRunConfig& aApiRunConfig, TInt& aApiStackUsage); TInt HeapUsage(TInt& aApiHeapUsage); TInt DoTheApiCall(); @@ -74,3 +77,5 @@ }; #endif + + diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfcsvgenerator.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfcsvgenerator.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfcsvgenerator.h Wed Sep 01 12:39:58 2010 +0100 @@ -47,15 +47,15 @@ CUptCsvGenerator(); ~CUptCsvGenerator(); - TInt OpenL(const TDesC& aFileName, const TBool& aAppend); + TInt Open(const TDesC& aFileName, const TBool& aAppend); TInt Close(); void WriteL(const RArray& aPerformanceData); void WriteL(const RArray& aPerformanceConfig); void WriteApiNameL(const TInt aApiEnum); - TInt WriteNewLineL(); - TInt WriteHeaderL(const TInt& aTestType); + TInt WriteNewLine(); + TInt WriteHeader(const TInt& aTestType); - TInt TestL(); + TInt Test(); private: //Private helper method for sanity tests TInt FillReferenceBuffer(RBuf8& aBufferName, const TInt& aAppendCount, const RArray& aDataName, const TInt& aData1Count, const RArray& aData2Name, const TInt& aData2Count); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfoutputsanity.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfoutputsanity.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfoutputsanity.h Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ */ #if (!defined TE_OUTPUTSANITYTEST_H) #define TE_OUTPUTSANITYTEST_H -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include @@ -42,9 +42,9 @@ private: COutputCSVSanityWrapper(); void ConstructL(); - TVerdict TestBaselineCsvL(); - TInt ReadCsvFileL(const TDesC& aFilename, RBuf8& aBuffer); - TInt CsvFileSizeL(const TDesC& aFilename, TInt& aSize); + TVerdict TestBaselineCsv(); + TInt ReadCsvFile(const TDesC& aFilename, RBuf8& aBuffer); + TInt CsvFileSize(const TDesC& aFilename, TInt& aSize); }; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfsanity.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfsanity.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfsanity.h Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ */ #if (!defined TE_PERFORMANCESANITYTEST_H) #define TE_PERFORMANCESANITYTEST_H -#include +#include #include "te_ostv2integsuite_basewrapper.h" #include #include @@ -42,8 +42,8 @@ private: CPerformanceSanityWrapper(); void ConstructL(); - TVerdict TestTimerL(); - TBool SanityTestTimedUtraceL(); + TVerdict TestTimer(); + TBool SanityTestTimedUtrace(); }; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perftracetester.h --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perftracetester.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perftracetester.h Wed Sep 01 12:39:58 2010 +0100 @@ -56,13 +56,13 @@ * Makes a trace call to either kernel or user side * and returns the time in the parameter aApiRunConfig.iApiTraceTime */ - TInt TimeTraceCallL(const TApiRunConfig& aApiRunConfig, TApiRunResults& aApiRunResults); + TInt TimeTraceCall(const TApiRunConfig& aApiRunConfig, TApiRunResults& aApiRunResults); /** * Makes a call to user side, returning the time in the * parameter aApiRunConfig.iApiTraceTime */ - TInt TimeUsersideTraceCallsL(const TApiRunConfig& aApiRunConfig, TApiRunResults& aApiRunResults); + TInt TimeUsersideTraceCalls(const TApiRunConfig& aApiRunConfig, TApiRunResults& aApiRunResults); /** */ diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/sanity/te_perfsanitytimer.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/sanity/te_perfsanitytimer.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/sanity/te_perfsanitytimer.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -30,39 +30,39 @@ #endif #include "te_dataparameters.h" -TBool TTestTimer::TestUserTimerL(TUint32& aTestTime) +TBool TTestTimer::TestUserTimer(TUint32& aTestTime) { - return DoTestTraceL(ESanityFoo, aTestTime); + return DoTestTrace(ESanityFoo, aTestTime); } -TBool TTestTimer::TestUserLongTimerL(TUint32& aTestTime) +TBool TTestTimer::TestUserLongTimer(TUint32& aTestTime) { - return DoTestTraceL(ESanityFooLong, aTestTime); + return DoTestTrace(ESanityFooLong, aTestTime); } -TBool TTestTimer::TestKernelTimerL(TUint32& aTestTime) +TBool TTestTimer::TestKernelTimer(TUint32& aTestTime) { - return DoTestTraceL(ESanityFoo, aTestTime); + return DoTestTrace(ESanityFoo, aTestTime); } -TBool TTestTimer::TestKernelLongTimerL(TUint32& aTestTime) +TBool TTestTimer::TestKernelLongTimer(TUint32& aTestTime) { - return DoTestTraceL(ESanityFooLong, aTestTime); + return DoTestTrace(ESanityFooLong, aTestTime); } -TBool TTestTimer::TestUTraceUserTimerL(TUint32& aTestTime) +TBool TTestTimer::TestUTraceUserTimer(TUint32& aTestTime) { - return DoTestTraceL(EUtraceUsr, aTestTime); + return DoTestTrace(EUtraceUsr, aTestTime); } -TBool TTestTimer::TestUTraceKernelTimerL(TUint32& aTestTime) +TBool TTestTimer::TestUTraceKernelTimer(TUint32& aTestTime) { - return DoTestTraceL(EUtraceKrn, aTestTime); + return DoTestTrace(EUtraceKrn, aTestTime); } -TBool TTestTimer::DoTestTraceL(const TTestMethodType aMethod, TUint32& aTestTime) +TBool TTestTimer::DoTestTrace(const TTestMethodType aMethod, TUint32& aTestTime) { aTestTime = 0; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perf.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perf.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perf.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -71,6 +71,7 @@ */ { TRunConfigurer::Init(iApiRunConfig); + iPluginRunConfig = new(ELeave) CPluginRunConfig; } @@ -91,7 +92,6 @@ void CTCMPerformanceWrapper::ConstructL() { - iPluginRunConfig = new(ELeave) CPluginRunConfig; } TAny* CTCMPerformanceWrapper::GetObject() @@ -125,18 +125,18 @@ TInt pluginOnlyTests=0; //run api tests if(doapicalltests) - SetBlockResult(DoApiTestsL(aSection)); + SetBlockResult(DoApiTests(aSection)); if(dooutputplugintests) { pluginOnlyTests=1; - SetBlockResult(DoPluginTestsL(pluginOnlyTests, aSection)); + SetBlockResult(DoPluginTests(pluginOnlyTests, aSection)); } if(dothroughputtests) { pluginOnlyTests=2; - SetBlockResult(DoPluginTestsL(pluginOnlyTests, aSection)); + SetBlockResult(DoPluginTests(pluginOnlyTests, aSection)); } /* @@ -155,7 +155,7 @@ return ETrue; } -TVerdict CTCMPerformanceWrapper::DoApiTestsL(const TTEFSectionName& aSection) +TVerdict CTCMPerformanceWrapper::DoApiTests(const TTEFSectionName& aSection) { //initialize and create test run parameters //*******this is quite ugly and could be tidied up into a new routine so isnt in main test step @@ -327,7 +327,7 @@ } } CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); //put in test over API CALLS testtype=0; @@ -373,22 +373,22 @@ //do the test INFO_PRINTF2(_L("Testing API %d"), iApiRunConfig.iApiId); - error = apitest.CachedTraceTimeL(iApiRunConfig, apitestresult); + error = apitest.CachedTraceTime(iApiRunConfig, apitestresult); if(error) { - INFO_PRINTF2(_L("ERROR: CachedTraceTimeL failed, error %d"), error); + INFO_PRINTF2(_L("ERROR: CachedTraceTime failed, error %d"), error); SetBlockResult(EFail); } - error = apitest.NonCachedTraceTimeL(iApiRunConfig, apitestresult); + error = apitest.NonCachedTraceTime(iApiRunConfig, apitestresult); if(error) { - INFO_PRINTF2(_L("ERROR: NonCachedTraceTimeL failed, error %d"), error); + INFO_PRINTF2(_L("ERROR: NonCachedTraceTime failed, error %d"), error); SetBlockResult(EFail); } - error = apitest.StackUsageL(iApiRunConfig, apitestresult); + error = apitest.StackUsage(iApiRunConfig, apitestresult); if(error) { - INFO_PRINTF2(_L("ERROR: StackUsageL failed, error %d"), error); + INFO_PRINTF2(_L("ERROR: StackUsage failed, error %d"), error); SetBlockResult(EFail); } @@ -437,7 +437,7 @@ } } } - configIni.ClearL(logger); + configIni.Clear(logger); } //put in all the error returns //put in test step result returns @@ -445,7 +445,7 @@ return BlockResult(); } -TVerdict CTCMPerformanceWrapper::DoPluginTestsL(const TInt& aPluginOnly, const TTEFSectionName& aSection) +TVerdict CTCMPerformanceWrapper::DoPluginTests(const TInt& aPluginOnly, const TTEFSectionName& aSection) { //define default plugin configurations _LIT(KDefaultPlugin,"uloggerfileplugin"); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfapicall.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfapicall.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfapicall.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -75,7 +75,7 @@ return error; } -TInt CApiCallTest::CachedTraceTimeL(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult) +TInt CApiCallTest::CachedTraceTime(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult) { TInt error = KErrNotSupported; //create a dummy time variable to be used for the baseline measurement @@ -85,17 +85,17 @@ __TEST_LOG("about to carry out cache trace"); if(aApiRunConfig.iDoMinExecution) { - CachedTraceBaselineTimeL(aApiRunConfig, baselinetime); + CachedTraceBaselineTime(aApiRunConfig, baselinetime); __TEST_LOG("cache baseline"); __TEST_LOGNUM(baselinetime); - error = CachedTraceTimeL(aApiRunConfig, aApiTestResult.iMinimumExecutionTime, baselinetime); + error = CachedTraceTime(aApiRunConfig, aApiTestResult.iMinimumExecutionTime, baselinetime); __TEST_LOG("cache"); __TEST_LOGNUM(aApiTestResult.iMinimumExecutionTime); } return error; } -TInt CApiCallTest::NonCachedTraceTimeL(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult) +TInt CApiCallTest::NonCachedTraceTime(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult) { TInt error = KErrNotSupported; //create a dummy time variable to be used for the baseline measurement @@ -103,20 +103,20 @@ __TEST_LOG("about to carry out non cache trace"); if(aApiRunConfig.iDoTypicalExecution) { - NonCachedTraceBaselineTimeL(aApiRunConfig, baselinetime); + NonCachedTraceBaselineTime(aApiRunConfig, baselinetime); __TEST_LOG("noncache baseline"); __TEST_LOGNUM(baselinetime); - error = NonCachedTraceTimeL(aApiRunConfig, aApiTestResult.iTypicalExecutionTime, baselinetime); + error = NonCachedTraceTime(aApiRunConfig, aApiTestResult.iTypicalExecutionTime, baselinetime); __TEST_LOG("noncache"); __TEST_LOGNUM(aApiTestResult.iTypicalExecutionTime); } return error; } -TInt CApiCallTest::StackUsageL(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult) +TInt CApiCallTest::StackUsage(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult) { __TEST_LOG("about to carry out stack usage trace"); - TInt error = StackUsageL(aApiRunConfig, aApiTestResult.iRunResults.iApiStackUsage); + TInt error = StackUsage(aApiRunConfig, aApiTestResult.iRunResults.iApiStackUsage); if(aApiTestResult.iRunResults.iApiStackUsage == KErrNotSupported && !error) error = KErrNotSupported; return error; @@ -141,7 +141,7 @@ @param aMinimumExecutionBaselineTime is the minimum execution baseline time taken for the commented API call, calculated in nanoseconds @return KErrNone if command was prepared correctly and a system wide error code otherwise. */ -TInt CApiCallTest::CachedTraceBaselineTimeL(TApiRunConfig& aApiRunConfig, TInt32& aMinimumExecutionBaselineTime) +TInt CApiCallTest::CachedTraceBaselineTime(TApiRunConfig& aApiRunConfig, TInt32& aMinimumExecutionBaselineTime) { //****NB: update this routine to something more maintainable TUptTraceTester timer; @@ -171,7 +171,7 @@ @param aMinimumExecutionBaselineTime is the minimum execution baseline time taken for commented API call, calculated in nanoseconds @return KErrNone if command was prepared correctly and a system wide error code otherwise. */ -TInt CApiCallTest::CachedTraceTimeL(TApiRunConfig& aApiRunConfig, TInt32& aMinimumExecutionTime, TInt32& aMinimumExecutionBaselineTime) +TInt CApiCallTest::CachedTraceTime(TApiRunConfig& aApiRunConfig, TInt32& aMinimumExecutionTime, TInt32& aMinimumExecutionBaselineTime) { //NB!!! any changes to this routine and you have to update the baseline calculation as well TUptTraceTester timer; @@ -194,7 +194,7 @@ @param aTypicalExecutionBaselineTime is the typical execution baseline time taken for the API call, calculated in nanoseconds @return KErrNone if command was prepared correctly and a system wide error code otherwise. */ -TInt CApiCallTest::NonCachedTraceBaselineTimeL(TApiRunConfig& aApiRunConfig, TInt32& aTypicalExecutionBaselineTime) +TInt CApiCallTest::NonCachedTraceBaselineTime(TApiRunConfig& aApiRunConfig, TInt32& aTypicalExecutionBaselineTime) { //****NB: update this routine to something more maintainable TUptTraceTester timer; @@ -223,7 +223,7 @@ @param aTypicalExecutionTime is the typical execution time taken for the API call, calculated in nanoseconds @return KErrNone if command was prepared correctly and a system wide error code otherwise. */ -TInt CApiCallTest::NonCachedTraceTimeL(TApiRunConfig& aApiRunConfig, TInt32& aTypicalExecutionTime, TInt32& aTypicalExecutionBaselineTime) +TInt CApiCallTest::NonCachedTraceTime(TApiRunConfig& aApiRunConfig, TInt32& aTypicalExecutionTime, TInt32& aTypicalExecutionBaselineTime) { TUptTraceTester timer; @@ -259,7 +259,7 @@ * * @return KErrNone if command was prepared correctly and a system wide error code otherwise. */ -TInt CApiCallTest::StackUsageL(TApiRunConfig& aApiRunConfig, TInt& aApiStackUsage) +TInt CApiCallTest::StackUsage(TApiRunConfig& aApiRunConfig, TInt& aApiStackUsage) { /* PSEUDOCODE @@ -311,7 +311,7 @@ return err; } -/** This sanity test method is executed in Test() to verify that UPT StackUsageL() method in +/** This sanity test method is executed in Test() to verify that UPT StackUsage() method in this class are stable before any of the stack size performance tests are carried out @return KErrNone if command was prepared correctly and system wide error code otherwise. */ diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfcsvgenerator.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfcsvgenerator.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfcsvgenerator.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -48,7 +48,7 @@ ETrue=Append, EFalse=Overwrite @return KErrNone if command was prepared correctly and a system wide error code otherwise. */ -TInt CUptCsvGenerator::OpenL(const TDesC& aFileName, const TBool& aAppend) +TInt CUptCsvGenerator::Open(const TDesC& aFileName, const TBool& aAppend) { iCsvFileSession.Connect(); @@ -89,7 +89,7 @@ appends a newline character. @return KErrNone if command was prepared correctly and a system wide error code otherwise. */ -TInt CUptCsvGenerator::WriteNewLineL() +TInt CUptCsvGenerator::WriteNewLine() { TInt filesize; @@ -211,7 +211,7 @@ @param aTestType is the enum identifier for the test in question @return KErrNone if command was prepared correctly and a system wide error code otherwise. */ -TInt CUptCsvGenerator::WriteHeaderL(const TInt& aTestType) +TInt CUptCsvGenerator::WriteHeader(const TInt& aTestType) { RBuf8 buf; CleanupClosePushL(buf); @@ -294,7 +294,7 @@ @return KErrNone if command was prepared correctly and system wide error code otherwise. */ -TInt CUptCsvGenerator::TestL() +TInt CUptCsvGenerator::Test() { //define filepaths for the test csv files according to the test platform. #ifdef __WINSCW__ @@ -338,11 +338,11 @@ TInt appendcount=3; for(TInt i=0; i!=appendcount;i++) { - OpenL(KTestFileAppend, ETrue); + Open(KTestFileAppend, ETrue); WriteL(atestdata1); - WriteNewLineL(); + WriteNewLine(); WriteL(atestdata2); - WriteNewLineL(); + WriteNewLine(); Close(); } @@ -352,11 +352,11 @@ // 0, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 11000 for(TInt i=0; i!=appendcount;i++) { - OpenL(KTestFileOverwrite, EFalse); + Open(KTestFileOverwrite, EFalse); WriteL(atestdata1); - WriteNewLineL(); + WriteNewLine(); WriteL(atestdata2); - WriteNewLineL(); + WriteNewLine(); Close(); } diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfoutputsanity.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfoutputsanity.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfoutputsanity.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -71,7 +71,7 @@ if(BlockResult()==EPass) { - SetBlockResult(TestBaselineCsvL()); + SetBlockResult(TestBaselineCsv()); } return ETrue; @@ -79,7 +79,7 @@ -TVerdict COutputCSVSanityWrapper::TestBaselineCsvL() +TVerdict COutputCSVSanityWrapper::TestBaselineCsv() { //read a sanity test file @@ -91,14 +91,14 @@ TInt size = 0; //get the size of the reference file #ifdef __WINSCW__ - TInt error = CsvFileSizeL(KReferenceWinscwCsvFile, size); + TInt error = CsvFileSize(KReferenceWinscwCsvFile, size); #else - TInt error = CsvFileSizeL(KReferenceCsvFile, size); + TInt error = CsvFileSize(KReferenceCsvFile, size); #endif if(error) { SetBlockResult(EFail); - INFO_PRINTF2(_L("TestBaselineCsvL, KReferenceCsvFile, test failed on with error code %d"), error); + INFO_PRINTF2(_L("TestBaselineCsv, KReferenceCsvFile, test failed on with error code %d"), error); } //Set the size of the RBuf csvReference.Create(size); @@ -106,32 +106,32 @@ //Create csvGenerated CCsvReader csvGenerated; //get the size of the generated file - error = CsvFileSizeL(KApiCSVFile, size); + error = CsvFileSize(KApiCSVFile, size); if(error) { SetBlockResult(EFail); - INFO_PRINTF2(_L("TestBaselineCsvL, KApiCSVFile, test failed on with error code %d"), error); + INFO_PRINTF2(_L("TestBaselineCsv, KApiCSVFile, test failed on with error code %d"), error); } //create the RBuf csvGenerated.Create(size); //Read the reference file into the RBuf #ifdef __WINSCW__ - error = ReadCsvFileL(KReferenceWinscwCsvFile, csvReference.Buffer()); + error = ReadCsvFile(KReferenceWinscwCsvFile, csvReference.Buffer()); #else - error = ReadCsvFileL(KReferenceCsvFile, csvReference.Buffer()); + error = ReadCsvFile(KReferenceCsvFile, csvReference.Buffer()); #endif if(error) { SetBlockResult(EFail); - INFO_PRINTF2(_L("TestBaselineCsvL, ReadCsvFileL(KReferenceCsvFile) failed on with error code %d"), error); + INFO_PRINTF2(_L("TestBaselineCsv, ReadCsvFile(KReferenceCsvFile) failed on with error code %d"), error); } //Read the generated file into the RBuf - error = ReadCsvFileL(KApiCSVFile, csvGenerated.Buffer()); + error = ReadCsvFile(KApiCSVFile, csvGenerated.Buffer()); if(error) { SetBlockResult(EFail); - INFO_PRINTF2(_L("TestBaselineCsvL, ReadCsvFileL(KApiCSVFile) failed on with error code %d"), error); + INFO_PRINTF2(_L("TestBaselineCsv, ReadCsvFile(KApiCSVFile) failed on with error code %d"), error); } //compare the two files @@ -164,7 +164,7 @@ } -TInt COutputCSVSanityWrapper::CsvFileSizeL(const TDesC& aFilename, TInt& aSize) +TInt COutputCSVSanityWrapper::CsvFileSize(const TDesC& aFilename, TInt& aSize) { RFs fsSession; CleanupClosePushL(fsSession); @@ -189,7 +189,7 @@ * The caller of the method owns the buffer * Ie. this method allocates the buffer but the caller is responsible for destroying it. */ -TInt COutputCSVSanityWrapper::ReadCsvFileL(const TDesC& aFilename, RBuf8& aBuffer) +TInt COutputCSVSanityWrapper::ReadCsvFile(const TDesC& aFilename, RBuf8& aBuffer) { RFs fsSession; CleanupClosePushL(fsSession); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfplugin.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfplugin.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfplugin.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -73,7 +73,7 @@ CPluginTests::CPluginTests() { /*Constructor*/ - + iPluginTestResult = new(ELeave) CPluginTestResult; __CREATE_LOG(false); } @@ -102,10 +102,7 @@ //const COutputPluginTestResult* COutputPluginTests::DoTestL(const TPtrC8& aPluginName, const TPluginConfiguration& aPluginSetting, const TInt& aTestDataSize, const TInt& aTestIteration) { //TTraceTester tracecall; - if (iPluginTestResult == NULL) - { - iPluginTestResult = new(ELeave) CPluginTestResult; - } + TInt numberOfTraces=aPluginRunConfig.iDataSize/16; //update magic number to a size of (trace)/bytes //do a baseline to remove loop effects for throughput tests????? diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfresultscollector.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfresultscollector.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfresultscollector.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -85,10 +85,10 @@ //create a csvgenerator class CUptCsvGenerator csvgenerator; - csvgenerator.OpenL(aFileName,aAppend); + csvgenerator.Open(aFileName,aAppend); //call writeheader to write the relevent test column header for the csv file, - csvgenerator.WriteHeaderL(aTestType); + csvgenerator.WriteHeader(aTestType); if(aTestType==0) { @@ -125,7 +125,7 @@ // __TEST_LOGNUM(iApiTest.Count()); //call write newline to write a new line in preparation for the next test object - csvgenerator.WriteNewLineL(); + csvgenerator.WriteNewLine(); //clear out the RArray object in preparation for the next test result object testdataarray.Reset(); @@ -161,7 +161,7 @@ //call write newline to write a new line in preparation for the next test object - csvgenerator.WriteNewLineL(); + csvgenerator.WriteNewLine(); //clear out the RArray objects in preparation for the next test result object initialpluginarray.Reset(); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfsanity.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfsanity.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perfsanity.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -102,7 +102,7 @@ if(BlockResult()==EPass) { - SetBlockResult(TestTimerL()); + SetBlockResult(TestTimer()); } //run this no matter if its failed or not..., just to get some statistics out. @@ -110,14 +110,14 @@ //temporarily tagged out this test as it is causing a test timeout //can be reinstated as soon as the device driver has been fully implemented - //SanityTestTimedUtraceL(); + //SanityTestTimedUtrace(); return ETrue; } -TVerdict CPerformanceSanityWrapper::TestTimerL() +TVerdict CPerformanceSanityWrapper::TestTimer() { INFO_PRINTF1(_L("Testing User side timer functions")); TBool passed = EFalse; @@ -128,7 +128,7 @@ //test CUptTimer class TTestTimer timer; TUint32 userTime = 0; - passed = timer.TestUserTimerL(userTime); + passed = timer.TestUserTimer(userTime); INFO_PRINTF1(_L("Testing User side timer functions #2")); if(!passed) @@ -186,16 +186,16 @@ return BlockResult(); } -TBool CPerformanceSanityWrapper::SanityTestTimedUtraceL() +TBool CPerformanceSanityWrapper::SanityTestTimedUtrace() { TTestTimer timer; TUint32 userSanityTime = 0; TUint32 userSanityLongTime = 0; TUint32 userUtraceTime = 0; - timer.TestUserTimerL(userSanityTime); - timer.TestUserLongTimerL(userSanityLongTime); - timer.TestUTraceUserTimerL(userUtraceTime); + timer.TestUserTimer(userSanityTime); + timer.TestUserLongTimer(userSanityLongTime); + timer.TestUTraceUserTimer(userUtraceTime); TUint32 kernelSanityTime = 0; // TUint32 kernelSanityLongTime = 0; @@ -226,8 +226,8 @@ //I want to find out what the variation is, is it static 0.5us, or is it 10% variable, or what? for(TInt i = 0; i < iters; i++) { - timer.TestUserTimerL(user[i]); - timer.TestUserLongTimerL(ulong[i]); + timer.TestUserTimer(user[i]); + timer.TestUserLongTimer(ulong[i]); utracedriver.SanityTestTimer(kernel[i]); //utracedriver.SanityTestLongTimer(klong[i]); } diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perftracetester.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perftracetester.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/src/te_perftracetester.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -66,7 +66,7 @@ TUint32 callResults[KNumberOfTraceCallIterations]; for(TInt i = 0; i < KNumberOfTraceCallIterations; i++) { - error = TimeTraceCallL(aApiRunConfig, aApiRunResults); + error = TimeTraceCall(aApiRunConfig, aApiRunResults); callResults[i] = aApiRunResults.iApiTraceTime; } TUint32 total = 0; @@ -76,7 +76,7 @@ return error; } -TInt TUptTraceTester::TimeTraceCallL(const TApiRunConfig& aApiRunConfig, TApiRunResults& aApiRunResults) +TInt TUptTraceTester::TimeTraceCall(const TApiRunConfig& aApiRunConfig, TApiRunResults& aApiRunResults) { TInt error = KErrNone; if(TUptTraceCalls::IsKernelTrace(aApiRunConfig.iApiId)) @@ -91,13 +91,13 @@ } else { - error = TimeUsersideTraceCallsL(aApiRunConfig, aApiRunResults); + error = TimeUsersideTraceCalls(aApiRunConfig, aApiRunResults); } return error; } -TInt TUptTraceTester::TimeUsersideTraceCallsL(const TApiRunConfig& aApiRunConfig, TApiRunResults& aApiRunResults) //pass the configuration here +TInt TUptTraceTester::TimeUsersideTraceCalls(const TApiRunConfig& aApiRunConfig, TApiRunResults& aApiRunResults) //pass the configuration here { aApiRunResults.iTimeCount = 0; CUptTimer timer; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_default.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_default.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_default.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName te_perf_default.script //! @SYMScriptTestEnvironment TEF diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName te_perf_guidelines.script //! @SYMScriptTestEnvironment TEF diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines_disabled.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines_disabled.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines_disabled.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName te_perf_guidelines_disabled.script //! @SYMScriptTestEnvironment TEF @@ -38,7 +38,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled out, GroupID filtering on, Component ID Filtering on, GroupID filter matches trace point, Component ID filter matches trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes.. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_disabled \testdata\configs\te_perf_gon_con_gmatch_cmatch.ini @@ -63,7 +63,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled out, GroupID filtering on, Component ID Filtering on, GroupID filter matches trace point, Component ID filter doesn't match trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_disabled \testdata\configs\te_perf_gon_con_gmatch_cmismatch.ini @@ -88,7 +88,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled out, GroupID filtering on, Component ID Filtering on, GroupID filter doesn't match trace point, Component ID filter matches trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_disabled \testdata\configs\te_perf_gon_con_gmismatch_cmatch.ini @@ -113,7 +113,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled out, GroupID filtering on, Component ID Filtering off, GroupID filter matches trace point, Component ID filter doesn't match trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_disabled \testdata\configs\te_perf_gon_coff_gmatch_cmismatch.ini @@ -138,7 +138,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled out, GroupID filtering on, Component ID Filtering off, GroupID filter doesn't match trace point, Component ID filter matches trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_disabled \testdata\configs\te_perf_gon_coff_gmismatch_cmatch.ini @@ -163,7 +163,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled out, GroupID filtering off, Component ID Filtering on, GroupID filter doesn't match trace point, Component ID filter matches trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_disabled \testdata\configs\te_perf_goff_con_gmismatch_cmatch.ini @@ -188,7 +188,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled out, GroupID filtering off, Component ID Filtering on, GroupID filter matches trace point, Component ID filter doesn't match trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_disabled \testdata\configs\te_perf_goff_con_gmatch_cmismatch.ini @@ -213,7 +213,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled out, GroupID filtering off, Component ID Filtering off, GroupID filter matches trace point, Component ID filter doesn't match trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_disabled \testdata\configs\te_perf_goff_coff_gmatch_cmatch.ini diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines_enabled.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines_enabled.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_guidelines_enabled.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName te_perf_guidelines_enabled.script //! @SYMScriptTestEnvironment TEF @@ -38,7 +38,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled in, GroupID filtering on, Component ID Filtering on, GroupID filter matches trace point, Component ID filter matches trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes.. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_enabled \testdata\configs\te_perf_gon_con_gmatch_cmatch.ini @@ -63,7 +63,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled in, GroupID filtering on, Component ID Filtering on, GroupID filter matches trace point, Component ID filter doesn't match trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_enabled \testdata\configs\te_perf_gon_con_gmatch_cmismatch.ini @@ -88,7 +88,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled in, GroupID filtering on, Component ID Filtering on, GroupID filter doesn't match trace point, Component ID filter matches trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_enabled \testdata\configs\te_perf_gon_con_gmismatch_cmatch.ini @@ -113,7 +113,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled in, GroupID filtering on, Component ID Filtering off, GroupID filter matches trace point, Component ID filter doesn't match trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_enabled \testdata\configs\te_perf_gon_coff_gmatch_cmismatch.ini @@ -138,7 +138,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled in, GroupID filtering on, Component ID Filtering off, GroupID filter doesn't match trace point, Component ID filter matches trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_enabled \testdata\configs\te_perf_gon_coff_gmismatch_cmatch.ini @@ -163,7 +163,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled in, GroupID filtering off, Component ID Filtering on, GroupID filter doesn't match trace point, Component ID filter matches trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_enabled \testdata\configs\te_perf_goff_con_gmismatch_cmatch.ini @@ -188,7 +188,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled in, GroupID filtering off, Component ID Filtering on, GroupID filter matches trace point, Component ID filter doesn't match trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_enabled \testdata\configs\te_perf_goff_con_gmatch_cmismatch.ini @@ -213,7 +213,7 @@ //! @SYMTestActions Calculate the typical and minimum times taken for trace APIs (compiled in, GroupID filtering off, Component ID Filtering off, GroupID filter matches trace point, Component ID filter doesn't match trace point) and run configs specified in the te_perf_default.ini config file. Output to te_apitestresults.csv along with its stack usage. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs, other than expected by source code changes. //! @SYMTestType ST -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 10000 te_ostv2integsuite_enabled \testdata\configs\te_perf_goff_coff_gmatch_cmatch.ini diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_outputcsvsanity.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_outputcsvsanity.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_outputcsvsanity.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName te_perf_outputcsvsanity.script //! @SYMScriptTestEnvironment TEF @@ -35,7 +35,7 @@ //! @SYMTestActions Compares a baseline.csv file included in the reference subfolder of the integration tests with that output from a default performance test ru n and return a fail if any of the column elements>10% from that expected. All elements compared and reported back with associated discrepancy //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs. //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 100 te_ostv2integsuite_enabled \testdata\configs\te_perf_outputcsvsanity.ini diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName te_perf_sanity.script //! @SYMScriptTestEnvironment TEF @@ -29,7 +29,7 @@ //! @SYMTestActions Compares lauterbach measured time for foo() with that generated in the returns a fail it is>10% from that expected. //! @SYMTestExpectedResults Verify that there has not been any significant change in the timer resolution figures from hardware measurement. //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12122 12761 START_TEST_BLOCK 100 te_ostv2integsuite_enabled \testdata\configs\te_perf_sanity.ini diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity_disabled.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity_disabled.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity_disabled.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName te_perf_sanity_disabled.script //! @SYMScriptTestEnvironment TEF diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity_enabled.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity_enabled.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_sanity_enabled.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName te_perf_sanity_enabled.script //! @SYMScriptTestEnvironment TEF diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_sanityloop.script --- a/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_sanityloop.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/testdata/scripts/te_perf_sanityloop.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName te_perf_sanityloop.script //! @SYMScriptTestEnvironment TEF diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/tracecontroltestplugin/group/bld.inf --- a/traceservices/tracefw/integ_test/ost/TEF/tracecontroltestplugin/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/tracecontroltestplugin/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -13,11 +13,18 @@ // Description: // +/** + @file bld.inf + @internalTechnology +*/ PRJ_PLATFORMS DEFAULT +PRJ_EXPORTS + PRJ_TESTEXPORTS -te_tracecontrol_testplugin.iby /epoc32/rom/include/te_tracecontrol_testplugin.iby +//iby's +te_tracecontrol_testplugin.iby /epoc32/rom/include/te_tracecontrol_testplugin.iby PRJ_TESTMMPFILES -te_tracecontrol_testplugin.mmp manual +te_tracecontrol_testplugin.mmp diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/tracecontroltestplugin/group/te_tracecontrol_testplugin.mmp --- a/traceservices/tracefw/integ_test/ost/TEF/tracecontroltestplugin/group/te_tracecontrol_testplugin.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/tracecontroltestplugin/group/te_tracecontrol_testplugin.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -14,16 +14,20 @@ // Te_tracecontrol_FilePlugin.dll ULogger & Framework File Test plug-in // + + +/** + @file te_tracecontroltestplugin.mmp + @internalTechnology +*/ + TARGET te_tracecontrol_testplugin.dll TARGETTYPE PLUGIN UID 0x10009D8D 0x10287231 VENDORID 0x70000001 + CAPABILITY CommDD NetworkControl LocalServices ProtServ NetworkServices -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc/ - SOURCEPATH ../src/ SOURCE te_tracecontroltestplugin.cpp @@ -32,10 +36,12 @@ TARGET te_tracecontrol_testplugin.rsc end -LIBRARY euser.lib -LIBRARY efsrv.lib -LIBRARY c32.lib -LIBRARY ecom.lib + +USERINCLUDE ../inc/ +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/platform + +LIBRARY euser.lib efsrv.lib c32.lib ecom.lib SMPSAFE -epocallowdlldata diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/tracecontroltestplugin/resource/10287231.rss --- a/traceservices/tracefw/integ_test/ost/TEF/tracecontroltestplugin/resource/10287231.rss Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/tracecontroltestplugin/resource/10287231.rss Wed Sep 01 12:39:58 2010 +0100 @@ -14,7 +14,7 @@ // 10287231.RSS -- for outfrwkinterface definitions // -#include +#include "registryinfo.rh" RESOURCE REGISTRY_INFO r_registry { diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/tracecontroltestplugin/src/te_tracecontroltestplugin.cpp --- a/traceservices/tracefw/integ_test/ost/TEF/tracecontroltestplugin/src/te_tracecontroltestplugin.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/tracecontroltestplugin/src/te_tracecontroltestplugin.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -22,8 +22,7 @@ #include #include -#include - +#include #include "te_tracecontroltestplugin.h" #if defined(__TEST_LIGHTLOGGER_ENABLED) diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/traces/OstTraceDefinitions.h --- a/traceservices/tracefw/integ_test/ost/TEF/traces/OstTraceDefinitions.h Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -#ifndef __OSTTRACEDEFINITIONS_H__ -#define __OSTTRACEDEFINITIONS_H__ -// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler -// REMOVE BEFORE CHECK-IN TO VERSION CONTROL -//#define OST_TRACE_COMPILER_IN_USE -#include -#endif diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/traces/fixed_id.definitions --- a/traceservices/tracefw/integ_test/ost/TEF/traces/fixed_id.definitions Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/traces/fixed_id.definitions Wed Sep 01 12:39:58 2010 +0100 @@ -1,22 +1,18 @@ #Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. [GROUP]TEST_GROUP=0xde +[GROUP]TRACE_DEBUG=0x89 [GROUP]TRACE_DUMP=0x89 [GROUP]TRACE_FATAL=0x81 [GROUP]TRACE_FLOW=0x8a -[GROUP]TRACE_NORMAL=0x86 [GROUP]TRACE_PERFORMANCE=0x8b [GROUP]TRACE_STATE=0x87 [GROUP]USER_DEFINED_GID_1=0xdf [GROUP]USER_DEFINED_GID_2=0xe0 [TRACE]TEST_GROUP[0xDE]_OstTesting=0x1 -[TRACE]TRACE_DUMP[0x89]_TEST_OSTTRACEWRAPPER2=0x1 -[TRACE]TRACE_DUMP[0x89]_TEST_OSTTRACEWRAPPER2w=0x5 -[TRACE]TRACE_DUMP[0x89]_TEST_OSTTRACEWRAPPER3=0x2 -[TRACE]TRACE_DUMP[0x89]_TEST_OSTTRACEWRAPPER3w=0x6 -[TRACE]TRACE_DUMP[0x89]_TEST_OSTTRACEWRAPPER5=0x3 -[TRACE]TRACE_DUMP[0x89]_TEST_OSTTRACEWRAPPER5w=0x7 -[TRACE]TRACE_DUMP[0x89]_TEST_OSTTRACEWRAPPER6=0x4 -[TRACE]TRACE_DUMP[0x89]_TEST_OSTTRACEWRAPPER6w=0x8 +[TRACE]TRACE_DEBUG[0x89]_TEST_OSTTRACEWRAPPER2=0x1 +[TRACE]TRACE_DEBUG[0x89]_TEST_OSTTRACEWRAPPER5=0x2 +[TRACE]TRACE_DUMP[0x89]_TEST_OSTTRACEWRAPPER3=0x1 +[TRACE]TRACE_DUMP[0x89]_TEST_OSTTRACEWRAPPER6=0x2 [TRACE]TRACE_FATAL[0x81]_TEST_OSTTRACE0=0x9 [TRACE]TRACE_FATAL[0x81]_TEST_OSTTRACE1=0xa [TRACE]TRACE_FATAL[0x81]_TEST_OSTTRACEDATA=0xb @@ -28,9 +24,7 @@ [TRACE]TRACE_FATAL[0x81]_TEST_OSTTRACEEXT4=0xf [TRACE]TRACE_FATAL[0x81]_TEST_OSTTRACEEXT5=0x10 [TRACE]TRACE_FATAL[0x81]_TEST_OSTTRACEWRAPPER1=0x13 -[TRACE]TRACE_FATAL[0x81]_TEST_OSTTRACEWRAPPER1w=0x15 [TRACE]TRACE_FATAL[0x81]_TEST_OSTTRACEWRAPPER4=0x14 -[TRACE]TRACE_FATAL[0x81]_TEST_OSTTRACEWRAPPER4w=0x16 [TRACE]TRACE_FATAL[0x81]_TEST_OstTraceDef0=0x1 [TRACE]TRACE_FATAL[0x81]_TEST_OstTraceDef1=0x2 [TRACE]TRACE_FATAL[0x81]_TEST_OstTraceDefData=0x3 @@ -39,29 +33,16 @@ [TRACE]TRACE_FATAL[0x81]_TEST_OstTraceDefExt3=0x6 [TRACE]TRACE_FATAL[0x81]_TEST_OstTraceDefExt4=0x7 [TRACE]TRACE_FATAL[0x81]_TEST_OstTraceDefExt5=0x8 -[TRACE]TRACE_FLOW[0x8A]_CTESTCTOR_INITLIST_TRACE=0x1 -[TRACE]TRACE_FLOW[0x8A]_CTESTCTOR_NO_INITLIST_TRACE=0x2 -[TRACE]TRACE_FLOW[0x8A]_TEST_OSTTRACEFUNCTIONEXIT1=0x7 -[TRACE]TRACE_FLOW[0x8A]_TEST_OSTTRACEFUNCTIONEXITEXT=0x8 -[TRACE]TRACE_FLOW[0x8A]_TEST_OSTTraceFunctionalityEntry0=0x3 -[TRACE]TRACE_FLOW[0x8A]_TEST_OSTTraceFunctionalityEntry1=0x4 -[TRACE]TRACE_FLOW[0x8A]_TEST_OSTTraceFunctionalityExt=0x5 -[TRACE]TRACE_FLOW[0x8A]_TEST_OstTraceFunctionExit0=0x6 -[TRACE]TRACE_NORMAL[0x86]_TEST_OSTTRACEWRAPPER1m=0x1 -[TRACE]TRACE_NORMAL[0x86]_TEST_OSTTRACEWRAPPER2m=0x2 -[TRACE]TRACE_NORMAL[0x86]_TEST_OSTTRACEWRAPPER3m=0x3 -[TRACE]TRACE_NORMAL[0x86]_TEST_OSTTRACEWRAPPER4m=0x4 -[TRACE]TRACE_NORMAL[0x86]_TEST_OSTTRACEWRAPPER5m=0x5 -[TRACE]TRACE_NORMAL[0x86]_TEST_OSTTRACEWRAPPER6m=0x6 -[TRACE]TRACE_NORMAL[0x86]_TEST_OSTTRACEWRAPPER7m=0x7 -[TRACE]TRACE_NORMAL[0x86]_TEST_OSTTRACEWRAPPER8m=0x8 -[TRACE]TRACE_NORMAL[0x86]_TEST_OSTTRACEWRAPPER9m=0x9 +[TRACE]TRACE_FLOW[0x8A]_TEST_OSTTRACEFUNCTIONEXIT1=0x5 +[TRACE]TRACE_FLOW[0x8A]_TEST_OSTTRACEFUNCTIONEXITEXT=0x6 +[TRACE]TRACE_FLOW[0x8A]_TEST_OSTTraceFunctionalityEntry0=0x1 +[TRACE]TRACE_FLOW[0x8A]_TEST_OSTTraceFunctionalityEntry1=0x2 +[TRACE]TRACE_FLOW[0x8A]_TEST_OSTTraceFunctionalityExt=0x3 +[TRACE]TRACE_FLOW[0x8A]_TEST_OstTraceFunctionExit0=0x4 [TRACE]TRACE_PERFORMANCE[0x8B]_TEST_OSTTRACEEVENTSTART0=0x1 [TRACE]TRACE_PERFORMANCE[0x8B]_TEST_OSTTRACEEVENTSTART1=0x2 [TRACE]TRACE_PERFORMANCE[0x8B]_TEST_OSTTRACEEVENTSTOP=0x3 [TRACE]TRACE_STATE[0x87]_TEST_OSTTRACESTATE0=0x1 [TRACE]TRACE_STATE[0x87]_TEST_OSTTRACESTATE1=0x2 [TRACE]USER_DEFINED_GID_1[0xDF]_TEST_OSTTRACEWRAPPER7=0x1 -[TRACE]USER_DEFINED_GID_1[0xDF]_TEST_OSTTRACEWRAPPER7w=0x2 [TRACE]USER_DEFINED_GID_2[0xE0]_TEST_OSTTRACEWRAPPER8=0x1 -[TRACE]USER_DEFINED_GID_2[0xE0]_TEST_OSTTRACEWRAPPER8w=0x2 diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/traces/te_advancedfilteringTraces.h --- a/traceservices/tracefw/integ_test/ost/TEF/traces/te_advancedfilteringTraces.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/traces/te_advancedfilteringTraces.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Created by TraceCompiler 2.1.4 +// Created by TraceCompiler 1.3.1 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __TE_ADVANCEDFILTERINGTRACES_H__ diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/traces/te_ctorTraces.h --- a/traceservices/tracefw/integ_test/ost/TEF/traces/te_ctorTraces.h Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -// Created by TraceCompiler 2.1.4 -// DO NOT EDIT, CHANGES WILL BE LOST - -#ifndef __TE_CTORTRACES_H__ -#define __TE_CTORTRACES_H__ - -#define KOstTraceComponentID 0x1028722e - -#define CTESTCTOR_INITLIST_TRACE 0x8a0001, ( TUint )( aArg1 ), ( TUint )( aArg2 ) -#define CTESTCTOR_NO_INITLIST_TRACE 0x8a0002, ( TUint )( aArg1 ) - - -inline TBool OstTraceGenExt( TUint32 aTraceID, TUint aParam1, TUint aParam2, TUint aParam3 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 12 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam2; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam3; - ptr += sizeof ( TUint ); - ptr -= 12; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 12 ); - } - return retval; - } - -inline TBool OstTraceGenExt( TUint32 aTraceID, TUint32 aParam1, TUint32 aParam2, TUint32 aParam3 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 12 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam2; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam3; - ptr += sizeof ( TUint ); - ptr -= 12; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 12 ); - } - return retval; - } - - -inline TBool OstTraceGenExt( TUint32 aTraceID, TUint aParam1, TUint aParam2 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 8 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam2; - ptr += sizeof ( TUint ); - ptr -= 8; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 ); - } - return retval; - } - -inline TBool OstTraceGenExt( TUint32 aTraceID, TUint32 aParam1, TUint32 aParam2 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 8 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam2; - ptr += sizeof ( TUint ); - ptr -= 8; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 ); - } - return retval; - } - - -#endif - -// End of file - diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/traces/te_ctor_disabledTraces.h --- a/traceservices/tracefw/integ_test/ost/TEF/traces/te_ctor_disabledTraces.h Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -// Created by TraceCompiler 2.1.4 -// DO NOT EDIT, CHANGES WILL BE LOST - -#ifndef __TE_CTOR_DISABLEDTRACES_H__ -#define __TE_CTOR_DISABLEDTRACES_H__ - -#define KOstTraceComponentID 0x1028722f - -#define CTESTCTOR_INITLIST_TRACE 0x8a0001, ( TUint )( aArg1 ), ( TUint )( aArg2 ) -#define CTESTCTOR_NO_INITLIST_TRACE 0x8a0002, ( TUint )( aArg1 ) - - -inline TBool OstTraceGenExt( TUint32 aTraceID, TUint aParam1, TUint aParam2, TUint aParam3 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 12 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam2; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam3; - ptr += sizeof ( TUint ); - ptr -= 12; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 12 ); - } - return retval; - } - -inline TBool OstTraceGenExt( TUint32 aTraceID, TUint32 aParam1, TUint32 aParam2, TUint32 aParam3 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 12 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam2; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam3; - ptr += sizeof ( TUint ); - ptr -= 12; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 12 ); - } - return retval; - } - - -inline TBool OstTraceGenExt( TUint32 aTraceID, TUint aParam1, TUint aParam2 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 8 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam2; - ptr += sizeof ( TUint ); - ptr -= 8; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 ); - } - return retval; - } - -inline TBool OstTraceGenExt( TUint32 aTraceID, TUint32 aParam1, TUint32 aParam2 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 8 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam2; - ptr += sizeof ( TUint ); - ptr -= 8; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 ); - } - return retval; - } - - -#endif - -// End of file - diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/traces/te_instrumentationpoints_disabledTraces.h --- a/traceservices/tracefw/integ_test/ost/TEF/traces/te_instrumentationpoints_disabledTraces.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/traces/te_instrumentationpoints_disabledTraces.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Created by TraceCompiler 2.1.4 +// Created by TraceCompiler 1.3.1 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __TE_INSTRUMENTATIONPOINTS_DISABLEDTRACES_H__ @@ -6,12 +6,6 @@ #define KOstTraceComponentID 0x1028722f -#define TEST_OSTTraceFunctionalityEntry0 0x8a0003 -#define TEST_OSTTraceFunctionalityEntry1 0x8a0004 -#define TEST_OSTTraceFunctionalityExt 0x8a0005, ( TUint )&( aApiRunConfig ), ( TUint )&( aApiRunResults ) -#define TEST_OstTraceFunctionExit0 0x8a0006 -#define TEST_OSTTRACEFUNCTIONEXIT1 0x8a0007 -#define TEST_OSTTRACEFUNCTIONEXITEXT 0x8a0008 #define TEST_OstTraceDef0 0x810001 #define TEST_OstTraceDef1 0x810002 #define TEST_OstTraceDefData 0x810003 @@ -30,6 +24,12 @@ #define TEST_OSTTRACEEXT5 0x810010 #define TEST_OSTTRACEDATA96 0x810011 #define TEST_OSTTRACEDATA1000 0x810012 +#define TEST_OSTTraceFunctionalityEntry0 0x8a0001 +#define TEST_OSTTraceFunctionalityEntry1 0x8a0002 +#define TEST_OSTTraceFunctionalityExt 0x8a0003, ( TUint )&( aApiRunConfig ), ( TUint )&( aApiRunResults ) +#define TEST_OstTraceFunctionExit0 0x8a0004 +#define TEST_OSTTRACEFUNCTIONEXIT1 0x8a0005 +#define TEST_OSTTRACEFUNCTIONEXITEXT 0x8a0006 #define TEST_OSTTRACEEVENTSTART0 0x8b0001 #define TEST_OSTTRACEEVENTSTART1 0x8b0002 #define TEST_OSTTRACEEVENTSTOP 0x8b0003 @@ -37,80 +37,6 @@ #define TEST_OSTTRACESTATE1 0x870002 -inline TBool OstTraceGenExt( TUint32 aTraceID, TUint aParam1, TUint aParam2, TUint aParam3 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 12 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam2; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam3; - ptr += sizeof ( TUint ); - ptr -= 12; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 12 ); - } - return retval; - } - -inline TBool OstTraceGenExt( TUint32 aTraceID, TUint32 aParam1, TUint32 aParam2, TUint32 aParam3 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 12 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam2; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam3; - ptr += sizeof ( TUint ); - ptr -= 12; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 12 ); - } - return retval; - } - - -inline TBool OstTraceGen2( TUint32 aTraceID, TUint aParam1, TInt aParam2 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 8 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TInt* )ptr ) = aParam2; - ptr += sizeof ( TInt ); - ptr -= 8; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 ); - } - return retval; - } - -inline TBool OstTraceGen2( TUint32 aTraceID, TUint32 aParam1, TInt32 aParam2 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 8 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TInt* )ptr ) = aParam2; - ptr += sizeof ( TInt ); - ptr -= 8; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 ); - } - return retval; - } - - inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC8& aParam1 ) { TBool retval; @@ -333,6 +259,80 @@ } +inline TBool OstTraceGenExt( TUint32 aTraceID, TUint aParam1, TUint aParam2, TUint aParam3 ) + { + TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); + if ( retval ) + { + TUint8 data[ 12 ]; + TUint8* ptr = data; + *( ( TUint* )ptr ) = aParam1; + ptr += sizeof ( TUint ); + *( ( TUint* )ptr ) = aParam2; + ptr += sizeof ( TUint ); + *( ( TUint* )ptr ) = aParam3; + ptr += sizeof ( TUint ); + ptr -= 12; + retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 12 ); + } + return retval; + } + +inline TBool OstTraceGenExt( TUint32 aTraceID, TUint32 aParam1, TUint32 aParam2, TUint32 aParam3 ) + { + TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); + if ( retval ) + { + TUint8 data[ 12 ]; + TUint8* ptr = data; + *( ( TUint* )ptr ) = aParam1; + ptr += sizeof ( TUint ); + *( ( TUint* )ptr ) = aParam2; + ptr += sizeof ( TUint ); + *( ( TUint* )ptr ) = aParam3; + ptr += sizeof ( TUint ); + ptr -= 12; + retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 12 ); + } + return retval; + } + + +inline TBool OstTraceGen2( TUint32 aTraceID, TUint aParam1, TInt aParam2 ) + { + TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); + if ( retval ) + { + TUint8 data[ 8 ]; + TUint8* ptr = data; + *( ( TUint* )ptr ) = aParam1; + ptr += sizeof ( TUint ); + *( ( TInt* )ptr ) = aParam2; + ptr += sizeof ( TInt ); + ptr -= 8; + retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 ); + } + return retval; + } + +inline TBool OstTraceGen2( TUint32 aTraceID, TUint32 aParam1, TInt32 aParam2 ) + { + TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); + if ( retval ) + { + TUint8 data[ 8 ]; + TUint8* ptr = data; + *( ( TUint* )ptr ) = aParam1; + ptr += sizeof ( TUint ); + *( ( TInt* )ptr ) = aParam2; + ptr += sizeof ( TInt ); + ptr -= 8; + retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 ); + } + return retval; + } + + inline TBool OstTraceGen2( TUint32 aTraceID, TInt aParam1, TUint aParam2 ) { TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/traces/te_instrumentationpoints_enabledTraces.h --- a/traceservices/tracefw/integ_test/ost/TEF/traces/te_instrumentationpoints_enabledTraces.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/traces/te_instrumentationpoints_enabledTraces.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Created by TraceCompiler 2.1.4 +// Created by TraceCompiler 1.3.1 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __TE_INSTRUMENTATIONPOINTS_ENABLEDTRACES_H__ @@ -6,12 +6,6 @@ #define KOstTraceComponentID 0x1028722e -#define TEST_OSTTraceFunctionalityEntry0 0x8a0003 -#define TEST_OSTTraceFunctionalityEntry1 0x8a0004 -#define TEST_OSTTraceFunctionalityExt 0x8a0005, ( TUint )&( aApiRunConfig ), ( TUint )&( aApiRunResults ) -#define TEST_OstTraceFunctionExit0 0x8a0006 -#define TEST_OSTTRACEFUNCTIONEXIT1 0x8a0007 -#define TEST_OSTTRACEFUNCTIONEXITEXT 0x8a0008 #define TEST_OstTraceDef0 0x810001 #define TEST_OstTraceDef1 0x810002 #define TEST_OstTraceDefData 0x810003 @@ -30,6 +24,12 @@ #define TEST_OSTTRACEEXT5 0x810010 #define TEST_OSTTRACEDATA96 0x810011 #define TEST_OSTTRACEDATA1000 0x810012 +#define TEST_OSTTraceFunctionalityEntry0 0x8a0001 +#define TEST_OSTTraceFunctionalityEntry1 0x8a0002 +#define TEST_OSTTraceFunctionalityExt 0x8a0003, ( TUint )&( aApiRunConfig ), ( TUint )&( aApiRunResults ) +#define TEST_OstTraceFunctionExit0 0x8a0004 +#define TEST_OSTTRACEFUNCTIONEXIT1 0x8a0005 +#define TEST_OSTTRACEFUNCTIONEXITEXT 0x8a0006 #define TEST_OSTTRACEEVENTSTART0 0x8b0001 #define TEST_OSTTRACEEVENTSTART1 0x8b0002 #define TEST_OSTTRACEEVENTSTOP 0x8b0003 @@ -37,80 +37,6 @@ #define TEST_OSTTRACESTATE1 0x870002 -inline TBool OstTraceGenExt( TUint32 aTraceID, TUint aParam1, TUint aParam2, TUint aParam3 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 12 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam2; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam3; - ptr += sizeof ( TUint ); - ptr -= 12; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 12 ); - } - return retval; - } - -inline TBool OstTraceGenExt( TUint32 aTraceID, TUint32 aParam1, TUint32 aParam2, TUint32 aParam3 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 12 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam2; - ptr += sizeof ( TUint ); - *( ( TUint* )ptr ) = aParam3; - ptr += sizeof ( TUint ); - ptr -= 12; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 12 ); - } - return retval; - } - - -inline TBool OstTraceGen2( TUint32 aTraceID, TUint aParam1, TInt aParam2 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 8 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TInt* )ptr ) = aParam2; - ptr += sizeof ( TInt ); - ptr -= 8; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 ); - } - return retval; - } - -inline TBool OstTraceGen2( TUint32 aTraceID, TUint32 aParam1, TInt32 aParam2 ) - { - TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); - if ( retval ) - { - TUint8 data[ 8 ]; - TUint8* ptr = data; - *( ( TUint* )ptr ) = aParam1; - ptr += sizeof ( TUint ); - *( ( TInt* )ptr ) = aParam2; - ptr += sizeof ( TInt ); - ptr -= 8; - retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 ); - } - return retval; - } - - inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC8& aParam1 ) { TBool retval; @@ -333,6 +259,80 @@ } +inline TBool OstTraceGenExt( TUint32 aTraceID, TUint aParam1, TUint aParam2, TUint aParam3 ) + { + TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); + if ( retval ) + { + TUint8 data[ 12 ]; + TUint8* ptr = data; + *( ( TUint* )ptr ) = aParam1; + ptr += sizeof ( TUint ); + *( ( TUint* )ptr ) = aParam2; + ptr += sizeof ( TUint ); + *( ( TUint* )ptr ) = aParam3; + ptr += sizeof ( TUint ); + ptr -= 12; + retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 12 ); + } + return retval; + } + +inline TBool OstTraceGenExt( TUint32 aTraceID, TUint32 aParam1, TUint32 aParam2, TUint32 aParam3 ) + { + TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); + if ( retval ) + { + TUint8 data[ 12 ]; + TUint8* ptr = data; + *( ( TUint* )ptr ) = aParam1; + ptr += sizeof ( TUint ); + *( ( TUint* )ptr ) = aParam2; + ptr += sizeof ( TUint ); + *( ( TUint* )ptr ) = aParam3; + ptr += sizeof ( TUint ); + ptr -= 12; + retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 12 ); + } + return retval; + } + + +inline TBool OstTraceGen2( TUint32 aTraceID, TUint aParam1, TInt aParam2 ) + { + TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); + if ( retval ) + { + TUint8 data[ 8 ]; + TUint8* ptr = data; + *( ( TUint* )ptr ) = aParam1; + ptr += sizeof ( TUint ); + *( ( TInt* )ptr ) = aParam2; + ptr += sizeof ( TInt ); + ptr -= 8; + retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 ); + } + return retval; + } + +inline TBool OstTraceGen2( TUint32 aTraceID, TUint32 aParam1, TInt32 aParam2 ) + { + TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); + if ( retval ) + { + TUint8 data[ 8 ]; + TUint8* ptr = data; + *( ( TUint* )ptr ) = aParam1; + ptr += sizeof ( TUint ); + *( ( TInt* )ptr ) = aParam2; + ptr += sizeof ( TInt ); + ptr -= 8; + retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 ); + } + return retval; + } + + inline TBool OstTraceGen2( TUint32 aTraceID, TInt aParam1, TUint aParam2 ) { TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID ); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ost/TEF/traces/te_ostv2tracetestwrapperTraces.h --- a/traceservices/tracefw/integ_test/ost/TEF/traces/te_ostv2tracetestwrapperTraces.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ost/TEF/traces/te_ostv2tracetestwrapperTraces.h Wed Sep 01 12:39:58 2010 +0100 @@ -1,10 +1,10 @@ -// Created by TraceCompiler 2.1.4 +// Created by TraceCompiler 2.1.0 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __TE_OSTV2TRACETESTWRAPPERTRACES_H__ #define __TE_OSTV2TRACETESTWRAPPERTRACES_H__ -#define KOstTraceComponentID 0x1028722f +#define KOstTraceComponentID 0x1028722e #define TEST_OSTTRACEWRAPPER1 0x810013 #define TEST_OSTTRACEWRAPPER4 0x810014 @@ -22,15 +22,6 @@ #define TEST_OSTTRACEWRAPPER7w 0xdf0002 #define TEST_OSTTRACEWRAPPER8 0xe00001 #define TEST_OSTTRACEWRAPPER8w 0xe00002 -#define TEST_OSTTRACEWRAPPER1m 0x860001 -#define TEST_OSTTRACEWRAPPER2m 0x860002 -#define TEST_OSTTRACEWRAPPER3m 0x860003 -#define TEST_OSTTRACEWRAPPER4m 0x860004 -#define TEST_OSTTRACEWRAPPER5m 0x860005 -#define TEST_OSTTRACEWRAPPER6m 0x860006 -#define TEST_OSTTRACEWRAPPER7m 0x860007 -#define TEST_OSTTRACEWRAPPER8m 0x860008 -#define TEST_OSTTRACEWRAPPER9m 0x860009 #endif diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/device-driver/group/bld.inf --- a/traceservices/tracefw/integ_test/ulogger/TEF/device-driver/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/device-driver/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -12,6 +12,10 @@ // // Description: // +/** + @file bld.inf + @internalTechnology +*/ PRJ_TESTMMPFILES //usbc.mmp diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/device-driver/group/usbc.mmp --- a/traceservices/tracefw/integ_test/ulogger/TEF/device-driver/group/usbc.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/device-driver/group/usbc.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -17,24 +17,22 @@ #include "../../kernel/kern_ext.mmh" -target usbc.ldd -targettype ldd -uid 0 0x101F8928 -VENDORID 0x70000001 -capability all - -OS_LAYER_SYSTEMINCLUDE +systeminclude ../../include/drivers +systeminclude \epoc32\include\ulogger_integrationtest -sourcepath ..\src -source d_usbc.cpp -source usbdma.cpp - -sourcepath ..\..\te_ulogger\src -source te_utracecmds.cpp - -library ekern.lib -library usbcc.lib +target usbc.ldd +targettype ldd +source d_usbc.cpp usbdma.cpp //te_utracecmds.cpp# +sourcepath \epoc32\include\ulogger_integrationtest +source te_utracecmds.cpp +library ekern.lib usbcc.lib +epocallowdlldata MACRO SYMBIAN_TRACE_ENABLE + +uid 0 0x101F8928 +VENDORID 0x70000001 +capability all + SMPSAFE diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/device-driver/src/d_usbc.cpp --- a/traceservices/tracefw/integ_test/ulogger/TEF/device-driver/src/d_usbc.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/device-driver/src/d_usbc.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -278,9 +278,9 @@ } if (id < 0) { - // DoRequestL + // DoRequest TRequestStatus* pS = (TRequestStatus*) m.Ptr0(); - DoRequestL(~id, pS, m.Ptr1(), m.Ptr2()); + DoRequest(~id, pS, m.Ptr1(), m.Ptr2()); m.Complete(KErrNone, ETrue); } else @@ -314,10 +314,10 @@ } // Asynchronous requests - overriding pure virtual // -void DLddUsbcChannel::DoRequestL(TInt aReqNo, TRequestStatus* aStatus, TAny* a1, TAny* a2) +void DLddUsbcChannel::DoRequest(TInt aReqNo, TRequestStatus* aStatus, TAny* a1, TAny* a2) { // Check on request status - //__KTRACE_OPT(KUSB, Kern::Printf("DoRequestL 0x%08x", aReqNo)); + //__KTRACE_OPT(KUSB, Kern::Printf("DoRequest 0x%08x", aReqNo)); if (aReqNo <= KUsbcMaxRequests) { TInt r = KErrNone; @@ -442,7 +442,7 @@ // ep0 requests if (!(iValidInterface || iOwnsDeviceControl)) { - //__KTRACE_OPT(KUSB, Kern::Printf("DoRequestL rejected: not configured (Ep0)")); + //__KTRACE_OPT(KUSB, Kern::Printf("DoRequest rejected: not configured (Ep0)")); r = KErrUsbInterfaceNotReady; goto exit; } @@ -454,7 +454,7 @@ iDeviceState == EUsbcDeviceStateSuspended)) ) { - //__KTRACE_OPT(KUSB, Kern::Printf("DoRequestL rejected not configured (Ep %d)", aEndpointNum)); + //__KTRACE_OPT(KUSB, Kern::Printf("DoRequest rejected not configured (Ep %d)", aEndpointNum)); r = KErrUsbInterfaceNotReady; goto exit; } @@ -462,7 +462,7 @@ if (!ValidEndpoint(aEndpointNum)) { - //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequestL Read: in error complete")); + //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequest Read: in error complete")); r = KErrUsbEpNotInInterface; goto exit; } @@ -481,13 +481,13 @@ pEndpoint = iEndpoint[aEndpointNum]; if (!pEndpoint) { - //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequestL Read: in error complete")); + //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequest Read: in error complete")); r = KErrUsbEpNotInInterface; goto exit; } pEndpointInfo = pEndpoint->EndpointInfo(); - //__KTRACE_OPT(KUSB, Kern::Printf("DoRequestL %d", aEndpointNum)); + //__KTRACE_OPT(KUSB, Kern::Printf("DoRequest %d", aEndpointNum)); switch (pTfr->iTransferType) { @@ -497,7 +497,7 @@ case ETransferTypeReadUntilShort: case ETransferTypeReadOneOrMore: { - //__KTRACE_OPT(KUSB, Kern::Printf("DoRequestL Read")); + //__KTRACE_OPT(KUSB, Kern::Printf("DoRequest Read")); if (pEndpoint->iDmaBuffers->RxIsActive()) { //__KTRACE_OPT(KUSB, Kern::Printf("**** ReadReq ep%d RxActive", aEndpointNum)); @@ -511,7 +511,7 @@ pEndpointInfo->iDir != KUsbEpDirBidirect) { // Trying to do the wrong thing - //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequestL Read: in error complete")); + //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequest Read: in error complete")); r = KErrUsbEpBadDirection; break; } @@ -530,7 +530,7 @@ { if (pTfr->iTransferType == ETransferTypeReadPacket) { - //__KTRACE_OPT(KUSB, Kern::Printf("DoRequestL Read packet: data available complete")); + //__KTRACE_OPT(KUSB, Kern::Printf("DoRequest Read packet: data available complete")); r = pEndpoint->CopyToClient(iClient); aNeedsCompletion = ETrue; break; @@ -539,7 +539,7 @@ { if (pTfr->iTransferSize <= pEndpoint->RxBytesAvailable()) { - //__KTRACE_OPT(KUSB, Kern::Printf("DoRequestL Read data: data available complete")); + //__KTRACE_OPT(KUSB, Kern::Printf("DoRequest Read data: data available complete")); r = pEndpoint->CopyToClient(iClient); aNeedsCompletion = ETrue; break; @@ -553,7 +553,7 @@ { if (pEndpoint->RxBytesAvailable() > 0) { - //__KTRACE_OPT(KUSB, Kern::Printf("DoRequestL Read data: data available complete")); + //__KTRACE_OPT(KUSB, Kern::Printf("DoRequest Read data: data available complete")); r = pEndpoint->CopyToClient(iClient); aNeedsCompletion = ETrue; break; @@ -571,7 +571,7 @@ (nRx < maxPacketSize) || pEndpoint->iDmaBuffers->ShortPacketExists()) { - //__KTRACE_OPT(KUSB, Kern::Printf("DoRequestL Read data: data available complete")); + //__KTRACE_OPT(KUSB, Kern::Printf("DoRequest Read data: data available complete")); r = pEndpoint->CopyToClient(iClient); aNeedsCompletion = ETrue; } @@ -584,7 +584,7 @@ r = pEndpoint->TryToStartRead(EFalse); if (r != KErrNone) { - //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequestL Read: couldn't start read")); + //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequest Read: couldn't start read")); r = KErrNone; // Reader full isn't a userside error; } break; @@ -592,33 +592,33 @@ case ETransferTypeWrite: { - //__KTRACE_OPT(KUSB, Kern::Printf("DoRequestL Write 1")); + //__KTRACE_OPT(KUSB, Kern::Printf("DoRequest Write 1")); if (pEndpointInfo->iDir != KUsbEpDirIn && pEndpointInfo->iDir != KUsbEpDirBidirect) { - //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequestL Write: wrong direction complete")); + //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequest Write: wrong direction complete")); r = KErrUsbEpBadDirection; break; } - //__KTRACE_OPT(KUSB, Kern::Printf("DoRequestL Write 2")); + //__KTRACE_OPT(KUSB, Kern::Printf("DoRequest Write 2")); TAny* logicalSrc = pTfr->iDes; TInt desLength = Kern::ThreadGetDesLength(iClient, logicalSrc); if (desLength < pTfr->iTransferSize) { - //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequestL Write: user buffer too short")); + //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequest Write: user buffer too short")); r = KErrUsbTransferSize; break; } - //__KTRACE_OPT(KUSB, Kern::Printf("DoRequestL Write 3 length=%d maxlength=%d", + //__KTRACE_OPT(KUSB, Kern::Printf("DoRequest Write 3 length=%d maxlength=%d", // pTfr->iTransferSize, desLength)); // Zero length writes are acceptable pEndpoint->SetClientWritePending(ETrue); r = pEndpoint->TryToStartWrite(pTfr); if (r != KErrNone) { - //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequestL Write: couldn't start write")); + //__KTRACE_OPT(KPANIC, Kern::Printf(" Error: DoRequest Write: couldn't start write")); pEndpoint->SetClientWritePending(EFalse); } break; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/group/bld.inf --- a/traceservices/tracefw/integ_test/ulogger/TEF/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -12,6 +12,10 @@ // // Description: // +/** + @file bld.inf + @internalTechnology +*/ #include "../device-driver/group/bld.inf" #include "../testplugin/group/bld.inf" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/bld.inf --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -13,18 +13,67 @@ // Description: // +/** + @file bld.inf + @internalTechnology +*/ +PRJ_PLATFORMS + + +PRJ_EXPORTS + PRJ_TESTEXPORTS -te_uloggermclsuite.iby /epoc32/rom/include/te_uloggermclsuite.iby + +//to c: +../scripts/te_uloggermclsuite.script /epoc32/winscw/c/testdata/scripts/te_uloggermclsuite.script +../scripts/te_uloggermclperfsuite.script /epoc32/winscw/c/testdata/scripts/te_uloggermclperfsuite.script +../scripts/te_uloggersysstart.script /epoc32/winscw/c/testdata/scripts/te_uloggersysstart.script +../scripts/te_uloggerconfigfile.script /epoc32/winscw/c/testdata/scripts/te_uloggerconfigfile.script +../scripts/te_uloggerconfigfile_winscw.script /epoc32/winscw/c/testdata/scripts/te_uloggerconfigfile_winscw.script +./configfileuloggerconfig.ini /epoc32/winscw/c/ulogger/configfileuloggerconfig.ini +//to z: +../scripts/te_uloggermclsuite.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_uloggermclsuite.script +../scripts/te_uloggermclperfsuite.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_uloggermclperfsuite.script +../scripts/te_uloggersysstart.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_uloggersysstart.script +../scripts/te_uloggerconfigfile.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_uloggerconfigfile.script +../scripts/te_uloggerconfigfile_winscw.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_uloggerconfigfile_winscw.script +./configfileuloggerconfig.ini /epoc32/release/winscw/udeb/z/ulogger/configfileuloggerconfig.ini + +./te_uloggermclsuite.iby /epoc32/rom/include/te_uloggermclsuite.iby -../scripts/te_uloggermclsuite.script z:/testdata/scripts/te_uloggermclsuite.script -//Test script for platform that doesn't support serial port -../scripts/te_uloggermclsuite_noserial.script z:/testdata/scripts/te_uloggermclsuite_noserial.script -../scripts/te_uloggermclperfsuite.script z:/testdata/scripts/te_uloggermclperfsuite.script -../scripts/te_uloggersysstart.script z:/testdata/scripts/te_uloggersysstart.script -../scripts/te_uloggerconfigfile.script z:/testdata/scripts/te_uloggerconfigfile.script -../scripts/te_uloggerconfigfile_winscw.script z:/testdata/scripts/te_uloggerconfigfile_winscw.script +#ifdef SYMBIAN_OLD_EXPORT_LOCATION +#endif +#ifdef SYMBIAN_OLD_EXPORT_LOCATION +../inc/te_setfilterparameters.h /epoc32/include/ulogger_integrationtest/te_setfilterparameters.h +#endif +../inc/te_setfilterparameters.h /epoc32/rom/include/ulogger_integrationtest/te_setfilterparameters.h +#ifdef SYMBIAN_OLD_EXPORT_LOCATION +../inc/te_utracecmds.h /epoc32/include/ulogger_integrationtest/te_utracecmds.h +#endif +../inc/te_utracecmds.h /epoc32/rom/include/ulogger_integrationtest/te_utracecmds.h +#ifdef SYMBIAN_OLD_EXPORT_LOCATION +../src/te_utracecmds.cpp /epoc32/include/ulogger_integrationtest/te_utracecmds.cpp +#endif +../src/te_utracecmds.cpp /epoc32/rom/include/ulogger_integrationtest/te_utracecmds.cpp +#ifdef SYMBIAN_OLD_EXPORT_LOCATION +../inc/te_utracekernelcmds.h /epoc32/include/ulogger_integrationtest/te_utracekernelcmds.h +#endif +../inc/te_utracekernelcmds.h /epoc32/rom/include/ulogger_integrationtest/te_utracekernelcmds.h +#ifdef SYMBIAN_OLD_EXPORT_LOCATION +../src/te_utracekernelcmds.cpp /epoc32/include/ulogger_integrationtest/te_utracekernelcmds.cpp +#endif +../src/te_utracekernelcmds.cpp /epoc32/rom/include/ulogger_integrationtest/te_utracekernelcmds.cpp +#ifdef SYMBIAN_OLD_EXPORT_LOCATION +../inc/te_uloggermclsuitedefs.h /epoc32/include/ulogger_integrationtest/te_uloggermclsuitedefs.h +#endif +../inc/te_uloggermclsuitedefs.h /epoc32/rom/include/ulogger_integrationtest/te_uloggermclsuitedefs.h +#ifdef SYMBIAN_OLD_EXPORT_LOCATION +../src/te_uloggermclsuitedefs.cpp /epoc32/include/ulogger_integrationtest/te_uloggermclsuitedefs.cpp +#endif +../src/te_uloggermclsuitedefs.cpp /epoc32/rom/include/ulogger_integrationtest/te_uloggermclsuitedefs.cpp -configfileuloggerconfig.ini z:/ulogger/configfileuloggerconfig.ini +PRJ_MMPFILES PRJ_TESTMMPFILES -te_uloggermclsuite.mmp manual + +te_uloggermclsuite.mmp diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/te_uloggermclsuite.iby --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/te_uloggermclsuite.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/te_uloggermclsuite.iby Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -18,11 +18,10 @@ #include #include -file=ABI_DIR\BUILD_DIR\te_uloggermclsuite.exe sys\bin\te_uloggermclsuite.exe -data=DATAZ_\TestData\scripts\te_uloggermclsuite.script TestData\Scripts\te_uloggermclsuite.script -data=DATAZ_\TestData\scripts\te_uloggermclsuite_noserial.script TestData\Scripts\te_uloggermclsuite_noserial.script -data=DATAZ_\TestData\scripts\te_uloggermclperfsuite.script TestData\Scripts\te_uloggermclperfsuite.script -data=DATAZ_\TestData\scripts\te_uloggersysstart.script TestData\Scripts\te_uloggersysstart.script -data=DATAZ_\TestData\scripts\te_uloggerconfigfile.script TestData\Scripts\te_uloggerconfigfile.script +file=ABI_DIR\BUILD_DIR\te_uloggermclsuite.exe sys\bin\te_uloggermclsuite.exe +data=EPOCROOT##Epoc32\winscw\c\TestData\scripts\te_uloggermclsuite.script TestData\Scripts\te_uloggermclsuite.script +data=EPOCROOT##Epoc32\winscw\c\TestData\scripts\te_uloggermclperfsuite.script TestData\Scripts\te_uloggermclperfsuite.script +data=EPOCROOT##Epoc32\winscw\c\TestData\scripts\te_uloggersysstart.script TestData\Scripts\te_uloggersysstart.script +data=EPOCROOT##Epoc32\winscw\c\TestData\scripts\te_uloggerconfigfile.script TestData\Scripts\te_uloggerconfigfile.script #endif diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/te_uloggermclsuite.mmp --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/te_uloggermclsuite.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/group/te_uloggermclsuite.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -13,19 +13,15 @@ // Description: // +/** + @file te_uloggermclsuite.mmp + @internalTechnology +*/ TARGET te_uloggermclsuite.exe TARGETTYPE exe -UID 0x1000007A 0x10285835 -CAPABILITY CommDD NetworkControl LocalServices - -EPOCHEAPSIZE 1048576 4194304 - -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc -USERINCLUDE ../../../../../common_utils/lightlogger/inc -USERINCLUDE ../../../../../common_utils - + UID 0x1000007A 0x10285835 + +//Please add any change under here SOURCEPATH ../src SOURCE te_uloggermclsuiteserver.cpp SOURCE te_uloggermclsuitestepbase.cpp @@ -42,16 +38,32 @@ SOURCE te_uloggerfilepluginsteperr.cpp SOURCE te_uloggermclperfstep.cpp +USERINCLUDE ../inc +USERINCLUDE ../../../../../common_utils/lightlogger/inc + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/ulogger_integrationtest +SYSTEMINCLUDE /epoc32/include/ecom + + +//Please add your system include under here. + LIBRARY euser.lib -LIBRARY testexecuteutils.lib -LIBRARY testexecutelogclient.lib -LIBRARY efsrv.lib -LIBRARY uloggerclient.lib -LIBRARY hal.lib +LIBRARY testexecuteutils.lib +LIBRARY testexecutelogclient.lib +LIBRARY efsrv.lib +LIBRARY uloggerclient.lib +LIBRARY hal.lib LIBRARY serialdriver.lib ecom.lib MACRO __LIGHTLOGGER_ENABLED MACRO SYMBIAN_TRACE_ENABLE + +EPOCHEAPSIZE 1048576 4194304 + +CAPABILITY CommDD NetworkControl LocalServices +USERINCLUDE ../../../../../common_utils + SMPSAFE -epocallowdlldata diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerapiteststep.h --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerapiteststep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerapiteststep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TE_ULOGGERAPITESTSTEP_H__) #define __TE_ULOGGERAPITESTSTEP_H__ -#include +#include #include "te_uloggermclsuitestepbase.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerbuffermodestep.h --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerbuffermodestep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerbuffermodestep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TE_ULOGGERBUFFERMODESTEP_H__) #define __TE_ULOGGERBUFFERMODESTEP_H__ -#include +#include #include "te_uloggermclsuitestepbase.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerbuffersizingstep.h --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerbuffersizingstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerbuffersizingstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TE_ULOGGERBUFFERSIZINGSTEP_H__) #define __TE_ULOGGERBUFFERSIZINGSTEP_H__ -#include +#include #include "te_uloggermclsuitestepbase.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerclearconfigstep.h --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerclearconfigstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerclearconfigstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TE_ULOGGERCLEARCONFIGSTEP_H__) #define __TE_ULOGGERCLEARCONFIGSTEP_H__ -#include +#include #include "te_uloggermclsuitestepbase.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerconfigfilestep.h --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerconfigfilestep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerconfigfilestep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TE_ULOGGERCONFIGFILESTEP_H__) #define __TE_ULOGGERCONFIGFILESTEP_H__ -#include +#include #include "te_uloggermclsuitestepbase.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerfilepluginstep.h --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerfilepluginstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerfilepluginstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TE_ULOGGERFILEPLUGNSTEP_H__) #define __TE_ULOGGERFILEPLUGNSTEP_H__ -#include +#include #include "te_uloggermclsuitestepbase.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerfilepluginsteperr.h --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerfilepluginsteperr.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerfilepluginsteperr.h Wed Sep 01 12:39:58 2010 +0100 @@ -25,7 +25,7 @@ #ifndef __TE_ULOGGERFILEPLUGINTESTERR_H__ #define __TE_ULOGGERFILEPLUGINTESTERR_H__ -#include +#include #include "te_uloggermclsuitestepbase.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggermclperfstep.h --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggermclperfstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggermclperfstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TE_ULOGGERMCLPERFSTEP_H__) #define __TE_ULOGGERMCLPERFSTEP_H__ -#include +#include #include "te_uloggermclsuitestepbase.h" #include "te_utracecmds.h" #include "te_utracekernelcmds.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggermclsuitedefs.h --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggermclsuitedefs.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggermclsuitedefs.h Wed Sep 01 12:39:58 2010 +0100 @@ -34,7 +34,7 @@ public: ~CClearConfig(); CClearConfig(); - void ClearL(RULogger& loggerSession); + void Clear(RULogger& loggerSession); //private: }; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggermclsuiteserver.h --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggermclsuiteserver.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggermclsuiteserver.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_ULOGGER_MCL_SERVER_H__) #define __TE_ULOGGER_MCL_SERVER_H__ -#include +#include class CTe_ULoggerMCLSuite : public CTestServer diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggermclsuitestepbase.h --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggermclsuitestepbase.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggermclsuitestepbase.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_ULOGGER_MCL_STEP_BASE__) #define __TE_ULOGGER_MCL_STEP_BASE__ -#include +#include // Please add your include here if you have /**************************************************************************** diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerserialpluginstep.h --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerserialpluginstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/inc/te_uloggerserialpluginstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TE_ULOGGERSERIALPLUGINSTEP_H__) #define __TE_ULOGGERSERIALPLUGINSTEP_H__ -#include +#include #include "te_uloggermclsuitestepbase.h" #include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggerconfigfile.script --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggerconfigfile.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggerconfigfile.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName utfv1-api-uloggerv1-configfile-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -38,7 +38,7 @@ //! @SYMTestActions Compare the settings in the ulogger server with that specified in the test config file in \testdata\configs\configfiletracecontrolconfig.ini //! @SYMTestExpectedResults Verify that the returned settings match those expected (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerPublicConfigFileTestStep @@ -60,7 +60,7 @@ //! @SYMTestActions Having deleted c:\ulogger\uloggerconfig.ini in the public path, now compare the settings in the ulogger server with that specified by default in the private path //! @SYMTestExpectedResults Verify that the returned settings match those expected (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerPrivateConfigFileTestStep @@ -82,7 +82,7 @@ //! @SYMTestActions Having reinstated a config file on the public path, now compare the settings in the ulogger server with that specified in the public path //! @SYMTestExpectedResults Verify that the returned settings match those expected (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerPublicConfigFileTestStep diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggerconfigfile_winscw.script --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggerconfigfile_winscw.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggerconfigfile_winscw.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -14,7 +14,7 @@ // -//! @file +//! @File //! @SYMTestSuiteName utfv1-api-uloggerv1-configfilewinscw-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -36,7 +36,7 @@ //! @SYMTestActions Compare the settings in the ulogger server with that specified in the test config file in \testdata\configs\configfiletracecontrolconfig.ini //! @SYMTestExpectedResults Verify that the returned settings match those expected (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerPublicConfigFileTestStep @@ -57,7 +57,7 @@ //! @SYMTestActions Having deleted c:\ulogger\uloggerconfig.ini in the public path, now compare the settings in the ulogger server with that specified by default in the private path //! @SYMTestExpectedResults Verify that the returned settings match those expected (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerPrivateConfigFileTestStep @@ -77,7 +77,7 @@ //! @SYMTestActions Having reinstated a config file on the public path, now compare the settings in the ulogger server with that specified in the public path //! @SYMTestExpectedResults Verify that the returned settings match those expected (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerPublicConfigFileTestStep diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggermclperfsuite.script --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggermclperfsuite.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggermclperfsuite.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -14,7 +14,7 @@ // -//! @file +//! @File //! @SYMTestSuiteName utfv1-api-uloggerv1-performance-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -31,7 +31,7 @@ //! @SYMTestActions Calculate the cached and non-cached times taken for user side trace APIs, outputting to file and serial plugins. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs. //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000000 te_uloggermclsuite ULoggerMCLUserPerfStep @@ -53,7 +53,7 @@ //! @SYMTestActions Calculate the cached and non-cached times taken for kernel side trace APIs, outputting to file and serial plugins. //! @SYMTestExpectedResults Verify that there has not been any significant change in the performance figures from previous runs. //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000000 te_uloggermclsuite ULoggerMCLKernelPerfStep diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggermclsuite.script --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggermclsuite.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggermclsuite.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -14,7 +14,7 @@ // -//! @file +//! @File //! @SYMTestSuiteName utfv1-api-uloggerv1-integration-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -32,7 +32,7 @@ //! @SYMTestActions Run a combination of single and multiple Primary filter set() methods and check the contents of the get() methods on server return the filters as expected //! @SYMTestExpectedResults Verify that the returned gettings match those expected from settings (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPIPrimTestStep @@ -46,7 +46,7 @@ //! @SYMTestActions Run a combination of single and multiple Secondary filter set() methods and check the contents of the get() methods on server return the filters as expected //! @SYMTestExpectedResults Verify that the returned gettings match those expected from settings (test step returns a test pass if so) //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 20000 te_uloggermclsuite ULoggerAPISecondTestStep @@ -60,7 +60,7 @@ //! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument user-side trace points accordingly for positive, begative and multiple setting tests //! @SYMTestExpectedResults Verify that the returned trace data and the output trace log files match the setttings in the ulogger accordingly //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPILoggingTestStep @@ -74,7 +74,7 @@ //! @SYMTestActions Run a combination of buffer resizing methods and run over various stress testing trace instrumentations. check the contents of the output file is as expected //! @SYMTestExpectedResults Verify that output file contains #traces as expected //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerBufferSizingStep @@ -88,7 +88,7 @@ //! @SYMTestActions Run a combination of buffer mode change methods and run over various stress testing trace instrumentations. check the contents of the output file is as expected //! @SYMTestExpectedResults Verify that output file contains a trace pattern as expected from buffer mode type //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerBufferModeStep @@ -102,7 +102,7 @@ //! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument kernel-side trace points accordingly for positive, begative and multiple setting tests //! @SYMTestExpectedResults Verify that the returned trace data and the output trace log files match the setttings in the ulogger accordingly //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPIKernelTestStep @@ -116,7 +116,7 @@ //! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument user-side trace printf-style points accordingly for positive, begative and multiple setting tests //! @SYMTestExpectedResults Verify that the returned trace data and the output trace log files match the setttings in the ulogger accordingly //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPIPrintfTestStep @@ -130,7 +130,7 @@ //! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument kernel-side trace printf-style points accordingly for positive, begative and multiple setting tests //! @SYMTestExpectedResults Verify that the returned trace data and the output trace log files match the setttings in the ulogger accordingly //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPIKernelPrintfTestStep @@ -146,7 +146,7 @@ //! @SYMTestActions Run a combination of plguin configuration methods for the file plugin and log over trace instrumentaion //! @SYMTestExpectedResults Verify that the trace data is output as expected to the file plugin //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerFilePluginStep @@ -160,7 +160,7 @@ //! @SYMTestActions Run a combination of plguin configuration methods for the serial plugin and log over trace instrumentaion //! @SYMTestExpectedResults Verify that the trace data is output as expected to the serial plugin //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerSerialPluginStep @@ -174,7 +174,7 @@ //! @SYMTestActions Run a combination of plguin configuration methods for the file plugin and test on the return errors //! @SYMTestExpectedResults Verify that the errors returned are as expected //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerFilePluginStepErr diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggermclsuite_noserial.script --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggermclsuite_noserial.script Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: This script doesn't have serial test for platform that doesn't support serial port -// - - -//! @file -//! @SYMTestSuiteName utfv1-api-uloggerv1-integration-test-suite.script -//! @SYMScriptTestEnvironment TEF - - - -LOAD_SUITE te_uloggermclsuite - - -PRINT API_Functionality_Tests - -START_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerAPIPrim-0001 -//! @SYMTestCaseID DT-DEBUG-TRACE-UTFv1-ULoggerAPIPrim-0001 -//! @SYMTestCaseDesc Run test for classification filter settings in ULoggerv1 server -//! @SYMTestPriority Critical -//! @SYMTestActions Run a combination of single and multiple Primary filter set() methods and check the contents of the get() methods on server return the filters as expected -//! @SYMTestExpectedResults Verify that the returned gettings match those expected from settings (test step returns a test pass if so) -//! @SYMTestType CT -//! @SYMTestStatus Implemented -//! @SYMPREQ PREQ1635 -//! @SYMREQ -RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPIPrimTestStep -END_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerAPIPrim-0001 - - -START_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerAPISecond-0001 -//! @SYMTestCaseID DT-DEBUG-TRACE-UTFv1-ULoggerAPISecond-0001 -//! @SYMTestCaseDesc Run test for ModuleUid filter settings in ULoggerv1 server -//! @SYMTestPriority Critical -//! @SYMTestActions Run a combination of single and multiple Secondary filter set() methods and check the contents of the get() methods on server return the filters as expected -//! @SYMTestExpectedResults Verify that the returned gettings match those expected from settings (test step returns a test pass if so) -//! @SYMTestType CT -//! @SYMTestStatus Implemented -//! @SYMPREQ PREQ1635 -//! @SYMREQ -RUN_TEST_STEP 20000 te_uloggermclsuite ULoggerAPISecondTestStep -END_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerAPISecond-0001 - - -START_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerAPILogging-0001 -//! @SYMTestCaseID DT-DEBUG-TRACE-UTFv1-ULoggerAPILogging-0001 -//! @SYMTestCaseDesc Run test for logging in ULoggerv1 server for trace compiled in on user side -//! @SYMTestPriority Critical -//! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument user-side trace points accordingly for positive, begative and multiple setting tests -//! @SYMTestExpectedResults Verify that the returned trace data and the output trace log files match the setttings in the ulogger accordingly -//! @SYMTestType CT -//! @SYMTestStatus Implemented -//! @SYMPREQ PREQ1635 -//! @SYMREQ -RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPILoggingTestStep -END_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerAPILogging-0001 - - -START_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerBufferSizing-0001 -//! @SYMTestCaseID DT-DEBUG-TRACE-UTFv1-ULoggerBufferSizing-0001 -//! @SYMTestCaseDesc Run test for buffersizing settings in ULoggerv1 server for trace compiled in -//! @SYMTestPriority Critical -//! @SYMTestActions Run a combination of buffer resizing methods and run over various stress testing trace instrumentations. check the contents of the output file is as expected -//! @SYMTestExpectedResults Verify that output file contains #traces as expected -//! @SYMTestType CT -//! @SYMTestStatus Implemented -//! @SYMPREQ PREQ1635 -//! @SYMREQ -RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerBufferSizingStep -END_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerBufferSizing-0001 - - -START_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerBufferMode-0001 -//! @SYMTestCaseID DT-DEBUG-TRACE-UTFv1-ULoggerBufferMode-0001 -//! @SYMTestCaseDesc Run test for buffer mode settings in ULoggerv1 server for trace compiled in -//! @SYMTestPriority Critical -//! @SYMTestActions Run a combination of buffer mode change methods and run over various stress testing trace instrumentations. check the contents of the output file is as expected -//! @SYMTestExpectedResults Verify that output file contains a trace pattern as expected from buffer mode type -//! @SYMTestType CT -//! @SYMTestStatus Implemented -//! @SYMPREQ PREQ1635 -//! @SYMREQ -RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerBufferModeStep -END_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerBufferMode-0001 - - -START_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerAPIKernel-0001 -//! @SYMTestCaseID DT-DEBUG-TRACE-UTFv1-ULoggerAPIKernel-0001 -//! @SYMTestCaseDesc Run test for logging in ULoggerv1 server for trace points compiled in on kernel side -//! @SYMTestPriority Critical -//! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument kernel-side trace points accordingly for positive, begative and multiple setting tests -//! @SYMTestExpectedResults Verify that the returned trace data and the output trace log files match the setttings in the ulogger accordingly -//! @SYMTestType CT -//! @SYMTestStatus Implemented -//! @SYMPREQ PREQ1635 -//! @SYMREQ -RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPIKernelTestStep -END_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerAPIKernel-0001 - - -START_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerAPIPrintf-0001 -//! @SYMTestCaseID DT-DEBUG-TRACE-UTFv1-ULoggerAPIPrintf-0001 -//! @SYMTestCaseDesc Run test for logging in ULoggerv1 server for trace printf-style points compiled in on user side -//! @SYMTestPriority Critical -//! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument user-side trace printf-style points accordingly for positive, begative and multiple setting tests -//! @SYMTestExpectedResults Verify that the returned trace data and the output trace log files match the setttings in the ulogger accordingly -//! @SYMTestType CT -//! @SYMTestStatus Implemented -//! @SYMPREQ PREQ1635 -//! @SYMREQ -RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPIPrintfTestStep -END_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerAPIPrintf-0001 - - -START_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerAPIKernelPrintf-0001 -//! @SYMTestCaseID DT-DEBUG-TRACE-UTFv1-ULoggerAPIKernelPrintf-0001 -//! @SYMTestCaseDesc Run test for logging in ULoggerv1 server for trace printf-style points compiled in on kernel side -//! @SYMTestPriority Critical -//! @SYMTestActions Run a combination of single and multiple filter and filtering set() methods instrument kernel-side trace printf-style points accordingly for positive, begative and multiple setting tests -//! @SYMTestExpectedResults Verify that the returned trace data and the output trace log files match the setttings in the ulogger accordingly -//! @SYMTestType CT -//! @SYMTestStatus Implemented -//! @SYMPREQ PREQ1635 -//! @SYMREQ -RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPIKernelPrintfTestStep -END_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerAPIKernelPrintf-0001 - -PRINT Plugin_Tests - - -START_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerFilePlugin-0001 -//! @SYMTestCaseID DT-DEBUG-TRACE-UTFv1-ULoggerFilePlugin-0001 -//! @SYMTestCaseDesc Run test for logging to the file plugin for trace compiled in -//! @SYMTestPriority Critical -//! @SYMTestActions Run a combination of plguin configuration methods for the file plugin and log over trace instrumentaion -//! @SYMTestExpectedResults Verify that the trace data is output as expected to the file plugin -//! @SYMTestType CT -//! @SYMTestStatus Implemented -//! @SYMPREQ PREQ1635 -//! @SYMREQ -RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerFilePluginStep -END_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerFilePlugin-0001 - - -START_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerFilePluginStepErr-0001 -//! @SYMTestCaseID DT-DEBUG-TRACE-UTFv1-ULoggerFilePluginStepErr-0001 -//! @SYMTestCaseDesc Run test for error returns from plugin methods for trace compiled in -//! @SYMTestPriority Critical -//! @SYMTestActions Run a combination of plguin configuration methods for the file plugin and test on the return errors -//! @SYMTestExpectedResults Verify that the errors returned are as expected -//! @SYMTestType CT -//! @SYMTestStatus Implemented -//! @SYMPREQ PREQ1635 -//! @SYMREQ -RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerFilePluginStepErr -END_TESTCASE DT-DEBUG-TRACE-UTFv1-ULoggerFilePluginStepErr-0001 - - -PRINT Complete_te_ULogger_Tests diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggersysstart.script --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggersysstart.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/scripts/te_uloggersysstart.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -14,7 +14,7 @@ // -//! @file +//! @File //! @SYMTestSuiteName utfv1-api-uloggerv1-sysstart-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -34,7 +34,7 @@ //! @SYMTestActions Compile a rom with uloggersysstart.exe compiled into startup sequence and uncomment #define systart in ULoggerAPILoggingTestStep. Run test step. //! @SYMTestExpectedResults Verify that the output log contains btrace output from bott sequence as well as trace points enabled in ULoggerAPILoggingTestStep //! @SYMTestType CT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_uloggermclsuite ULoggerAPILoggingTestStep diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerapiteststep.cpp --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerapiteststep.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerapiteststep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -81,7 +81,7 @@ Result=logger.Connect(); INFO_PRINTF2(_L("connect err %d"), Result); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); INFO_PRINTF2(_L("connect err %d"), Result); Result=logger.SetPrimaryFiltersEnabled(*setfilter,ETrue); @@ -280,7 +280,7 @@ // ************** Block end **************** - configIni.ClearL(logger); + configIni.Clear(logger); logger.Close(); if(setfilter) delete setfilter; @@ -361,7 +361,7 @@ logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); Result = logger.SetSecondaryFiltersEnabled(setfilter,ETrue); INFO_PRINTF2(_L("Secondary filter has been set with single filter, %d, check log"), setfilter[0]); INFO_PRINTF2(_L("code: %d"), Result); @@ -547,7 +547,7 @@ } } INFO_PRINTF1(_L("Now call clear config to check removing multiple second filters performance")); - configIni.ClearL(logger); + configIni.Clear(logger); INFO_PRINTF1(_L("after clear config- multiple second filters performance")); if(Result==1) @@ -640,7 +640,7 @@ #endif #ifndef SysStartTest CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); #endif CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(1); setprimfilter->AppendL(UTracePrimary); @@ -909,7 +909,7 @@ { INFO_PRINTF1(_L("Now do some multiple type logging testing.")); //CClearConfig configIni; - //configIni.ClearL(logger); + //configIni.Clear(logger); if(Result==0) { @@ -1062,7 +1062,7 @@ multsetprimfilter=NULL; } } - configIni.ClearL(logger); + configIni.Clear(logger); } else INFO_PRINTF1(_L("adding file as output plugin failed")); @@ -1151,7 +1151,7 @@ RULogger logger; logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(1); setprimfilter->AppendL(UTracePrimary); RArray setsecondfilter; @@ -1377,7 +1377,7 @@ else SetTestStepResult(EFail); INFO_PRINTF1(_L("Multiple logging to file with kernel side tracing has been tested - check output log. It should contain four lines of tracing of type, (sec,prim), (sec+2, prim), (sec, prim+2), (sec+2, prim+2)")); - configIni.ClearL(logger); + configIni.Clear(logger); } if(setprimfilter) { @@ -1462,7 +1462,7 @@ RULogger logger; logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(1); setprimfilter->AppendL(UTracePrimary); RArray setsecondfilter; @@ -1643,7 +1643,7 @@ RULogger logger; logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(1); setprimfilter->AppendL(UTracePrimary); RArray setsecondfilter; @@ -1870,7 +1870,7 @@ else SetTestStepResult(EFail); INFO_PRINTF1(_L("Multiple printf logging to file with kernel side tracing has been tested - check output log. It should contain four lines of tracing of type, (sec,prim), (sec+2, prim), (sec, prim+2), (sec+2, prim+2)")); - configIni.ClearL(logger); + configIni.Clear(logger); } if(setprimfilter) { diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerbuffermodestep.cpp --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerbuffermodestep.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerbuffermodestep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -115,7 +115,7 @@ RULogger logger; logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); TInt iBufferCircular = 0; TInt iBufferStraight = 1; TInt iGetBuffer = 2; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerbuffersizingstep.cpp --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerbuffersizingstep.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerbuffersizingstep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -98,7 +98,7 @@ RULogger logger; logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(1); setprimfilter->AppendL(UTracePrimary); RArray setsecondfilter; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerclearconfigstep.cpp --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerclearconfigstep.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerclearconfigstep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -62,7 +62,7 @@ RULogger logger; logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); SetTestStepResult(EPass); return TestStepResult(); } diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerfilepluginstep.cpp --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerfilepluginstep.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerfilepluginstep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -68,7 +68,7 @@ RULogger logger; logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); _LIT8(KTextmedia,"uloggerfileplugin"); const TPtrC8 mediaptr(KTextmedia); if(Result==0||Result==-11) diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerfilepluginsteperr.cpp --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerfilepluginsteperr.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerfilepluginsteperr.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -49,7 +49,7 @@ RULogger logger; logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); _LIT8(KTextmedia,"te_fileplugin"); const TPtrC8 mediaptr(KTextmedia); INFO_PRINTF1(_L("Setting test plugin as active...")); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggermclperfstep.cpp --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggermclperfstep.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggermclperfstep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -86,7 +86,7 @@ RULogger logger; logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(1); setprimfilter->AppendL(UTracePrimary); RArray setsecondfilter; @@ -344,7 +344,7 @@ RULogger logger; logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(1); setprimfilter->AppendL(UTracePrimary); RArray setsecondfilter; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggermclsuitedefs.cpp --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggermclsuitedefs.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggermclsuitedefs.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -33,7 +33,7 @@ /*Constructor*/ } -void CClearConfig::ClearL(RULogger& loggerSession) +void CClearConfig::Clear(RULogger& loggerSession) { loggerSession.Stop(); loggerSession.DeActivateInputPlugin(); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerserialpluginstep.cpp --- a/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerserialpluginstep.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/te_ulogger/src/te_uloggerserialpluginstep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -69,7 +69,7 @@ RULogger logger; logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); CArrayFixFlat *setprimfilter = new (ELeave)CArrayFixFlat(1); setprimfilter->AppendL(UTracePrimary); RArray setsecondfilter; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/testplugin/group/bld.inf --- a/traceservices/tracefw/integ_test/ulogger/TEF/testplugin/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/testplugin/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -12,9 +12,14 @@ // // Description: // +/** + @file bld.inf + @internalTechnology +*/ + PRJ_TESTEXPORTS -te_uloggermcl.iby /epoc32/rom/include/te_uloggermcl.iby +./te_uloggermcl.iby /epoc32/rom/include/te_uloggermcl.iby PRJ_TESTMMPFILES -te_fileplugin.mmp manual +te_fileplugin.mmp diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/testplugin/group/te_fileplugin.mmp --- a/traceservices/tracefw/integ_test/ulogger/TEF/testplugin/group/te_fileplugin.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/testplugin/group/te_fileplugin.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -15,16 +15,19 @@ // // -TARGET te_fileplugin.dll -TARGETTYPE PLUGIN -UID 0x10009D8D 0x10273888 -VENDORID 0x70000001 -CAPABILITY CommDD NetworkControl LocalServices ProtServ NetworkServices +/** + @file te_fileplugin.mmp + @internalTechnology +*/ -OS_LAYER_SYSTEMINCLUDE +TARGET te_fileplugin.dll +TARGETTYPE PLUGIN +UID 0x10009D8D 0x10273888 +VENDORID 0x70000001 + +CAPABILITY CommDD NetworkControl LocalServices ProtServ NetworkServices USERINCLUDE ../inc/ - SOURCEPATH ../src/ SOURCE te_fileplugin.cpp @@ -33,9 +36,9 @@ TARGET te_fileplugin.rsc end -LIBRARY euser.lib -LIBRARY efsrv.lib -LIBRARY c32.lib -LIBRARY ecom.lib +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/ecom + +LIBRARY euser.lib efsrv.lib c32.lib ecom.lib SMPSAFE diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/integ_test/ulogger/TEF/testplugin/src/te_fileplugin.cpp --- a/traceservices/tracefw/integ_test/ulogger/TEF/testplugin/src/te_fileplugin.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/integ_test/ulogger/TEF/testplugin/src/te_fileplugin.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -20,8 +20,7 @@ #include #include -#include - +#include #include "te_fileplugin.h" #if defined(__LIGHTLOGGER_ENABLED) diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/devicedriver/eabi/te_ostdd_disabledu.def --- a/traceservices/tracefw/ost_trace_api/unit_test/devicedriver/eabi/te_ostdd_disabledu.def Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -EXPORTS - _Z19CreateLogicalDevicev @ 1 NONAME - _ZTI14DUTraceChannel @ 2 NONAME - _ZTI14DUTraceFactory @ 3 NONAME - _ZTV14DUTraceChannel @ 4 NONAME - _ZTV14DUTraceFactory @ 5 NONAME - diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/devicedriver/eabi/te_ostdd_enabledu.def --- a/traceservices/tracefw/ost_trace_api/unit_test/devicedriver/eabi/te_ostdd_enabledu.def Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -EXPORTS - _Z19CreateLogicalDevicev @ 1 NONAME - _ZTI14DUTraceChannel @ 2 NONAME - _ZTI14DUTraceFactory @ 3 NONAME - _ZTV14DUTraceChannel @ 4 NONAME - _ZTV14DUTraceFactory @ 5 NONAME - diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/devicedriver/group/bld.inf --- a/traceservices/tracefw/ost_trace_api/unit_test/devicedriver/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/devicedriver/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -16,7 +16,10 @@ PRJ_PLATFORMS DEFAULT - +PRJ_EXPORTS +PRJ_MMPFILES PRJ_TESTMMPFILES -te_utracedrv_enabled.mmp manual -te_utracedrv_disabled.mmp manual +te_utracedrv_enabled.mmp +te_utracedrv_disabled.mmp + +PRJ_TESTEXPORTS diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/devicedriver/group/te_utracedrv_disabled.mmp --- a/traceservices/tracefw/ost_trace_api/unit_test/devicedriver/group/te_utracedrv_disabled.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/devicedriver/group/te_utracedrv_disabled.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -23,17 +23,16 @@ VENDORID 0x70000001 capability all -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc/ -USERINCLUDE ../../te_ost/inc/ +USERINCLUDE ../inc/ +USERINCLUDE ../../te_ost/inc/ +SYSTEMINCLUDE /epoc32/include/platform +SYSTEMINCLUDE /epoc32/include/kernel MACRO TE_MODULE_UID=0 MACRO EXECUTABLE_DEFAULT_MODULEUID=6666 SOURCEPATH ../src/ SOURCE te_utracedrv.cpp - SOURCEPATH ../../te_ost/src/ SOURCE te_tracerecord.cpp SOURCE te_kerneltimer.cpp diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/devicedriver/group/te_utracedrv_enabled.mmp --- a/traceservices/tracefw/ost_trace_api/unit_test/devicedriver/group/te_utracedrv_enabled.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/devicedriver/group/te_utracedrv_enabled.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -25,29 +25,30 @@ VENDORID 0x70000001 capability all -always_build_as_arm - -OS_LAYER_SYSTEMINCLUDE USERINCLUDE ../inc/ USERINCLUDE ../../te_ost/inc/ +SYSTEMINCLUDE /epoc32/include/platform +SYSTEMINCLUDE /epoc32/include/kernel + MACRO TE_MODULE_UID=0 MACRO EXECUTABLE_DEFAULT_MODULEUID=6666 -SOURCEPATH ../src/ -SOURCE te_utracedrv.cpp - -SOURCEPATH ../../te_ost/src/ -SOURCE te_tracerecord.cpp -SOURCE te_kerneltimer.cpp - start wins win32_headers end LIBRARY te_ost_lauterbach_kernel.lib +SOURCEPATH ../src/ +SOURCE te_utracedrv.cpp +SOURCEPATH ../../te_ost/src/ +SOURCE te_tracerecord.cpp +SOURCE te_kerneltimer.cpp + + +always_build_as_arm SMPSAFE diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/devicedriver/inc/d32utrace.h --- a/traceservices/tracefw/ost_trace_api/unit_test/devicedriver/inc/d32utrace.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/devicedriver/inc/d32utrace.h Wed Sep 01 12:39:58 2010 +0100 @@ -28,7 +28,6 @@ #endif #include #include - #include "te_tracerecord.h" //needs to be the filename of the driver diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/group/bld.inf --- a/traceservices/tracefw/ost_trace_api/unit_test/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -12,6 +12,10 @@ // // Description: // +/** + @file bld.inf + @internalTechnology +*/ #include "../lauterbach_perf_tester/group/bld.inf" #include "../devicedriver/group/bld.inf" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/lauterbach_perf_tester/group/bld.inf --- a/traceservices/tracefw/ost_trace_api/unit_test/lauterbach_perf_tester/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/lauterbach_perf_tester/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -12,10 +12,18 @@ // // Description: // +/** + @file bld.inf + @internalTechnology +*/ + PRJ_PLATFORMS DEFAULT - +PRJ_EXPORTS +PRJ_MMPFILES PRJ_TESTMMPFILES -te_lauterbach.mmp manual -te_lauterbach_kernel.mmp manual +te_lauterbach.mmp +te_lauterbach_kernel.mmp + +PRJ_TESTEXPORTS diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/lauterbach_perf_tester/group/te_lauterbach.mmp --- a/traceservices/tracefw/ost_trace_api/unit_test/lauterbach_perf_tester/group/te_lauterbach.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/lauterbach_perf_tester/group/te_lauterbach.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -17,9 +17,9 @@ TARGET te_ost_lauterbach.dll //user side enabled TARGETTYPE dll UID 0x1000008d 0x10287236 -CAPABILITY All -OS_LAYER_SYSTEMINCLUDE +SYSTEMINCLUDE \epoc32\include +SYSTEMINCLUDE \epoc32\include\platform USERINCLUDE ../inc/ @@ -29,11 +29,16 @@ LIBRARY euser.lib #if defined (WINS) - DEFFILE ../bwins/te_lauterbach.def + DEFFILE ..\bwins\te_lauterbach.def #else - DEFFILE ../eabi/te_lauterbach.def + DEFFILE ..\eabi\te_lauterbach.def #endif + +CAPABILITY All + + OPTION ARMCC --interleave SMPSAFE + diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/lauterbach_perf_tester/group/te_lauterbach_kernel.mmp --- a/traceservices/tracefw/ost_trace_api/unit_test/lauterbach_perf_tester/group/te_lauterbach_kernel.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/lauterbach_perf_tester/group/te_lauterbach_kernel.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -13,26 +13,28 @@ // Description: // -#include -TARGET te_ost_lauterbach_kernel.dll +#include "..\kernel\kern_ext.mmh" +TARGET te_ost_lauterbach_kernel.dll //kernel side TARGETTYPE kdll UID 0x1000008d 0x10287237 -CAPABILITY All -OS_LAYER_SYSTEMINCLUDE - +SYSTEMINCLUDE /epoc32/include/platform +SYSTEMINCLUDE /epoc32/include/kernel USERINCLUDE ../inc/ SOURCEPATH ../src/ SOURCE te_trace_for_lauterbach.cpp +CAPABILITY All + #if defined (WINS) - DEFFILE ../bwins/te_lauterbach_kernel.def + DEFFILE ..\bwins\te_lauterbach_kernel.def #else - DEFFILE ../eabi/te_lauterbach_kernel.def + DEFFILE ..\eabi\te_lauterbach_kernel.def #endif + OPTION ARMCC --interleave SMPSAFE diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/lauterbach_perf_tester/inc/utracemacros.h --- a/traceservices/tracefw/ost_trace_api/unit_test/lauterbach_perf_tester/inc/utracemacros.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/lauterbach_perf_tester/inc/utracemacros.h Wed Sep 01 12:39:58 2010 +0100 @@ -58,17 +58,17 @@ /**@internalComponent*/ #define UTRACE_PRIMARY_0(aClassification,aCategory,aContext,aPc,aFormatId) \ - BTrace::OutX \ - (UTRACE_HEADER(8,(aClassification),(aCategory),(aContext),(aPc)), (TUint32)(aFormatId),0,0) + ((BTrace::TBTrace2)BTrace::OutX) \ + (UTRACE_HEADER(8,(aClassification),(aCategory),(aContext),(aPc)), (TUint32)(aFormatId)) /**@internalComponent*/ #define UTRACE_PRIMARY_1(aClassification,aCategory,aContext,aPc,aFormatId, aData1) \ - BTrace::OutX \ - (UTRACE_HEADER(12,(aClassification),(aCategory),(aContext),(aPc)),(TUint32)(aFormatId),(TUint32)(aData1),0) + ((BTrace::TBTrace3)BTrace::OutX)\ + (UTRACE_HEADER(12,(aClassification),(aCategory),(aContext),(aPc)),(TUint32)(aFormatId),(TUint32)(aData1)) /**@internalComponent*/ #define UTRACE_PRIMARY_2(aClassification,aCategory,aContext,aPc,aFormatId,aData1,aData2) \ - BTrace::OutX \ + (BTrace::OutX)\ (UTRACE_HEADER(16,(aClassification),(aCategory),(aContext),(aPc)),(TUint32)(aFormatId),(TUint32)(aData1),(TUint32)(aData2)) /**@internalComponent @@ -84,11 +84,11 @@ /**@internalComponent*/ #define UTRACE_SECONDARY_0(aClassification,aModuleUid,aCategory,aContext,aPc,aFormatId) \ - BTrace::OutFilteredX(UTRACE_HEADER(12,(aClassification),(aCategory),(aContext),(aPc)),(TUint32)(aModuleUid),(TUint32)(aFormatId),0) + ((BTrace::TBTrace3)BTrace::OutFilteredX)(UTRACE_HEADER(12,(aClassification),(aCategory),(aContext),(aPc)),(TUint32)(aModuleUid),(TUint32)(aFormatId)) /** @internalComponent */ #define UTRACE_SECONDARY_1(aClassification,aModuleUid,aCategory,aContext,aPc,aFormatId, aData1) \ - BTrace::OutFilteredX(UTRACE_HEADER(16,(aClassification),(aCategory),(aContext),(aPc)),(TUint32)(aModuleUid),(TUint32)(aFormatId),(TUint32)(aData1)) + (BTrace::OutFilteredX)(UTRACE_HEADER(16,(aClassification),(aCategory),(aContext),(aPc)),(TUint32)(aModuleUid),(TUint32)(aFormatId),(TUint32)(aData1)) /** @internalComponent * You have to use the ANY macro instead. diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/bld.inf --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -12,17 +12,34 @@ // // Description: // +/** + @file bld.inf + @internalTechnology +*/ + +PRJ_EXPORTS +PRJ_MMPFILES + PRJ_TESTEXPORTS -te_ost.iby /epoc32/rom/include/te_ost.iby + +//to c: +../scripts/te_ostsuite.script /epoc32/winscw/c/testdata/scripts/te_ostsuite.script +../testdata/te_ost_trace_user.ini /epoc32/winscw/c/testdata/configs/te_ost_trace_user.ini -../scripts/te_ostsuite.script z:/testdata/scripts/te_ostsuite.script -../testdata/te_ost_trace_user.ini z:/testdata/configs/te_ost_trace_user.ini +//to z: +../scripts/te_ostsuite.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_ostsuite.script +../testdata/te_ost_trace_user.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_ost_trace_user.ini + + +te_ost.iby /epoc32/rom/include/te_ost.iby + PRJ_TESTMMPFILES -te_trace_disabled_suite.mmp manual -te_trace_enabled_suite.mmp manual -te_record_content_suite.mmp manual -te_multiparttrace.mmp manual -te_ost_marcos_enabled.mmp manual -te_ost_marcos_disabled.mmp manual +te_trace_disabled_suite.mmp +te_trace_enabled_suite.mmp +te_record_content_suite.mmp +te_multiparttrace.mmp +te_ost_marcos_enabled.mmp +te_ost_marcos_disabled.mmp + diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_multiparttrace.mmp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_multiparttrace.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_multiparttrace.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -17,18 +17,12 @@ TARGETTYPE exe UID 0x1000007A 0x10287238 -#define SYMBIAN_INCLUDE_EXECUTABLE_TRACE +#define SYMBIAN_INCLUDE_EXECUTABLE_TRACE #include MACRO TE_MULTIPART_TRACE epocprocesspriority high -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc -USERINCLUDE ../../lauterbach_perf_tester/inc -USERINCLUDE ../../devicedriver/inc - SOURCEPATH ../src SOURCE te_multiparttrace.cpp SOURCE te_suite_step_base.cpp @@ -47,6 +41,16 @@ SOURCE uloggerconfig.cpp SOURCE te_usertimer.cpp + +USERINCLUDE ../inc +USERINCLUDE ../../lauterbach_perf_tester/inc +USERINCLUDE ../../devicedriver/inc + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/platform + + LIBRARY euser.lib LIBRARY testexecuteutils.lib LIBRARY testexecutelogclient.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_ost.iby --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_ost.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_ost.iby Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -20,19 +20,19 @@ #include #include -file=ABI_DIR\DEBUG_DIR\te_ost_enabled.exe sys\bin\te_ost_enabled.exe -file=ABI_DIR\DEBUG_DIR\te_ost_disabled.exe sys\bin\te_ost_disabled.exe -file=ABI_DIR\DEBUG_DIR\te_ost_record_content.exe sys\bin\te_ost_record_content.exe -file=ABI_DIR\DEBUG_DIR\te_ost_multipart_trace.exe sys\bin\te_ost_multipart_trace.exe -file=ABI_DIR\DEBUG_DIR\te_ost_lauterbach.dll sys\bin\te_ost_lauterbach.dll -file=ABI_DIR\DEBUG_DIR\te_ost_macros_disabled.exe sys\bin\te_ost_macros_disabled.exe -file=ABI_DIR\DEBUG_DIR\te_ost_macros_enabled.exe sys\bin\te_ost_macros_enabled.exe +file=ABI_DIR\DEBUG_DIR\te_ost_enabled.exe sys\bin\te_ost_enabled.exe +file=ABI_DIR\DEBUG_DIR\te_ost_disabled.exe sys\bin\te_ost_disabled.exe +file=ABI_DIR\DEBUG_DIR\te_ost_record_content.exe sys\bin\te_ost_record_content.exe +file=ABI_DIR\DEBUG_DIR\te_ost_multipart_trace.exe sys\bin\te_ost_multipart_trace.exe +file=ABI_DIR\DEBUG_DIR\te_ost_lauterbach.dll sys\bin\te_ost_lauterbach.dll +file=ABI_DIR\DEBUG_DIR\te_ost_macros_disabled.exe sys\bin\te_ost_macros_disabled.exe +file=ABI_DIR\DEBUG_DIR\te_ost_macros_enabled.exe sys\bin\te_ost_macros_enabled.exe -//ROM_IMAGE[0] device[VARID]=ABI_DIR\DEBUG_DIR\te_ost_lauterbach_kernel.dll sys\bin\te_ost_lauterbach_kernel.dll -ROM_IMAGE[0] device[VARID]=ABI_DIR\DEBUG_DIR\te_ostdd_enabled.ldd sys\bin\te_ostdd_enabled.ldd -ROM_IMAGE[0] device[VARID]=ABI_DIR\DEBUG_DIR\te_ostdd_disabled.ldd sys\bin\te_ostdd_disabled.ldd +ROM_IMAGE[0] device[VARID]=ABI_DIR\DEBUG_DIR\te_ost_lauterbach_kernel.dll sys\bin\te_ost_lauterbach_kernel.dll +ROM_IMAGE[0] device[VARID]=ABI_DIR\DEBUG_DIR\te_ostdd_enabled.ldd sys\bin\te_ostdd_enabled.ldd +ROM_IMAGE[0] device[VARID]=ABI_DIR\DEBUG_DIR\te_ostdd_disabled.ldd sys\bin\te_ostdd_disabled.ldd -data=EPOCROOT##epoc32\release\winscw\udeb\z\testdata\scripts\te_ostsuite.script testdata\scripts\te_ostsuite.script -data=EPOCROOT##epoc32\release\winscw\udeb\z\testdata\configs\te_ost_trace_user.ini testdata\configs\te_ost_trace_user.ini +data=EPOCROOT##epoc32\release\winscw\udeb\z\testdata\scripts\te_ostsuite.script testdata\scripts\te_ostsuite.script +data=EPOCROOT##epoc32\release\winscw\udeb\z\testdata\configs\te_ost_trace_user.ini testdata\configs\te_ost_trace_user.ini -#endif +#endif \ No newline at end of file diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_ost_marcos_disabled.mmp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_ost_marcos_disabled.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_ost_marcos_disabled.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -17,18 +17,12 @@ TARGETTYPE exe UID 0x1000007A 0xE13C6AED -#define SYMBIAN_INCLUDE_EXECUTABLE_TRACE +#define SYMBIAN_INCLUDE_EXECUTABLE_TRACE #include MACRO TE_OST_MACROS_DISABLED //MACRO OST_TRACE_COMPILER_IN_USE -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc -USERINCLUDE ../../devicedriver/inc/ -USERINCLUDE ../../lauterbach_perf_tester/inc/ - SOURCEPATH ../src SOURCE te_apicaller.cpp SOURCE uloggerconfig.cpp @@ -46,6 +40,15 @@ SOURCE te_multiparttrace.cpp SOURCE te_macrostest_disabled.cpp +USERINCLUDE ../inc +USERINCLUDE ../../devicedriver/inc/ +USERINCLUDE ../../lauterbach_perf_tester/inc/ + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/platform + + LIBRARY euser.lib LIBRARY testexecuteutils.lib LIBRARY testexecutelogclient.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_ost_marcos_enabled.mmp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_ost_marcos_enabled.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_ost_marcos_enabled.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -17,18 +17,12 @@ TARGETTYPE exe UID 0x1000007A 0xED92FE5F -#define SYMBIAN_INCLUDE_EXECUTABLE_TRACE +#define SYMBIAN_INCLUDE_EXECUTABLE_TRACE #include MACRO TE_OST_MACROS_ENABLED MACRO OST_TRACE_COMPILER_IN_USE -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc -USERINCLUDE ../../devicedriver/inc/ -USERINCLUDE ../../lauterbach_perf_tester/inc/ - SOURCEPATH ../src SOURCE te_apicaller.cpp SOURCE uloggerconfig.cpp @@ -46,6 +40,15 @@ SOURCE te_multiparttrace.cpp SOURCE te_macrostest_disabled.cpp +USERINCLUDE ../inc +USERINCLUDE ../../devicedriver/inc/ +USERINCLUDE ../../lauterbach_perf_tester/inc/ + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/platform + + LIBRARY euser.lib LIBRARY testexecuteutils.lib LIBRARY testexecutelogclient.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_record_content_suite.mmp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_record_content_suite.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_record_content_suite.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -19,21 +19,22 @@ #define SYMBIAN_INCLUDE_EXECUTABLE_TRACE -#include - +#include MACRO TE_RECORD_CONTENT MACRO TE_MODULE_UID=0x10287239 -// to make sure the timers are prioritised +//to make sure the timers are prioritised epocprocesspriority high -OS_LAYER_SYSTEMINCLUDE +SYSTEMINCLUDE \epoc32\include +SYSTEMINCLUDE \epoc32\include\test +SYSTEMINCLUDE \epoc32\include\platform -USERINCLUDE ../inc +USERINCLUDE ..\inc USERINCLUDE ../../devicedriver/inc/ USERINCLUDE ../../lauterbach_perf_tester/inc/ -SOURCEPATH ../src +SOURCEPATH ..\src SOURCE te_suite_server.cpp SOURCE te_suite_step_base.cpp SOURCE te_check_record_content_step.cpp @@ -51,6 +52,7 @@ SOURCE te_macrostest_disabled.cpp SOURCE te_usertimer.cpp + LIBRARY euser.lib LIBRARY testexecuteutils.lib LIBRARY testexecutelogclient.lib @@ -60,6 +62,8 @@ LIBRARY uloggerclient.lib LIBRARY te_ost_lauterbach.lib + + always_build_as_arm OPTION ARMCC --interleave diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_trace_disabled_suite.mmp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_trace_disabled_suite.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_trace_disabled_suite.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -18,22 +18,24 @@ UID 0x1000007A 0x10287240 //#undef SYMBIAN_INCLUDE_EXECUTABLE_TRACE -#include - +#include MACRO TE_TRACE_DISABLED MACRO TE_SYSTEM_SHOULD_BE_ENABLED //MACRO TE_EXECUTABLE_SHOULD_BE_ENABLED MACRO EXECUTABLE_DEFAULT_MODULEUID=6666 MACRO TE_MODULE_UID=0x10287240 -OS_LAYER_SYSTEMINCLUDE +SYSTEMINCLUDE \epoc32\include +SYSTEMINCLUDE \epoc32\include\test +SYSTEMINCLUDE \epoc32\include\platform -USERINCLUDE ../inc +USERINCLUDE ..\inc USERINCLUDE ../../devicedriver/inc/ USERINCLUDE ../../lauterbach_perf_tester/inc/ -SOURCEPATH ../src -SOURCE te_suite_server.cpp + +SOURCEPATH ..\src +SOURCE te_suite_server.cpp SOURCE te_suite_step_base.cpp SOURCE te_check_build_variability_step.cpp SOURCE te_check_record_content_step.cpp @@ -50,6 +52,7 @@ SOURCE te_macrostest_disabled.cpp SOURCE te_usertimer.cpp + LIBRARY euser.lib LIBRARY testexecuteutils.lib LIBRARY testexecutelogclient.lib @@ -59,6 +62,8 @@ LIBRARY uloggerclient.lib LIBRARY te_ost_lauterbach.lib + + always_build_as_arm OPTION ARMCC --interleave diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_trace_enabled_suite.mmp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_trace_enabled_suite.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_trace_enabled_suite.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -18,21 +18,23 @@ UID 0x1000007A 0x10287241 #define SYMBIAN_INCLUDE_EXECUTABLE_TRACE -#include - +#include MACRO TE_SYSTEM_SHOULD_BE_ENABLED MACRO TE_EXECUTABLE_SHOULD_BE_ENABLED MACRO TE_TRACE_ENABLED MACRO EXECUTABLE_DEFAULT_MODULEUID=6666 MACRO TE_MODULE_UID=0x10287241 -OS_LAYER_SYSTEMINCLUDE -USERINCLUDE ../inc +SYSTEMINCLUDE \epoc32\include +SYSTEMINCLUDE \epoc32\include\test +SYSTEMINCLUDE \epoc32\include\platform + +USERINCLUDE ..\inc USERINCLUDE ../../devicedriver/inc/ USERINCLUDE ../../lauterbach_perf_tester/inc/ -SOURCEPATH ../src +SOURCEPATH ..\src SOURCE te_suite_server.cpp te_suite_step_base.cpp SOURCE te_check_build_variability_step.cpp SOURCE te_check_record_content_step.cpp @@ -49,6 +51,7 @@ SOURCE te_macrostest_disabled.cpp SOURCE te_usertimer.cpp + LIBRARY euser.lib LIBRARY testexecuteutils.lib LIBRARY testexecutelogclient.lib @@ -58,6 +61,8 @@ LIBRARY uloggerclient.lib LIBRARY te_ost_lauterbach.lib + + always_build_as_arm OPTION ARMCC --interleave diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_trace_system_disabled_suite.mmp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_trace_system_disabled_suite.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_trace_system_disabled_suite.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -19,22 +19,24 @@ #undef SYMBIAN_INCLUDE_SYSTEM_TRACE //#undef SYMBIAN_INCLUDE_EXECUTABLE_TRACE -#include - +#include MACRO TE_SYSTEM_TRACE_DISABLED //MACRO TE_SYSTEM_SHOULD_BE_ENABLED //MACRO TE_EXECUTABLE_SHOULD_BE_ENABLED MACRO EXECUTABLE_DEFAULT_MODULEUID=6666 MACRO TE_MODULE_UID=0x101a7785 -OS_LAYER_SYSTEMINCLUDE + +SYSTEMINCLUDE \epoc32\include +SYSTEMINCLUDE \epoc32\include\test +SYSTEMINCLUDE \epoc32\include\platform USERINCLUDE ..\inc USERINCLUDE ../../devicedriver/inc/ USERINCLUDE ../../lauterbach_perf_tester/inc/ SOURCEPATH ..\src -SOURCE te_suite_server.cpp +SOURCE te_suite_server.cpp SOURCE te_suite_step_base.cpp SOURCE te_check_build_variability_step.cpp SOURCE te_check_record_content_step.cpp @@ -52,6 +54,7 @@ #endif SOURCE te_usertimer.cpp + LIBRARY euser.lib LIBRARY testexecuteutils.lib LIBRARY testexecutelogclient.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_trace_system_enabled_suite.mmp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_trace_system_enabled_suite.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/group/te_trace_system_enabled_suite.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -19,16 +19,16 @@ #undef SYMBIAN_TRACE_SYSTEM_INCLUDE #define SYMBIAN_TRACE_EXECUTABLE_INCLUDE -#include - +#include //MACRO TE_SYSTEM_SHOULD_BE_ENABLED MACRO TE_EXECUTABLE_SHOULD_BE_ENABLED MACRO TE_SYSTEM_TRACE_ENABLED MACRO EXECUTABLE_DEFAULT_MODULEUID=6666 MACRO TE_MODULE_UID=0x101F6784 MACRO EXECUTABLE_DEFAULT_HAS_THREAD_IDENTIFICATION=ENoThreadIdentification - -OS_LAYER_SYSTEMINCLUDE +SYSTEMINCLUDE \epoc32\include +SYSTEMINCLUDE \epoc32\include\test +SYSTEMINCLUDE \epoc32\include\platform USERINCLUDE ..\inc USERINCLUDE ../../devicedriver/inc/ @@ -52,6 +52,7 @@ #endif SOURCE te_usertimer.cpp + LIBRARY euser.lib LIBRARY testexecuteutils.lib LIBRARY testexecutelogclient.lib @@ -62,6 +63,7 @@ LIBRARY te_lauterbach.lib LIBRARY te_ost_lauterbach.lib + always_build_as_arm OPTION ARMCC --interleave diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_check_build_variability_step.h --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_check_build_variability_step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_check_build_variability_step.h Wed Sep 01 12:39:58 2010 +0100 @@ -21,7 +21,7 @@ */ #ifndef TE_USER_STEP_H_ #define TE_USER_STEP_H_ -#include +#include #include "te_suite_step_base.h" @@ -35,9 +35,9 @@ // virtual TVerdict doTestStepPostambleL(); private: TVerdict CheckBuildtimeVariability(); - TVerdict CheckLoggingVariabilityL(); - TBool TestTracesL(); - TBool DoSendTraceL(TTraceApiUsed aApiUsed); + TVerdict CheckLoggingVariability(); + TBool TestTraces(); + TBool DoSendTrace(TTraceApiUsed aApiUsed); TBool WasTraceVariabilitySuccessful(TInt aTraceResult); }; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_check_performance_step.h --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_check_performance_step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_check_performance_step.h Wed Sep 01 12:39:58 2010 +0100 @@ -22,7 +22,7 @@ #ifndef TE_CHECK_PERFORMANCE_STEP_H_ #define TE_CHECK_PERFORMANCE_STEP_H_ -#include +#include #include "te_suite_step_base.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_check_record_content_step.h --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_check_record_content_step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_check_record_content_step.h Wed Sep 01 12:39:58 2010 +0100 @@ -22,7 +22,7 @@ #ifndef TE_CHECK_RECORD_CONTENT_STEP_H_ #define TE_CHECK_RECORD_CONTENT_STEP_H_ -#include +#include #include "te_suite_step_base.h" #include "te_parser.h" @@ -37,7 +37,7 @@ // virtual TVerdict doTestStepPostambleL(); private: TInt CompareTraces(); - TInt WriteTracesL(); + TInt WriteTraces(); TInt ReadTraces(); TTraceConfigs* CreateTrace(TTraceApiUsed aApi); TTraceParser iParser; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_macrostest.h --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_macrostest.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_macrostest.h Wed Sep 01 12:39:58 2010 +0100 @@ -26,7 +26,7 @@ #ifndef __TE_MACROSTEST_H__ #define __TE_MACROSTEST_H__ -#include +#include #include "te_suite_step_base.h" _LIT(KOstMacrosEnabledStep, "COstMacrosEnabledStep"); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_macrostest_disabled.h --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_macrostest_disabled.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_macrostest_disabled.h Wed Sep 01 12:39:58 2010 +0100 @@ -26,7 +26,7 @@ #ifndef __TE_MACROSTEST_DISABLED_H__ #define __TE_MACROSTEST_DISABLED_H__ -#include +#include #include "te_macrostest.h" _LIT(KOstMacrosDisabledStep, "COstMacrosDisabledStep"); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_multiparttrace.h --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_multiparttrace.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_multiparttrace.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ // INCLUDES #include #include -#include +#include #include #include #include "te_suite_step_base.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_suite_server.h --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_suite_server.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_suite_server.h Wed Sep 01 12:39:58 2010 +0100 @@ -22,7 +22,7 @@ #ifndef __TE_ENABLED_SUITE_SERVER_H__ #define __TE_ENABLED_SUITE_SERVER_H__ -#include +#include class CTe_UTraceSuite : public CTestServer diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_suite_step_base.h --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_suite_step_base.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_suite_step_base.h Wed Sep 01 12:39:58 2010 +0100 @@ -22,7 +22,7 @@ #ifndef TE_SUITE_STEP_BASE__ #define TE_SUITE_STEP_BASE__ -#include +#include #include "te_tracer.h" #include "te_logger.h" @@ -50,7 +50,7 @@ TInt StartLoggingL(TTraceConfigs& aTraceData); TInt StopLogging(); void SetLogFilename(const TDesC& aFilename); - void DeleteLogFileL(); + void DeleteLogFile(); protected: TTraceTester iTraceTester; TTraceConfigs iTraceData; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_tracer.h --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_tracer.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/te_tracer.h Wed Sep 01 12:39:58 2010 +0100 @@ -35,7 +35,7 @@ static TInt SendTraceL(TTraceConfigs& aTraceData); static TInt TimeTraceL(TTraceConfigs& aTraceData, TUint32& aTime, TUint32& aCount); private: - static TInt TimeTraceCallL(TTraceConfigs& aTraceData, TUint32& aTime, TUint32& aCount); + static TInt TimeTraceCall(TTraceConfigs& aTraceData, TUint32& aTime, TUint32& aCount); }; #endif /*TE_TRACER_H_*/ diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/uloggerconfig.h --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/uloggerconfig.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/inc/uloggerconfig.h Wed Sep 01 12:39:58 2010 +0100 @@ -34,8 +34,8 @@ public: ~CClearConfig(); CClearConfig(); - void ClearL(RULogger& loggerSession); - void DefaultL(RULogger& loggerSession); + void Clear(RULogger& loggerSession); + void Default(RULogger& loggerSession); //private: }; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/scripts/te_ostsuite.script --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/scripts/te_ostsuite.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/scripts/te_ostsuite.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName ostv2-api-unit-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -28,7 +28,7 @@ //! @SYMTestActions For various size payloads inducing multi-parting of the trace packet (>80bytes) test the data contained in the trace packets //! @SYMTestExpectedResults Verify that the trace packet contain payload data multiparted as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12144 12761 12825 RUN_TEST_STEP 100 te_ost_multipart_trace CMultiTraceTestStep z:\testdata\configs\te_ost_trace_user.ini variability @@ -45,7 +45,7 @@ //! @SYMTestActions For trace compiled in at build time, instrument and output trace points //! @SYMTestExpectedResults Verify that trace is implemented and output as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12144 12761 12825 RUN_TEST_STEP 100 te_ost_enabled CCheckBuildVariabilityStep z:\testdata\configs\te_ost_trace_user.ini variability @@ -62,7 +62,7 @@ //! @SYMTestActions For trace compiled out at build time, instrument and output trace points //! @SYMTestExpectedResults Verify that trace is implemented and not output as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12144 12761 12825 RUN_TEST_STEP 100 te_ost_disabled CCheckBuildVariabilityStep z:\testdata\configs\te_ost_trace_user.ini variability @@ -80,7 +80,7 @@ //! @SYMTestActions Check record content of logged trace packets is as expected for the sent packet //! @SYMTestExpectedResults Verify that trace is implemented and output as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12144 12761 12825 RUN_TEST_STEP 100 te_ost_record_content CCheckRecordContentStep z:\testdata\configs\te_ost_trace_user.ini variability @@ -99,7 +99,7 @@ //! @SYMTestActions Measure the trace time of the implemented APIs //! @SYMTestExpectedResults Verify that performance of the trace APIs are not significantly more intrusive than previous implementations //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12144 12761 12825 RUN_TEST_STEP 100 te_ost_record_content CCheckPerformanceStep z:\testdata\configs\te_ost_trace_user.ini variability @@ -116,7 +116,7 @@ //! @SYMTestActions Test the implemented OSTv1-style APIs when compiled in //! @SYMTestExpectedResults Verify that the OSTv1-style trace APIs return trace packets as expected by the instrumentation //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12144 12761 12825 RUN_TEST_STEP 100 te_ost_macros_enabled COstMacrosEnabledStep z:\testdata\configs\te_ost_trace_user.ini variability @@ -133,7 +133,7 @@ //! @SYMTestActions Test the implemented OSTv1-style APIs when compiled out //! @SYMTestExpectedResults Verify that the OSTv1-style trace APIs don't return trace packets as expected by the instrumentation //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ2390 //! @SYMREQ 12115 12144 12761 12825 RUN_TEST_STEP 100 te_ost_macros_disabled COstMacrosDisabledStep z:\testdata\configs\te_ost_trace_user.ini variability diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_check_build_variability_step.cpp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_check_build_variability_step.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_check_build_variability_step.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -88,13 +88,13 @@ CheckBuildtimeVariability(); if (TestStepResult()==EPass) {//now check that logging occurs properly - CheckLoggingVariabilityL(); + CheckLoggingVariability(); } } return TestStepResult(); } -TVerdict CCheckBuildVariabilityStep::CheckLoggingVariabilityL() +TVerdict CCheckBuildVariabilityStep::CheckLoggingVariability() { //test all cases when logging is enabled INFO_PRINTF2(_L("--- Logging enabled, tracing built in %i ---"), iTraceData.iTracingBuiltIn); @@ -108,7 +108,7 @@ SetTestStepResult(EFail); return TestStepResult(); } - TBool passLogging = TestTracesL(); + TBool passLogging = TestTraces(); //test all cases where logging is disabled INFO_PRINTF1(_L("--- Logging disabled ---")); iTraceData.iLoggingEnabled = EFalse; @@ -120,7 +120,7 @@ return TestStepResult(); } - TBool passNoLogging = TestTracesL(); + TBool passNoLogging = TestTraces(); //if any of the cases failed, fail the test step if((passLogging == EFalse) || (passNoLogging == EFalse)) @@ -130,7 +130,7 @@ return TestStepResult(); } -TBool CCheckBuildVariabilityStep::TestTracesL() +TBool CCheckBuildVariabilityStep::TestTraces() { TBool allPassed = ETrue; for(TInt i = 1; i <= KAPIMaxNumberOfTraceApis; i++) @@ -142,7 +142,7 @@ if(i == EContextTClassification) INFO_PRINTF1(_L("-- Testing contexts --")); - if(DoSendTraceL((TTraceApiUsed)i)) + if(DoSendTrace((TTraceApiUsed)i)) INFO_PRINTF2(_L("Trace %i - ok"), i); else allPassed = EFalse; @@ -153,7 +153,7 @@ } -TBool CCheckBuildVariabilityStep::DoSendTraceL(TTraceApiUsed aApiUsed) +TBool CCheckBuildVariabilityStep::DoSendTrace(TTraceApiUsed aApiUsed) { iTraceData.iApiUsed = aApiUsed; TInt result = iTraceTester.SendTraceL(iTraceData); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_check_performance_step.cpp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_check_performance_step.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_check_performance_step.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -49,12 +49,11 @@ SetTestStepName(KCheckPerformanceStep); SetLogFilename(KLogFilename); + DeleteLogFile(); } TVerdict CCheckPerformanceStep::doTestStepPreambleL() { - DeleteLogFileL(); - if(TestStepResult()==EPass) { //SetTestStepResult(EFail); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_check_record_content_step.cpp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_check_record_content_step.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_check_record_content_step.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -52,12 +52,11 @@ SetTestStepName(KCheckRecordContentStep); SetLogFilename(KLogFilename); + DeleteLogFile(); } TVerdict CCheckRecordContentStep::doTestStepPreambleL() { - DeleteLogFileL(); - if(TestStepResult()==EPass) { //SetTestStepResult(EFail); @@ -80,7 +79,7 @@ TInt error = KErrNone; INFO_PRINTF1(_L("-------- Writing traces --------")); - error = WriteTracesL(); + error = WriteTraces(); if(error) { INFO_PRINTF2(_L("ERROR: Error when writing traces, error %i"), error); @@ -277,7 +276,7 @@ return trace; } -TInt CCheckRecordContentStep::WriteTracesL() +TInt CCheckRecordContentStep::WriteTraces() { TInt error = KErrNone; TInt lastError = KErrNone; @@ -420,11 +419,11 @@ TInt32 temp = TInt32(sent->iPc-logged->iPc); if ( temp < 4) INFO_PRINTF2(_L("Pc value 0x%x - ok"), (TInt) sent->iPc); -// else -// { -// INFO_PRINTF4(_L("Pc value - ERROR: sent 0x%x, logged 0x%x, temp difference %u"), sent->iPc, logged->iPc, temp); -// error = KErrCorrupt; -// } + else + { + INFO_PRINTF4(_L("Pc value - ERROR: sent 0x%x, logged 0x%x, temp difference %u"), sent->iPc, logged->iPc, temp); + error = KErrCorrupt; + } //payload ... TInt j = sizeof(sent->iRawData)/4 - 1; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_multiparttrace.cpp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_multiparttrace.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_multiparttrace.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -80,7 +80,7 @@ INFO_PRINTF1(_L("INFO: configuring ULogger...")); User::LeaveIfError( iUlogger.Connect() ); CClearConfig configIni; - configIni.ClearL(iUlogger); + configIni.Clear(iUlogger); iUlogger.SetSecondaryFilteringEnabled(EFalse); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_suite_step_base.cpp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_suite_step_base.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_suite_step_base.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -81,7 +81,7 @@ return KErrNone; } -void CTe_UTraceSuiteStepBase::DeleteLogFileL() +void CTe_UTraceSuiteStepBase::DeleteLogFile() { iLogger.DeleteLogfileL(); } diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_tracer.cpp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_tracer.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_tracer.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -31,7 +31,7 @@ TUint32 callResults[KNumberOfTraceCallIterations]; for(TInt i = 0; i < KNumberOfTraceCallIterations; i++) { - error = TimeTraceCallL(aTraceData, aTime, aCount); + error = TimeTraceCall(aTraceData, aTime, aCount); callResults[i] = aTime; } TUint32 total = 0; @@ -42,7 +42,7 @@ } -TInt TTraceTester::TimeTraceCallL(TTraceConfigs& aTraceData, TUint32& aTime, TUint32& aCount) +TInt TTraceTester::TimeTraceCall(TTraceConfigs& aTraceData, TUint32& aTime, TUint32& aCount) { TInt error = KErrNotSupported; if(TApiCaller::IsKernelTrace(aTraceData.iApiUsed)) diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/uloggerconfig.cpp --- a/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/uloggerconfig.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/uloggerconfig.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -26,7 +26,7 @@ /*Constructor*/ } -void CClearConfig::ClearL(RULogger& aLoggerSession) +void CClearConfig::Clear(RULogger& aLoggerSession) { aLoggerSession.Stop(); aLoggerSession.DeActivateInputPlugin(); @@ -58,9 +58,9 @@ } //NB: currently this method does not set the default values for serial and usb! hanging the server -void CClearConfig::DefaultL(RULogger& aLoggerSession) +void CClearConfig::Default(RULogger& aLoggerSession) { - ClearL(aLoggerSession); + Clear(aLoggerSession); //Now set default configurations shipped with ulogger CArrayFixFlat* array = new(ELeave) CArrayFixFlat(4); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/group/bld.inf --- a/traceservices/tracefw/ulogger/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -15,24 +15,14 @@ // // +/** + @file +*/ + #include "../../utf_trace_api/group/bld.inf" -PRJ_EXPORTS -../inc/uloggerclient.h OS_LAYER_PLATFORM_EXPORT_PATH(uloggerclient.h) -../inc/uloggeroutputplugin.h OS_LAYER_PLATFORM_EXPORT_PATH(uloggeroutputplugin.h) -../inc/uloggerdatatypes.h OS_LAYER_PLATFORM_EXPORT_PATH(uloggerdatatypes.h) -../inc/uloggerinputplugin.h OS_LAYER_PLATFORM_EXPORT_PATH(uloggerinputplugin.h) -../inc/uloggerplugin.h OS_LAYER_PLATFORM_EXPORT_PATH(uloggerplugin.h) -../inc/uloggerplugin.inl OS_LAYER_PLATFORM_EXPORT_PATH(uloggerplugin.inl) -../inc/uloggercommands.h OS_LAYER_PLATFORM_EXPORT_PATH(uloggercommands.h) -../inc/uloggershared.h OS_LAYER_PLATFORM_EXPORT_PATH(uloggershared.h) +PRJ_MMPFILES -../inc/uloggerconfig.ini c:/private/10273881/uloggerconfig.ini -../inc/uloggerconfig.ini z:/private/10273881/uloggerconfig.ini - -../group/ulogger.iby /epoc32/rom/include/ulogger.iby - -PRJ_MMPFILES uloggercommand.mmp uloggersysconfig.mmp uloggerpluginframework.mmp @@ -41,3 +31,23 @@ uloggerclient.mmp uloggerserver.mmp uloggersysstart.mmp + +PRJ_EXPORTS + +../inc/uloggerclient.h uloggerclient.h +../inc/uloggeroutputplugin.h uloggeroutputplugin.h +../inc/uloggerdatatypes.h uloggerdatatypes.h +../inc/uloggerinputplugin.h uloggerinputplugin.h +../inc/uloggerplugin.h uloggerplugin.h +../inc/uloggerplugin.inl uloggerplugin.inl +../inc/uloggercommands.h uloggercommands.h +../inc/uloggershared.h uloggershared.h + + + +../inc/uloggerconfig.ini c:/private/10273881/uloggerconfig.ini +../inc/uloggerconfig.ini z:/private/10273881/uloggerconfig.ini + + +//IBY file +../group/ulogger.iby /epoc32/rom/include/ulogger.iby diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/group/uloggerclient.mmp --- a/traceservices/tracefw/ulogger/group/uloggerclient.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/group/uloggerclient.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -15,22 +15,23 @@ // // +/** + @file +*/ + TARGET uloggerclient.dll TARGETTYPE dll UID 0x1000008d 0x1028304C VENDORID 0x70000001 CAPABILITY ALL -TCB -OS_LAYER_SYSTEMINCLUDE -USERINCLUDE ../inc SOURCEPATH ../src/client SOURCE uloggerclient.cpp -LIBRARY euser.lib -LIBRARY bafl.lib -LIBRARY estor.lib -LIBRARY efsrv.lib +USERINCLUDE ../inc +OS_LAYER_SYSTEMINCLUDE_SYMBIAN +LIBRARY euser.lib bafl.lib estor.lib efsrv.lib DEFFILE ULOGGERCLIENT.DEF diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/group/uloggercommand.mmp --- a/traceservices/tracefw/ulogger/group/uloggercommand.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/group/uloggercommand.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -15,6 +15,10 @@ // // +/** + @file +*/ + TARGET uloggercommand.dll TARGETTYPE DLL UID 0x1000008d 0x102857F5 @@ -23,13 +27,10 @@ DEFFILE ULOGGERCOMMAND.DEF -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc - SOURCEPATH ../src/command SOURCE uloggercommands.cpp -LIBRARY euser.lib -LIBRARY etext.lib -LIBRARY ecom.lib +USERINCLUDE ../inc +OS_LAYER_SYSTEMINCLUDE_SYMBIAN + +LIBRARY euser.lib etext.lib ecom.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/group/uloggerplugfile.mmp --- a/traceservices/tracefw/ulogger/group/uloggerplugfile.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/group/uloggerplugfile.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -15,23 +15,26 @@ // // +/** + @file +*/ + TARGET uloggerfileplugin.dll TARGETTYPE PLUGIN UID 0x10009D8D 0x10273886 VENDORID 0x70000001 CAPABILITY CommDD NetworkControl LocalServices ProtServ NetworkServices -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc SOURCEPATH ../src/outfrwkchans/file -SOURCE uloggerfileplugin.cpp +SOURCE uloggerfileplugin.cpp + +USERINCLUDE ../inc +OS_LAYER_SYSTEMINCLUDE_SYMBIAN start RESOURCE 10273886.rss TARGET uloggerfileplugin.rsc end -LIBRARY euser.lib -LIBRARY efsrv.lib -LIBRARY ecom.lib + +LIBRARY euser.lib efsrv.lib ecom.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/group/uloggerpluginframework.mmp --- a/traceservices/tracefw/ulogger/group/uloggerpluginframework.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/group/uloggerpluginframework.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -15,6 +15,10 @@ // // +/** + @file +*/ + TARGET uloggerpluginframework.dll TARGETTYPE dll UID 0x1000008d 0x102857F4 @@ -22,19 +26,17 @@ CAPABILITY CommDD LocalServices NetworkControl NetworkServices ProtServ DEFFILE ULOGGERPLUGINFRAMEWORK.DEF -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc -USERINCLUDE ../../common_utils/lightlogger/inc -USERINCLUDE ../src/pluginframework - SOURCEPATH ../src/pluginframework SOURCE outputframework.cpp SOURCE inputframework.cpp SOURCE inputdata.cpp SOURCE pluginallocator.cpp -LIBRARY euser.lib -LIBRARY etext.lib -LIBRARY ecom.lib + +USERINCLUDE ../inc +USERINCLUDE ../../common_utils/lightlogger/inc +USERINCLUDE ../src/pluginframework +OS_LAYER_SYSTEMINCLUDE_SYMBIAN + +LIBRARY euser.lib etext.lib ecom.lib LIBRARY uloggercommand.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/group/uloggerplugserial.mmp --- a/traceservices/tracefw/ulogger/group/uloggerplugserial.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/group/uloggerplugserial.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -15,25 +15,26 @@ // // +/** + @file +*/ + TARGET uloggerserialplugin.dll TARGETTYPE PLUGIN UID 0x10009D8D 0x10273887 VENDORID 0x70000001 CAPABILITY CommDD NetworkControl LocalServices ProtServ NetworkServices -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc -USERINCLUDE ../../common_utils/lightlogger/inc SOURCEPATH ../src/outfrwkchans/serial -SOURCE uloggerserialplugin.cpp +SOURCE uloggerserialplugin.cpp START RESOURCE 10273887.rss TARGET uloggerserialplugin.rsc end -LIBRARY euser.lib -LIBRARY efsrv.lib -LIBRARY c32.lib -LIBRARY ecom.lib + +USERINCLUDE ../inc +USERINCLUDE ../../common_utils/lightlogger/inc +OS_LAYER_SYSTEMINCLUDE_SYMBIAN +LIBRARY euser.lib efsrv.lib c32.lib ecom.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/group/uloggerserver.mmp --- a/traceservices/tracefw/ulogger/group/uloggerserver.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/group/uloggerserver.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -15,29 +15,26 @@ // // +/** + @file +*/ + target uloggerserver.exe targettype exe uid 0x1000008d 0x10273881 CAPABILITY CommDD NetworkControl LocalServices ProtServ NetworkServices -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc -USERINCLUDE ../../common_utils/lightlogger/inc -USERINCLUDE ../src/pluginframework SOURCEPATH ../src/uloggerserver SOURCE uloggerserver.cpp SOURCE uloggersrvsession.cpp SOURCE uloggerwatcher.cpp -LIBRARY euser.lib -LIBRARY estor.lib -LIBRARY bafl.lib -LIBRARY hal.lib -LIBRARY efsrv.lib -LIBRARY ecom.lib -LIBRARY btracec.lib -LIBRARY uloggerpluginframework.lib -LIBRARY uloggersysconfig.lib -LIBRARY uloggercommand.lib + +USERINCLUDE ../inc +USERINCLUDE ../../common_utils/lightlogger/inc +USERINCLUDE ../src/pluginframework +OS_LAYER_SYSTEMINCLUDE_SYMBIAN + +LIBRARY euser.lib estor.lib bafl.lib hal.lib efsrv.lib ecom.lib +LIBRARY btracec.lib uloggerpluginframework.lib uloggersysconfig.lib uloggercommand.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/group/uloggersysconfig.mmp --- a/traceservices/tracefw/ulogger/group/uloggersysconfig.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/group/uloggersysconfig.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -15,24 +15,24 @@ // // +/** + @file +*/ + TARGET uloggersysconfig.dll TARGETTYPE DLL UID 0x1000008d 0x10273889 VENDORID 0x70000001 CAPABILITY CommDD LocalServices NetworkControl NetworkServices ProtServ -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc - SOURCEPATH ../src/sysconfig SOURCE uloggersysconfig.cpp -SOURCE sysconfigimpl.cpp -SOURCE configfilemanager.cpp +SOURCE sysconfigimpl.cpp configfilemanager.cpp + -LIBRARY euser.lib -LIBRARY efsrv.lib -LIBRARY bsulinifile.lib -LIBRARY hal.lib +USERINCLUDE ../inc +OS_LAYER_SYSTEMINCLUDE_SYMBIAN + +LIBRARY euser.lib efsrv.lib bsulinifile.lib hal.lib DEFFILE ULOGGERSYSCONFIG.DEF diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/group/uloggersysstart.mmp --- a/traceservices/tracefw/ulogger/group/uloggersysstart.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/group/uloggersysstart.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -15,22 +15,22 @@ // // +/** + @file +*/ + target uloggersysstart.exe targettype exe uid 0x10273884 0x10273885 CAPABILITY None -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc - SOURCEPATH ../src/sysstarter SOURCE uloggersysstarter.cpp -LIBRARY euser.lib -LIBRARY hal.lib -LIBRARY efsrv.lib -LIBRARY uloggerclient.lib +USERINCLUDE ../inc +OS_LAYER_SYSTEMINCLUDE_SYMBIAN + +LIBRARY euser.lib hal.lib efsrv.lib uloggerclient.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/src/outfrwkchans/file/uloggerfileplugin.cpp --- a/traceservices/tracefw/ulogger/src/outfrwkchans/file/uloggerfileplugin.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/src/outfrwkchans/file/uloggerfileplugin.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -15,8 +15,8 @@ #include #include +#include "uloggerfileplugin.h" -#include "uloggerfileplugin.h" namespace Ulogger { diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/src/outfrwkchans/serial/uloggerserialplugin.cpp --- a/traceservices/tracefw/ulogger/src/outfrwkchans/serial/uloggerserialplugin.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/src/outfrwkchans/serial/uloggerserialplugin.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -15,7 +15,6 @@ #include #include - #include "uloggerserialplugin.h" #if defined(__LIGHTLOGGER_ENABLED) diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/src/pluginframework/pluginallocator.cpp --- a/traceservices/tracefw/ulogger/src/pluginframework/pluginallocator.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/src/pluginframework/pluginallocator.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -79,12 +79,12 @@ EXPORT_C void CPluginAllocator::ConstructL(const TPtrC8& aOutputPluginName, const TPtrC8& aInputPluginName) { //create output and control channels - User::LeaveIfError(this->CreateChannelsL(aOutputPluginName, aInputPluginName)); + User::LeaveIfError(this->CreateChannels(aOutputPluginName, aInputPluginName)); } /*!This function create Output channel according to aOutputSettings. */ -TInt CPluginAllocator::CreateChannelsL(const TPtrC8& aOutputPluginName, const TPtrC8& aInputPluginName) +TInt CPluginAllocator::CreateChannels(const TPtrC8& aOutputPluginName, const TPtrC8& aInputPluginName) { TInt retVal = KErrNone; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/src/pluginframework/pluginallocator.h --- a/traceservices/tracefw/ulogger/src/pluginframework/pluginallocator.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/src/pluginframework/pluginallocator.h Wed Sep 01 12:39:58 2010 +0100 @@ -53,7 +53,7 @@ private: CPluginAllocator(); - TInt CreateChannelsL(const TPtrC8& aOutputPluginName, const TPtrC8& aInputPluginName); + TInt CreateChannels(const TPtrC8& aOutputPluginName, const TPtrC8& aInputPluginName); private: CPlugin *iOutputPluginBase; //output plugin instance diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/src/sysconfig/uloggersysconfig.cpp --- a/traceservices/tracefw/ulogger/src/sysconfig/uloggersysconfig.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/src/sysconfig/uloggersysconfig.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -57,7 +57,7 @@ */ EXPORT_C void CConfigSettingsIter::Reset() { - iImpl->Reset(); + return iImpl->Reset(); } /** diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/src/uloggerserver/uloggerserver.cpp --- a/traceservices/tracefw/ulogger/src/uloggerserver/uloggerserver.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/src/uloggerserver/uloggerserver.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -276,7 +276,7 @@ TInt ret= KErrNone; //check configuration file in user path (\\ulogger\\uloggerconfig.ini) - ret = GetInstalledInputPluginsL(activePluginsArray); + ret = GetInstalledInputPlugins(activePluginsArray); if(ret==KErrNone) { ret = KErrNotFound; @@ -334,7 +334,7 @@ return KErrNotFound; else { - TInt ret = GetValuesL(aMediaName,aListBuffer); + TInt ret = GetValues(aMediaName,aListBuffer); if(ret == KErrNotFound) //this error indicate that there is no section in config file, plug-in exists ret = KErrNone; return ret; @@ -347,7 +347,7 @@ Function to get values from the configuration file (i.e. for filters,plugin settings) This should leave with KErrNotFound if it cannot find the configuration file */ -TInt CULoggerServer::GetValuesL(const TDesC8 &aSectionName, RArray& aListBuffer) +TInt CULoggerServer::GetValues(const TDesC8 &aSectionName, RArray& aListBuffer) { TPtrC8 key; TPtrC8 val; @@ -386,7 +386,7 @@ @return KErrNone, if successful, otherwise one of the other system-wide error codes. */ -TInt CULoggerServer::SetActiveFilterL(RArray aCategory, TInt aFilterType) +TInt CULoggerServer::SetActiveFilter(RArray aCategory, TInt aFilterType) { TInt error = KErrNone; if(aFilterType == 1) @@ -490,7 +490,7 @@ @return KErrNone, if successful, otherwise one of the other system-wide error codes. */ -TInt CULoggerServer::SetBufferSizeL(TInt aSize) +TInt CULoggerServer::SetBufferSize(TInt aSize) { if(aSize > KMaxBufferSize || aSize < 1) return KErrArgument; @@ -532,7 +532,7 @@ @return KErrNone, if successful, otherwise one of the other system-wide error codes. */ -TInt CULoggerServer::SetDataNotificationSizeL(TInt aSize) +TInt CULoggerServer::SetDataNotificationSize(TInt aSize) { if(aSize > KMaxDnsSize || aSize < 0) return KErrArgument; @@ -644,7 +644,7 @@ RArray aValues; if(aFilterType == 1) { - ret = GetValuesL(KPrimaryFilterSection,aValues); + ret = GetValues(KPrimaryFilterSection,aValues); if(ret==KErrNone) { TInt i =0; @@ -664,7 +664,7 @@ } else if(aFilterType == 2) { - ret = GetValuesL(KSecondaryFilterSection,aValues); + ret = GetValues(KSecondaryFilterSection,aValues); if(ret==KErrNone) { TInt i =0; @@ -739,7 +739,7 @@ -TInt CULoggerServer::GetInstalledInputPluginsL(RArray& aListBuffer) +TInt CULoggerServer::GetInstalledInputPlugins(RArray& aListBuffer) { #if defined(__LIGHTLOGGER_ENABLED) && defined(__VERBOSE_MODE) __MARK_METHOD("CULoggerServer::GetInstalledControlPlugins") @@ -773,7 +773,7 @@ */ TInt CULoggerServer::GetActiveOutputPlugin(RArray& aListBuffer) { - TInt errCode = GetValuesL(KActiveSection,aListBuffer); + TInt errCode = GetValues(KActiveSection,aListBuffer); //plugins are received as, e.g. '1 uloggerfileplugin' (.ini file syntax) //we have to remove number from array for(TInt i=0; i& aListBuffer) { - return GetValuesL(KActiveControlSection,aListBuffer); + return GetValues(KActiveControlSection,aListBuffer); } /** @@ -884,7 +884,7 @@ if(iBtraceOpen == EFalse) { if(iIsBooting) - error = TraceSettingsOnBootL(); + error = TraceSettingsOnBoot(); else error = iTrace.Open(); @@ -1015,8 +1015,9 @@ Gets the Trace settings on boot @return none */ -TInt CULoggerServer::TraceSettingsOnBootL() +TInt CULoggerServer::TraceSettingsOnBoot() { + TInt trace = FALSE; RArray category; @@ -1026,9 +1027,9 @@ TInt bufferSize = iTrace.BufferSize(); //To get the buffer size set at boot if(bufferSize <= 0 && bufferSize > KMaxBufferSize) - SetBufferSizeL(KMaxBufferSize); //Update config + SetBufferSize(KMaxBufferSize); //Update config else - SetBufferSizeL(bufferSize); //Update config + SetBufferSize(bufferSize); //Update config for(TUint i=0; iCreatePackage((void*)result.Ptr(), result.Length()); @@ -1435,7 +1436,7 @@ TInt bufSize; TLex8 lex(aArguments[0]); if((errCode = lex.Val(bufSize)) == KErrNone) - errCode = SetBufferSizeL(bufSize); + errCode = SetBufferSize(bufSize); } else errCode = KErrArgument; @@ -1484,7 +1485,7 @@ TInt dns; TLex8 lex(aArguments[0]); if((errCode = lex.Val(dns)) == KErrNone) - errCode = SetDataNotificationSizeL(dns); + errCode = SetDataNotificationSize(dns); else errCode = KErrArgument; } @@ -1936,7 +1937,7 @@ #endif RArray tmpArray; - errCode = GetInstalledInputPluginsL(tmpArray); + errCode = GetInstalledInputPlugins(tmpArray); result.Num(errCode); data = inputData->CreatePackage((void*)result.Ptr(), result.Length()); @@ -2014,7 +2015,7 @@ TInt errCode = 0; CPlugin::TPluginInterface interfaceId; //assign filter value - interfaceId = (aFilter == EOutputPluginFilter ? MOutputPlugin::iInterfaceId : MInputPlugin::iInterfaceId); + aFilter==EOutputPluginFilter ? interfaceId=MOutputPlugin::iInterfaceId : interfaceId=MInputPlugin::iInterfaceId; //filter plugins TInt i=0; @@ -2055,7 +2056,7 @@ if(aPluginFilter == EOutputPluginFilter) GetInstalledOutputPlugins(pluginsArray); else if(aPluginFilter == EInputPluginFilter) - GetInstalledInputPluginsL(pluginsArray); + GetInstalledInputPlugins(pluginsArray); for(TInt i=0; i& aListBuffer,TInt aFilterType); - TInt SetActiveFilterL(RArray aCategory, TInt aFilterType); + TInt SetActiveFilter(RArray aCategory, TInt aFilterType); TInt RemoveActiveFilter(RArray& aValue, const TInt aFilterType); TInt SetSecondaryFiltering(const TDesC8& aEnabled); TInt GetSecondaryFiltering(TBool& aEnabled); @@ -102,14 +102,14 @@ TInt DeActivateInputPlugin(const TDesC8& aPluginname); TInt GetActiveInputPlugin(RArray& aListBuffer); TInt SetActiveInputPlugin(const TDesC8& aPluginname); - TInt GetInstalledInputPluginsL(RArray& aListBuffer); + TInt GetInstalledInputPlugins(RArray& aListBuffer); //buffers TInt GetOptionsSettingsL(const TDesC8& aMedianame, RArray& aListBuffer); TInt GetBufandDataNotifyValuesL(const TDesC8& aSetting,TInt& value); TInt SetBufferMode(const TDesC8& aValue); - TInt SetBufferSizeL(TInt aSize); - TInt SetDataNotificationSizeL(TInt aSize); + TInt SetBufferSize(TInt aSize); + TInt SetDataNotificationSize(TInt aSize); private: //server related stuff @@ -124,7 +124,7 @@ CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const; //on boot things - TInt TraceSettingsOnBootL(); + TInt TraceSettingsOnBoot(); TInt ResetBtracePrimaryFilters(RBTrace& aBTrace); //action related things @@ -153,7 +153,7 @@ //filter related stuff ControlData* SetPrimaryFilters(RArray &aArguments); - TInt GetValuesL(const TDesC8& aSectionName, RArray& aListBuffer); + TInt GetValues(const TDesC8& aSectionName, RArray& aListBuffer); private: //data TInt iRunAsService; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/src/uloggerserver/uloggersession.h --- a/traceservices/tracefw/ulogger/src/uloggerserver/uloggersession.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/src/uloggerserver/uloggersession.h Wed Sep 01 12:39:58 2010 +0100 @@ -45,7 +45,7 @@ CULoggerSession(RThread& aClient, CULoggerServer& aServer); void ConstructL(); - void SendIntegerL(const RMessage2& aMessage, TUint32 aInt); + void SendInteger(const RMessage2& aMessage, TUint32 aInt); //void PanicClient(TInt aPanic) const; //data diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/src/uloggerserver/uloggersrvsession.cpp --- a/traceservices/tracefw/ulogger/src/uloggerserver/uloggersrvsession.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/src/uloggerserver/uloggersrvsession.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -141,7 +141,7 @@ filterArray.Append((TUint32)array->At(i)); } - error = iServer.SetActiveFilterL(filterArray, EPrimaryFilter); + error = iServer.SetActiveFilter(filterArray, EPrimaryFilter); CleanupStack::PopAndDestroy(2,desData); //array, desData filterArray.Close(); @@ -218,7 +218,7 @@ TUint32 tmp=1; InternalizeFromBufL(readPtr, filterArray, tmp); - error = iServer.SetActiveFilterL(filterArray,ESecondaryFilter); + error = iServer.SetActiveFilter(filterArray,ESecondaryFilter); CleanupStack::PopAndDestroy(); //desData filterArray.Close(); @@ -285,7 +285,7 @@ { TBool enabled = EFalse; iServer.GetSecondaryFiltering(enabled); - SendIntegerL(aMessage, (TInt)enabled); + SendInteger(aMessage, (TInt)enabled); } break; @@ -452,7 +452,7 @@ { //Get the installed plugins RArray tmpArray; - error = iServer.GetInstalledInputPluginsL(tmpArray); + error = iServer.GetInstalledInputPlugins(tmpArray); if(!error) { // @@ -547,7 +547,7 @@ { //Resize buffer size TInt bufferSize = aMessage.Int0(); - error = iServer.SetBufferSizeL(bufferSize); + error = iServer.SetBufferSize(bufferSize); } break; @@ -556,7 +556,7 @@ //Get buffer size TInt bufferSize = 0; error = iServer.GetBufandDataNotifyValuesL(KBuffer,bufferSize); - SendIntegerL(aMessage, bufferSize); + SendInteger(aMessage, bufferSize); } break; @@ -577,7 +577,7 @@ //Get buffer size TInt bufferMode = 3; error = iServer.GetBufandDataNotifyValuesL(KBufferMode,bufferMode); - SendIntegerL(aMessage, bufferMode); + SendInteger(aMessage, bufferMode); } break; @@ -585,7 +585,7 @@ { //Set data notification size TInt dataNotification = aMessage.Int0(); - error = iServer.SetDataNotificationSizeL(dataNotification); + error = iServer.SetDataNotificationSize(dataNotification); } break; @@ -594,7 +594,7 @@ //Get Data Notification size TInt dataNotification = 0; error = iServer.GetBufandDataNotifyValuesL(KDataNotification,dataNotification); - SendIntegerL(aMessage, dataNotification); + SendInteger(aMessage, dataNotification); } break; @@ -607,7 +607,7 @@ aMessage.Complete(error); } -void CULoggerSession::SendIntegerL(const RMessage2& aMessage, TUint32 aInt) +void CULoggerSession::SendInteger(const RMessage2& aMessage, TUint32 aInt) { HBufC8* size = HBufC8::NewLC(32); size->Des().Num(aInt); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/group/bld.inf --- a/traceservices/tracefw/ulogger/unit_test/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -12,57 +12,65 @@ // // Description: // +/** + @file bld.inf + @internalTechnology +*/ +PRJ_PLATFORMS +WINSCW +ARMV5 PRJ_TESTEXPORTS + //te_outfrwk files -te_outfrwk.iby /epoc32/rom/include/te_outfrwk.iby -../scripts/te_outfrwk.script z:/testdata/scripts/te_outfrwk.script +te_outfrwk.iby /epoc32/rom/include/te_outfrwk.iby +../scripts/te_outfrwk.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_outfrwk.script + //te_sysconfig -te_sysconfig.iby /epoc32/rom/include/te_sysconfig.iby -../scripts/te_sysconfig.script z:/testdata/scripts/te_sysconfig.script +te_sysconfig.iby /epoc32/rom/include/te_sysconfig.iby +../scripts/te_sysconfig.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_sysconfig.script + //te_outfrwkchans/te_file -te_file.iby /epoc32/rom/include/te_file.iby -../scripts/te_file.script z:/testdata/scripts/te_file.script +te_file.iby /epoc32/rom/include/te_file.iby +../scripts/te_file.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_file.script //te_outfrwkchans/te_serial -te_serial.iby /epoc32/rom/include/te_serial.iby -../scripts/te_serial.script z:/testdata/scripts/te_serial.script +te_serial.iby /epoc32/rom/include/te_serial.iby +../scripts/te_serial.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_serial.script //te_server -te_server.iby /epoc32/rom/include/te_server.iby -../scripts/te_server.script z:/testdata/scripts/te_server.script +te_server.iby /epoc32/rom/include/te_server.iby +../scripts/te_server.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_server.script //te_client -te_client.iby /epoc32/rom/include/te_client.iby -../scripts/te_client.script z:/testdata/scripts/te_client.script +te_client.iby /epoc32/rom/include/te_client.iby +../scripts/te_client.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_client.script //to run all script files at once. -te_unittestsuite.iby /epoc32/rom/include/te_unittestsuite.iby -../scripts/te_unittestsuite.script z:/testdata/scripts/te_unittestsuite.script +te_unittestsuite.iby /epoc32/rom/include/te_unittestsuite.iby +../scripts/te_unittestsuite.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_unittestsuite.script //to run automated script files at once -te_automatedsuite.iby /epoc32/rom/include/te_automatedsuite.iby -../scripts/te_automatedsuite.script z:/testdata/scripts/te_automatedsuite.script -//Test script for platform that doesn't support serial port -../scripts/te_automatedsuite_noserial.script z:/testdata/scripts/te_automatedsuite_noserial.script +te_automatedsuite.iby /epoc32/rom/include/te_automatedsuite.iby +../scripts/te_automatedsuite.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_automatedsuite.script //te_createconfig -te_createconfig.iby /epoc32/rom/include/te_createconfig.iby +te_createconfig.iby /epoc32/rom/include/te_createconfig.iby //te_sysstart -te_sysstart.iby /epoc32/rom/include/te_sysstart.iby -../scripts/te_sysstart.script z:/testdata/scripts/te_sysstart.script +te_sysstart.iby /epoc32/rom/include/te_sysstart.iby +../scripts/te_sysstart.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_sysstart.script PRJ_TESTMMPFILES -te_outfrwk.mmp manual -te_createconfig.mmp manual -te_sysconfig.mmp manual -te_file.mmp manual -te_serial.mmp manual -te_server.mmp manual -te_client.mmp manual -te_sysstart.mmp manual +te_outfrwk.mmp +te_createconfig.mmp +te_sysconfig.mmp +te_file.mmp +te_serial.mmp +te_server.mmp +te_client.mmp +te_sysstart.mmp diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/group/te_automatedsuite.iby --- a/traceservices/tracefw/ulogger/unit_test/group/te_automatedsuite.iby Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/group/te_automatedsuite.iby Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -28,6 +28,7 @@ #include +file=ABI_DIR\DEBUG_DIR\RUNTESTS.EXE System\Programs\RUNTESTS.EXE + data=EPOCROOT##epoc32\release\winscw\udeb\z\testdata\scripts\te_automatedsuite.script testData\scripts\te_automatedsuite.script -data=EPOCROOT##epoc32\release\winscw\udeb\z\testdata\scripts\te_automatedsuite_noserial.script testData\scripts\te_automatedsuite_noserial.script #endif diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/group/te_client.mmp --- a/traceservices/tracefw/ulogger/unit_test/group/te_client.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/group/te_client.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -20,10 +20,7 @@ UID 0x1000007A 0x101F7784 CAPABILITY NONE -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../../inc - +//Please add any change under here SOURCEPATH ../te-client SOURCE te_uloggerclientsuiteserver.cpp SOURCE te_uloggerclientsuitestepbase.cpp @@ -44,6 +41,12 @@ SOURCE testdeactivateoutputpluginstep.cpp SOURCE testruloggerapi_ext.cpp +USERINCLUDE ../../inc + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test + +//Please add your system include under here. LIBRARY euser.lib LIBRARY testexecuteutils.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/group/te_createconfig.mmp --- a/traceservices/tracefw/ulogger/unit_test/group/te_createconfig.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/group/te_createconfig.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -19,15 +19,19 @@ TARGETTYPE exe UID 0x1000007A 0x101F7784 -OS_LAYER_SYSTEMINCLUDE -USERINCLUDE ../../inc - +//Please add any change under here SOURCEPATH ../te-createconfig SOURCE te_createconfigserver.cpp SOURCE te_clearconfig.cpp SOURCE te_createconfigemptystep.cpp SOURCE te_createconfigfullstep.cpp +USERINCLUDE ../../inc + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test + +//Please add your system include under here. LIBRARY euser.lib LIBRARY testexecuteutils.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/group/te_file.mmp --- a/traceservices/tracefw/ulogger/unit_test/group/te_file.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/group/te_file.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -21,16 +21,24 @@ CAPABILITY NONE VENDORID 0x70000001 -OS_LAYER_SYSTEMINCLUDE +//--------------------------------------- +// Specific files for TEFUnit +//--------------------------------------- +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/libc +SYSTEMINCLUDE /epoc32/include/ecom USERINCLUDE ../te-outfrwkchans/te-file USERINCLUDE ../../inc USERINCLUDE ../../src/outfrwkchans/file -userinclude ../../src/pluginframework SOURCEPATH ../../src/outfrwkchans/file SOURCE uloggerfileplugin.cpp +userinclude ../../src/pluginframework + + SOURCEPATH ../te-outfrwkchans/te-file SOURCE uloggerfileplugintest.cpp SOURCE te_filesuiteserver.cpp diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/group/te_outfrwk.mmp --- a/traceservices/tracefw/ulogger/unit_test/group/te_outfrwk.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/group/te_outfrwk.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -15,21 +15,29 @@ // // +/** + @file +*/ + + TARGET uloggeroutfrmwkserver.exe TARGETTYPE EXE uid 0x1000008d 0x10273889 CAPABILITY CommDD NetworkControl LocalServices ProtServ VENDORID 0x70000001 -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../../inc -USERINCLUDE ../../src/pluginframework SOURCEPATH ../te-outfrwk SOURCE te_outfrwk_testserver.cpp SOURCE te_outfrwk_teststep.cpp +USERINCLUDE ../../inc + +USERINCLUDE ../../src/pluginframework +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/ecom + LIBRARY bafl.lib LIBRARY euser.lib LIBRARY testexecutelogclient.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/group/te_serial.mmp --- a/traceservices/tracefw/ulogger/unit_test/group/te_serial.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/group/te_serial.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -21,16 +21,24 @@ CAPABILITY CommDD NetworkControl LocalServices ProtServ VENDORID 0x70000001 -OS_LAYER_SYSTEMINCLUDE +//--------------------------------------- +// Specific files for TEFUnit +//--------------------------------------- +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/libc +SYSTEMINCLUDE /epoc32/include/ecom USERINCLUDE ../te-outfrwkchans/te-serial USERINCLUDE ../../inc USERINCLUDE ../../src/outfrwkchans/serial -USERINCLUDE ../../src/pluginframework SOURCEPATH ../../src/outfrwkchans/serial SOURCE uloggerserialplugin.cpp +USERINCLUDE ../../src/pluginframework + + SOURCEPATH ../te-outfrwkchans/te-serial SOURCE uloggerserialplugintest.cpp SOURCE te_serialsuiteserver.cpp @@ -52,3 +60,4 @@ #endif SMPSAFE + diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/group/te_server.mmp --- a/traceservices/tracefw/ulogger/unit_test/group/te_server.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/group/te_server.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -17,18 +17,13 @@ TARGET te_uloggerservertestsuite.exe TARGETTYPE exe -UID 0x1000007A 0x10273881 -CAPABILITY CommDD NetworkControl LocalServices ProtServ +UID 0x1000007A 0x10273881 +//0x101F7784 +CAPABILITY CommDD NetworkControl LocalServices ProtServ MACRO __ULOGGER_SERVER_UNIT_TEST -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../te-server -USERINCLUDE ../../inc -USERINCLUDE ../../src/pluginframework -USERINCLUDE ../../src/uloggerserver - +//Please add any change under here SOURCEPATH ../te-server SOURCE te_uloggerservertestsuiteserver.cpp SOURCE te_uloggerservertestsuitestepbase.cpp @@ -45,6 +40,9 @@ SOURCE uloggersrvsession.cpp SOURCE uloggerserver.cpp +SMPSAFE + + SOURCEPATH ../../src/pluginframework SOURCE pluginallocator.cpp SOURCE inputframework.cpp @@ -54,14 +52,19 @@ SOURCEPATH ../../src/command SOURCE uloggercommands.cpp -LIBRARY euser.lib -LIBRARY estor.lib -LIBRARY bafl.lib -LIBRARY hal.lib -LIBRARY efsrv.lib -LIBRARY btracec.lib -LIBRARY uloggersysconfig.lib +USERINCLUDE ../te-server +USERINCLUDE ../../inc +USERINCLUDE ../../src/pluginframework +USERINCLUDE ../../src/uloggerserver + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/ecom + + + +LIBRARY euser.lib estor.lib bafl.lib hal.lib efsrv.lib btracec.lib uloggersysconfig.lib LIBRARY testexecuteutils.lib LIBRARY testexecutelogclient.lib ecom.lib -SMPSAFE + diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/group/te_sysconfig.mmp --- a/traceservices/tracefw/ulogger/unit_test/group/te_sysconfig.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/group/te_sysconfig.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -15,20 +15,20 @@ // // +/** + @file +*/ + + TARGET te_syscfg.exe TARGETTYPE exe -VENDORID 0x70000001 -UID 0x1000008d 0x10273881 -CAPABILITY NONE + +VENDORID 0x70000001 +UID 0x1000008d 0x10273881 +CAPABILITY NONE MACRO SYSCONFIG_COMTEST -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../../src/sysconfig -USERINCLUDE ../../inc -USERINCLUDE ../../src/pluginframework - SOURCEPATH ../te-sysconfig SOURCE te_test_syscfgserver.cpp SOURCE te_test_syscfgstep.cpp @@ -37,6 +37,13 @@ source uloggersysconfig.cpp source sysconfigimpl.cpp +userinclude ../../src/sysconfig +userinclude ../../inc +userinclude ../../src/pluginframework +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/test + LIBRARY euser.lib LIBRARY testexecutelogclient.lib LIBRARY testexecuteutils.lib @@ -47,3 +54,4 @@ LIBRARY ecom.lib SMPSAFE + diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/group/te_sysstart.mmp --- a/traceservices/tracefw/ulogger/unit_test/group/te_sysstart.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/group/te_sysstart.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -21,7 +21,10 @@ VENDORID 0x70000001 MACRO __ULOGGER_SYSTEMSTART_UNIT_TEST -OS_LAYER_SYSTEMINCLUDE +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test + + USERINCLUDE ../te-sysstart USERINCLUDE ../../inc @@ -30,6 +33,7 @@ SOURCEPATH ../../src/sysstarter SOURCE uloggersysstarter.cpp + SOURCEPATH ../te-sysstart SOURCE uloggersysstarttest.cpp SOURCE te_sysstartersuiteserver.cpp @@ -43,8 +47,11 @@ LIBRARY rfileloggerclient.lib LIBRARY uloggerclient.lib + + #if (!defined WINS) LIBRARY estlib.lib #endif SMPSAFE + diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/scripts/te_automatedsuite_noserial.script --- a/traceservices/tracefw/ulogger/unit_test/scripts/te_automatedsuite_noserial.script Tue Aug 31 16:57:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// This script doesn't have serial test for platform that doesn't support serial port -// - -PRINT ****RUNNING ALL ULOGGER UNIT TESTS**** -PRINT -PRINT CLIENT API UNIT TESTS -RUN_SCRIPT z:\testdata\scripts\te_client.script -PRINT SERVER UNIT TESTS -RUN_SCRIPT z:\testdata\scripts\te_server.script -PRINT SYSTEM CONFIG TESTS -RUN_SCRIPT z:\testdata\scripts\te_sysconfig.script -PRINT FILE PLUG-IN TESTS -RUN_SCRIPT z:\testdata\scripts\te_file.script -PRINT **completed all ULogger Unit Tests** -PRINT SERIAL PLUG-IN TESTS -RUN_SCRIPT z:\testdata\scripts\te_outfrwk.script -PRINT SYSTEM STARTER TESTS -RUN_SCRIPT z:\testdata\scripts\te_sysstart.script -PRINT -PRINT ****COMPLETED ALL ULOGGER UNIT TESTS EXCEPT FOR CLT**** \ No newline at end of file diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/scripts/te_client.script --- a/traceservices/tracefw/ulogger/unit_test/scripts/te_client.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/scripts/te_client.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -14,7 +14,7 @@ // // -//! @file +//! @File //! @SYMTestSuiteName uloggerv1-client-unit-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -39,7 +39,7 @@ //! @SYMTestActions Connect to ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerClientAPIServer TestConnectStep @@ -55,7 +55,7 @@ //! @SYMTestActions Set Primary Filter in ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerClientAPIServer TestSetPrimaryFltStep @@ -71,7 +71,7 @@ //! @SYMTestActions Start ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerClientAPIServer TestStartStep @@ -87,7 +87,7 @@ //! @SYMTestActions Stop ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerClientAPIServer TestStopStep @@ -103,7 +103,7 @@ //! @SYMTestActions Get Primeay Filter in ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerClientAPIServer TestGetPrimaryFiltersLStep @@ -119,7 +119,7 @@ //! @SYMTestActions Get secondary Filter in ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerClientAPIServer TestGetSecondaryFiltersLStep @@ -135,7 +135,7 @@ //! @SYMTestActions Get buffer size in ulogger client //! @SYMTestExpectedResults error return/buffer size as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerClientAPIServer TestGetTraceBufferSizeStep @@ -150,7 +150,7 @@ //! @SYMTestActions Remove Primeay Filter in ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP -1 UloggerClientAPIServer TestRemovePrimaryFltStep @@ -166,7 +166,7 @@ //! @SYMTestActions Resize buffer size in ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerClientAPIServer TestResizeTraceBufferSizeStep @@ -183,7 +183,7 @@ //! @SYMTestActions Set DNS in ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerClientAPIServer TestSetDataNotificationSizeStep @@ -199,7 +199,7 @@ //! @SYMTestActions Set all secondary Filtesr in ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerClientAPIServer TestSetSecondaryFilterAllStep @@ -214,7 +214,7 @@ //! @SYMTestActions Set one secondary Filtesr in ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerClientAPIServer TestSetSecondaryFltStep @@ -231,7 +231,7 @@ //! @SYMTestActions Get version in ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerClientAPIServer TestVersionStep @@ -247,7 +247,7 @@ //! @SYMTestActions Deactivate output plugin in ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerClientAPIServer TestDeactivateOutputPluginStep @@ -263,7 +263,7 @@ //! @SYMTestActions Call RULogger API in ulogger client //! @SYMTestExpectedResults error return as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 2000 UloggerClientAPIServer TestRULoggerAPIStep diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/scripts/te_file.script --- a/traceservices/tracefw/ulogger/unit_test/scripts/te_file.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/scripts/te_file.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName uloggerv1-file-unit-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -32,7 +32,7 @@ //! @SYMTestActions Set and configure file plugin //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 uloggerplugfiletest file0Step diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/scripts/te_outfrwk.script --- a/traceservices/tracefw/ulogger/unit_test/scripts/te_outfrwk.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/scripts/te_outfrwk.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName uloggerv1-outfrwk-unit-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -34,7 +34,7 @@ //! @SYMTestActions Set and configure output framework server //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 UloggerOutfrmwkServer TextMessageTeststep @@ -48,7 +48,7 @@ //! @SYMTestActions Set and configure output framework server with OOM //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP !OOM 100 UloggerOutfrmwkServer TextMessageTeststep diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/scripts/te_serial.script --- a/traceservices/tracefw/ulogger/unit_test/scripts/te_serial.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/scripts/te_serial.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName uloggerv1-serial-unit-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -34,7 +34,7 @@ //! @SYMTestActions Set and configure serial plugin //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 uloggerplugserialtest serial0Step diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/scripts/te_server.script --- a/traceservices/tracefw/ulogger/unit_test/scripts/te_server.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/scripts/te_server.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName uloggerv1-server-unit-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -39,7 +39,7 @@ //! @SYMTestActions STart and Stop watching in the server //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 te_UloggerServerTestSuite UloggerServerTest0Step @@ -52,7 +52,7 @@ //! @SYMTestActions Call all possibly get/set/configure ulogger command methods in the server //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_UloggerServerTestSuite UloggerServerTest1Step @@ -65,7 +65,7 @@ //! @SYMTestActions Call NewL and NewLC to create new server sessions //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 te_UloggerServerTestSuite UloggerServerTest2Step @@ -78,7 +78,7 @@ //! @SYMTestActions Call NewL and NewLC to create new plugin allocations under various conditions //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 te_UloggerServerTestSuite UloggerServerTest3Step @@ -91,7 +91,7 @@ //! @SYMTestActions Start/Stop reading and test functionality of passing and translating commands for server control framework //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 1000 te_UloggerServerTestSuite UloggerServerTest4Step @@ -104,7 +104,7 @@ //! @SYMTestActions Call methods to change settings of server channels //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 te_UloggerServerTestSuite UloggerServerTest5Step @@ -117,7 +117,7 @@ //! @SYMTestActions Call methods to pass data to/fro server //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 te_UloggerServerTestSuite UloggerServerTest6Step diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/scripts/te_sysconfig.script --- a/traceservices/tracefw/ulogger/unit_test/scripts/te_sysconfig.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/scripts/te_sysconfig.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName uloggerv1-sysconfig-unit-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -38,7 +38,7 @@ //! @SYMTestActions Call Set/Get/Activate configuration methods for channels and plugins //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 Te_SysCfg SysCfgTeststep1 @@ -51,7 +51,7 @@ //! @SYMTestActions Call Set/Get/Remove configuration methods for sections and plugins //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 Te_SysCfg SysCfgTeststep2 @@ -64,7 +64,7 @@ //! @SYMTestActions Call Set/Get/Remove configuration methods for filters and buffer //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 Te_SysCfg SysCfgTeststep3 @@ -77,7 +77,7 @@ //! @SYMTestActions Call AddPlugin, RemoveChannel with various error cases //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 Te_SysCfg SysCfgTeststep4 diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/scripts/te_sysstart.script --- a/traceservices/tracefw/ulogger/unit_test/scripts/te_sysstart.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/scripts/te_sysstart.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName uloggerv1-sysstart-unit-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -32,7 +32,7 @@ //! @SYMTestActions Call available start/configuration methods for ulogger systart //! @SYMTestExpectedResults error returns as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 uloggersysstarttest sysStart0Step diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/te_uloggerclientsuiteserver.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/te_uloggerclientsuiteserver.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/te_uloggerclientsuiteserver.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_ULOGGERCLIENT_SERVER_H__) #define __TE_ULOGGERCLIENT_SERVER_H__ -#include +#include class CTestUloggerClientApi : public CTestServer diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/te_uloggerclientsuitestepbase.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/te_uloggerclientsuitestepbase.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/te_uloggerclientsuitestepbase.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_ULOGGERCLIENT_STEP_BASE__) #define __TE_ULOGGERCLIENT_STEP_BASE__ -#include +#include #include "uloggerclient.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testconnectstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testconnectstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testconnectstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTCONNECT_STEP_H__) #define __TESTCONNECT_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestConnectStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testdeactivateoutputpluginstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testdeactivateoutputpluginstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testdeactivateoutputpluginstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTDEACTIVATEOUTPUTPLUGIN_STEP_H__) #define __TESTDEACTIVATEOUTPUTPLUGIN_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestDeactivateOutputPluginStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testgetprimaryfilterslstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testgetprimaryfilterslstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testgetprimaryfilterslstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTGETPRIMARYFILTERSL_STEP_H__) #define __TESTGETPRIMARYFILTERSL_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestGetPrimaryFiltersLStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testgetsecondaryfilterslstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testgetsecondaryfilterslstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testgetsecondaryfilterslstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTGETSECONDARYFILTERSL_STEP_H__) #define __TESTGETSECONDARYFILTERSL_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestGetSecondaryFiltersLStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testgettracebuffersizestep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testgettracebuffersizestep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testgettracebuffersizestep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTGETTRACEBUFFERSIZE_STEP_H__) #define __TESTGETTRACEBUFFERSIZE_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestGetTraceBufferSizeStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testremoveprimaryfltstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testremoveprimaryfltstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testremoveprimaryfltstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTREMOVEPRIMARYFLT_STEP_H__) #define __TESTREMOVEPRIMARYFLT_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testresizetracebuffersizestep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testresizetracebuffersizestep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testresizetracebuffersizestep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTRESIZETRACEBUFFERSIZE_STEP_H__) #define __TESTRESIZETRACEBUFFERSIZE_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestResizeTraceBufferSizeStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testruloggerapi_ext.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testruloggerapi_ext.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testruloggerapi_ext.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTRULOGGERAPI_EXT_H__) #define __TESTRULOGGERAPI_EXT_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" #include using namespace Ulogger; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testsetdatanotificationsizestep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testsetdatanotificationsizestep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testsetdatanotificationsizestep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTSETDATANOTIFICATIONSIZE_STEP_H__) #define __TESTSETDATANOTIFICATIONSIZE_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestSetDataNotificationSizeStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testsetoutputpluginsettingsstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testsetoutputpluginsettingsstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testsetoutputpluginsettingsstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTSETOUTPUTPLUGINSETTINGS_STEP_H__) #define __TESTSETOUTPUTPLUGINSETTINGS_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestSetOutputPluginSettingsStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testsetprimaryfltstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testsetprimaryfltstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testsetprimaryfltstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TESTSETPRIMARYFLT_STEP_H__) #define __TESTSETPRIMARYFLT_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestSetPrimaryFltStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testsetsecondaryfilterallstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testsetsecondaryfilterallstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testsetsecondaryfilterallstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTSETSECONDARYFILTERALL_STEP_H__) #define __TESTSETSECONDARYFILTERALL_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestSetSecondaryFilterAllStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testsetsecondaryfltstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testsetsecondaryfltstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testsetsecondaryfltstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTSETSECONDARYFLT_STEP_H__) #define __TESTSETSECONDARYFLT_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestSetSecondaryFltStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/teststartstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/teststartstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/teststartstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTSTART_STEP_H__) #define __TESTSTART_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestStartStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/teststopstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/teststopstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/teststopstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTSTOP_STEP_H__) #define __TESTSTOP_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestStopStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testtracebuffermodestep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testtracebuffermodestep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testtracebuffermodestep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTRESIZETRACEBUFFERSIZE_STEP_H__) #define __TESTRESIZETRACEBUFFERSIZE_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestTraceBufferModeStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-client/testversionstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-client/testversionstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-client/testversionstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __TESTVERSION_STEP_H__) #define __TESTVERSION_STEP_H__ -#include +#include #include "te_uloggerclientsuitestepbase.h" class CTestVersionStep : public CTestUloggerClientApiStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-createconfig/te_clearconfig.cpp --- a/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_clearconfig.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_clearconfig.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -35,7 +35,7 @@ } -void CClearConfig::ClearL(RULogger& loggerSession) +void CClearConfig::Clear(RULogger& loggerSession) { // CArrayPtrFlat *activeplugins = new (ELeave)CArrayPtrFlat(1); // CleanupStack::PushL(activeplugins); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-createconfig/te_clearconfig.h --- a/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_clearconfig.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_clearconfig.h Wed Sep 01 12:39:58 2010 +0100 @@ -34,7 +34,7 @@ public: ~CClearConfig(); CClearConfig(); - void ClearL(RULogger& loggerSession); + void Clear(RULogger& loggerSession); //private: }; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigemptystep.cpp --- a/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigemptystep.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigemptystep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -74,7 +74,7 @@ logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); logger.SetSecondaryFilteringEnabled(EFalse); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigemptystep.h --- a/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigemptystep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigemptystep.h Wed Sep 01 12:39:58 2010 +0100 @@ -25,7 +25,7 @@ #ifndef TE_CREATECONFIGEMPTYSTEP_H #define TE_CREATECONFIGEMPTYSTEP_H -#include +#include //Test Sysconfig of Ulogger class CCreateConfigEmptyTestStep : public CTestStep diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigfullstep.cpp --- a/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigfullstep.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigfullstep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -72,7 +72,7 @@ logger.Connect(); CClearConfig configIni; - configIni.ClearL(logger); + configIni.Clear(logger); _LIT8(KTextplugin,"uloggerfileplugin"); logger.ActivateOutputPlugin(KTextplugin); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigfullstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigfullstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigfullstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -25,7 +25,7 @@ #ifndef TE_CREATECONFIGFULLSTEP_H #define TE_CREATECONFIGFULLSTEP_H -#include +#include //Test Sysconfig of Ulogger class CCreateConfigFUllTestStep : public CTestStep diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigserver.h --- a/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigserver.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigserver.h Wed Sep 01 12:39:58 2010 +0100 @@ -16,7 +16,7 @@ #ifndef TE_CREATECONFIG_SERVER_H #define TE_CREATECONFIG_SERVER_H -#include +#include /* * Derived class of the CTestServer diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-outfrwk/te_outfrwk_testserver.h --- a/traceservices/tracefw/ulogger/unit_test/te-outfrwk/te_outfrwk_testserver.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-outfrwk/te_outfrwk_testserver.h Wed Sep 01 12:39:58 2010 +0100 @@ -16,7 +16,7 @@ #ifndef T_OUTFRWK_SERVER_H #define T_OUTFRWK_SERVER_H -#include +#include /* * Derived class of the CTestServer diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-outfrwk/te_outfrwk_teststep.h --- a/traceservices/tracefw/ulogger/unit_test/te-outfrwk/te_outfrwk_teststep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-outfrwk/te_outfrwk_teststep.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ #ifndef T_OUTFRWK_TESTSTEP_H #define T_OUTFRWK_TESTSTEP_H -#include +#include #include // CBase #include #include // RFs, RFile diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-file/te_filesuiteserver.h --- a/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-file/te_filesuiteserver.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-file/te_filesuiteserver.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_FILE_SERVER_H__) #define __TE_FILE_SERVER_H__ -#include +#include class CTe_fileSuite : public CTestServer diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-file/te_filesuitestepbase.h --- a/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-file/te_filesuitestepbase.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-file/te_filesuitestepbase.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_FILE_STEP_BASE__) #define __TE_FILE_STEP_BASE__ -#include +#include #include using namespace Ulogger; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-file/uloggerfileplugintest.cpp --- a/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-file/uloggerfileplugintest.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-file/uloggerfileplugintest.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -36,7 +36,7 @@ delete fileWriter; } /* - * TestUnlockResourcesL: Test that the CloseOutputPlugin method ??? + * TestUnlockResources: Test that the CloseOutputPlugin method ??? * * Expected Verdict: PASS/FAIL/PANIC * @@ -45,7 +45,7 @@ * Description: Retrieve and print some data from an external ini data file * */ -void CFile0Step::TestUnlockResourcesL() +void CFile0Step::TestUnlockResources() { CFileWriter* fileWriter = CFileWriter::NewL(); INFO_PRINTF1(_L("Invoking CFileWriter::CloseOutputPlugin(). CloseOutputPlugin() is supposed to do nothing.")); @@ -55,7 +55,7 @@ } /* - * TestSettingsL: Test that the Settings method ??? + * TestSettings: Test that the Settings method ??? * * Expected Verdict: PASS/FAIL/PANIC * @@ -64,7 +64,7 @@ * Description: Retrieve and print some data from an external ini data file * */ -void CFile0Step::TestSettingsL() +void CFile0Step::TestSettings() { CFileWriter* fileWriter = CFileWriter::NewL(); INFO_PRINTF1(_L("Passing empty RPointerArray to CFileWriter::ConfigureOutputPlugin()")); @@ -75,7 +75,7 @@ } /* - * TestWriteL: Test that the Write method ??? + * TestWrite: Test that the Write method ??? * * Expected Verdict: PASS/FAIL/PANIC * @@ -86,7 +86,7 @@ * */ // The implementation for this is not working correctly! Check this -void CFile0Step::TestWriteL() +void CFile0Step::TestWrite() { INFO_PRINTF1(_L("Checking that CFileWriter::Write(const TDesC8&) writes a String correctly to C:\\logs\\log.txt")); @@ -136,9 +136,9 @@ if (TestStepResult()==EPass) { TestNewL(); - TestUnlockResourcesL(); - TestSettingsL(); - TestWriteL(); + TestUnlockResources(); + TestSettings(); + TestWrite(); if(iErrors == 0) SetTestStepResult(EPass); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-file/uloggerfileplugintest.h --- a/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-file/uloggerfileplugintest.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-file/uloggerfileplugintest.h Wed Sep 01 12:39:58 2010 +0100 @@ -20,8 +20,7 @@ #ifndef __ULOGGERFILEPLUGINTEST_H__ #define __ULOGGERFILEPLUGINTEST_H__ -#include - +#include #include "uloggerfileplugin.h" #include "te_filesuitestepbase.h" @@ -38,9 +37,9 @@ private: // Tests void TestNewL(); - void TestUnlockResourcesL(); - void TestSettingsL(); - void TestWriteL(); + void TestUnlockResources(); + void TestSettings(); + void TestWrite(); RFs iFileServer; }; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/te_serialsuiteserver.h --- a/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/te_serialsuiteserver.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/te_serialsuiteserver.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_SERIAL_SERVER_H__) #define __TE_SERIAL_SERVER_H__ -#include +#include class CTe_serialSuite : public CTestServer diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/te_serialsuitestepbase.h --- a/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/te_serialsuitestepbase.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/te_serialsuitestepbase.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_SERIAL_STEP_BASE__) #define __TE_SERIAL_STEP_BASE__ -#include +#include #include using namespace Ulogger; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/uloggerserialplugintest.cpp --- a/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/uloggerserialplugintest.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/uloggerserialplugintest.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -47,7 +47,7 @@ * Description: Retrieve and print some data from an external ini data file * */ -void CSerial0Step::TestUnlockResourcesL() +void CSerial0Step::TestUnlockResources() { Ulogger::CSerialWriter* serialWriter = Ulogger::CSerialWriter::NewL(); INFO_PRINTF1(_L("Invoking CSerialWriter::CloseOutputPlugin(). CloseOutputPlugin() is supposed to do nothing.")); @@ -66,7 +66,7 @@ * Description: Retrieve and print some data from an external ini data file * */ -void CSerial0Step::TestSettingsL() +void CSerial0Step::TestSettings() { Ulogger::CSerialWriter* serialWriter = Ulogger::CSerialWriter::NewL(); INFO_PRINTF1(_L("Passing empty RPointerArray to CSerialWriter::ConfigureOutputPlugin()")); @@ -92,7 +92,7 @@ * */ // The implementation for this is not working correctly! Check this -void CSerial0Step::TestWriteL() +void CSerial0Step::TestWrite() { INFO_PRINTF1(_L("Checking that CSerialWriter::Write(const TDesC8&) writes a string correctly to the serial port")); @@ -148,9 +148,9 @@ if (TestStepResult()==EPass) { TestNewL(); - TestUnlockResourcesL(); - TestSettingsL(); - TestWriteL(); + TestUnlockResources(); + TestSettings(); + TestWrite(); if(iErrors == 0) SetTestStepResult(EPass); diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/uloggerserialplugintest.h --- a/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/uloggerserialplugintest.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/uloggerserialplugintest.h Wed Sep 01 12:39:58 2010 +0100 @@ -22,8 +22,7 @@ #ifndef __ULOGGERSERIALPLUGINTEST_H__ #define __ULOGGERSERIALPLUGINTEST_H__ -#include - +#include #include "uloggerserialplugin.h" #include "te_serialsuitestepbase.h" @@ -39,9 +38,9 @@ private: // Tests void TestNewL(); - void TestUnlockResourcesL(); - void TestSettingsL(); - void TestWriteL(); + void TestUnlockResources(); + void TestSettings(); + void TestWrite(); RFs iFileServer; }; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-server/te_uloggerservertestsuiteserver.h --- a/traceservices/tracefw/ulogger/unit_test/te-server/te_uloggerservertestsuiteserver.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-server/te_uloggerservertestsuiteserver.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_ULOGGERSERVERTEST_SERVER_H__) #define __TE_ULOGGERSERVERTEST_SERVER_H__ -#include +#include class CTe_UloggerServerTestSuite : public CTestServer diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-server/te_uloggerservertestsuitestepbase.h --- a/traceservices/tracefw/ulogger/unit_test/te-server/te_uloggerservertestsuitestepbase.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-server/te_uloggerservertestsuitestepbase.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_ULOGGERSERVERTEST_STEP_BASE__) #define __TE_ULOGGERSERVERTEST_STEP_BASE__ -#include +#include // Please add your include here if you have /**************************************************************************** diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest0step.h --- a/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest0step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest0step.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __ULOGGERSERVERTEST0_STEP_H__) #define __ULOGGERSERVERTEST0_STEP_H__ -#include +#include #include "te_uloggerservertestsuitestepbase.h" #include "uloggerwatcher.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest1step.cpp --- a/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest1step.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest1step.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -78,8 +78,8 @@ iErrors += Test15L();//CULoggerServer::GetInstalledPlugins iMediaCount = 0; iErrors += Test16L();//CULoggerServer::GetOutputPluginSettingsL - iErrors += Test18L();//CULoggerServer::SetBufferSizeL - iErrors += Test19L();//CULoggerServer::SetDataNotificationSizeL + iErrors += Test18L();//CULoggerServer::SetBufferSize + iErrors += Test19L();//CULoggerServer::SetDataNotificationSize iErrors += Test20L();//CULoggerServer::GetBufferSize iErrors += Test21L();// CULoggerServer::GetDataNotificationSize iErrors += Test22L();//CULoggerServer::SetGlobalSecondaryFilters @@ -315,7 +315,7 @@ aCategory.Append(194); TInt e = KErrNone; - e = server->SetActiveFilterL(aCategory,EPrimaryFilter); + e = server->SetActiveFilter(aCategory,EPrimaryFilter); TBuf<128> buf; buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); @@ -340,7 +340,7 @@ { RArray array; array.Append(34); - TInt e = server->SetActiveFilterL(array,ESecondaryFilter); + TInt e = server->SetActiveFilter(array,ESecondaryFilter); TBuf<128> buf; buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); @@ -536,9 +536,9 @@ TInt CUloggerServerTest1Step::Test18L() -{//CULoggerServer::SetBufferSizeL +{//CULoggerServer::SetBufferSize TInt errors = 0; - INFO_PRINTF1(_L("Testing - CULoggerServer::SetBufferSizeL method")); + INFO_PRINTF1(_L("Testing - CULoggerServer::SetBufferSize method")); CULoggerServer *server = NULL; server = CULoggerServer::NewLC(EPriorityBackground); if(server == NULL) @@ -550,38 +550,38 @@ { TInt e; INFO_PRINTF1(_L("testing value: -1")); - e = server->SetBufferSizeL(-1); + e = server->SetBufferSize(-1); TBuf<128> buf; buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); buf.Zero(); INFO_PRINTF1(_L("testing value: 0")); - e = server->SetBufferSizeL(0); + e = server->SetBufferSize(0); buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); buf.Zero(); INFO_PRINTF1(_L("testing value: 100")); - e = server->SetBufferSizeL(100); + e = server->SetBufferSize(100); buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); buf.Zero(); INFO_PRINTF1(_L("testing value: 65535")); - e = server->SetBufferSizeL(65535); + e = server->SetBufferSize(65535); buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); buf.Zero(); INFO_PRINTF1(_L("testing value: 65536")); - e = server->SetBufferSizeL(65536); + e = server->SetBufferSize(65536); buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); buf.Zero(); INFO_PRINTF1(_L("testing value: 165537")); - e = server->SetBufferSizeL(165537); + e = server->SetBufferSize(165537); buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); buf.Zero(); @@ -592,9 +592,9 @@ TInt CUloggerServerTest1Step::Test19L() -{//CULoggerServer::SetDataNotificationSizeL +{//CULoggerServer::SetDataNotificationSize TInt errors = 0; - INFO_PRINTF1(_L("Testing - CULoggerServer::SetDataNotificationSizeL method")); + INFO_PRINTF1(_L("Testing - CULoggerServer::SetDataNotificationSize method")); CULoggerServer *server = NULL; server = CULoggerServer::NewLC(EPriorityBackground); if(server == NULL) @@ -606,44 +606,44 @@ { TInt e; INFO_PRINTF1(_L("testing value: -1")); - e = server->SetDataNotificationSizeL(-1); + e = server->SetDataNotificationSize(-1); TBuf<128> buf; buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); buf.Zero(); INFO_PRINTF1(_L("testing value: 0")); - e = server->SetDataNotificationSizeL(0); + e = server->SetDataNotificationSize(0); buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); buf.Zero(); INFO_PRINTF1(_L("testing value: 100")); - e = server->SetDataNotificationSizeL(100); + e = server->SetDataNotificationSize(100); buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); buf.Zero(); INFO_PRINTF1(_L("testing value: 65535")); - e = server->SetDataNotificationSizeL(65535); + e = server->SetDataNotificationSize(65535); buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); buf.Zero(); INFO_PRINTF1(_L("testing value: 65536")); - e = server->SetDataNotificationSizeL(65536); + e = server->SetDataNotificationSize(65536); buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); buf.Zero(); INFO_PRINTF1(_L("testing value: 85536")); - e = server->SetDataNotificationSizeL(85536); + e = server->SetDataNotificationSize(85536); buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); buf.Zero(); INFO_PRINTF1(_L("testing value: 165538")); - e = server->SetDataNotificationSizeL(165538); + e = server->SetDataNotificationSize(165538); buf.AppendFormat(_L("Code returned from method - %d"), e); INFO_PRINTF1(buf); buf.Zero(); @@ -914,10 +914,10 @@ } -TInt CUloggerServerTest1Step::Test29L()//CULoggerServer::GetInstalledInputPluginsL +TInt CUloggerServerTest1Step::Test29L()//CULoggerServer::GetInstalledInputPlugins { TInt errors = 0; - INFO_PRINTF1(_L("Testing - CULoggerServer::GetInstalledInputPluginsL method")); + INFO_PRINTF1(_L("Testing - CULoggerServer::GetInstalledInputPlugins method")); CULoggerServer *server = NULL; server = CULoggerServer::NewLC(EPriorityBackground); if(server == NULL) @@ -928,7 +928,7 @@ else { RArray list; - server->GetInstalledInputPluginsL(list); + server->GetInstalledInputPlugins(list); list.Close(); CleanupStack::PopAndDestroy(); //server } diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest1step.h --- a/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest1step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest1step.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __ULOGGERSERVERTEST1_STEP_H__) #define __ULOGGERSERVERTEST1_STEP_H__ -#include +#include #include "te_uloggerservertestsuitestepbase.h" @@ -55,8 +55,8 @@ TInt Test15L();//CULoggerServer::GetInstalledPlugins TInt Test16L();//CULoggerServer::GetOutputPluginSettingsL TInt Test17L();//CULoggerServer::GetOutputChannelL - TInt Test18L();//CULoggerServer::SetBufferSizeL - TInt Test19L();//CULoggerServer::SetDataNotificationSizeL + TInt Test18L();//CULoggerServer::SetBufferSize + TInt Test19L();//CULoggerServer::SetDataNotificationSize TInt Test20L();//CULoggerServer::GetBufferSize TInt Test21L();// CULoggerServer::GetDataNotificationSize TInt Test22L();//CULoggerServer::SetGlobalSecondaryFilters diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest2step.h --- a/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest2step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest2step.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __ULOGGERSERVERTEST2_STEP_H__) #define __ULOGGERSERVERTEST2_STEP_H__ -#include +#include #include "te_uloggerservertestsuitestepbase.h" class CUloggerServerTest2Step : public CTe_UloggerServerTestSuiteStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest3step.h --- a/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest3step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest3step.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __ULOGGERSERVERTEST3_STEP_H__) #define __ULOGGERSERVERTEST3_STEP_H__ -#include +#include #include "te_uloggerservertestsuitestepbase.h" #include "uloggerwatcher.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest4step.h --- a/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest4step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest4step.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __ULOGGERSERVERTEST4_STEP_H__) #define __ULOGGERSERVERTEST4_STEP_H__ -#include +#include #include "te_uloggerservertestsuitestepbase.h" #include "pluginallocator.h" #include "inputframework.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest5step.h --- a/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest5step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest5step.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __ULOGGERSERVERTEST5_STEP_H__) #define __ULOGGERSERVERTEST5_STEP_H__ -#include +#include #include "te_uloggerservertestsuitestepbase.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest6step.h --- a/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest6step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest6step.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __ULOGGERSERVERTEST6_STEP_H__) #define __ULOGGERSERVERTEST6_STEP_H__ -#include +#include #include "te_uloggerservertestsuitestepbase.h" #include "inputdata.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-sysconfig/te_test_syscfgserver.h --- a/traceservices/tracefw/ulogger/unit_test/te-sysconfig/te_test_syscfgserver.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-sysconfig/te_test_syscfgserver.h Wed Sep 01 12:39:58 2010 +0100 @@ -16,7 +16,7 @@ #ifndef TE_SYSCFG_SERVER_H #define TE_SYSCFG_SERVER_H -#include +#include /* * Derived class of the CTestServer diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-sysconfig/te_test_syscfgstep.h --- a/traceservices/tracefw/ulogger/unit_test/te-sysconfig/te_test_syscfgstep.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-sysconfig/te_test_syscfgstep.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #ifndef TE_SYSCFG_TESTSTEP_H #define TE_SYSCFG_TESTSTEP_H -#include +#include #include // cbase #include #include // rfs, rfile diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-sysstart/te_sysstartersuiteserver.h --- a/traceservices/tracefw/ulogger/unit_test/te-sysstart/te_sysstartersuiteserver.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-sysstart/te_sysstartersuiteserver.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_SYSSTARTER_SERVER_H__) #define __TE_SYSSTARTER_SERVER_H__ -#include +#include class CTe_sysstartSuite : public CTestServer diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-sysstart/te_sysstartersuitestepbase.h --- a/traceservices/tracefw/ulogger/unit_test/te-sysstart/te_sysstartersuitestepbase.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-sysstart/te_sysstartersuitestepbase.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_SYSSTART_STEP_BASE__) #define __TE_SYSSTART_STEP_BASE__ -#include +#include #include using namespace Ulogger; diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/ulogger/unit_test/te-sysstart/uloggersysstarttest.h --- a/traceservices/tracefw/ulogger/unit_test/te-sysstart/uloggersysstarttest.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/ulogger/unit_test/te-sysstart/uloggersysstarttest.h Wed Sep 01 12:39:58 2010 +0100 @@ -20,8 +20,7 @@ #ifndef __ULOGGERSYSSTARTTEST_H__ #define __ULOGGERSYSSTARTTEST_H__ -#include - +#include #include "uloggersysstarter.h" #include "te_sysstartersuitestepbase.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/group/bld.inf --- a/traceservices/tracefw/utf_trace_api/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -12,10 +12,15 @@ // // Description: // +/** + @file bld.inf + @internalTechnology +*/ + PRJ_PLATFORMS DEFAULT PRJ_EXPORTS -../inc/e32utrace.h OS_LAYER_PLATFORM_EXPORT_PATH(e32utrace.h) +../inc/e32utrace.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(e32utrace.h) diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/inc/e32utrace.h --- a/traceservices/tracefw/utf_trace_api/inc/e32utrace.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/inc/e32utrace.h Wed Sep 01 12:39:58 2010 +0100 @@ -83,14 +83,14 @@ +((aSchema)< +/*#include #include +*/ #ifndef __KERNEL_MODE__ -#include +//#include #endif + /** Interface to the utrace api. diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/unit_test/devicedriver/src/utracedrv.cpp --- a/traceservices/tracefw/utf_trace_api/unit_test/devicedriver/src/utracedrv.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/unit_test/devicedriver/src/utracedrv.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +// 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" @@ -15,9 +15,9 @@ // // -#include +#include #include -#include "d32utrace.h" +#include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/unit_test/devicedriver/src/utraceusr.cpp --- a/traceservices/tracefw/utf_trace_api/unit_test/devicedriver/src/utraceusr.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/unit_test/devicedriver/src/utraceusr.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -16,7 +16,7 @@ // #include -#include "d32utrace.h" +#include #include diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/unit_test/group/bld.inf --- a/traceservices/tracefw/utf_trace_api/unit_test/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/unit_test/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -12,6 +12,11 @@ // // Description: // +/** + @file bld.inf + @internalTechnology +*/ + #include "../devicedriver/group/bld.inf" #include "../te-utrace/group/bld.inf" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/unit_test/te-utrace/group/bld.inf --- a/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/group/bld.inf Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/group/bld.inf Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -15,14 +15,27 @@ // // + +//PRJ_EXPORTS + +PRJ_TESTEXPORTS +//to c: +../scripts/te_utracesuite.script /epoc32/winscw/c/testdata/scripts/te_utracesuite.script +../testdata/te_utracesuite.ini /epoc32/winscw/c/testdata/configs/te_utracesuite.ini +//to z: +../scripts/te_utracesuite.script /epoc32/release/winscw/udeb/z/testdata/scripts/te_utracesuite.script +../testdata/te_utracesuite.ini /epoc32/release/winscw/udeb/z/testdata/configs/te_utracesuite.ini + +./te_utracesuite.iby /epoc32/rom/include/te_utracesuite.iby + + +PRJ_MMPFILES + + +PRJ_TESTMMPFILES +te_utracesuite.mmp + PRJ_PLATFORMS DEFAULT -PRJ_TESTEXPORTS -te_utracesuite.iby /epoc32/rom/include/te_utracesuite.iby -../scripts/te_utracesuite.script z:/testdata/scripts/te_utracesuite.script -../testdata/te_utracesuite.ini z:/testdata/configs/te_utracesuite.ini - -PRJ_TESTMMPFILES -te_utracesuite.mmp manual diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/unit_test/te-utrace/group/te_utracesuite.mmp --- a/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/group/te_utracesuite.mmp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/group/te_utracesuite.mmp Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-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" @@ -17,19 +17,19 @@ TARGETTYPE exe UID 0x1000007A 0x101F7784 -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc -USERINCLUDE ../../devicedriver/inc - SOURCEPATH ../src SOURCE te_utracesuiteserver.cpp SOURCE te_utracesuitestepbase.cpp SOURCE cutrace_nonstatic_step.cpp SOURCE cutrace_static_step.cpp SOURCE cutrace_user_performance_step.cpp -SOURCE te_btracecmds.cpp -SOURCE cutrace_kernperf_step.cpp +SOURCE te_btracecmds.cpp cutrace_kernperf_step.cpp + + +USERINCLUDE ../inc + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/test LIBRARY euser.lib LIBRARY testexecuteutils.lib diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/cutrace_kernperf_step.h --- a/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/cutrace_kernperf_step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/cutrace_kernperf_step.h Wed Sep 01 12:39:58 2010 +0100 @@ -25,7 +25,7 @@ #define CUTRACE_KERNPERF_STEP_H_ -#include +#include #include "te_utracesuitestepbase.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/cutrace_nonstatic_step.h --- a/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/cutrace_nonstatic_step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/cutrace_nonstatic_step.h Wed Sep 01 12:39:58 2010 +0100 @@ -23,7 +23,7 @@ */ #if (!defined __CUTRACE_PRINTF_CHAR_STEP_H__) #define __CUTRACE_PRINTF_CHAR_STEP_H__ -#include +#include #include "te_utracesuitestepbase.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/cutrace_static_step.h --- a/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/cutrace_static_step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/cutrace_static_step.h Wed Sep 01 12:39:58 2010 +0100 @@ -26,7 +26,7 @@ -#include +#include #include "te_utracesuitestepbase.h" class CUTrace_Static_Step : public CTe_UTraceSuiteStepBase diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/cutrace_user_performance_step.h --- a/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/cutrace_user_performance_step.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/cutrace_user_performance_step.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ */ #ifndef CUTRACE_PERFORMANCE_STEP_H_ #define CUTRACE_PERFORMANCE_STEP_H_ -#include +#include #include "te_utracesuitestepbase.h" diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/te_utracesuiteserver.h --- a/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/te_utracesuiteserver.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/te_utracesuiteserver.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_UTRACE_SERVER_H__) #define __TE_UTRACE_SERVER_H__ -#include +#include class CTe_UTraceSuite : public CTestServer diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/te_utracesuitestepbase.h --- a/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/te_utracesuitestepbase.h Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/inc/te_utracesuitestepbase.h Wed Sep 01 12:39:58 2010 +0100 @@ -24,7 +24,7 @@ #if (!defined __TE_UTRACE_STEP_BASE__) #define __TE_UTRACE_STEP_BASE__ -#include +#include #include #include "te_btracecmds.h" // Please add your include here if you have diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/unit_test/te-utrace/scripts/te_utracesuite.script --- a/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/scripts/te_utracesuite.script Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/scripts/te_utracesuite.script Wed Sep 01 12:39:58 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -13,7 +13,7 @@ // Description: // -//! @file +//! @File //! @SYMTestSuiteName utfv1-unit-test-suite.script //! @SYMScriptTestEnvironment TEF @@ -31,7 +31,7 @@ //! @SYMTestActions Measure the trace time of the implemented user-side API //! @SYMTestExpectedResults Verify that performance of the trace APIs are not significantly more intrusive than previous implementations //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 300 te_UTraceSuite CUTrace_User_Performance_Step c:\testdata\configs\te_utracesuite.ini Performance @@ -45,7 +45,7 @@ //! @SYMTestActions Test the implementation of nonstatic APIs //! @SYMTestExpectedResults Verify that traces generated as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 te_UTraceSuite CUTrace_nonStatic_Step c:\testdata\configs\te_utracesuite.ini General @@ -59,7 +59,7 @@ //! @SYMTestActions Test the implementation of static APIs //! @SYMTestExpectedResults Verify that traces generated as expected //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ RUN_TEST_STEP 100 te_UTraceSuite CUTrace_Static_Step c:\testdata\configs\te_utracesuite.ini General @@ -74,7 +74,7 @@ //! @SYMTestActions Measure the trace time of the implemented kernel-side API //! @SYMTestExpectedResults Verify that performance of the trace APIs are not significantly more intrusive than previous implementations //! @SYMTestType UT -//! @SYMTestStatus Implemented +//! @SYMTESTSTATUS Implemented //! @SYMPREQ PREQ1635 //! @SYMREQ //RUN_TEST_STEP 100 te_UTraceSuite CUTrace_KernPerf_Step c:\testdata\configs\te_utracesuite.ini General diff -r 26645d81f48d -r cc28652e0254 traceservices/tracefw/utf_trace_api/unit_test/te-utrace/src/cutrace_kernperf_step.cpp --- a/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/src/cutrace_kernperf_step.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/traceservices/tracefw/utf_trace_api/unit_test/te-utrace/src/cutrace_kernperf_step.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -16,13 +16,14 @@ // /** - @file + @file CUTrace_Performance_Step.cpp @internalTechnology */ -#include "d32utrace.h" - #include "cutrace_kernperf_step.h" #include "te_utracesuitedefs.h" +#include + + CUTrace_KernPerf_Step::~CUTrace_KernPerf_Step()