VirtualBox

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


Ignore:
Timestamp:
Jul 7, 2014 4:28:37 PM (10 years ago)
Author:
vboxsync
Message:

Fixing testcases on windows.

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

Legend:

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

    r49731 r51906  
    4141endif
    4242ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
    43  PROGRAMS  += tstGlobalConfig tstInstrEmul
     43 PROGRAMS  += tstInstrEmul
     44 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     45  PROGRAMS += tstGlobalConfigHardened
     46  DLL      += tstGlobalConfig
     47 else
     48  PROGRAMS += tstGlobalConfig
     49 endif
     50
    4451 ifdef VBOX_WITH_RAW_MODE
    45   PROGRAMS  += tstVMM tstVMM-HM
     52  if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     53   PROGRAMS += tstVMMHardened
     54   DLLS     += tstVMM
     55  else
     56   PROGRAMS += tstVMM tstVMM-HM
     57  endif
    4658  ifneq ($(KBUILD_TARGET),win)
    4759   PROGRAMS += tstVMMFork
     
    4961 endif
    5062 ifdef VBOX_WITH_TESTCASES
    51   PROGRAMS  += \
    52         tstCFGM \
     63  if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     64   PROGRAMS += tstCFGMHardened tstSSMHardened tstVMREQHardened tstMMHyperHeapHardened tstAnimateHardened
     65   DLLS     += tstCFGM tstSSM tstVMREQ tstMMHyperHeap tstAnimate
     66  else
     67   PROGRAMS += tstCFGM tstSSM tstVMREQ tstMMHyperHeap tstAnimate
     68  endif
     69  PROGRAMS += \
    5370        tstCompressionBenchmark \
    5471        tstIEMCheckMc \
    55         tstMMHyperHeap \
    56         tstSSM \
    5772        tstVMMR0CallHost-1 \
    5873        tstVMMR0CallHost-2 \
    59         tstVMREQ \
    6074        tstX86-FpuSaveRestore
    6175  ifn1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), solaris.x86 solaris.amd64 win.amd64 ) ## TODO: Fix the code.
    6276   PROGRAMS += tstX86-1
    6377  endif
    64   ifneq ($(KBUILD_TARGET),l4)
    65    PROGRAMS += tstAnimate
    66   endif
    6778  ifdef VBOX_WITH_RAW_MODE
    68    PROGRAMS += tstMicro
    69    SYSMODS  += tstMicroRC
     79   if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     80    PROGRAMS += tstMicroHardened
     81    DLLS     += tstMicro
     82   else
     83    PROGRAMS += tstMicro
     84   endif
     85   SYSMODS   += tstMicroRC
    7086  endif
    7187  ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
    72    PROGRAMS  += tstPDMAsyncCompletion
    73    PROGRAMS  += tstPDMAsyncCompletionStress
     88   if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     89    PROGRAMS += tstPDMAsyncCompletionHardened tstPDMAsyncCompletionStressHardened
     90    DLLS     += tstPDMAsyncCompletion tstPDMAsyncCompletionStress
     91   else
     92    PROGRAMS += tstPDMAsyncCompletion tstPDMAsyncCompletionStress
     93   endif
    7494  endif
    7595 endif # VBOX_WITH_TESTCASES
     
    202222
    203223
    204 tstGlobalConfig_TEMPLATE= VBOXR3TSTEXE
     224#
     225# Glboal config tool.
     226#
     227if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     228 tstGlobalConfigHardened_TEMPLATE = VBoxR3HardenedTstExe
     229 tstGlobalConfigHardened_NAME     = tstGlobalConfig
     230 tstGlobalConfigHardened_DEFS     = PROGRAM_NAME_STR=\"tstGlobalConfig\"
     231 tstGlobalConfigHardened_SOURCES  = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
     232 tstGlobalConfig_TEMPLATE = VBoxR3TstDll
     233else
     234 tstGlobalConfig_TEMPLATE = VBOXR3TSTEXE
     235endif
    205236tstGlobalConfig_SOURCES = tstGlobalConfig.cpp
    206237tstGlobalConfig_LIBS    = $(LIB_RUNTIME)
    207238
     239#
     240# Testcase for checking the repurposing of the IEM instruction code.
     241#
    208242tstIEMCheckMc_TEMPLATE  = VBOXR3TSTEXE
    209243tstIEMCheckMc_SOURCES   = tstIEMCheckMc.cpp
     
    213247endif
    214248
    215 tstMMHyperHeap_TEMPLATE = VBOXR3TSTEXE
     249#
     250# VMM heap testcase.
     251#
     252if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     253 tstMMHyperHeapHardened_TEMPLATE = VBoxR3HardenedTstExe
     254 tstMMHyperHeapHardened_NAME     = tstMMHyperHeap
     255 tstMMHyperHeapHardened_DEFS     = PROGRAM_NAME_STR=\"tstMMHyperHeap\"
     256 tstMMHyperHeapHardened_SOURCES  = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
     257 tstMMHyperHeap_TEMPLATE = VBoxR3TstDll
     258else
     259 tstMMHyperHeap_TEMPLATE = VBOXR3TSTEXE
     260endif
    216261tstMMHyperHeap_SOURCES  = tstMMHyperHeap.cpp
    217262tstMMHyperHeap_LIBS     = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    218263
    219 tstSSM_TEMPLATE         = VBOXR3TSTEXE
     264#
     265# Saved state manager testcase.
     266#
     267if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     268 tstSSMHardened_TEMPLATE = VBoxR3HardenedTstExe
     269 tstSSMHardened_NAME     = tstSSM
     270 tstSSMHardened_DEFS     = PROGRAM_NAME_STR=\"tstSSM\"
     271 tstSSMHardened_SOURCES  = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
     272 tstSSM_TEMPLATE        = VBoxR3TstDll
     273else
     274 tstSSM_TEMPLATE        = VBOXR3TSTEXE
     275endif
    220276tstSSM_INCS             = $(VBOX_PATH_VMM_SRC)/include
    221277tstSSM_SOURCES          = tstSSM.cpp
    222278tstSSM_LIBS             = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    223279
     280#
     281# Test some EM assembly routines used in instruction emulation.
     282#
    224283tstInstrEmul_TEMPLATE   = VBOXR3EXE
    225284tstInstrEmul_SOURCES    = tstInstrEmul.cpp ../VMMAll/EMAllA.asm
    226285tstInstrEmul_LIBS       = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    227286
    228 tstCFGM_TEMPLATE        = VBOXR3TSTEXE
     287#
     288# VMM configuration manager tests.
     289#
     290if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     291 tstCFGMHardened_TEMPLATE = VBoxR3HardenedTstExe
     292 tstCFGMHardened_NAME     = tstCFGM
     293 tstCFGMHardened_DEFS     = PROGRAM_NAME_STR=\"tstCFGM\"
     294 tstCFGMHardened_SOURCES  = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
     295 tstCFGM_TEMPLATE       = VBoxR3TstDll
     296else
     297 tstCFGM_TEMPLATE       = VBOXR3TSTEXE
     298endif
    229299tstCFGM_SOURCES         = tstCFGM.cpp
    230300tstCFGM_LIBS            = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    231301
     302#
     303# Comparing some compression algorithms considered for SSM usage.
     304#
    232305tstCompressionBenchmark_TEMPLATE = VBOXR3TSTEXE
    233306tstCompressionBenchmark_SOURCES  = tstCompressionBenchmark.cpp
    234307
     308#
     309# Two testcases for checking the ring-3 "long jump" code.
     310#
    235311tstVMMR0CallHost-1_TEMPLATE = VBOXR3TSTEXE
    236312tstVMMR0CallHost-1_DEFS = VMM_R0_NO_SWITCH_STACK
     
    246322tstVMMR0CallHost-2_DEFS = VMM_R0_SWITCH_STACK
    247323
    248 tstVMREQ_TEMPLATE       = VBOXR3EXE
     324#
     325# For testing the VM request queue code.
     326#
     327if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     328 tstVMREQHardened_TEMPLATE = VBOXR3HARDENEDEXE
     329 tstVMREQHardened_NAME     = tstVMREQ
     330 tstVMREQHardened_DEFS     = PROGRAM_NAME_STR=\"tstVMREQ\"
     331 tstVMREQHardened_SOURCES  = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
     332 tstVMREQ_TEMPLATE      = VBOXR3
     333else
     334 tstVMREQ_TEMPLATE      = VBOXR3EXE
     335endif
    249336tstVMREQ_SOURCES        = tstVMREQ.cpp
    250337tstVMREQ_LIBS           = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    251338
    252 tstAnimate_TEMPLATE     = VBOXR3EXE
     339#
     340# Tool for reanimate things like OS/2 dumps.
     341#
     342if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     343 tstAnimateHardened_TEMPLATE = VBOXR3HARDENEDEXE
     344 tstAnimateHardened_NAME     = tstAnimate
     345 tstAnimateHardened_DEFS     = PROGRAM_NAME_STR=\"tstAnimate\"
     346 tstAnimateHardened_SOURCES  = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
     347 tstAnimate_TEMPLATE    = VBOXR3
     348else
     349 tstAnimate_TEMPLATE    = VBOXR3EXE
     350endif
    253351tstAnimate_SOURCES      = tstAnimate.cpp
    254352tstAnimate_LIBS         = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
     
    264362ifdef VBOX_WITH_RAW_MODE
    265363
    266  tstVMM_TEMPLATE        = VBOXR3EXE
     364 #
     365 # Raw-mode VMM testcase.
     366 #
     367 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     368  tstVMMHardened_TEMPLATE = VBOXR3HARDENEDEXE
     369  tstVMMHardened_NAME     = tstVMM
     370  tstVMMHardened_DEFS     = PROGRAM_NAME_STR=\"tstVMM\"
     371  tstVMMHardened_SOURCES  = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
     372  tstVMM_TEMPLATE       = VBOXR3
     373 else
     374  tstVMM_TEMPLATE       = VBOXR3EXE
     375 endif
    267376 tstVMM_SOURCES         = tstVMM.cpp
    268377 tstVMM_LIBS            = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    269378
     379 #
     380 # HM VMM testcase.
     381 #
    270382 tstVMM-HM_TEMPLATE     = VBOXR3EXE
    271383 tstVMM-HM_SOURCES      = tstVMM-HM.cpp
    272384 tstVMM-HM_LIBS         = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    273385
     386 #
     387 # VMM host process fork test case (memory ++).
     388 #
    274389 tstVMMFork_TEMPLATE    = VBOXR3EXE
    275390 tstVMMFork_SOURCES     = tstVMMFork.cpp
    276391 tstVMMFork_LIBS        = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    277392
    278  tstMicro_TEMPLATE       = VBOXR3EXE
     393 #
     394 # Raw-mode micro benchmark.
     395 #
     396 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     397  tstMicroHardened_TEMPLATE = VBOXR3HARDENEDEXE
     398  tstMicroHardened_NAME     = tstMicro
     399  tstMicroHardened_DEFS     = PROGRAM_NAME_STR=\"tstMicro\"
     400  tstMicroHardened_SOURCES  = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
     401  tstMicro_TEMPLATE      = VBOXR3
     402 else
     403  tstMicro_TEMPLATE      = VBOXR3EXE
     404 endif
    279405 tstMicro_SOURCES        = tstMicro.cpp
    280406 tstMicro_LIBS           = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
     
    302428
    303429ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
    304  tstPDMAsyncCompletion_TEMPLATE         = VBOXR3EXE
     430 #
     431 # PDM asynchronous completation test.
     432 #
     433 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     434  tstPDMAsyncCompletionHardened_TEMPLATE = VBOXR3HARDENEDEXE
     435  tstPDMAsyncCompletionHardened_NAME     = tstPDMAsyncCompletion
     436  tstPDMAsyncCompletionHardened_DEFS     = PROGRAM_NAME_STR=\"tstPDMAsyncCompletion\"
     437  tstPDMAsyncCompletionHardened_SOURCES  = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
     438  tstPDMAsyncCompletion_TEMPLATE        = VBOXR3
     439 else
     440  tstPDMAsyncCompletion_TEMPLATE        = VBOXR3EXE
     441 endif
    305442 tstPDMAsyncCompletion_INCS             = $(VBOX_PATH_VMM_SRC)/include
    306443 tstPDMAsyncCompletion_SOURCES          = tstPDMAsyncCompletion.cpp
    307444 tstPDMAsyncCompletion_LIBS             = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
    308445
    309  tstPDMAsyncCompletionStress_TEMPLATE   = VBOXR3EXE
     446 #
     447 # PDM asynchronous completation stress test.
     448 #
     449 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
     450  tstPDMAsyncCompletionStressHardened_TEMPLATE = VBOXR3HARDENEDEXE
     451  tstPDMAsyncCompletionStressHardened_NAME     = tstPDMAsyncCompletionStress
     452  tstPDMAsyncCompletionStressHardened_DEFS     = PROGRAM_NAME_STR=\"tstPDMAsyncCompletionStress\"
     453  tstPDMAsyncCompletionStressHardened_SOURCES  = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
     454  tstPDMAsyncCompletionStress_TEMPLATE  = VBOXR3
     455 else
     456  tstPDMAsyncCompletionStress_TEMPLATE  = VBOXR3EXE
     457 endif
    310458 tstPDMAsyncCompletionStress_INCS       = $(VBOX_PATH_VMM_SRC)/include
    311459 tstPDMAsyncCompletionStress_SOURCES    = tstPDMAsyncCompletionStress.cpp
  • trunk/src/VBox/VMM/testcase/tstAnimate.cpp

    r44528 r51906  
    619619
    620620
    621 int main(int argc, char **argv)
     621/**
     622 *  Entry point.
     623 */
     624extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
    622625{
    623626    int rcRet = 1;
     
    937940}
    938941
     942
     943#if !defined(VBOX_WITH_HARDENING) || !defined(RT_OS_WINDOWS)
     944/**
     945 * Main entry point.
     946 */
     947int main(int argc, char **argv, char **envp)
     948{
     949    return TrustedMain(argc, argv, envp);
     950}
     951#endif
     952
  • trunk/src/VBox/VMM/testcase/tstCFGM.cpp

    r46860 r51906  
    136136}
    137137
    138 int main()
     138
     139/**
     140 *  Entry point.
     141 */
     142extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
    139143{
    140144    /*
     
    153157}
    154158
     159
     160#if !defined(VBOX_WITH_HARDENING) || !defined(RT_OS_WINDOWS)
     161/**
     162 * Main entry point.
     163 */
     164int main(int argc, char **argv, char **envp)
     165{
     166    return TrustedMain(argc, argv, envp);
     167}
     168#endif
     169
  • trunk/src/VBox/VMM/testcase/tstGlobalConfig.cpp

    r50694 r51906  
    3939
    4040
    41 int main(int argc, char **argv)
     41/**
     42 *  Entry point.
     43 */
     44extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
    4245{
    4346    RTR3InitExe(argc, &argv, 0);
     
    121124    return RT_FAILURE(rc) ? 1 : 0;
    122125}
     126
     127
     128#if !defined(VBOX_WITH_HARDENING) || !defined(RT_OS_WINDOWS)
     129/**
     130 * Main entry point.
     131 */
     132int main(int argc, char **argv, char **envp)
     133{
     134    return TrustedMain(argc, argv, envp);
     135}
     136#endif
     137
  • trunk/src/VBox/VMM/testcase/tstMMHyperHeap.cpp

    r48657 r51906  
    3838
    3939
    40 int main(int argc, char **argv)
     40/**
     41 *  Entry point.
     42 */
     43extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
    4144{
    4245
     
    241244    return 0;
    242245}
     246
     247
     248#if !defined(VBOX_WITH_HARDENING) || !defined(RT_OS_WINDOWS)
     249/**
     250 * Main entry point.
     251 */
     252int main(int argc, char **argv, char **envp)
     253{
     254    return TrustedMain(argc, argv, envp);
     255}
     256#endif
     257
  • trunk/src/VBox/VMM/testcase/tstMicro.cpp

    r45530 r51906  
    340340
    341341
    342 int main(int argc, char **argv)
     342/**
     343 *  Entry point.
     344 */
     345extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
    343346{
    344347    int     rcRet = 0;                  /* error count. */
     
    386389    return rcRet;
    387390}
     391
     392
     393#if !defined(VBOX_WITH_HARDENING) || !defined(RT_OS_WINDOWS)
     394/**
     395 * Main entry point.
     396 */
     397int main(int argc, char **argv, char **envp)
     398{
     399    return TrustedMain(argc, argv, envp);
     400}
     401#endif
     402
  • trunk/src/VBox/VMM/testcase/tstPDMAsyncCompletion.cpp

    r44528 r51906  
    7373}
    7474
    75 int main(int argc, char *argv[])
     75/**
     76 *  Entry point.
     77 */
     78extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
    7679{
    7780    int rcRet = 0; /* error count */
     
    257260}
    258261
     262
     263#if !defined(VBOX_WITH_HARDENING) || !defined(RT_OS_WINDOWS)
     264/**
     265 * Main entry point.
     266 */
     267int main(int argc, char **argv, char **envp)
     268{
     269    return TrustedMain(argc, argv, envp);
     270}
     271#endif
     272
  • trunk/src/VBox/VMM/testcase/tstPDMAsyncCompletionStress.cpp

    r44528 r51906  
    568568}
    569569
    570 int main(int argc, char *argv[])
     570/**
     571 *  Entry point.
     572 */
     573extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
    571574{
    572575    int rcRet = 0; /* error count */
     
    630633}
    631634
     635
     636#if !defined(VBOX_WITH_HARDENING) || !defined(RT_OS_WINDOWS)
     637/**
     638 * Main entry point.
     639 */
     640int main(int argc, char **argv, char **envp)
     641{
     642    return TrustedMain(argc, argv, envp);
     643}
     644#endif
     645
  • trunk/src/VBox/VMM/testcase/tstSSM.cpp

    r44521 r51906  
    684684
    685685
    686 int main(int argc, char **argv)
     686/**
     687 *  Entry point.
     688 */
     689extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
    687690{
    688691    /*
     
    917920}
    918921
     922
     923#if !defined(VBOX_WITH_HARDENING) || !defined(RT_OS_WINDOWS)
     924/**
     925 * Main entry point.
     926 */
     927int main(int argc, char **argv, char **envp)
     928{
     929    return TrustedMain(argc, argv, envp);
     930}
     931#endif
     932
  • trunk/src/VBox/VMM/testcase/tstVMM.cpp

    r49368 r51906  
    193193
    194194
    195 int main(int argc, char **argv)
     195/**
     196 * Entry point.
     197 */
     198extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
    196199{
    197200    /*
     
    364367    return RTTestSummaryAndDestroy(hTest);
    365368}
     369
     370
     371#if !defined(VBOX_WITH_HARDENING) || !defined(RT_OS_WINDOWS)
     372/**
     373 * Main entry point.
     374 */
     375int main(int argc, char **argv, char **envp)
     376{
     377    return TrustedMain(argc, argv, envp);
     378}
     379#endif
     380
  • trunk/src/VBox/VMM/testcase/tstVMREQ.cpp

    r47658 r51906  
    225225}
    226226
    227 int main(int argc, char **argv)
     227/**
     228 *  Entry point.
     229 */
     230extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
    228231{
    229232    RTR3InitExe(argc, &argv, RTR3INIT_FLAGS_SUPLIB);
     
    331334    return !!g_cErrors;
    332335}
     336
     337
     338#if !defined(VBOX_WITH_HARDENING) || !defined(RT_OS_WINDOWS)
     339/**
     340 * Main entry point.
     341 */
     342int main(int argc, char **argv, char **envp)
     343{
     344    return TrustedMain(argc, argv, envp);
     345}
     346#endif
     347
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