testfws/stif/StifKernelTestClassBase/src/StifKernelTestClassBase.cpp
changeset 4 b8d1455fddc0
parent 2 73b88125830c
equal deleted inserted replaced
2:73b88125830c 4:b8d1455fddc0
   166         case RStifKernelTestClass::ERunMethod:
   166         case RStifKernelTestClass::ERunMethod:
   167             {
   167             {
   168             TStifRunMethodInfo methodInfo;
   168             TStifRunMethodInfo methodInfo;
   169             TPckg<TStifRunMethodInfo> methodInfoPckg( methodInfo );
   169             TPckg<TStifRunMethodInfo> methodInfoPckg( methodInfo );
   170 
   170 
   171             TInt err = KErrNone;
       
   172                                                           
       
   173             ret = Kern::ThreadDesRead( iThread, a1, methodInfoPckg, 0, KChunkShiftBy0 );
   171             ret = Kern::ThreadDesRead( iThread, a1, methodInfoPckg, 0, KChunkShiftBy0 );
   174             if( ret != KErrNone )
   172             if( ret != KErrNone )
   175                 {
   173                 {
   176                 __KTRACE_OPT(KHARDWARE, 
   174                 __KTRACE_OPT(KHARDWARE, 
   177                     Kern::Printf("DStifKernelTestClassBase::DoControl: ThreadDesRead fails! %d", 333));
   175                     Kern::Printf("DStifKernelTestClassBase::DoControl: ThreadDesRead fails! %d", 333));
   181             // TRAP is not supported in EKA2 kernel, so we can't use it. However, it is not even needed 
   179             // TRAP is not supported in EKA2 kernel, so we can't use it. However, it is not even needed 
   182             // any longer because kernel test cases cannot leave either. Although RunMethodL's name 
   180             // any longer because kernel test cases cannot leave either. Although RunMethodL's name 
   183             // seems to allow leaves (L in the end of the name), it really doesn't!
   181             // seems to allow leaves (L in the end of the name), it really doesn't!
   184             ret = RunMethodL( methodInfo.iMethodName, methodInfo.iMethodParams );                                           
   182             ret = RunMethodL( methodInfo.iMethodName, methodInfo.iMethodParams );                                           
   185                                      
   183                                      
   186             if( err != KErrNone )
   184             if( ret != KErrNone )
   187                 {
       
   188                 methodInfo.iResult = err;
       
   189                 methodInfo.iMethodResultDes.Copy( _L("RunMethodL leave: ") );
       
   190                 methodInfo.iMethodResultDes.AppendNum( err );
       
   191                 }
       
   192             else if( ret != KErrNone )
       
   193                 {
   185                 {
   194                 methodInfo.iResult = ret;
   186                 methodInfo.iResult = ret;
   195                 methodInfo.iMethodResultDes.Copy( _L("RunMethodL returned error: ") );
   187                 methodInfo.iMethodResultDes.Copy( _L("RunMethodL returned error: ") );
   196                 methodInfo.iMethodResultDes.AppendNum( ret );
   188                 methodInfo.iMethodResultDes.AppendNum( ret );
   197                 }
   189                 }