bool SPARCSignature::qualified(UserProc *p, Signature & /*candidate*/) { LOG_VERBOSE2("Consider promotion to stdc SPARC signature for %1", p->getName()); if (p->getProg()->getMachine() != Machine::SPARC) { return false; } LOG_VERBOSE2("Promoted to StdC::SPARCSignature"); return true; }
/** otgOpen */ TInt COtgRoot::otgOpen() { if(gVerboseOutput) { OstTraceFunctionEntry0(COTGROOT_OTGOPEN); } LOG_VERBOSE2(_L("Opening session... loaded = %d\n"), LddLoaded()); if(gVerboseOutput) { OstTrace1(TRACE_VERBOSE, COTGROOT_OTGOPEN_DUP01, "Opening session... loaded = %d\n", LddLoaded()); } TInt err(oUsbOtgDriver.Open()); if (err != KErrNone) { test.Printf(_L("<Error %d> Unable to open a channel to USB OTG driver\n"),err); OstTrace1(TRACE_NORMAL, COTGROOT_OTGOPEN_DUP02, "<Error %d> Unable to open a channel to USB OTG driver\n",err); return(err); } else { LOG_VERBOSE1(_L("Open channel OK\n")); if(gVerboseOutput) { OstTrace0(TRACE_VERBOSE, COTGROOT_OTGOPEN_DUP03, "Open channel OK\n"); } } return(KErrNone); }
TBool COtgRoot::otgIdPinPresent() { if(gVerboseOutput) { OstTraceFunctionEntry0(COTGROOT_OTGIDPINPRESENT); } TRequestStatus aStatus; RUsbOtgDriver::TOtgIdPin aPin; oUsbOtgDriver.QueueOtgIdPinNotification(aPin, aStatus); // the kernel driver populates aPin... LOG_VERBOSE2(_L("(sync) ID_PIN=%d\n"), iOTGIdPin); if(gVerboseOutput) { OstTrace1(TRACE_VERBOSE, COTGROOT_OTGIDPINPRESENT_DUP01, "(sync) ID_PIN=%d\n", iOTGIdPin); } oUsbOtgDriver.CancelOtgIdPinNotification(); // swallow the event User::WaitForRequest(aStatus); if (RUsbOtgDriver::EIdPinAPlug == aPin) // at this stage, the aPin value is known { return(ETrue); } return(EFalse); }
Address::Address(value_type _value) : m_value(_value) { if ((m_value != static_cast<value_type>(-1)) && ((_value & ~getSourceMask()) != 0)) { LOG_VERBOSE2("Address initialized with invalid value %1", QString("0x%1").arg(m_value, 2 * sizeof(value_type), 16, QChar('0'))); } }
/** otgQueueOtgStateRequest */ void COtgRoot::otgQueueOtgStateRequest(RUsbOtgDriver::TOtgState& aState, TRequestStatus &aStatus) { LOG_VERBOSE2(_L("Queue a State Request %08X.\n"), (TInt)(&aStatus)); if(gVerboseOutput) { OstTrace1(TRACE_VERBOSE, COTGROOT_OTGQUEUEOTGSTATEREQUEST_DUP01, "Queue a State Request %08X.\n", (TInt)(&aStatus)); } oUsbOtgDriver.QueueOtgStateRequest(aState, aStatus); }
void CTestCase0676::ContinueAfter(TTimeIntervalMicroSeconds32 aMicroSecs, TCaseSteps aStep) { LOG_VERBOSE2(_L("Wait %dms before drop VBus"), (TInt)(aMicroSecs.Int()/1000)); if(gVerboseOutput) { OstTrace1(TRACE_VERBOSE, CTESTCASE0676_CONTINUEAFTER, "Wait %dms before drop VBus", (TInt)(aMicroSecs.Int()/1000));; } iTimer.After(iStatus, aMicroSecs); iCaseStep = aStep; SetActive(); }
/** otgLoadLdd */ TInt COtgRoot::otgLoadLdd() { if(gVerboseOutput) { OstTraceFunctionEntry0(COTGROOT_OTGLOADLDD); } LOG_VERBOSE2(_L("Load driver: %S\n"), &KOTGDeviceInterfaceDriverName); if(gVerboseOutput) { OstTraceExt1(TRACE_VERBOSE, COTGROOT_OTGLOADLDD_DUP01, "Load driver: %S\n", KOTGDeviceInterfaceDriverName); } if (!LddLoaded()) { // load ldd device drivers (load otg only, it will load the needed stuff for us) TInt err(User::LoadLogicalDevice(KOTGDeviceInterfaceDriverName)); if ( (err != KErrNone) && (err != KErrAlreadyExists) ) { test.Printf(_L("<Error %d> Unable to load driver: %S\n"), err, &KOTGDeviceInterfaceDriverName); OstTraceExt2(TRACE_NORMAL, COTGROOT_OTGLOADLDD_DUP02, "<Error %d> Unable to load driver: %S\n", err, KOTGDeviceInterfaceDriverName); SetLoaded(EFalse); return(err); } else { LOG_VERBOSE2(_L("Loaded driver: '%S' OK\n"), &KOTGDeviceInterfaceDriverName); if(gVerboseOutput) { OstTraceExt1(TRACE_VERBOSE, COTGROOT_OTGLOADLDD_DUP03, "Loaded driver: '%S' OK\n", KOTGDeviceInterfaceDriverName); } SetLoaded(ETrue); } } return(KErrNone); }
/** process the command-line, ; arguments appear in any order IN : User::CommandLine() OUT : iTestCasesIdentities iHelpRequested gSemiAutomated gVerboseOutput gOpenIterations gOOMIterations gTestRoleMaster gUSBVidPid */ void CTestEngine::ProcessCommandLineL() { // example t_otgdi.exe /ALL /G:0468 /VERBOSE TInt cmdLineLength(User::CommandLineLength()); HBufC* cmdLine = HBufC::NewMaxLC(cmdLineLength); TPtr cmdLinePtr = cmdLine->Des(); User::CommandLine(cmdLinePtr); TBool tokenParsed(EFalse); TLex args(*cmdLine); args.SkipSpace(); // args are separated by spaces // first arg is the exe name, skip it TPtrC cmdToken = args.NextToken(); HBufC* tc = HBufC::NewLC(KParameterTextLenMax); *tc = cmdToken; while (tc->Length()) { tokenParsed = EFalse; // '/?' help wanted flag '?' or /? parameter TInt pos(0); if ((0== tc->FindF(_L("?"))) || (0==tc->FindF(_L("/?")))) { iHelpRequested = ETrue; tokenParsed = ETrue; } // '/ALL' parameter pos = tc->FindF(KArgAllTestCases); if (pos != KErrNotFound) { AddAllDefaultTests(); tokenParsed = ETrue; } // '/AUTO' pos = tc->FindF(KArgAutomatedTest); if (pos != KErrNotFound) { // skip some of the press-any key things test.Printf(_L("Test semi-automated mode.\n")); OstTrace0(TRACE_NORMAL, CTESTENGINE_PROCESSCOMMANDLINEL, "Test semi-automated mode.\n"); gSemiAutomated = ETrue; tokenParsed = ETrue; } // '/G:TESTNAME' pos = tc->FindF(KArgGoTestCase); if (pos != KErrNotFound) { HBufC* tcPart = HBufC::NewLC(KTestCaseIdLength); TPtrC testID = tc->Right(tc->Length() - pos - KArgGoTestCase().Length()); LOG_VERBOSE2(_L("Parameter found:'%S'\n"), &testID); if(gVerboseOutput) { OstTraceExt1(TRACE_VERBOSE, CTESTENGINE_PROCESSCOMMANDLINEL_DUP01, "Parameter found:'%S'\n", testID); } // Check if it is a test we know of in our suite, users may provide the full // name "PBASE-USB_OTGDI-0466", or just the last 4 digits "0466", in such cases, fetch the full name if (!RTestFactory::TestCaseExists(testID)) { // try use just the test#part TPtr tcDes = tcPart->Des(); // build and add the full name tcDes.Format(KidFormatterS, &testID); if (!RTestFactory::TestCaseExists(tcDes)) { test.Printf(_L("Test case does NOT Exist: '%lS'\n"), &testID); OstTraceExt1(TRACE_NORMAL, CTESTENGINE_PROCESSCOMMANDLINEL_DUP02, "Test case does NOT Exist: '%lS'\n", testID); } else { // only the number was supplied, copy the full name testID.Set(tcDes); } } // check that it's valid before adding it to the run-list if (RTestFactory::TestCaseExists(testID)) { HBufC* testIdentity = HBufC::NewLC(KTestCaseIdLength); *testIdentity = testID; test.Printf(_L("Test case specified: %lS\n"), testIdentity); OstTraceExt1(TRACE_NORMAL, CTESTENGINE_PROCESSCOMMANDLINEL_DUP03, "Test case specified: %lS\n", *testIdentity); iTestCasesIdentities.Append(testIdentity); CleanupStack::Pop(testIdentity); } CleanupStack::PopAndDestroy(tcPart); tokenParsed = ETrue; } // '/VERBOSE' option pos = tc->FindF(KArgVerboseOutput); if (pos != KErrNotFound) { gVerboseOutput = ETrue; tokenParsed = ETrue; // turn on logging of test Printf() output to serial debug/log at the same time test.SetLogged(ETrue); } // '/LOOPO:n' option (Set #times to run open/close tests amongst others) pos = tc->FindF(KArgSetOpenIterations); if (pos != KErrNotFound) { TPtrC iterationStr = tc->Right(tc->Length() - pos - KArgSetOpenIterations().Length()); TLex lex(iterationStr); lex.Val(gOpenIterations); MINMAX_CLAMPVALUE(gOpenIterations, OPEN_MINREPEATS, OPEN_MAXREPEATS); tokenParsed = ETrue; } // '/LOOPM:n' option (Set # of allocs to start at for OOM test) pos = tc->FindF(KArgSetOOMIterations); if (pos != KErrNotFound) { TPtrC iterationStr = tc->Right(tc->Length() - pos - KArgSetOOMIterations().Length()); TLex lex(iterationStr); lex.Val(gOOMIterations); MINMAX_CLAMPVALUE(gOOMIterations, OOM_MINREPEATS, OOM_MAXREPEATS); tokenParsed = ETrue; } // '/VID:nnnn' option (Set Symbian or other VID-Pid example /VID:0670) pos = tc->FindF(KArgOverrideVidPid); if (pos != KErrNotFound) { TPtrC vidpidStr = tc->Right(tc->Length() - pos - KArgOverrideVidPid().Length()); TUint16 prodID; TLex lex(vidpidStr); if (KErrNone == lex.Val(prodID, EHex)) { if (prodID> 0xFFFF) prodID = 0xFFFF; tokenParsed = ETrue; LOG_VERBOSE2(_L(" accept param %04X \n\n"), prodID); if(gVerboseOutput) { OstTrace1(TRACE_VERBOSE, CTESTENGINE_PROCESSCOMMANDLINEL_DUP05, " accept param %04X \n\n", prodID); } gUSBVidPid = prodID; // replace the vid-pid with the user-supplied one } else { // print error test.Printf(_L("Warning: VID+PID '%lS' not parsed .\n"), tc); OstTraceExt1(TRACE_NORMAL, CTESTENGINE_PROCESSCOMMANDLINEL_DUP06, "Warning: VID+PID '%lS' not parsed .\n", *tc); } } // '/SLAVE' (peer) pos = tc->FindF(KArgSetRoleSlave); if (pos != KErrNotFound) { gTestRoleMaster = EFalse; tokenParsed = ETrue; } // '/MASTER' - default role pos = tc->FindF(KArgSetRoleMaster); // note that master is the default role, so this parameter is optional if (pos != KErrNotFound) { gTestRoleMaster = ETrue; tokenParsed = ETrue; } if (!tokenParsed) { // warn about unparsed parameter test.Printf(_L("Warning: '%lS'??? not parsed\n"), tc); OstTraceExt1(TRACE_NORMAL, CTESTENGINE_PROCESSCOMMANDLINEL_DUP07, "Warning: '%lS'??? not parsed\n", *tc); iHelpRequested = ETrue; } // next parameter *tc = args.NextToken(); } CleanupStack::PopAndDestroy(tc); CleanupStack::PopAndDestroy(cmdLine); }