featuremgmt/featuremgr/test/rtest/src/t_fmgrswi.cpp
branchRCL_3
changeset 10 31a8f755b7fe
parent 9 667e88a979d7
equal deleted inserted replaced
9:667e88a979d7 10:31a8f755b7fe
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    97     return KErrNone;
    97     return KErrNone;
    98     }
    98     }
    99 
    99 
   100 /**
   100 /**
   101 @SYMTestCaseID          PDS-EFM-CT-4111
   101 @SYMTestCaseID          PDS-EFM-CT-4111
   102 @SYMTestCaseDesc        
   102 @SYMTestCaseDesc        The test demonstrates that there is a problem in the FeatMgr code that processes SWI events.
       
   103                         Test steps:
       
   104                         1) The test sets KSAUidSoftwareInstallKeyValue property in order to simulate that SWI has started.
       
   105                         2) The test calls RFeatureControl::SWIStart() to notify the server that SWI started.
       
   106                         3) The test adds a new feature. Since this happens during the SWI process the new feature
       
   107                            will be cached by the FeatMgr server.
       
   108                         4) The test simulates a file I/O error to happen on iteration #4. The failure should occur
       
   109                            at the moment when the server tries to persist the new feature that is in the cache.
       
   110                         5) The test notifies the server that SWI has completed: KSAUidSoftwareInstallKeyValue value set
       
   111                            and RFeatureControl::SWIEnd() called.
       
   112                            When the server receives the "end of SWI" notification, the server will try to persist
       
   113                            the cached new feature. But because of the simulated file I/O error the server will fail
       
   114                            to store the new feature to the features.dat file. But in accordance with the current
       
   115                            design of the server, no error will be reported back to the client.
       
   116                         6) The test kills the FeatMgr server. The server cache is gone.
       
   117                         7) The test restarts the server and attempts to request the new feature. The new feature
       
   118                            is missing.
   103 @SYMTestPriority        High
   119 @SYMTestPriority        High
   104 @SYMTestActions         
   120 @SYMTestActions         FeatMgr SWI test with simulated file I/O error during SWI.
   105 @SYMTestExpectedResults Test must not fail
   121 @SYMTestExpectedResults Test must not fail
   106 @SYMDEF                 DEF144262
   122 @SYMDEF                 DEF144262
   107 */
   123 */
   108 void SWItest()
   124 void SWItest()
   109     {
   125     {