branch | RCL_3 |
changeset 23 | 26645d81f48d |
parent 0 | 08ec8eefde2f |
child 24 | cc28652e0254 |
21:28839de615b4 | 23:26645d81f48d |
---|---|
79 /**************First set primary filter*************/ |
79 /**************First set primary filter*************/ |
80 |
80 |
81 Result=logger.Connect(); |
81 Result=logger.Connect(); |
82 INFO_PRINTF2(_L("connect err %d"), Result); |
82 INFO_PRINTF2(_L("connect err %d"), Result); |
83 CClearConfig configIni; |
83 CClearConfig configIni; |
84 configIni.Clear(logger); |
84 configIni.ClearL(logger); |
85 INFO_PRINTF2(_L("connect err %d"), Result); |
85 INFO_PRINTF2(_L("connect err %d"), Result); |
86 Result=logger.SetPrimaryFiltersEnabled(*setfilter,ETrue); |
86 Result=logger.SetPrimaryFiltersEnabled(*setfilter,ETrue); |
87 |
87 |
88 if(Result==KErrNone) |
88 if(Result==KErrNone) |
89 INFO_PRINTF2(_L("Primary filter has been set with single filter, %d, check log"), setfilter->At(0)); |
89 INFO_PRINTF2(_L("Primary filter has been set with single filter, %d, check log"), setfilter->At(0)); |
278 } |
278 } |
279 } |
279 } |
280 |
280 |
281 // ************** Block end **************** |
281 // ************** Block end **************** |
282 |
282 |
283 configIni.Clear(logger); |
283 configIni.ClearL(logger); |
284 logger.Close(); |
284 logger.Close(); |
285 if(setfilter) |
285 if(setfilter) |
286 delete setfilter; |
286 delete setfilter; |
287 if(getfilter) |
287 if(getfilter) |
288 delete getfilter; |
288 delete getfilter; |
359 |
359 |
360 /**************First set Secondary filter*************/ |
360 /**************First set Secondary filter*************/ |
361 |
361 |
362 logger.Connect(); |
362 logger.Connect(); |
363 CClearConfig configIni; |
363 CClearConfig configIni; |
364 configIni.Clear(logger); |
364 configIni.ClearL(logger); |
365 Result = logger.SetSecondaryFiltersEnabled(setfilter,ETrue); |
365 Result = logger.SetSecondaryFiltersEnabled(setfilter,ETrue); |
366 INFO_PRINTF2(_L("Secondary filter has been set with single filter, %d, check log"), setfilter[0]); |
366 INFO_PRINTF2(_L("Secondary filter has been set with single filter, %d, check log"), setfilter[0]); |
367 INFO_PRINTF2(_L("code: %d"), Result); |
367 INFO_PRINTF2(_L("code: %d"), Result); |
368 |
368 |
369 |
369 |
545 Result=0; |
545 Result=0; |
546 } |
546 } |
547 } |
547 } |
548 } |
548 } |
549 INFO_PRINTF1(_L("Now call clear config to check removing multiple second filters performance")); |
549 INFO_PRINTF1(_L("Now call clear config to check removing multiple second filters performance")); |
550 configIni.Clear(logger); |
550 configIni.ClearL(logger); |
551 INFO_PRINTF1(_L("after clear config- multiple second filters performance")); |
551 INFO_PRINTF1(_L("after clear config- multiple second filters performance")); |
552 |
552 |
553 if(Result==1) |
553 if(Result==1) |
554 SetTestStepResult(EFail); |
554 SetTestStepResult(EFail); |
555 else |
555 else |
638 INFO_PRINTF2(_L("Logger start returning incorrect error code of %d when already started by SysStart, should be KErrInUse (-14)"), SysStartResult); |
638 INFO_PRINTF2(_L("Logger start returning incorrect error code of %d when already started by SysStart, should be KErrInUse (-14)"), SysStartResult); |
639 logger.Stop(); |
639 logger.Stop(); |
640 #endif |
640 #endif |
641 #ifndef SysStartTest |
641 #ifndef SysStartTest |
642 CClearConfig configIni; |
642 CClearConfig configIni; |
643 configIni.Clear(logger); |
643 configIni.ClearL(logger); |
644 #endif |
644 #endif |
645 CArrayFixFlat<TUint8> *setprimfilter = new (ELeave)CArrayFixFlat<TUint8>(1); |
645 CArrayFixFlat<TUint8> *setprimfilter = new (ELeave)CArrayFixFlat<TUint8>(1); |
646 setprimfilter->AppendL(UTracePrimary); |
646 setprimfilter->AppendL(UTracePrimary); |
647 RArray<TUint32> setsecondfilter; |
647 RArray<TUint32> setsecondfilter; |
648 setsecondfilter.Append((TUint32) UTraceSecondary); |
648 setsecondfilter.Append((TUint32) UTraceSecondary); |
907 // From negative test: primary has been set to UTracePrimary+2 and secondary to UTraceSecondary+2 |
907 // From negative test: primary has been set to UTracePrimary+2 and secondary to UTraceSecondary+2 |
908 if(TestStepResult()==EPass) |
908 if(TestStepResult()==EPass) |
909 { |
909 { |
910 INFO_PRINTF1(_L("Now do some multiple type logging testing.")); |
910 INFO_PRINTF1(_L("Now do some multiple type logging testing.")); |
911 //CClearConfig configIni; |
911 //CClearConfig configIni; |
912 //configIni.Clear(logger); |
912 //configIni.ClearL(logger); |
913 |
913 |
914 if(Result==0) |
914 if(Result==0) |
915 { |
915 { |
916 INFO_PRINTF1(_L("file set as output plugin ok")); |
916 INFO_PRINTF1(_L("file set as output plugin ok")); |
917 _LIT8(KTextmedia,"uloggerfileplugin"); |
917 _LIT8(KTextmedia,"uloggerfileplugin"); |
1060 { |
1060 { |
1061 delete(multsetprimfilter); |
1061 delete(multsetprimfilter); |
1062 multsetprimfilter=NULL; |
1062 multsetprimfilter=NULL; |
1063 } |
1063 } |
1064 } |
1064 } |
1065 configIni.Clear(logger); |
1065 configIni.ClearL(logger); |
1066 } |
1066 } |
1067 else |
1067 else |
1068 INFO_PRINTF1(_L("adding file as output plugin failed")); |
1068 INFO_PRINTF1(_L("adding file as output plugin failed")); |
1069 if(Result==0&&TestStepResult()==EPass) |
1069 if(Result==0&&TestStepResult()==EPass) |
1070 SetTestStepResult(EPass); |
1070 SetTestStepResult(EPass); |
1149 TInt Result=0; |
1149 TInt Result=0; |
1150 CUKernelTraces TestKernelTracer; |
1150 CUKernelTraces TestKernelTracer; |
1151 RULogger logger; |
1151 RULogger logger; |
1152 logger.Connect(); |
1152 logger.Connect(); |
1153 CClearConfig configIni; |
1153 CClearConfig configIni; |
1154 configIni.Clear(logger); |
1154 configIni.ClearL(logger); |
1155 CArrayFixFlat<TUint8> *setprimfilter = new (ELeave)CArrayFixFlat<TUint8>(1); |
1155 CArrayFixFlat<TUint8> *setprimfilter = new (ELeave)CArrayFixFlat<TUint8>(1); |
1156 setprimfilter->AppendL(UTracePrimary); |
1156 setprimfilter->AppendL(UTracePrimary); |
1157 RArray<TUint32> setsecondfilter; |
1157 RArray<TUint32> setsecondfilter; |
1158 setsecondfilter.Append((TUint32) UTraceSecondary); |
1158 setsecondfilter.Append((TUint32) UTraceSecondary); |
1159 logger.SetPrimaryFiltersEnabled(*setprimfilter,ETrue); |
1159 logger.SetPrimaryFiltersEnabled(*setprimfilter,ETrue); |
1375 if(Result==0&&TestStepResult()==EPass) |
1375 if(Result==0&&TestStepResult()==EPass) |
1376 SetTestStepResult(EPass); |
1376 SetTestStepResult(EPass); |
1377 else |
1377 else |
1378 SetTestStepResult(EFail); |
1378 SetTestStepResult(EFail); |
1379 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)")); |
1379 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)")); |
1380 configIni.Clear(logger); |
1380 configIni.ClearL(logger); |
1381 } |
1381 } |
1382 if(setprimfilter) |
1382 if(setprimfilter) |
1383 { |
1383 { |
1384 delete(setprimfilter); |
1384 delete(setprimfilter); |
1385 setprimfilter=NULL; |
1385 setprimfilter=NULL; |
1460 INFO_PRINTF1(_L("About to test ulogger printf tracing with one primary and one secondary")); //Block start |
1460 INFO_PRINTF1(_L("About to test ulogger printf tracing with one primary and one secondary")); //Block start |
1461 TInt Result=0; |
1461 TInt Result=0; |
1462 RULogger logger; |
1462 RULogger logger; |
1463 logger.Connect(); |
1463 logger.Connect(); |
1464 CClearConfig configIni; |
1464 CClearConfig configIni; |
1465 configIni.Clear(logger); |
1465 configIni.ClearL(logger); |
1466 CArrayFixFlat<TUint8> *setprimfilter = new (ELeave)CArrayFixFlat<TUint8>(1); |
1466 CArrayFixFlat<TUint8> *setprimfilter = new (ELeave)CArrayFixFlat<TUint8>(1); |
1467 setprimfilter->AppendL(UTracePrimary); |
1467 setprimfilter->AppendL(UTracePrimary); |
1468 RArray<TUint32> setsecondfilter; |
1468 RArray<TUint32> setsecondfilter; |
1469 setsecondfilter.Append((TUint32) UTraceSecondary); |
1469 setsecondfilter.Append((TUint32) UTraceSecondary); |
1470 logger.SetPrimaryFiltersEnabled(*setprimfilter,ETrue); |
1470 logger.SetPrimaryFiltersEnabled(*setprimfilter,ETrue); |
1641 TInt Result=0; |
1641 TInt Result=0; |
1642 CUKernelTraces TestKernelTracer; |
1642 CUKernelTraces TestKernelTracer; |
1643 RULogger logger; |
1643 RULogger logger; |
1644 logger.Connect(); |
1644 logger.Connect(); |
1645 CClearConfig configIni; |
1645 CClearConfig configIni; |
1646 configIni.Clear(logger); |
1646 configIni.ClearL(logger); |
1647 CArrayFixFlat<TUint8> *setprimfilter = new (ELeave)CArrayFixFlat<TUint8>(1); |
1647 CArrayFixFlat<TUint8> *setprimfilter = new (ELeave)CArrayFixFlat<TUint8>(1); |
1648 setprimfilter->AppendL(UTracePrimary); |
1648 setprimfilter->AppendL(UTracePrimary); |
1649 RArray<TUint32> setsecondfilter; |
1649 RArray<TUint32> setsecondfilter; |
1650 setsecondfilter.Append((TUint32) UTraceSecondary); |
1650 setsecondfilter.Append((TUint32) UTraceSecondary); |
1651 logger.SetPrimaryFiltersEnabled(*setprimfilter,ETrue); |
1651 logger.SetPrimaryFiltersEnabled(*setprimfilter,ETrue); |
1868 if(Result==0&&TestStepResult()==EPass) |
1868 if(Result==0&&TestStepResult()==EPass) |
1869 SetTestStepResult(EPass); |
1869 SetTestStepResult(EPass); |
1870 else |
1870 else |
1871 SetTestStepResult(EFail); |
1871 SetTestStepResult(EFail); |
1872 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)")); |
1872 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)")); |
1873 configIni.Clear(logger); |
1873 configIni.ClearL(logger); |
1874 } |
1874 } |
1875 if(setprimfilter) |
1875 if(setprimfilter) |
1876 { |
1876 { |
1877 delete(setprimfilter); |
1877 delete(setprimfilter); |
1878 setprimfilter=NULL; |
1878 setprimfilter=NULL; |