Update contrib.
1 // Copyright (c) 2002-2010 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 "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.
18 #include "t_logutil2.h"
20 RTest TheTest(_L("t_logheap"));
22 const TUid KTestEventUid = {0x10005393};
23 _LIT(KTestEventDesc1, "Event Type Description");
24 _LIT(KTestEventDesc2, "Changed Event Description");
25 _LIT(KTestRemoteParty1, "Remote Party");
26 _LIT(KTestRemoteParty2, "Changed Remote Party");
27 _LIT(KTestDirection1, "Direction");
28 _LIT(KTestDirection2, "Changed Direction");
29 const TLogDurationType KTestDurationType1 = 1;
30 const TLogDurationType KTestDurationType2 = 2;
31 const TLogDuration KTestDuration1 = 0x1234;
32 const TLogDuration KTestDuration2 = 0x1234567;
33 _LIT(KTestStatus1, "Status");
34 _LIT(KTestStatus2, "Changed Status");
35 _LIT(KTestSubject1, "Subject");
36 _LIT(KTestSubject2, "Changed Subject");
37 _LIT(KTestNumber1, "Number");
38 _LIT(KTestNumber2, "Changed Number");
39 const TLogContactItemId KTestContact1 = 0x1234;
40 const TLogContactItemId KTestContact2 = 0x1234567;
41 const TLogLink KTestLink1 = 0x1234;
42 const TLogLink KTestLink2 = 0x1234567;
43 _LIT8(KTestData1, "ABCDEFGH");
44 _LIT8(KTestData2, "IJKLMNOPQRSTUVWXYZ");
45 const TLogSize KTestMaxLogSize = 0xFFF;
46 const TLogRecentSize KTestMaxRecentLogSize = 0xF;
47 const TLogAge KTestMaxEventAge = 0xFFFFFFF;
49 _LIT(KCreateDb, "Create Db");
50 _LIT(KOpenDb, "Open Db");
52 #ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
53 _LIT(KServerSide, "server side");
54 _LIT(KClientSide, "client side");
58 @SYMTestCaseID SYSLIB-LOGENG-CT-0884
59 @SYMTestCaseDesc Tests for functionality of CLogEvent,CTestActive classes
61 @SYMTestActions Tests for no memory errors.
62 @SYMTestExpectedResults Test must not fail
65 LOCAL_C void TestStartup1L()
67 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0884 "));
68 CLogClient* client = CLogClient::NewL(theFs);
69 CleanupStack::PushL(client);
71 CTestActive* active = new(ELeave)CTestActive();
72 CleanupStack::PushL(active);
74 CLogEvent* event = CLogEvent::NewL();
75 CleanupStack::PushL(event);
80 event->SetEventType(KLogCallEventTypeUid);
83 client->AddEvent(*event, active->iStatus);
84 CActiveScheduler::Start();
85 TEST2(active->iStatus.Int(), KErrNone);
87 TBool finished = EFalse;
92 __UHEAP_FAILNEXT(++failCount);
93 client->ChangeEvent(*event, active->iStatus);
96 CActiveScheduler::Start();
98 if (active->iStatus == KErrNone)
104 TEST2(active->iStatus.Int(), KErrNoMemory);
108 CleanupStack::PopAndDestroy(3); // client, active, event
109 TheTest.Printf(_L("===CLogClient::ChangeEvent() client side OOM test succeeded at iteration %d\n"), failCount);
113 @SYMTestCaseID SYSLIB-LOGENG-CT-0885
114 @SYMTestCaseDesc Tests for CLogEvent,CTestActive classes
115 @SYMTestPriority High
116 @SYMTestActions Tests for all basic functions of CLogEvent,CTestActive classes.Check for ErrNone flag.
117 @SYMTestExpectedResults Test must not fail
120 LOCAL_C void TestBasicL(CLogClient& aClient)
122 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0885 "));
124 CTestActive* active = new(ELeave)CTestActive();
125 CleanupStack::PushL(active);
127 CLogEvent* event = CLogEvent::NewL();
128 CleanupStack::PushL(event);
133 event->SetEventType(KLogCallEventTypeUid);
136 aClient.AddEvent(*event, active->iStatus);
137 CActiveScheduler::Start();
138 TEST2(active->iStatus.Int(), KErrNone);
140 TEST(event->EventType() == KLogCallEventTypeUid);
141 TEST(event->Description().Length() > 0);
142 TEST(event->Time() >= now);
145 TLogId id = event->Id();
147 event->SetRemoteParty(KTestRemoteParty1);
148 event->SetDirection(KTestDirection1);
149 event->SetDurationType(KTestDurationType1);
150 event->SetDuration(KTestDuration1);
151 event->SetStatus(KTestStatus1);
152 event->SetSubject(KTestSubject1);
153 event->SetNumber(KTestNumber1);
154 event->SetContact(KTestContact1);
155 event->SetLink(KTestLink1);
156 event->SetDataL(KTestData1);
159 aClient.ChangeEvent(*event, active->iStatus);
160 CActiveScheduler::Start();
161 TEST2(active->iStatus.Int(), KErrNone);
163 TEST(event->Id() == id);
164 TEST(event->EventType() == KLogCallEventTypeUid);
165 TEST(event->Description().Length() > 0);
166 TEST(event->Time() == now);
167 TEST(event->RemoteParty() == KTestRemoteParty1);
168 TEST(event->Direction() == KTestDirection1);
169 TEST(event->DurationType() == KTestDurationType1);
170 TEST(event->Duration() == KTestDuration1);
171 TEST(event->Status() == KTestStatus1);
172 TEST(event->Subject() == KTestSubject1);
173 TEST(event->Number() == KTestNumber1);
174 TEST(event->Contact() == KTestContact1);
175 TEST(event->Link() == KTestLink1);
176 TEST(event->Data() == KTestData1);
178 CleanupStack::PopAndDestroy(); // event;
180 event = CLogEvent::NewL();
181 CleanupStack::PushL(event);
186 aClient.GetEvent(*event, active->iStatus);
187 CActiveScheduler::Start();
188 TEST2(active->iStatus.Int(), KErrNone);
190 TEST(event->Id() == id);
191 TEST(event->EventType() == KLogCallEventTypeUid);
192 TEST(event->Description().Length() > 0);
193 TEST(event->Time() == now);
194 TEST(event->RemoteParty() == KTestRemoteParty1);
195 TEST(event->Direction() == KTestDirection1);
196 TEST(event->DurationType() == KTestDurationType1);
197 TEST(event->Duration() == KTestDuration1);
198 TEST(event->Status() == KTestStatus1);
199 TEST(event->Subject() == KTestSubject1);
200 TEST(event->Number() == KTestNumber1);
201 TEST(event->Contact() == KTestContact1);
202 TEST(event->Link() == KTestLink1);
203 TEST(event->Data() == KTestData1);
206 aClient.DeleteEvent(id, active->iStatus);
207 CActiveScheduler::Start();
208 TEST2(active->iStatus.Int(), KErrNone);
211 aClient.GetEvent(*event, active->iStatus);
212 CActiveScheduler::Start();
213 TEST2(active->iStatus.Int(), KErrNotFound);
215 CleanupStack::PopAndDestroy(2, active); // event, active
219 @SYMTestCaseID SYSLIB-LOGENG-CT-0886
220 @SYMTestCaseDesc Tests for new CLogClient object creation
221 @SYMTestPriority High
222 @SYMTestActions Create a CLogClient object on heap.Check for memory errors
223 @SYMTestExpectedResults Test must not fail
226 LOCAL_C void TestConstruction1L(TBool aCreateDb)
228 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0886 "));
232 TestUtils::DeleteDatabaseL();
235 CLogClient* client = NULL;
238 TBool finished = EFalse;
243 __UHEAP_FAILNEXT(++failCount);
245 TRAP(error, client = CLogClient::NewL(theFs));
249 if (error == KErrNone)
255 TEST2(error, KErrNoMemory);
259 TheTest.Printf(_L("==CLogClient::NewL()+\"%S\" client side OOM test succeeded at iteration %d\n"), aCreateDb ? &KCreateDb : &KOpenDb, failCount);
263 @SYMTestCaseID SYSLIB-LOGENG-CT-0887
264 @SYMTestCaseDesc Tests for creation of new CLogClient object
265 @SYMTestPriority High
266 @SYMTestActions Check for memory errors and error in the environment
267 @SYMTestExpectedResults Test must not fail
270 LOCAL_C void TestConstruction3L(TBool aCreateDb)
272 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0887 "));
276 TestUtils::DeleteDatabaseL();
279 CLogClient* client = NULL;
283 TBool finished = EFalse;
288 __LOGSERV_UHEAP_FAILNEXT(++failCount);
290 TRAP(error, client = CLogClient::NewL(theFs));
292 __LOGSERV_UHEAP_RESET;
294 if (error == KErrNone)
300 TEST2(error, KErrNoMemory);
304 TheTest.Printf(_L("==CLogClient::NewL()+\"%S\" server side OOM test succeeded at iteration %d\n"), aCreateDb ? &KCreateDb : &KOpenDb, failCount);
308 @SYMTestCaseID SYSLIB-LOGENG-CT-0888
309 @SYMTestCaseDesc Tests for CLogClient::AddEventType() function
310 @SYMTestPriority High
311 @SYMTestActions Tests for adding events to the log
312 Check for memory errors and error in the environment
313 @SYMTestExpectedResults Test must not fail
316 LOCAL_C void TestAddEventType1L()
318 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0888 "));
320 CLogClient* client = CLogClient::NewL(theFs);
321 CleanupStack::PushL(client);
323 CLogEventType* type = CLogEventType::NewL();
324 CleanupStack::PushL(type);
326 type->SetUid(KTestEventUid);
327 type->SetDescription(KTestEventDesc1);
328 type->SetLoggingEnabled(ETrue);
330 CTestActive* active = new(ELeave)CTestActive();
331 CleanupStack::PushL(active);
334 TBool finished = EFalse;
341 __UHEAP_FAILNEXT(++failCount);
342 client->AddEventType(*type, active->iStatus);
345 CActiveScheduler::Start();
347 if (active->iStatus == KErrNone)
350 error = active->iStatus.Int();
354 if (error == KErrNoMemory)
357 client->GetEventType(*type, active->iStatus);
358 CActiveScheduler::Start();
359 TEST2(active->iStatus.Int(), KErrNotFound);
362 TEST2(error, KErrNone);
367 client->AddEventType(*type, active->iStatus);
368 CActiveScheduler::Start();
369 TEST2(active->iStatus.Int(), KErrAlreadyExists);
371 CleanupStack::PopAndDestroy(3, client); // active, type, client
372 TheTest.Printf(_L("===CLogClient::AddEventType() client side OOM test succeeded at iteration %d\n"), failCount);
376 @SYMTestCaseID SYSLIB-LOGENG-CT-0889
377 @SYMTestCaseDesc Tests for CLogClient::AddEventType() function
378 @SYMTestPriority High
379 @SYMTestActions Tests for adding events to the log
380 Check for memory errors and error in the environment
381 Test for adding the same event and check for already exits error.
382 @SYMTestExpectedResults Test must not fail
385 LOCAL_C void TestAddEventType3L()
387 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0889 "));
389 CLogClient* client = CLogClient::NewL(theFs);
390 CleanupStack::PushL(client);
392 CLogEventType* type = CLogEventType::NewL();
393 CleanupStack::PushL(type);
395 type->SetUid(KTestEventUid);
396 type->SetDescription(KTestEventDesc1);
397 type->SetLoggingEnabled(ETrue);
399 CTestActive* active = new(ELeave)CTestActive();
400 CleanupStack::PushL(active);
404 TBool finished = EFalse;
411 __LOGSERV_UHEAP_FAILNEXT(++failCount);
412 client->AddEventType(*type, active->iStatus);
415 CActiveScheduler::Start();
417 if (active->iStatus == KErrNone)
420 error = active->iStatus.Int();
422 __LOGSERV_UHEAP_RESET;
424 if (error == KErrNoMemory)
427 client->GetEventType(*type, active->iStatus);
428 CActiveScheduler::Start();
429 TEST2(active->iStatus.Int(), KErrNotFound);
432 TEST2(error, KErrNone);
437 client->AddEventType(*type, active->iStatus);
438 CActiveScheduler::Start();
439 TEST2(active->iStatus.Int(), KErrAlreadyExists);
441 CleanupStack::PopAndDestroy(3, client); // active, type, client
442 TheTest.Printf(_L("===CLogClient::AddEventType() server side OOM test succeeded at iteration %d\n"), failCount);
446 @SYMTestCaseID SYSLIB-LOGENG-CT-0890
447 @SYMTestCaseDesc Tests for CLogClient::GetEventType() function
448 @SYMTestPriority High
449 @SYMTestActions Tests for getting event type for the specific UID from the log
450 Check for memory errors and error in the environment
451 @SYMTestExpectedResults Test must not fail
454 LOCAL_C void TestGetEventType1L()
456 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0890 "));
458 CLogClient* client = CLogClient::NewL(theFs);
459 CleanupStack::PushL(client);
461 CLogEventType* type = CLogEventType::NewL();
462 CleanupStack::PushL(type);
464 type->SetUid(KTestEventUid);
466 CTestActive* active = new(ELeave)CTestActive();
467 CleanupStack::PushL(active);
470 TBool finished = EFalse;
474 __UHEAP_FAILNEXT(++failCount);
476 client->GetEventType(*type, active->iStatus);
479 CActiveScheduler::Start();
481 if (active->iStatus == KErrNone)
485 TEST2(active->iStatus.Int(), KErrNoMemory);
486 TEST(type->Description() == KNullDesC);
492 TEST(type->Uid() == KTestEventUid);
493 TEST(type->Description() == KTestEventDesc1);
494 TEST(type->LoggingEnabled());
496 CleanupStack::PopAndDestroy(3, client); // active, type, client
497 TheTest.Printf(_L("===CLogClient::GetEventType() client side OOM test succeeded at iteration %d\n"), failCount);
501 @SYMTestCaseID SYSLIB-LOGENG-CT-0891
502 @SYMTestCaseDesc Tests for CLogClient::GetEventType() function
503 @SYMTestPriority High
504 @SYMTestActions Tests for getting event type for the specific UID from the log
505 Check for memory errors and error in the environment
506 @SYMTestExpectedResults Test must not fail
509 LOCAL_C void TestGetEventType3L()
511 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0891 "));
513 CLogClient* client = CLogClient::NewL(theFs);
514 CleanupStack::PushL(client);
516 CLogEventType* type = CLogEventType::NewL();
517 CleanupStack::PushL(type);
519 type->SetUid(KTestEventUid);
521 CTestActive* active = new(ELeave)CTestActive();
522 CleanupStack::PushL(active);
525 TBool finished = EFalse;
529 __LOGSERV_UHEAP_FAILNEXT(++failCount);
531 client->GetEventType(*type, active->iStatus);
534 CActiveScheduler::Start();
536 if (active->iStatus == KErrNone)
540 TEST2(active->iStatus.Int(), KErrNoMemory);
541 TEST(type->Description() == KNullDesC);
544 __LOGSERV_UHEAP_RESET;
547 TEST(type->Uid() == KTestEventUid);
548 TEST(type->Description() == KTestEventDesc1);
549 TEST(type->LoggingEnabled());
551 CleanupStack::PopAndDestroy(3, client); // active, type, client
552 TheTest.Printf(_L("===CLogClient::GetEventType() server side OOM test succeeded at iteration %d\n"), failCount);
556 @SYMTestCaseID SYSLIB-LOGENG-CT-0892
557 @SYMTestCaseDesc Tests for CLogClient::ChangeEventType() function
558 @SYMTestPriority High
559 @SYMTestActions Tests for changing the event type
560 Check for memory errors and error in the environment
561 @SYMTestExpectedResults Test must not fail
564 LOCAL_C void TestChangeEventType1L()
566 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0892 "));
568 CLogClient* client = CLogClient::NewL(theFs);
569 CleanupStack::PushL(client);
571 CTestActive* active = new(ELeave)CTestActive();
572 CleanupStack::PushL(active);
574 CLogEventType* type = CLogEventType::NewL();
575 CleanupStack::PushL(type);
577 type->SetUid(KTestEventUid);
579 type->SetDescription(KTestEventDesc1);
580 type->SetDescription(KTestEventDesc2);
583 TBool finished = EFalse;
590 type->SetDescription(KTestEventDesc2);
591 type->SetLoggingEnabled(EFalse);
593 __UHEAP_FAILNEXT(++failCount);
595 client->ChangeEventType(*type, active->iStatus);
598 CActiveScheduler::Start();
600 if (active->iStatus == KErrNone)
603 error = active->iStatus.Int();
607 if (error == KErrNoMemory)
610 client->GetEventType(*type, active->iStatus);
611 CActiveScheduler::Start();
612 TEST2(active->iStatus.Int(), KErrNone);
614 TEST(type->Description() == KTestEventDesc1);
615 TEST(type->LoggingEnabled());
618 TEST2(error, KErrNone);
621 type->SetUid(KTestEventUid);
624 client->GetEventType(*type, active->iStatus);
625 CActiveScheduler::Start();
626 TEST2(active->iStatus.Int(), KErrNone);
628 TEST(type->Uid() == KTestEventUid);
629 TEST(type->Description() == KTestEventDesc2);
630 TEST(type->LoggingEnabled() == EFalse);
632 CleanupStack::PopAndDestroy(3, client); // type, active, client
633 TheTest.Printf(_L("===CLogClient::ChangeEventType() client side OOM test succeeded at iteration %d\n"), failCount);
637 @SYMTestCaseID SYSLIB-LOGENG-CT-0893
638 @SYMTestCaseDesc Tests for CLogClient::ChangeEventType() function
639 @SYMTestPriority High
640 @SYMTestActions Tests for changing the event type.
641 Check for memory errors and error in the environment
642 @SYMTestExpectedResults Test must not fail
645 LOCAL_C void TestChangeEventType3L()
647 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0893 "));
649 CLogClient* client = CLogClient::NewL(theFs);
650 CleanupStack::PushL(client);
652 CTestActive* active = new(ELeave)CTestActive();
653 CleanupStack::PushL(active);
655 CLogEventType* type = CLogEventType::NewL();
656 CleanupStack::PushL(type);
658 type->SetUid(KTestEventUid);
660 type->SetDescription(KTestEventDesc1);
661 type->SetDescription(KTestEventDesc2);
664 TBool finished = EFalse;
671 type->SetDescription(KTestEventDesc2);
672 type->SetLoggingEnabled(EFalse);
674 __LOGSERV_UHEAP_FAILNEXT(++failCount);
676 client->ChangeEventType(*type, active->iStatus);
679 CActiveScheduler::Start();
681 if (active->iStatus == KErrNone)
684 error = active->iStatus.Int();
686 __LOGSERV_UHEAP_RESET;
688 if (error == KErrNoMemory)
691 client->GetEventType(*type, active->iStatus);
692 CActiveScheduler::Start();
693 TEST2(active->iStatus.Int(), KErrNone);
695 TEST(type->Description() == KTestEventDesc1);
696 TEST(type->LoggingEnabled());
699 TEST2(error, KErrNone);
702 type->SetUid(KTestEventUid);
705 client->GetEventType(*type, active->iStatus);
706 CActiveScheduler::Start();
707 TEST2(active->iStatus.Int(), KErrNone);
709 TEST(type->Uid() == KTestEventUid);
710 TEST(type->Description() == KTestEventDesc2);
711 TEST(type->LoggingEnabled() == EFalse);
713 CleanupStack::PopAndDestroy(3, client); // type, active, client
714 TheTest.Printf(_L("===CLogClient::ChangeEventType() server side OOM test succeeded at iteration %d\n"), failCount);
718 @SYMTestCaseID SYSLIB-LOGENG-CT-0894
719 @SYMTestCaseDesc Tests for CLogClient::DeleteEventType() function
720 @SYMTestPriority High
721 @SYMTestActions Tests for deleting of event type.
722 After deletion check by trying to retrieve the event.
723 Check for ErrNotFound,error flag
724 @SYMTestExpectedResults Test must not fail
727 LOCAL_C void TestDeleteEventType1L()
729 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0894 "));
731 CLogClient* client = CLogClient::NewL(theFs);
732 CleanupStack::PushL(client);
734 CTestActive* active = new(ELeave)CTestActive();
735 CleanupStack::PushL(active);
737 CLogEventType* type = CLogEventType::NewL();
738 CleanupStack::PushL(type);
740 type->SetUid(KTestEventUid);
743 TBool finished = EFalse;
750 __UHEAP_FAILNEXT(++failCount);
751 client->DeleteEventType(KTestEventUid, active->iStatus);
754 CActiveScheduler::Start();
756 if (active->iStatus == KErrNone)
759 error = active->iStatus.Int();
763 if (error == KErrNoMemory)
766 client->GetEventType(*type, active->iStatus);
767 CActiveScheduler::Start();
768 TEST2(active->iStatus.Int(), KErrNone);
771 TEST2(error, KErrNone);
775 client->GetEventType(*type, active->iStatus);
776 CActiveScheduler::Start();
777 TEST2(active->iStatus.Int(), KErrNotFound);
779 CleanupStack::PopAndDestroy(3, client); // type, active, client
780 TheTest.Printf(_L("===CLogClient::DeleteEventType() client side OOM test succeeded at iteration %d\n"), failCount);
784 @SYMTestCaseID SYSLIB-LOGENG-CT-0895
785 @SYMTestCaseDesc Tests for CLogClient::DeleteEventType() function
786 @SYMTestPriority High
787 @SYMTestActions Tests for deleting of event type.
788 After deletion check by trying to retrieve the event.
789 Check for ErrNotFound,error flag.
790 @SYMTestExpectedResults Test must not fail
793 LOCAL_C void TestDeleteEventType3L()
795 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0895 "));
797 CLogClient* client = CLogClient::NewL(theFs);
798 CleanupStack::PushL(client);
800 CTestActive* active = new(ELeave)CTestActive();
801 CleanupStack::PushL(active);
803 CLogEventType* type = CLogEventType::NewL();
804 CleanupStack::PushL(type);
806 type->SetUid(KTestEventUid);
810 TBool finished = EFalse;
817 __LOGSERV_UHEAP_FAILNEXT(++failCount);
818 client->DeleteEventType(KTestEventUid, active->iStatus);
821 CActiveScheduler::Start();
823 if (active->iStatus == KErrNone)
826 error = active->iStatus.Int();
828 __LOGSERV_UHEAP_RESET;
830 if (error == KErrNoMemory)
833 client->GetEventType(*type, active->iStatus);
834 CActiveScheduler::Start();
835 TEST2(active->iStatus.Int(), KErrNone);
838 TEST2(error, KErrNone);
842 client->GetEventType(*type, active->iStatus);
843 CActiveScheduler::Start();
844 TEST2(active->iStatus.Int(), KErrNotFound);
846 CleanupStack::PopAndDestroy(3, client); // type, active, client
847 TheTest.Printf(_L("===CLogClient::DeleteEventType() server side OOM test succeeded at iteration %d\n"), failCount);
851 @SYMTestCaseID SYSLIB-LOGENG-CT-0896
852 @SYMTestCaseDesc Tests for adding event CLogClient::AddEvent() function
853 @SYMTestPriority High
854 @SYMTestActions Add logeventtype and logevent to the log
855 Tests for memory errors and environment errors.
856 @SYMTestExpectedResults Test must not fail
859 LOCAL_C void TestAddEvent1L()
861 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0896 "));
863 CLogClient* client = CLogClient::NewL(theFs);
864 CleanupStack::PushL(client);
866 CLogEventType* type = CLogEventType::NewL();
867 CleanupStack::PushL(type);
869 type->SetUid(KTestEventUid);
870 type->SetDescription(KTestEventDesc1);
871 type->SetLoggingEnabled(ETrue);
873 CTestActive* active = new(ELeave)CTestActive();
874 CleanupStack::PushL(active);
877 client->AddEventType(*type, active->iStatus);
878 CActiveScheduler::Start();
879 TEST2(active->iStatus.Int(), KErrNone);
881 CLogEvent* event = CLogEvent::NewL();
882 CleanupStack::PushL(event);
887 event->SetEventType(KTestEventUid);
888 event->SetRemoteParty(KTestRemoteParty1);
889 event->SetDirection(KTestDirection1);
890 event->SetDurationType(KTestDurationType1);
891 event->SetDuration(KTestDuration1);
892 event->SetStatus(KTestStatus1);
893 event->SetSubject(KTestSubject1);
894 event->SetNumber(KTestNumber1);
895 event->SetContact(KTestContact1);
896 event->SetLink(KTestLink1);
897 event->SetDataL(KTestData1);
900 TBool finished = EFalse;
907 __UHEAP_FAILNEXT(++failCount);
908 client->AddEvent(*event, active->iStatus);
910 CActiveScheduler::Start();
912 if (active->iStatus == KErrNone)
915 error = active->iStatus.Int();
919 if(error != KErrNoMemory)
921 TEST2(error, KErrNone);
925 TEST(event->Time() >= now);
926 TEST(event->Description() == KTestEventDesc1);
929 client->GetEvent(*event, active->iStatus);
930 CActiveScheduler::Start();
931 TEST2(active->iStatus.Int(), KErrNone);
933 CleanupStack::PopAndDestroy(4, client); // event, active, type, client
934 TheTest.Printf(_L("===CLogClient::AddEvent() client side OOM test succeeded at iteration %d\n"), failCount);
938 @SYMTestCaseID SYSLIB-LOGENG-CT-0897
939 @SYMTestCaseDesc Tests for adding event CLogClient::AddEvent() function
940 @SYMTestPriority High
941 @SYMTestActions Add logeventtype and logevent to the log
942 Tests for memory errors and environment errors.
943 @SYMTestExpectedResults Test must not fail
946 LOCAL_C void TestAddEvent3L()
949 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0897 "));
951 CLogClient* client = CLogClient::NewL(theFs);
952 CleanupStack::PushL(client);
954 CLogEventType* type = CLogEventType::NewL();
955 CleanupStack::PushL(type);
957 type->SetUid(KTestEventUid);
958 type->SetDescription(KTestEventDesc1);
959 type->SetLoggingEnabled(ETrue);
961 CTestActive* active = new(ELeave)CTestActive();
962 CleanupStack::PushL(active);
965 client->AddEventType(*type, active->iStatus);
966 CActiveScheduler::Start();
967 TEST2(active->iStatus.Int(), KErrNone);
969 CLogEvent* event = CLogEvent::NewL();
970 CleanupStack::PushL(event);
975 event->SetEventType(KTestEventUid);
976 event->SetRemoteParty(KTestRemoteParty1);
977 event->SetDirection(KTestDirection1);
978 event->SetDurationType(KTestDurationType1);
979 event->SetDuration(KTestDuration1);
980 event->SetStatus(KTestStatus1);
981 event->SetSubject(KTestSubject1);
982 event->SetNumber(KTestNumber1);
983 event->SetContact(KTestContact1);
984 event->SetLink(KTestLink1);
985 event->SetDataL(KTestData1);
988 TBool finished = EFalse;
995 __LOGSERV_UHEAP_FAILNEXT(++failCount);
996 client->AddEvent(*event, active->iStatus);
998 CActiveScheduler::Start();
1000 if (active->iStatus == KErrNone)
1003 error = active->iStatus.Int();
1005 __LOGSERV_UHEAP_RESET;
1007 if(error != KErrNoMemory)
1009 TEST2(error, KErrNone);
1013 TEST(event->Time() >= now);
1014 TEST(event->Description() == KTestEventDesc1);
1017 client->GetEvent(*event, active->iStatus);
1018 CActiveScheduler::Start();
1019 TEST2(active->iStatus.Int(), KErrNone);
1021 CleanupStack::PopAndDestroy(4, client); // event, active, type, client
1022 TheTest.Printf(_L("===CLogClient::AddEvent() server side OOM test succeeded at iteration %d\n"), failCount);
1026 @SYMTestCaseID SYSLIB-LOGENG-CT-0898
1027 @SYMTestCaseDesc Tests for retrieving details of an event
1028 Tests for CLogClient::GetEvent() function.
1029 @SYMTestPriority High
1030 @SYMTestActions Tests for getting event details.Check for memory errors and error in the environment
1031 Tests for the integrity of the information
1032 @SYMTestExpectedResults Test must not fail
1035 LOCAL_C void TestGetEvent1L()
1037 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0898 "));
1039 CLogClient* client = CLogClient::NewL(theFs);
1040 CleanupStack::PushL(client);
1042 CTestActive* active = new(ELeave)CTestActive();
1043 CleanupStack::PushL(active);
1045 CLogEvent* event = CLogEvent::NewL();
1046 CleanupStack::PushL(event);
1051 TBool finished = EFalse;
1055 __UHEAP_FAILNEXT(++failCount);
1056 client->GetEvent(*event, active->iStatus);
1059 CActiveScheduler::Start();
1061 if (active->iStatus == KErrNone)
1064 TEST2(active->iStatus.Int(), KErrNoMemory);
1069 TEST(event->Id() == 0);
1070 TEST(event->Time() > TTime(0));
1071 TEST(event->Description() == KTestEventDesc1);
1072 TEST(event->EventType() == KTestEventUid);
1073 TEST(event->RemoteParty() == KTestRemoteParty1);
1074 TEST(event->Direction() == KTestDirection1);
1075 TEST(event->DurationType() == KTestDurationType1);
1076 TEST(event->Duration() == KTestDuration1);
1077 TEST(event->Status() == KTestStatus1);
1078 TEST(event->Subject() == KTestSubject1);
1079 TEST(event->Number() == KTestNumber1);
1080 TEST(event->Contact() == KTestContact1);
1081 TEST(event->Link() == KTestLink1);
1082 TEST(event->Data() == KTestData1);
1084 CleanupStack::PopAndDestroy(3, client); // event, active, client
1085 TheTest.Printf(_L("===CLogClient::AddEvent() client side OOM test succeeded at iteration %d\n"), failCount);
1089 @SYMTestCaseID SYSLIB-LOGENG-CT-0899
1090 @SYMTestCaseDesc Tests for retrieving details of an event.Tests for CLogClient::GetEventL() function
1091 @SYMTestPriority High
1092 @SYMTestActions Tests for getting event details of UID 0.Check for memory errors and error in the environment
1093 Tests for the integrity of the information
1094 @SYMTestExpectedResults Test must not fail
1097 LOCAL_C void TestGetEvent3L()
1099 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0899 "));
1101 CLogClient* client = CLogClient::NewL(theFs);
1102 CleanupStack::PushL(client);
1104 CTestActive* active = new(ELeave)CTestActive();
1105 CleanupStack::PushL(active);
1107 CLogEvent* event = CLogEvent::NewL();
1108 CleanupStack::PushL(event);
1113 TBool finished = EFalse;
1117 __LOGSERV_UHEAP_FAILNEXT(++failCount);
1118 client->GetEvent(*event, active->iStatus);
1121 CActiveScheduler::Start();
1123 if (active->iStatus == KErrNone)
1126 TEST2(active->iStatus.Int(), KErrNoMemory);
1128 __LOGSERV_UHEAP_RESET;
1131 TEST(event->Id() == 0);
1132 TEST(event->Time() > TTime(0));
1133 TEST(event->Description() == KTestEventDesc1);
1134 TEST(event->EventType() == KTestEventUid);
1135 TEST(event->RemoteParty() == KTestRemoteParty1);
1136 TEST(event->Direction() == KTestDirection1);
1137 TEST(event->DurationType() == KTestDurationType1);
1138 TEST(event->Duration() == KTestDuration1);
1139 TEST(event->Status() == KTestStatus1);
1140 TEST(event->Subject() == KTestSubject1);
1141 TEST(event->Number() == KTestNumber1);
1142 TEST(event->Contact() == KTestContact1);
1143 TEST(event->Link() == KTestLink1);
1144 TEST(event->Data() == KTestData1);
1146 CleanupStack::PopAndDestroy(3, client); // event, active, client
1147 TheTest.Printf(_L("===CLogClient::GetEvent() server side OOM test succeeded at iteration %d\n"), failCount);
1151 @SYMTestCaseID SYSLIB-LOGENG-CT-0900
1152 @SYMTestCaseDesc Tests for changing the log event details.
1153 Tests for CLogClient::ChangeEvent() function
1154 @SYMTestPriority High
1155 @SYMTestActions Tests for changing the event details.Check for memory errors and error in the environment
1156 If no memory error,get the event details and check for the integrity.
1157 @SYMTestExpectedResults Test must not fail
1160 LOCAL_C void TestChangeEvent3L()
1162 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0900 "));
1164 CLogClient* client = CLogClient::NewL(theFs);
1165 CleanupStack::PushL(client);
1167 CTestActive* active = new(ELeave)CTestActive();
1168 CleanupStack::PushL(active);
1170 CLogEvent* event = CLogEvent::NewL();
1171 CleanupStack::PushL(event);
1174 now.UniversalTime();
1177 TBool finished = EFalse;
1185 event->SetTime(now);
1186 event->SetRemoteParty(KTestRemoteParty2);
1187 event->SetDirection(KTestDirection2);
1188 event->SetDurationType(KTestDurationType2);
1189 event->SetDuration(KTestDuration2);
1190 event->SetStatus(KTestStatus2);
1191 event->SetSubject(KTestSubject2);
1192 event->SetNumber(KTestNumber2);
1193 event->SetContact(KTestContact2);
1194 event->SetLink(KTestLink2);
1195 event->SetDataL(KTestData2);
1197 __LOGSERV_UHEAP_FAILNEXT(++failCount);
1198 client->ChangeEvent(*event, active->iStatus);
1201 CActiveScheduler::Start();
1202 if (active->iStatus == KErrNone)
1205 error = active->iStatus.Int();
1207 __LOGSERV_UHEAP_RESET;
1209 if (error == KErrNoMemory)
1212 client->GetEvent(*event, active->iStatus);
1213 CActiveScheduler::Start();
1214 TEST2(active->iStatus.Int(), KErrNone);
1216 TEST(event->Id() == 0);
1217 TEST(event->Time() > TTime(0));
1218 TEST(event->Description() == KTestEventDesc1);
1219 TEST(event->EventType() == KTestEventUid);
1220 TEST(event->RemoteParty() == KTestRemoteParty1);
1221 TEST(event->Direction() == KTestDirection1);
1222 TEST(event->DurationType() == KTestDurationType1);
1223 TEST(event->Duration() == KTestDuration1);
1224 TEST(event->Status() == KTestStatus1);
1225 TEST(event->Subject() == KTestSubject1);
1226 TEST(event->Number() == KTestNumber1);
1227 TEST(event->Contact() == KTestContact1);
1228 TEST(event->Link() == KTestLink1);
1229 TEST(event->Data() == KTestData1);
1232 TEST2(error, KErrNone);
1236 client->GetEvent(*event, active->iStatus);
1237 CActiveScheduler::Start();
1238 TEST2(active->iStatus.Int(), KErrNone);
1240 TEST(event->Id() == 0);
1241 TEST(event->Time() == now);
1242 TEST(event->Description() == KTestEventDesc1);
1243 TEST(event->EventType() == KTestEventUid);
1244 TEST(event->RemoteParty() == KTestRemoteParty2);
1245 TEST(event->Direction() == KTestDirection2);
1246 TEST(event->DurationType() == KTestDurationType2);
1247 TEST(event->Duration() == KTestDuration2);
1248 TEST(event->Status() == KTestStatus2);
1249 TEST(event->Subject() == KTestSubject2);
1250 TEST(event->Number() == KTestNumber2);
1251 TEST(event->Contact() == KTestContact2);
1252 TEST(event->Link() == KTestLink2);
1253 TEST(event->Data() == KTestData2);
1255 CleanupStack::PopAndDestroy(3, client); // event, active, client
1256 TheTest.Printf(_L("===CLogClient::ChangeEvent() server side OOM test succeeded at iteration %d\n"), failCount);
1260 @SYMTestCaseID SYSLIB-LOGENG-CT-0901
1261 @SYMTestCaseDesc Tests for changing the log event details.Tests for CLogClient::ChangeEvent() function
1262 @SYMTestPriority High
1263 @SYMTestActions Tests for changing the event details.Check for memory errors and error in the environment
1264 If no memory error,get the event details and check for the integrity.
1265 @SYMTestExpectedResults Test must not fail
1268 LOCAL_C void TestChangeEvent1L()
1270 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0901 "));
1272 CLogClient* client = CLogClient::NewL(theFs);
1273 CleanupStack::PushL(client);
1275 CTestActive* active = new(ELeave)CTestActive();
1276 CleanupStack::PushL(active);
1278 CLogEvent* event = CLogEvent::NewL();
1279 CleanupStack::PushL(event);
1282 now.UniversalTime();
1285 TBool finished = EFalse;
1293 event->SetTime(now);
1294 event->SetRemoteParty(KTestRemoteParty2);
1295 event->SetDirection(KTestDirection2);
1296 event->SetDurationType(KTestDurationType2);
1297 event->SetDuration(KTestDuration2);
1298 event->SetStatus(KTestStatus2);
1299 event->SetSubject(KTestSubject2);
1300 event->SetNumber(KTestNumber2);
1301 event->SetContact(KTestContact2);
1302 event->SetLink(KTestLink2);
1303 event->SetDataL(KTestData2);
1305 __UHEAP_FAILNEXT(++failCount);
1306 client->ChangeEvent(*event, active->iStatus);
1309 CActiveScheduler::Start();
1310 if (active->iStatus == KErrNone)
1313 error = active->iStatus.Int();
1317 if (error == KErrNoMemory)
1320 client->GetEvent(*event, active->iStatus);
1321 CActiveScheduler::Start();
1322 TEST2(active->iStatus.Int(), KErrNone);
1324 TEST(event->Id() == 0);
1325 TEST(event->Time() > TTime(0));
1326 TEST(event->Description() == KTestEventDesc1);
1327 TEST(event->EventType() == KTestEventUid);
1328 TEST(event->RemoteParty() == KTestRemoteParty1);
1329 TEST(event->Direction() == KTestDirection1);
1330 TEST(event->DurationType() == KTestDurationType1);
1331 TEST(event->Duration() == KTestDuration1);
1332 TEST(event->Status() == KTestStatus1);
1333 TEST(event->Subject() == KTestSubject1);
1334 TEST(event->Number() == KTestNumber1);
1335 TEST(event->Contact() == KTestContact1);
1336 TEST(event->Link() == KTestLink1);
1337 TEST(event->Data() == KTestData1);
1340 TEST2(error, KErrNone);
1344 client->GetEvent(*event, active->iStatus);
1345 CActiveScheduler::Start();
1346 TEST2(active->iStatus.Int(), KErrNone);
1348 TEST(event->Id() == 0);
1349 TEST(event->Time() == now);
1350 TEST(event->Description() == KTestEventDesc1);
1351 TEST(event->EventType() == KTestEventUid);
1352 TEST(event->RemoteParty() == KTestRemoteParty2);
1353 TEST(event->Direction() == KTestDirection2);
1354 TEST(event->DurationType() == KTestDurationType2);
1355 TEST(event->Duration() == KTestDuration2);
1356 TEST(event->Status() == KTestStatus2);
1357 TEST(event->Subject() == KTestSubject2);
1358 TEST(event->Number() == KTestNumber2);
1359 TEST(event->Contact() == KTestContact2);
1360 TEST(event->Link() == KTestLink2);
1361 TEST(event->Data() == KTestData2);
1363 CleanupStack::PopAndDestroy(3, client); // event, active, client
1364 TheTest.Printf(_L("===CLogClient::ChangeEvent() client side OOM test succeeded at iteration %d\n"), failCount);
1368 @SYMTestCaseID SYSLIB-LOGENG-CT-0902
1369 @SYMTestCaseDesc Tests for deleting an event from the main event log.Tests for CLogClient::DeleteEvent() function
1370 @SYMTestPriority High
1371 @SYMTestActions Tests for deleting an event with unique ID of 0,check for any memory errors
1372 Try to get the deleted event and test for not found error.
1373 @SYMTestExpectedResults Test must not fail
1376 LOCAL_C void TestDeleteEvent1L()
1378 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0902 "));
1380 CLogClient* client = CLogClient::NewL(theFs);
1381 CleanupStack::PushL(client);
1383 CTestActive* active = new(ELeave)CTestActive();
1384 CleanupStack::PushL(active);
1386 CLogEvent* event = CLogEvent::NewL();
1387 CleanupStack::PushL(event);
1392 TBool finished = EFalse;
1399 __UHEAP_FAILNEXT(++failCount);
1400 client->DeleteEvent(0, active->iStatus);
1402 if (error == KErrNone)
1405 CActiveScheduler::Start();
1407 if (active->iStatus == KErrNone)
1410 error = active->iStatus.Int();
1415 if (error == KErrNoMemory)
1418 client->GetEvent(*event, active->iStatus);
1419 CActiveScheduler::Start();
1420 TEST2(active->iStatus.Int(), KErrNone);
1423 TEST2(error, KErrNone);
1427 client->GetEvent(*event, active->iStatus);
1428 CActiveScheduler::Start();
1429 TEST2(active->iStatus.Int(), KErrNotFound);
1431 CleanupStack::PopAndDestroy(3); // event, active, client
1432 TheTest.Printf(_L("===CLogClient::DeleteEvent() client side OOM test succeeded at iteration %d\n"), failCount);
1436 @SYMTestCaseID SYSLIB-LOGENG-CT-0903
1437 @SYMTestCaseDesc Tests for deleting an event from the main event log
1438 @SYMTestPriority High
1439 @SYMTestActions Tests for deleting an event with unique ID of 0,check for any memory errors
1440 Try to get the deleted event and test for not found error.
1441 @SYMTestExpectedResults Test must not fail
1444 LOCAL_C void TestDeleteEvent3L()
1446 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0903 "));
1448 CLogClient* client = CLogClient::NewL(theFs);
1449 CleanupStack::PushL(client);
1451 CTestActive* active = new(ELeave)CTestActive();
1452 CleanupStack::PushL(active);
1454 CLogEvent* event = CLogEvent::NewL();
1455 CleanupStack::PushL(event);
1460 TBool finished = EFalse;
1467 __LOGSERV_UHEAP_FAILNEXT(++failCount);
1468 client->DeleteEvent(0, active->iStatus);
1470 if (error == KErrNone)
1473 CActiveScheduler::Start();
1475 if (active->iStatus == KErrNone)
1478 error = active->iStatus.Int();
1481 __LOGSERV_UHEAP_RESET;
1483 if (error == KErrNoMemory)
1486 client->GetEvent(*event, active->iStatus);
1487 CActiveScheduler::Start();
1488 TEST2(active->iStatus.Int(), KErrNone);
1491 TEST2(error, KErrNone);
1495 client->GetEvent(*event, active->iStatus);
1496 CActiveScheduler::Start();
1497 TEST2(active->iStatus.Int(), KErrNotFound);
1499 CleanupStack::PopAndDestroy(3, client); // event, active, client
1500 TheTest.Printf(_L("===CLogClient::DeleteEvent() server side OOM test succeeded at iteration %d\n"), failCount);
1504 @SYMTestCaseID SYSLIB-LOGENG-CT-0904
1505 @SYMTestCaseDesc Tests for CLogClient::GetConfig() function
1506 @SYMTestPriority High
1507 @SYMTestActions Set the configuration data with zero values.
1508 Get the log engine configuration data,check for any memory errors.
1509 Tests for the integrity of the data
1510 @SYMTestExpectedResults Test must not fail
1513 LOCAL_C void TestGetConfig1L()
1515 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0904 "));
1517 CLogClient* client = CLogClient::NewL(theFs);
1518 CleanupStack::PushL(client);
1520 CTestActive* active = new(ELeave)CTestActive();
1521 CleanupStack::PushL(active);
1525 TEST(config.iMaxEventAge == 0);
1526 TEST(config.iMaxLogSize == 0);
1527 TEST(config.iMaxRecentLogSize == 0);
1530 TBool finished = EFalse;
1534 __UHEAP_FAILNEXT(++failCount);
1535 client->GetConfig(config, active->iStatus);
1538 CActiveScheduler::Start();
1540 if (active->iStatus == KErrNone)
1543 TEST2(active->iStatus.Int(), KErrNoMemory);
1548 TEST(config.iMaxEventAge > 0);
1549 TEST(config.iMaxLogSize > 0);
1550 TEST(config.iMaxRecentLogSize > 0);
1552 CleanupStack::PopAndDestroy(2, client); // active, client
1553 TheTest.Printf(_L("===CLogClient::GetConfig() client side OOM test succeeded at iteration %d\n"), failCount);
1557 @SYMTestCaseID SYSLIB-LOGENG-CT-0905
1558 @SYMTestCaseDesc Tests for CLogClient::GetConfig() function
1559 @SYMTestPriority High
1560 @SYMTestActions Set the configuration data with zero values.
1561 Get the log engine configuration data,check for any memory errors.
1562 Tests for the integrity of the data
1563 @SYMTestExpectedResults Test must not fail
1566 LOCAL_C void TestGetConfig3L()
1568 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0905 "));
1570 CLogClient* client = CLogClient::NewL(theFs);
1571 CleanupStack::PushL(client);
1573 CTestActive* active = new(ELeave)CTestActive();
1574 CleanupStack::PushL(active);
1578 TEST(config.iMaxEventAge == 0);
1579 TEST(config.iMaxLogSize == 0);
1580 TEST(config.iMaxRecentLogSize == 0);
1583 TBool finished = EFalse;
1587 __LOGSERV_UHEAP_FAILNEXT(++failCount);
1588 client->GetConfig(config, active->iStatus);
1591 CActiveScheduler::Start();
1593 if (active->iStatus == KErrNone)
1596 TEST2(active->iStatus.Int(), KErrNoMemory);
1598 __LOGSERV_UHEAP_RESET;
1601 TEST(config.iMaxEventAge > 0);
1602 TEST(config.iMaxLogSize > 0);
1603 TEST(config.iMaxRecentLogSize > 0);
1605 CleanupStack::PopAndDestroy(2, client); // active, client
1606 TheTest.Printf(_L("===CLogClient::GetConfig() server side OOM test succeeded at iteration %d\n"), failCount);
1610 @SYMTestCaseID SYSLIB-LOGENG-CT-0906
1611 @SYMTestCaseDesc Tests for CLogClient::ChangeConfig() function
1612 @SYMTestPriority High
1613 @SYMTestActions Get the configuration data and store in temporary object.
1614 Set the new configuration data and change the log engine configuration,check for no memory error
1615 If no memory error,get the configuration data and test for the new changes of the data with the old data.
1616 @SYMTestExpectedResults Test must not fail
1619 LOCAL_C void TestChangeConfig1L()
1621 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0906 "));
1623 CLogClient* client = CLogClient::NewL(theFs);
1624 CleanupStack::PushL(client);
1626 CTestActive* active = new(ELeave)CTestActive();
1627 CleanupStack::PushL(active);
1629 TLogConfig configOld;
1632 client->GetConfig(configOld, active->iStatus);
1633 CActiveScheduler::Start();
1634 TEST2(active->iStatus.Int(), KErrNone);
1639 TBool finished = EFalse;
1646 config.iMaxLogSize = KTestMaxLogSize;
1647 config.iMaxRecentLogSize = KTestMaxRecentLogSize;
1648 config.iMaxEventAge = KTestMaxEventAge;
1650 __UHEAP_FAILNEXT(++failCount);
1651 client->ChangeConfig(config, active->iStatus);
1654 CActiveScheduler::Start();
1656 if (active->iStatus == KErrNone)
1659 error = active->iStatus.Int();
1663 if (error == KErrNoMemory)
1666 client->GetConfig(config, active->iStatus);
1667 CActiveScheduler::Start();
1668 TEST2(active->iStatus.Int(), KErrNone);
1670 TEST(config.iMaxLogSize == configOld.iMaxLogSize);
1671 TEST(config.iMaxRecentLogSize == configOld.iMaxRecentLogSize);
1672 TEST(config.iMaxEventAge == configOld.iMaxEventAge);
1675 TEST2(error, KErrNone);
1678 TEST(config.iMaxLogSize == KTestMaxLogSize);
1679 TEST(config.iMaxRecentLogSize == KTestMaxRecentLogSize);
1680 TEST(config.iMaxEventAge == KTestMaxEventAge);
1682 CleanupStack::PopAndDestroy(2, client); // active, client
1683 TheTest.Printf(_L("===CLogClient::ChangeConfig() client side OOM test succeeded at iteration %d\n"), failCount);
1687 @SYMTestCaseID SYSLIB-LOGENG-CT-0907
1688 @SYMTestCaseDesc Tests for CLogClient::ChangeConfig() function
1689 @SYMTestPriority High
1690 @SYMTestActions Get the configuration data and store in temporary object.
1691 Set the new configuration data and change the log engine configuration,check for no memory error
1692 If no memory error,get the configuration data and test for the new changes of the data with the old data.
1693 @SYMTestExpectedResults Test must not fail
1696 LOCAL_C void TestChangeConfig3L()
1698 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0907 "));
1700 CLogClient* client = CLogClient::NewL(theFs);
1701 CleanupStack::PushL(client);
1703 CTestActive* active = new(ELeave)CTestActive();
1704 CleanupStack::PushL(active);
1706 TLogConfig configOld;
1709 client->GetConfig(configOld, active->iStatus);
1710 CActiveScheduler::Start();
1711 TEST2(active->iStatus.Int(), KErrNone);
1716 TBool finished = EFalse;
1723 config.iMaxLogSize = KTestMaxLogSize;
1724 config.iMaxRecentLogSize = KTestMaxRecentLogSize;
1725 config.iMaxEventAge = KTestMaxEventAge;
1727 __LOGSERV_UHEAP_FAILNEXT(++failCount);
1728 client->ChangeConfig(config, active->iStatus);
1731 CActiveScheduler::Start();
1733 if (active->iStatus == KErrNone)
1736 error = active->iStatus.Int();
1738 __LOGSERV_UHEAP_RESET;
1740 if (error == KErrNoMemory)
1743 client->GetConfig(config, active->iStatus);
1744 CActiveScheduler::Start();
1745 TEST2(active->iStatus.Int(), KErrNone);
1747 TEST(config.iMaxLogSize == configOld.iMaxLogSize);
1748 TEST(config.iMaxRecentLogSize == configOld.iMaxRecentLogSize);
1749 TEST(config.iMaxEventAge == configOld.iMaxEventAge);
1752 TEST2(error, KErrNone);
1755 TEST(config.iMaxLogSize == KTestMaxLogSize);
1756 TEST(config.iMaxRecentLogSize == KTestMaxRecentLogSize);
1757 TEST(config.iMaxEventAge == KTestMaxEventAge);
1759 CleanupStack::PopAndDestroy(2, client); // active, client
1760 TheTest.Printf(_L("===CLogClient::ChangeConfig() server side OOM test succeeded at iteration %d\n"), failCount);
1764 @SYMTestCaseID SYSLIB-LOGENG-CT-0908
1765 @SYMTestCaseDesc Tests for CLogClient::GetString() function
1766 @SYMTestPriority High
1767 @SYMTestActions Get the standard string name from the resource.
1768 Tests for no memory error and null string.
1769 @SYMTestExpectedResults Test must not fail
1772 LOCAL_C void TestGetString1L()
1774 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0908 "));
1776 CLogClient* client = CLogClient::NewL(theFs);
1777 CleanupStack::PushL(client);
1779 TBuf<KLogMaxSharedStringLength> str;
1782 TBool finished = EFalse;
1787 __UHEAP_FAILNEXT(++failCount);
1789 error = client->GetString(str, R_LOG_DIR_IN);
1793 if (error == KErrNone)
1796 TEST(str.Length() > 0);
1800 TEST2(error, KErrNoMemory);
1801 TEST(str.Length() == 0);
1804 CleanupStack::PopAndDestroy(client);
1805 TheTest.Printf(_L("===CLogClient::GetString() client side OOM test succeeded at iteration %d\n"), failCount);
1809 @SYMTestCaseID SYSLIB-LOGENG-CT-0909
1810 @SYMTestCaseDesc Tests for CLogClient::ClearLog() function
1811 @SYMTestPriority High
1812 @SYMTestActions Add 4 events to the event log,check for no errors
1813 Clear the log by calling ClearLog function.
1814 Try for getting the before added 4 events and check for not found error.
1815 @SYMTestExpectedResults Test must not fail
1818 LOCAL_C void TestClearEventLog1L(TBool aMicroSeconds)
1820 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0909 "));
1822 CLogClient* client = CLogClient::NewL(theFs);
1823 CleanupStack::PushL(client);
1826 now.UniversalTime();
1828 TDateTime dt(now.DateTime());
1830 dt.SetMicroSecond(0);
1831 dt.SetYear(dt.Year() - 1);
1834 dt.SetYear(dt.Year() - 1);
1837 TTime ClearThreshold(date1);
1838 ClearThreshold -= TTimeIntervalSeconds(1);
1839 /*need to use set the clear threshold (at least 1 sec) before the date of event 1,2.
1840 Otherwise the test will fail if now happens to occur at 0 microseconds (e.g the
1841 last 6 digit of now is 0) */
1843 CTestActive* active = new(ELeave)CTestActive();
1844 CleanupStack::PushL(active);
1846 CLogEvent* event1 = CLogEvent::NewL();
1847 CleanupStack::PushL(event1);
1848 event1->SetEventType(KTestEventUid);
1851 client->AddEvent(*event1, active->iStatus);
1852 CActiveScheduler::Start();
1853 TEST2(active->iStatus.Int(), KErrNone);
1855 event1->SetTime(date1);
1858 client->ChangeEvent(*event1, active->iStatus);
1859 CActiveScheduler::Start();
1860 TEST2(active->iStatus.Int(), KErrNone);
1862 CLogEvent* event2 = CLogEvent::NewL();
1863 CleanupStack::PushL(event2);
1864 event2->SetEventType(KTestEventUid);
1867 client->AddEvent(*event2, active->iStatus);
1868 CActiveScheduler::Start();
1869 TEST2(active->iStatus.Int(), KErrNone);
1871 event2->SetTime(date1);
1874 client->ChangeEvent(*event2, active->iStatus);
1875 CActiveScheduler::Start();
1876 TEST2(active->iStatus.Int(), KErrNone);
1878 CLogEvent* event3 = CLogEvent::NewL();
1879 CleanupStack::PushL(event3);
1880 event3->SetEventType(KTestEventUid);
1883 client->AddEvent(*event3, active->iStatus);
1884 CActiveScheduler::Start();
1885 TEST2(active->iStatus.Int(), KErrNone);
1887 event3->SetTime(date2);
1890 client->ChangeEvent(*event3, active->iStatus);
1891 CActiveScheduler::Start();
1892 TEST2(active->iStatus.Int(), KErrNone);
1894 CLogEvent* event4 = CLogEvent::NewL();
1895 CleanupStack::PushL(event4);
1896 event4->SetEventType(KTestEventUid);
1899 client->AddEvent(*event4, active->iStatus);
1900 CActiveScheduler::Start();
1901 TEST2(active->iStatus.Int(), KErrNone);
1903 event4->SetTime(date2);
1906 client->ChangeEvent(*event4, active->iStatus);
1907 CActiveScheduler::Start();
1908 TEST2(active->iStatus.Int(), KErrNone);
1911 TBool finished = EFalse;
1915 __UHEAP_FAILNEXT(++failCount);
1917 client->ClearLog(ClearThreshold, active->iStatus);
1922 CActiveScheduler::Start();
1924 if (active->iStatus == KErrNone)
1927 TEST2(active->iStatus.Int(), KErrNoMemory);
1931 client->GetEvent(*event1, active->iStatus);
1932 CActiveScheduler::Start();
1933 if (active->iStatus != KErrNone)
1934 TheTest.Printf(_L("error code:%d failcoount:%d\n"),active->iStatus.Int(),failCount);
1935 TEST2(active->iStatus.Int(), KErrNone);
1938 client->GetEvent(*event2, active->iStatus);
1939 CActiveScheduler::Start();
1940 TEST2(active->iStatus.Int(), KErrNone);
1943 client->GetEvent(*event3, active->iStatus);
1944 CActiveScheduler::Start();
1945 TEST2(active->iStatus.Int(), KErrNotFound);
1948 client->GetEvent(*event4, active->iStatus);
1949 CActiveScheduler::Start();
1950 TEST2(active->iStatus.Int(), KErrNotFound);
1953 client->ClearLog(now, active->iStatus);
1954 CActiveScheduler::Start();
1955 TEST2(active->iStatus.Int(), KErrNone);
1958 client->GetEvent(*event1, active->iStatus);
1959 CActiveScheduler::Start();
1960 TEST2(active->iStatus.Int(), KErrNotFound);
1963 client->GetEvent(*event2, active->iStatus);
1964 CActiveScheduler::Start();
1965 TEST2(active->iStatus.Int(), KErrNotFound);
1967 CleanupStack::PopAndDestroy(6, client); // event4, event3, event2, event1, active, client
1968 TheTest.Printf(_L("===CLogClient::ClearLog() client side OOM test succeeded at iteration %d\n"), failCount);
1972 @SYMTestCaseID SYSLIB-LOGENG-CT-0910
1973 @SYMTestCaseDesc Tests for CLogClient::ClearLog() function
1974 @SYMTestPriority High
1975 @SYMTestActions Add 4 events to the event log,check for no errors
1976 Clear the log by calling ClearLog function.
1977 Try for getting the before added 4 events and check for not found error.
1978 @SYMTestExpectedResults Test must not fail
1981 LOCAL_C void TestClearEventLog3L(TBool aMicroSeconds)
1983 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0910 "));
1985 CLogClient* client = CLogClient::NewL(theFs);
1986 CleanupStack::PushL(client);
1989 now.UniversalTime();
1991 TDateTime dt(now.DateTime());
1993 dt.SetMicroSecond(0);
1994 dt.SetYear(dt.Year() - 1);
1997 dt.SetYear(dt.Year() - 1);
2000 TTime ClearThreshold(date1);
2001 ClearThreshold -= TTimeIntervalSeconds(1);
2002 /*need to use set the clear threshold (at least 1 sec) before the date of event 1,2.
2003 Otherwise the test will fail if now happens to occur at 0 microseconds (e.g the
2004 last 6 digit of now is 0) */
2007 CTestActive* active = new(ELeave)CTestActive();
2008 CleanupStack::PushL(active);
2010 CLogEvent* event1 = CLogEvent::NewL();
2011 CleanupStack::PushL(event1);
2012 event1->SetEventType(KTestEventUid);
2015 client->AddEvent(*event1, active->iStatus);
2016 CActiveScheduler::Start();
2017 TEST2(active->iStatus.Int(), KErrNone);
2019 event1->SetTime(date1);
2022 client->ChangeEvent(*event1, active->iStatus);
2023 CActiveScheduler::Start();
2024 TEST2(active->iStatus.Int(), KErrNone);
2026 CLogEvent* event2 = CLogEvent::NewL();
2027 CleanupStack::PushL(event2);
2028 event2->SetEventType(KTestEventUid);
2031 client->AddEvent(*event2, active->iStatus);
2032 CActiveScheduler::Start();
2033 TEST2(active->iStatus.Int(), KErrNone);
2035 event2->SetTime(date1);
2038 client->ChangeEvent(*event2, active->iStatus);
2039 CActiveScheduler::Start();
2040 TEST2(active->iStatus.Int(), KErrNone);
2042 CLogEvent* event3 = CLogEvent::NewL();
2043 CleanupStack::PushL(event3);
2044 event3->SetEventType(KTestEventUid);
2047 client->AddEvent(*event3, active->iStatus);
2048 CActiveScheduler::Start();
2049 TEST2(active->iStatus.Int(), KErrNone);
2051 event3->SetTime(date2);
2054 client->ChangeEvent(*event3, active->iStatus);
2055 CActiveScheduler::Start();
2056 TEST2(active->iStatus.Int(), KErrNone);
2058 CLogEvent* event4 = CLogEvent::NewL();
2059 CleanupStack::PushL(event4);
2060 event4->SetEventType(KTestEventUid);
2063 client->AddEvent(*event4, active->iStatus);
2064 CActiveScheduler::Start();
2065 TEST2(active->iStatus.Int(), KErrNone);
2067 event4->SetTime(date2);
2070 client->ChangeEvent(*event4, active->iStatus);
2071 CActiveScheduler::Start();
2072 TEST2(active->iStatus.Int(), KErrNone);
2075 TBool finished = EFalse;
2079 __LOGSERV_UHEAP_FAILNEXT(++failCount);
2081 client->ClearLog(ClearThreshold, active->iStatus);
2083 __LOGSERV_UHEAP_RESET;
2086 CActiveScheduler::Start();
2088 if (active->iStatus == KErrNone)
2091 TEST2(active->iStatus.Int(), KErrNoMemory);
2095 client->GetEvent(*event1, active->iStatus);
2096 CActiveScheduler::Start();
2097 TEST2(active->iStatus.Int(), KErrNone);
2100 client->GetEvent(*event2, active->iStatus);
2101 CActiveScheduler::Start();
2102 TEST2(active->iStatus.Int(), KErrNone);
2105 client->GetEvent(*event3, active->iStatus);
2106 CActiveScheduler::Start();
2107 TEST2(active->iStatus.Int(), KErrNotFound);
2110 client->GetEvent(*event4, active->iStatus);
2111 CActiveScheduler::Start();
2112 TEST2(active->iStatus.Int(), KErrNotFound);
2115 client->ClearLog(now, active->iStatus);
2116 CActiveScheduler::Start();
2117 TEST2(active->iStatus.Int(), KErrNone);
2120 client->GetEvent(*event1, active->iStatus);
2121 CActiveScheduler::Start();
2122 TEST2(active->iStatus.Int(), KErrNotFound);
2125 client->GetEvent(*event2, active->iStatus);
2126 CActiveScheduler::Start();
2127 TEST2(active->iStatus.Int(), KErrNotFound);
2129 CleanupStack::PopAndDestroy(6, client); // event4, event3, event2, event1, active, client
2130 TheTest.Printf(_L("===CLogClient::ClearLog() server side OOM test succeeded at iteration %d\n"), failCount);
2134 @SYMTestCaseID SYSLIB-LOGENG-CT-1910
2135 @SYMTestCaseDesc Tests for CLogClient::ClearLog() under boundary conditions
2136 @SYMTestPriority High
2137 @SYMTestActions Add 4 events to the event log,check for no errors
2138 Clear the log by calling ClearLog function.
2139 However using the date for 2 events the same as the clear date threshold.
2140 Try for getting the before added 4 events and check for not found error.
2141 @SYMTestExpectedResults Test must not fail
2144 LOCAL_C void TestDEF093601L(TBool aClientTest)
2146 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-1910 "));
2148 TestClearEventLog3L(EFalse);
2150 TestClearEventLog1L(EFalse);
2153 #ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
2156 @SYMTestCaseID PDS-LOGENG-UT-4038
2157 @SYMTestCaseDesc Clear log events with specific SimId - client/server side OOM test.
2158 The test adds 2 events, one of them with a SimId. Then the test
2159 executes CLogClient::ClearLog() in an OOM loop.
2160 @SYMTestActions Clear log events with specific SimId - client/server side OOM test.
2161 @SYMTestExpectedResults Test must not fail
2162 @SYMTestPriority Medium
2165 void ClearLogSimIdOomTestL(TBool aServerSideOomTest)
2166 {//This test case is compiled only when SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM macro is defined
2167 CLogClient* client = CLogClient::NewL(theFs);
2168 CleanupStack::PushL(client);
2170 const TSimId KSimId = 4100000000U;
2172 now.UniversalTime();
2174 TDateTime dt(now.DateTime());
2175 dt.SetYear(dt.Year() - 1);
2178 TTime threshold(date);
2179 threshold += TTimeIntervalSeconds(10);
2181 CTestActive* active = new(ELeave)CTestActive();
2182 CleanupStack::PushL(active);
2184 //////// Event1 ///////////////////////////
2185 CLogEvent* event1 = CLogEvent::NewL();
2186 CleanupStack::PushL(event1);
2187 event1->SetEventType(KTestEventUid);
2190 client->AddEvent(*event1, active->iStatus);
2191 CActiveScheduler::Start();
2192 TEST2(active->iStatus.Int(), KErrNone);
2194 event1->SetTime(date);
2197 client->ChangeEvent(*event1, active->iStatus);
2198 CActiveScheduler::Start();
2199 TEST2(active->iStatus.Int(), KErrNone);
2201 //////// Event2 ///////////////////////////
2202 CLogEvent* event2 = CLogEvent::NewL();
2203 CleanupStack::PushL(event2);
2204 event2->SetEventType(KTestEventUid);
2207 client->AddEvent(*event2, active->iStatus);
2208 CActiveScheduler::Start();
2209 TEST2(active->iStatus.Int(), KErrNone);
2211 event2->SetTime(date);
2212 event2->SetSimId(KSimId);
2215 client->ChangeEvent(*event2, active->iStatus);
2216 CActiveScheduler::Start();
2217 TEST2(active->iStatus.Int(), KErrNone);
2218 ////////////////////////////////////////////
2221 TBool finished = EFalse;
2225 if(aServerSideOomTest)
2227 __LOGSERV_UHEAP_FAILNEXT(++failCount);
2231 __UHEAP_FAILNEXT(++failCount);
2234 client->ClearLog(threshold, KSimId, active->iStatus);
2236 if(aServerSideOomTest)
2238 __LOGSERV_UHEAP_RESET;
2246 CActiveScheduler::Start();
2248 if (active->iStatus == KErrNone)
2251 TEST2(active->iStatus.Int(), KErrNoMemory);
2254 //Check: event1 is without SimId and must not be deleted. event2 is with SimId and should be deleted.
2256 client->GetEvent(*event1, active->iStatus);
2257 CActiveScheduler::Start();
2258 TEST2(active->iStatus.Int(), KErrNone);
2261 client->GetEvent(*event2, active->iStatus);
2262 CActiveScheduler::Start();
2263 TEST2(active->iStatus.Int(), KErrNotFound);
2267 client->ClearLog(now, active->iStatus);
2268 CActiveScheduler::Start();
2269 TEST2(active->iStatus.Int(), KErrNone);
2272 client->GetEvent(*event1, active->iStatus);
2273 CActiveScheduler::Start();
2274 TEST2(active->iStatus.Int(), KErrNotFound);
2277 client->GetEvent(*event2, active->iStatus);
2278 CActiveScheduler::Start();
2279 TEST2(active->iStatus.Int(), KErrNotFound);
2281 CleanupStack::PopAndDestroy(4, client); //event2, event1, active, client
2282 TheTest.Printf(_L("===CLogClient::ClearLog() + SimId %S OOM test succeeded at iteration %d\n"), aServerSideOomTest ? &KServerSide : &KClientSide, failCount);
2286 @SYMTestCaseID PDS-LOGENG-UT-4039
2287 @SYMTestCaseDesc Clear log events with specific SimId and recent list- client/server side OOM test.
2288 The test adds 2 events to a recent list, one of them with a SimId. Then the test
2289 executes CLogClient::ClearLog() in an OOM loop.
2290 @SYMTestActions Clear log events with specific SimId and recent list- client/server side OOM test.
2291 @SYMTestExpectedResults Test must not fail
2292 @SYMTestPriority Medium
2295 void ClearLogRecentSimIdOomTestL(TBool aServerSideOomTest)
2296 {//This test case is compiled only when SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM macro is defined
2297 CLogClient* client = CLogClient::NewL(theFs);
2298 CleanupStack::PushL(client);
2300 const TSimId KSimId = 4200000000U;
2301 const TUid KEvTypeUid = {KLogCallEventType};
2302 _LIT(KEvDirection, "Missed call");
2304 CTestActive* active = new(ELeave)CTestActive();
2305 CleanupStack::PushL(active);
2307 //////// Event1 ///////////////////////////
2308 CLogEvent* event1 = CLogEvent::NewL();
2309 CleanupStack::PushL(event1);
2310 event1->SetEventType(KEvTypeUid);
2311 event1->SetDirection(KEvDirection);
2312 event1->SetNumber(_L("12345678"));
2315 client->AddEvent(*event1, active->iStatus);
2316 CActiveScheduler::Start();
2317 TEST2(active->iStatus.Int(), KErrNone);
2318 //////// Event2 ///////////////////////////
2319 CLogEvent* event2 = CLogEvent::NewL();
2320 CleanupStack::PushL(event2);
2321 event2->SetEventType(KEvTypeUid);
2322 event2->SetDirection(KEvDirection);
2323 event2->SetNumber(_L("87654321"));
2324 event2->SetSimId(KSimId);
2327 client->AddEvent(*event2, active->iStatus);
2328 CActiveScheduler::Start();
2329 TEST2(active->iStatus.Int(), KErrNone);
2330 ////////////////////////////////////////////
2333 TBool finished = EFalse;
2337 if(aServerSideOomTest)
2339 __LOGSERV_UHEAP_FAILNEXT(++failCount);
2343 __UHEAP_FAILNEXT(++failCount);
2346 client->ClearLog(KLogRecentMissedCalls, KSimId, active->iStatus);
2348 if(aServerSideOomTest)
2350 __LOGSERV_UHEAP_RESET;
2358 CActiveScheduler::Start();
2360 if (active->iStatus == KErrNone)
2363 TEST2(active->iStatus.Int(), KErrNoMemory);
2366 //Check: event1 is without SimId and must be presented in the view. Event2 is with SimId and should not be in the view.
2367 CLogViewRecent* view = CLogViewRecent::NewL(*client);
2368 CleanupStack::PushL(view);
2369 TBool rc = view->SetRecentListL(KLogRecentMissedCalls, active->iStatus);
2372 CActiveScheduler::Start();
2373 TEST2(active->iStatus.Int(), KErrNone);
2375 TInt count = view->CountL();
2377 rc = view->FirstL(active->iStatus);
2380 CActiveScheduler::Start();
2381 TEST2(active->iStatus.Int(), KErrNone);
2382 const CLogEvent& e = view->Event();
2383 TEST2(e.SimId(), KLogNullSimId);
2385 CleanupStack::PopAndDestroy(view);
2389 client->ClearLog(KLogRecentMissedCalls, active->iStatus);
2390 CActiveScheduler::Start();
2391 TEST2(active->iStatus.Int(), KErrNone);
2393 //Check: no events in the recent view list
2394 view = CLogViewRecent::NewL(*client);
2395 CleanupStack::PushL(view);
2396 rc = view->SetRecentListL(KLogRecentMissedCalls, active->iStatus);
2399 CleanupStack::PopAndDestroy(5, client); //view, event2, event1, active, client
2400 TheTest.Printf(_L("===CLogClient::ClearLog()/Recent + SimId %S OOM test succeeded at iteration %d\n"), aServerSideOomTest ? &KServerSide : &KClientSide, failCount);
2403 #endif//SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
2405 LOCAL_C void doClientFailureL()
2407 TheTest.Next(_L("Server startup"));
2409 User::After(100000);
2411 TheTest.Next(_L("Construction + create logeng database"));
2412 TestConstruction1L(ETrue); // Creates database
2413 TheTest.Next(_L("Construction + open logeng database"));
2414 TestConstruction1L(EFalse); // Opens existing database
2415 TestUtils::DeleteDatabaseL();
2416 theLog.Write(_L8("Test 1.1 OK\n"));
2418 TheTest.Next(_L("Add Event Type"));
2419 TestAddEventType1L();
2420 theLog.Write(_L8("Test 1.2 OK\n"));
2422 TheTest.Next(_L("Get Event Type"));
2423 TestGetEventType1L();
2424 theLog.Write(_L8("Test 1.3 OK\n"));
2426 TheTest.Next(_L("Change Event Type"));
2427 TestChangeEventType1L();
2428 theLog.Write(_L8("Test 1.4 OK\n"));
2430 TheTest.Next(_L("Delete Event Type"));
2431 TestDeleteEventType1L();
2432 theLog.Write(_L8("Test 1.5 OK\n"));
2434 TheTest.Next(_L("Add Event"));
2436 theLog.Write(_L8("Test 1.6 OK\n"));
2438 TheTest.Next(_L("Get Event"));
2440 theLog.Write(_L8("Test 1.7 OK\n"));
2442 TheTest.Next(_L("Change Event"));
2443 TestChangeEvent1L();
2444 theLog.Write(_L8("Test 1.8 OK\n"));
2446 TheTest.Next(_L("Delete Event"));
2447 TestDeleteEvent1L();
2448 theLog.Write(_L8("Test 1.9 OK\n"));
2450 TheTest.Next(_L("Get Config"));
2452 theLog.Write(_L8("Test 1.10 OK\n"));
2454 TheTest.Next(_L("Change Config"));
2455 TestChangeConfig1L();
2456 theLog.Write(_L8("Test 1.11 OK\n"));
2458 TheTest.Next(_L("Get String"));
2460 theLog.Write(_L8("Test 1.12 OK\n"));
2462 TheTest.Next(_L("Clear Event Log"));
2463 TestClearEventLog1L(ETrue);
2464 theLog.Write(_L8("Test 1.13 OK\n"));
2466 TheTest.Next(_L("DEF093601"));
2467 TestDEF093601L(EFalse);
2468 theLog.Write(_L8("Test 1.14 OK\n"));
2470 #ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
2471 TheTest.Next(_L(" @SYMTestCaseID:PDS-LOGENG-UT-4038 Clear Event Log + SimId"));
2472 ClearLogSimIdOomTestL(EFalse);
2473 theLog.Write(_L8("Test 1.15 OK\n"));
2475 TheTest.Next(_L(" @SYMTestCaseID:PDS-LOGENG-UT-4039 Clear Event Log/Recent + SimId"));
2476 ClearLogRecentSimIdOomTestL(EFalse);
2477 theLog.Write(_L8("Test 1.16 OK\n"));
2481 LOCAL_C void doLogServFailureL()
2483 TheTest.Next(_L("Construction + create logeng database"));
2484 TestConstruction3L(ETrue); // Creates database
2485 TheTest.Next(_L("Construction + open logeng database"));
2486 TestConstruction3L(EFalse); // Opens existing database
2487 TestUtils::DeleteDatabaseL();
2488 theLog.Write(_L8("Test 2.1 OK\n"));
2490 TheTest.Next(_L("Add Event Type"));
2491 TestAddEventType3L();
2492 theLog.Write(_L8("Test 2.2 OK\n"));
2494 TheTest.Next(_L("Get Event Type"));
2495 TestGetEventType3L();
2496 theLog.Write(_L8("Test 2.3 OK\n"));
2498 TheTest.Next(_L("Change Event Type"));
2499 TestChangeEventType3L();
2500 theLog.Write(_L8("Test 2.4 OK\n"));
2502 TheTest.Next(_L("Delete Event Type"));
2503 TestDeleteEventType3L();
2504 theLog.Write(_L8("Test 2.5 OK\n"));
2506 TheTest.Next(_L("Add Event"));
2508 theLog.Write(_L8("Test 2.6 OK\n"));
2510 TheTest.Next(_L("Get Event"));
2512 theLog.Write(_L8("Test 2.7 OK\n"));
2514 TheTest.Next(_L("Change Event"));
2515 TestChangeEvent3L();
2516 theLog.Write(_L8("Test 2.8 OK\n"));
2518 TheTest.Next(_L("Delete Event"));
2519 TestDeleteEvent3L();
2520 theLog.Write(_L8("Test 2.9 OK\n"));
2522 TheTest.Next(_L("Get Config"));
2524 theLog.Write(_L8("Test 2.10 OK\n"));
2526 TheTest.Next(_L("Change Config"));
2527 TestChangeConfig3L();
2528 theLog.Write(_L8("Test 2.11 OK\n"));
2530 TheTest.Next(_L("Clear Event Log"));
2531 TestClearEventLog3L(ETrue);
2532 theLog.Write(_L8("Test 2.12 OK\n"));
2534 TheTest.Next(_L("DEF093601"));
2535 TestDEF093601L(ETrue);
2536 theLog.Write(_L8("Test 2.13 OK\n"));
2538 #ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
2539 TheTest.Next(_L(" @SYMTestCaseID:PDS-LOGENG-UT-4038 Clear Event Log + SimId"));
2540 ClearLogSimIdOomTestL(ETrue);
2541 theLog.Write(_L8("Test 2.14 OK\n"));
2543 TheTest.Next(_L(" @SYMTestCaseID:PDS-LOGENG-UT-4039 Clear Event Log/Recent + SimId"));
2544 ClearLogRecentSimIdOomTestL(ETrue);
2545 theLog.Write(_L8("Test 2.15 OK\n"));
2551 TestUtils::Initialize(_L("t_logheap"));
2553 TheTest.Start(_L("Log Client"));
2556 TheTest.Next(_L("Log Server"));
2557 doLogServFailureL();