VirtualBox

Changeset 49368 in vbox for trunk/src/VBox/VMM/testcase


Ignore:
Timestamp:
Nov 2, 2013 4:30:06 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
90410
Message:

tstVMM updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/testcase/tstVMM.cpp

    r49141 r49368  
    5555*   Internal Functions                                                         *
    5656*******************************************************************************/
    57 VMMR3DECL(int) VMMDoTest(PVM pVM);    /* Linked into VMM, see ../VMMTests.cpp. */
    58 VMMR3DECL(int) VMMDoBruteForceMsrs(PVM pVM); /* Ditto. */
     57VMMR3DECL(int) VMMDoTest(PVM pVM);              /* Linked into VMM, see ../VMMTests.cpp. */
     58VMMR3DECL(int) VMMDoBruteForceMsrs(PVM pVM);    /* Ditto. */
     59VMMR3DECL(int) VMMDoKnownMsrs(PVM pVM);         /* Ditto. */
     60VMMR3DECL(int) VMMDoMsrExperiments(PVM pVM);    /* Ditto. */
    5961
    6062
     
    211213    enum
    212214    {
    213         kTstVMMTest_VMM,  kTstVMMTest_TM, kTstVMMTest_MSRs
     215        kTstVMMTest_VMM,  kTstVMMTest_TM, kTstVMMTest_MSRs, kTstVMMTest_KnownMSRs, kTstVMMTest_MSRExperiments
    214216    } enmTestOpt = kTstVMMTest_VMM;
    215217
     
    233235                else if (!strcmp("msr", ValueUnion.psz) || !strcmp("msrs", ValueUnion.psz))
    234236                    enmTestOpt = kTstVMMTest_MSRs;
     237                else if (!strcmp("known-msr", ValueUnion.psz) || !strcmp("known-msrs", ValueUnion.psz))
     238                    enmTestOpt = kTstVMMTest_KnownMSRs;
     239                else if (!strcmp("msr-experiments", ValueUnion.psz))
     240                    enmTestOpt = kTstVMMTest_MSRExperiments;
    235241                else
    236242                {
     
    241247
    242248            case 'h':
    243                 RTPrintf("usage: tstVMM [--cpus|-c cpus] [--test <vmm|tm|msr>]\n");
     249                RTPrintf("usage: tstVMM [--cpus|-c cpus] [--test <vmm|tm|msrs|known-msrs>]\n");
    244250                return 1;
    245251
     
    311317                break;
    312318            }
     319
     320            case kTstVMMTest_KnownMSRs:
     321            {
     322                RTTestSub(hTest, "Known MSRs");
     323                if (g_cCpus == 1)
     324                {
     325                    rc = VMR3ReqCallWaitU(pUVM, 0 /*idDstCpu*/, (PFNRT)VMMDoKnownMsrs, 1, pVM);
     326                    if (RT_FAILURE(rc))
     327                        RTTestFailed(hTest, "VMMDoKnownMsrs failed: rc=%Rrc\n", rc);
     328                }
     329                else
     330                    RTTestFailed(hTest, "The MSR test can only be run with one VCpu!\n");
     331                break;
     332            }
     333
     334            case kTstVMMTest_MSRExperiments:
     335            {
     336                RTTestSub(hTest, "MSR Experiments");
     337                if (g_cCpus == 1)
     338                {
     339                    rc = VMR3ReqCallWaitU(pUVM, 0 /*idDstCpu*/, (PFNRT)VMMDoMsrExperiments, 1, pVM);
     340                    if (RT_FAILURE(rc))
     341                        RTTestFailed(hTest, "VMMDoMsrExperiments failed: rc=%Rrc\n", rc);
     342                }
     343                else
     344                    RTTestFailed(hTest, "The MSR test can only be run with one VCpu!\n");
     345                break;
     346            }
     347
    313348        }
    314349
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette