VirtualBox

Changeset 13567 in vbox


Ignore:
Timestamp:
Oct 24, 2008 11:11:05 PM (16 years ago)
Author:
vboxsync
Message:

tstInstrEmul: unbusted the darwin build and straigthened up the testcase output a bit.

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

Legend:

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

    r13561 r13567  
    334334# Run rule for tstInstrEmul.
    335335#
    336 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstInstrEmul.run: $$(INSTARGET_tstInstrEmul)
     336$(VBOX_VMM_TESTCASE_OUT_DIR)/tstInstrEmul.run: $$(INSTARGET_tstInstrEmul) | $$(dir $$@)
    337337        $(QUIET)$(RM) -f $@
    338         $(INSTARGET_tstInstrEmul)
     338        $(QUIET)$(REDIRECT) -E 'VBOX_LOG_FLAGS=disabled' -E 'VBOX_LOG_DEST=nofile' \
     339                $(if $(eq $(KBUILD_TARGET),darwin), -E 'DYLD_FALLBACK_LIBRARY_PATH=$(dir $(LIB_RUNTIME))') \
     340                -- \
     341                $(INSTARGET_tstInstrEmul)
    339342        $(QUIET)$(APPEND) "$@" "done"
  • trunk/src/VBox/VMM/testcase/tstInstrEmul.cpp

    r13562 r13567  
    4040    int     rcRet = 0;                  /* error count. */
    4141
     42    RTR3Init();
     43    RTPrintf("tstInstrEmul: TESTING...\n");
     44
    4245    uint32_t eax, edx, ebx, ecx, eflags;
    4346    uint64_t val;
     
    5255        ||  val != UINT64_C(0x200000001))
    5356    {
    54         printf("Lock cmpxchg8b failed the equal case! (val=%x%x)\n", val);
    55         return -1;
     57        RTPrintf("tstInstrEmul: FAILURE - Lock cmpxchg8b failed the equal case! (val=%x%x)\n", val);
     58        return 1;
    5659    }
    5760    val = UINT64_C(0x123456789);
     
    6164        ||  edx != 0x1)
    6265    {
    63         printf("Lock cmpxchg8b failed the non-equal case! (val=%x%x)\n", val);
    64         return -1;
     66        RTPrintf("tstInstrEmul: FAILURE - Lock cmpxchg8b failed the non-equal case! (val=%x%x)\n", val);
     67        return 1;
    6568    }
    66     printf("Testing lock cmpxchg instruction emulation - SUCCESS\n");
     69    RTPrintf("tstInstrEmul: Testing lock cmpxchg instruction emulation - SUCCESS\n");
    6770
    6871    val = UINT64_C(0xffffffffffff);
     
    7578        ||  val != UINT64_C(0x200000001))
    7679    {
    77         printf("Cmpxchg8b failed the equal case! (val=%x%x)\n", val);
    78         return -1;
     80        RTPrintf("tstInstrEmul: FAILURE - Cmpxchg8b failed the equal case! (val=%x%x)\n", val);
     81        return 1;
    7982    }
    8083    val = UINT64_C(0x123456789);
     
    8487        ||  edx != 0x1)
    8588    {
    86         printf("Cmpxchg8b failed the non-equal case! (val=%x%x)\n", val);
    87         return -1;
     89        RTPrintf("tstInstrEmul: FAILURE - Cmpxchg8b failed the non-equal case! (val=%x%x)\n", val);
     90        return 1;
    8891    }
    89     printf("Testing cmpxchg instruction emulation - SUCCESS\n");
     92    RTPrintf("tstInstrEmul: Testing cmpxchg instruction emulation - SUCCESS\n");
    9093
    91     return rcRet;
     94
     95    /*
     96     * Summary.
     97     */
     98    if (!rcRet)
     99        RTPrintf("tstInstrEmul: SUCCESS\n");
     100    else
     101        RTPrintf("tstInstrEmul: FAILURE - %d errors\n", rcRet);
     102    return rcRet ? 1 : 0;
    92103}
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