VirtualBox

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


Ignore:
Timestamp:
Aug 15, 2019 7:36:15 AM (5 years ago)
Author:
vboxsync
Message:

tstSSM: Does not need to be hardnend. bugref:9217

Location:
trunk/src/VBox/VMM/testcase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/testcase/Makefile.kmk

    r80003 r80282  
    6161 ifdef VBOX_WITH_TESTCASES
    6262  if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
    63 PROGRAMS += tstCFGMHardened tstSSMHardened tstVMREQHardened tstMMHyperHeapHardened tstAnimateHardened
    64 DLLS     += tstCFGM tstSSM tstVMREQ tstMMHyperHeap tstAnimate
     63PROGRAMS += tstCFGMHardened tstVMREQHardened tstMMHyperHeapHardened tstAnimateHardened
     64DLLS     += tstCFGM tstVMREQ tstMMHyperHeap tstAnimate
    6565  else
    66 PROGRAMS += tstCFGM tstSSM tstVMREQ tstMMHyperHeap tstAnimate
     66PROGRAMS += tstCFGM tstVMREQ tstMMHyperHeap tstAnimate
    6767  endif
    6868PROGRAMS += \
    6969        tstCompressionBenchmark \
    7070        tstIEMCheckMc \
     71        tstSSM \
    7172        tstVMMR0CallHost-1 \
    7273        tstVMMR0CallHost-2 \
     
    251252# Saved state manager testcase.
    252253#
    253 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
    254 tstSSMHardened_TEMPLATE = VBoxR3HardenedTstExe
    255 tstSSMHardened_NAME     = tstSSM
    256 tstSSMHardened_DEFS     = PROGRAM_NAME_STR=\"tstSSM\"
    257 tstSSMHardened_SOURCES  = ../../HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
    258 tstSSM_TEMPLATE         = VBoxR3HardenedTstDll
    259 else
    260254tstSSM_TEMPLATE         = VBOXR3TSTEXE
    261 endif
    262255tstSSM_INCS             = $(VBOX_PATH_VMM_SRC)/include
    263256tstSSM_SOURCES          = tstSSM.cpp
  • trunk/src/VBox/VMM/testcase/tstSSM.cpp

    r80281 r80282  
    669669#ifdef VBOX_BUGREF_9217
    670670                    PVMCPU pVCpu = (PVMCPU)(pVM + 1);
    671                     pVM->apCpusR3[0]= pVCpu;
     671#else
     672                    PVMCPU pVCpu = &pVM->aCpus[0];
     673#endif
    672674                    pVCpu->pVMR3 = pVM;
    673675                    pVCpu->hNativeThread = RTThreadNativeSelf();
    674 #else
    675                     pVM->aCpus[0].pVMR3 = pVM;
    676                     pVM->aCpus[0].hNativeThread = RTThreadNativeSelf();
    677 #endif
     676                    pVM->apCpusR3[0] = pVCpu;
    678677
    679678                    pUVM->pVM = pVM;
     
    715714 *  Entry point.
    716715 */
    717 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
    718 {
    719     RT_NOREF1(envp);
    720 
     716int main(int argc, char **argv)
     717{
    721718    /*
    722719     * Init runtime and static data.
    723720     */
    724 #ifdef VBOX_BUGREF_9217
    725721    int rc = RTR3InitExe(argc, &argv, 0);
    726722    AssertRCReturn(rc, RTEXITCODE_INIT);
    727 #else
    728     RTR3InitExe(argc, &argv, RTR3INIT_FLAGS_SUPLIB);
    729 #endif
    730723    RTPrintf("tstSSM: TESTING...\n");
    731724    initBigMem();
     
    735728     * Create an fake VM structure and init SSM.
    736729     */
    737 #ifndef VBOX_BUGREF_9217
    738     int rc = SUPR3Init(NULL);
    739     if (RT_FAILURE(rc))
    740     {
    741         RTPrintf("Fatal error: SUP Failure! rc=%Rrc\n", rc);
    742         return 1;
    743     }
    744 #endif
    745730    PVM pVM;
    746731    if (createFakeVM(&pVM))
     
    959944}
    960945
    961 
    962 #if !defined(VBOX_WITH_HARDENING) || !defined(RT_OS_WINDOWS)
    963 /**
    964  * Main entry point.
    965  */
    966 int main(int argc, char **argv, char **envp)
    967 {
    968     return TrustedMain(argc, argv, envp);
    969 }
    970 #endif
    971 
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