systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_faileiofcount0.cpp
--- a/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_faileiofcount0.cpp Tue Aug 31 16:29:05 2010 +0300
+++ b/systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_faileiofcount0.cpp Wed Sep 01 12:34:26 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,11 +19,8 @@
@internalComponent - Internal Symbian test code
*/
-#include <e32property.h>
#include "sysmontesthelper.h"
-const TUint32 KRestartExeCount = 33;
-
TInt MainL()
{
@@ -31,14 +28,11 @@
TInt runCount = 0;
CCommandLineArguments* args = CCommandLineArguments::NewLC();
- TInt err = RProperty::Define(KTestSysMon, KRestartExeCount, RProperty::EInt);
- RDebug::Printf("Defining P&S key with key %d returns with err %d", err, KRestartExeCount);
-
runCount = CSysMonTestHelper::ReadRunCountL(args->Arg(0));
CSysMonTestHelper::IncrementRunCountL(args->Arg(0));
CleanupStack::PopAndDestroy(args);
- RDebug::Printf("runCount = %d", runCount);
+
switch (runCount)
{
case 0:
@@ -48,7 +42,7 @@
sysmon.OpenL();
CleanupClosePushL(sysmon);
- CStartupProperties* props = CStartupProperties::NewLC(_L("tsysmon_app_donothing.exe"), _L("33"));
+ CStartupProperties* props = CStartupProperties::NewLC(_L("tsysmon_app_donothing.exe"), KNullDesC);
props->SetMonitored(ETrue);
props->SetStartupType(EStartProcess);
props->SetStartMethod(EWaitForStart);
@@ -59,15 +53,12 @@
RProcess slave1;
slave1.Create(_L("tsysmon_app_donothing.exe"), _L("5000"));
CleanupClosePushL(slave1);
- TRequestStatus status;
- slave1.Rendezvous(status);
slave1.Resume();
- User::WaitForRequest(status);
// Register with SysMon
sysmon.MonitorL(*props, slave1);
slave1.Terminate(KErrNone);
-
+
CleanupStack::PopAndDestroy(3, &sysmon);
break;
}
@@ -77,7 +68,6 @@
break;
}
}
-
RDebug::Print(_L("appfwk-sysmon-0033: End MainL"));
return KErrNone;
}