Update contrib.
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // f32test\demandpaging\t_ramstress.cpp
15 // Following this, it requests that the driver continuously attempt
16 // to move pages directly.
17 // Platforms/Drives/Compatibility:
18 // Hardware only. No defrag support on emulator.
22 //! @SYMTestCaseID KBASE-t_ramstress-0606
24 //! @SYMTestCaseDesc RAM Defrag background defrag stresser
26 //! @SYMTestPriority High
27 //! @SYMTestActions t_ramstress loads and opens the logical device driver ("D_RAMSTRESS").
28 //! @SYMTestExpectedResults Finishes if the system behaves as expected, panics otherwise
29 //! @SYMTestPriority High
30 //! @SYMTestStatus Implemented
31 //-------------------------------------------------------------------------------------------------
37 #include "t_ramstress.h"
39 RTest test(_L("T_RAMSTRESS"));
41 RRamStressTestLdd RamstressLdd;
53 test.Start(_L("RAM Defrag background stress testing..."));
56 User::CommandLine(args);
58 TPtrC token=lex.NextToken();
59 if (token.Length() != 0)
61 // exit immediately if we are run as part of autotest
66 TInt r = User::LoadLogicalDevice(KRamStressTestLddName);
67 test(r==KErrNone || r==KErrAlreadyExists);
68 test(RamstressLdd.Open()==KErrNone);
71 TInt ret = UserSvr::HalFunction(EHalGroupRam,ERamHalGetZoneCount,&zoneCount,0);
72 test(ret == KErrNone);
79 for (index = 0; index < zoneCount; index ++)
81 RamstressLdd.DoMovePagesInZone(index);
82 User::AfterHighRes(1000);
84 //## mDH make it run forever iters ++;
91 test.Next(_L("Ram Defrag : Done"));