VirtualBox

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


Ignore:
Timestamp:
Jan 15, 2007 2:08:28 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
17451
Message:

string.h & stdio.h + header cleanups.

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

Legend:

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

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * VBox Animation Testcase / Tool.
    44 */
     
    4242#include <iprt/file.h>
    4343#include <iprt/thread.h>
    44 
    45 #include <string.h>
    46 #include <ctype.h>
     44#include <iprt/ctype.h>
     45
    4746#include <signal.h>
    4847
  • trunk/src/VBox/VMM/testcase/tstAsmStructs.cpp

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * Testcase for checking offsets in the assembly structures shared with C/C++.
    44 */
  • trunk/src/VBox/VMM/testcase/tstCFGM.cpp

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * Testcase for CFGM.
    44 */
     
    3434#include <iprt/runtime.h>
    3535#include <iprt/stream.h>
    36 
    37 #include <string.h>
     36#include <iprt/string.h>
    3837
    3938
  • trunk/src/VBox/VMM/testcase/tstCompiler.cpp

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * Testing how the compiler deals with various things.
    44 *
  • trunk/src/VBox/VMM/testcase/tstHelp.c

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * Testcase helpers.
    44 */
  • trunk/src/VBox/VMM/testcase/tstHelp.h

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * VMM testcase - Helper stuff.
    44 */
  • trunk/src/VBox/VMM/testcase/tstMMHyperHeap.cpp

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * MM Hypervisor Heap testcase.
    44 */
     
    3434#include <iprt/assert.h>
    3535#include <iprt/stream.h>
    36 
    37 #include <string.h>
     36#include <iprt/string.h>
    3837
    3938
  • trunk/src/VBox/VMM/testcase/tstMicro.cpp

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * Micro Testcase, profiling special CPU operations.
    44 */
     
    3939#include <iprt/string.h>
    4040#include <iprt/semaphore.h>
    41 
    42 #include <stdio.h>
    4341
    4442#include "tstMicro.h"
     
    368366        if (!VBOX_SUCCESS(rc))
    369367        {
    370             printf(TESTCASE ": error: failed to destroy vm! rc=%d\n", rc);
     368            RTPrintf(TESTCASE ": error: failed to destroy vm! rc=%d\n", rc);
    371369            rcRet++;
    372370        }
     
    374372    else
    375373    {
    376         printf(TESTCASE ": fatal error: failed to create vm! rc=%d\n", rc);
     374        RTPrintf(TESTCASE ": fatal error: failed to create vm! rc=%d\n", rc);
    377375        rcRet++;
    378376    }
  • trunk/src/VBox/VMM/testcase/tstMicro.h

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * Micro Testcase, profiling special CPU operations.
    44 */
  • trunk/src/VBox/VMM/testcase/tstMicroGC.cpp

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * Micro Testcase, profiling special CPU operations - GC Code (hacks).
    44 */
     
    3232#include <VBox/log.h>
    3333#include <iprt/assert.h>
    34 #include <string.h>
     34#include <iprt/string.h>
    3535
    3636
  • trunk/src/VBox/VMM/testcase/tstProg-1.c

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * VMM - Test program.
    44 *
  • trunk/src/VBox/VMM/testcase/tstProg-2.c

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * VMM - Test program no.2.
    44 *
  • trunk/src/VBox/VMM/testcase/tstProg-3.c

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * VMM - Test program #3.
    44 *
  • trunk/src/VBox/VMM/testcase/tstSSM.cpp

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * Saved State Manager Testcase.
    44 */
     
    3636#include <iprt/string.h>
    3737#include <iprt/time.h>
    38 
    39 #include <string.h>
    4038
    4139
  • trunk/src/VBox/VMM/testcase/tstVMM-2.cpp

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * VMM Testcase - no. 2.
    44 */
     
    3434#include <iprt/semaphore.h>
    3535#include <iprt/thread.h>
    36 
    37 
    38 #include <stdio.h>
    39 #include <string.h>
    40 #include <ctype.h>
     36#include <iprt/string.h>
     37#include <iprt/ctype.h>
     38#include <iprt/stream.h>
     39
     40#include <stdio.h> /** @todo get rid of this. */
    4141
    4242
     
    8989            if (*psz != '/')
    9090            {
    91                 printf("%s(%d): error: key path must start with slash.\n", pArgs->pszFilename, iLine);
     91                RTPrintf("%s(%d): error: key path must start with slash.\n", pArgs->pszFilename, iLine);
    9292                return VERR_GENERAL_FAILURE;
    9393            }
     
    9595            if (!pszEnd)
    9696            {
    97                 printf("%s(%d): error: missing ']'.\n", pArgs->pszFilename, iLine);
     97                RTPrintf("%s(%d): error: missing ']'.\n", pArgs->pszFilename, iLine);
    9898                return VERR_GENERAL_FAILURE;
    9999            }
     
    119119                    {
    120120                        *pszCurEnd = '/';
    121                         printf("%s(%d): error: failed to create node '%s', rc=%d.\n", pArgs->pszFilename, iLine, psz, rc);
     121                        RTPrintf("%s(%d): error: failed to create node '%s', rc=%d.\n", pArgs->pszFilename, iLine, psz, rc);
    122122                        return rc;
    123123                    }
     
    146146                    if (!pszNameEnd)
    147147                    {
    148                         printf("%s(%d): error: unbalanced quote.\n", pArgs->pszFilename, iLine);
     148                        RTPrintf("%s(%d): error: unbalanced quote.\n", pArgs->pszFilename, iLine);
    149149                        return VERR_GENERAL_FAILURE;
    150150                    }
     
    163163                if (!pszNameEnd)
    164164                {
    165                     printf("%s(%d): error: missing '='.\n", pArgs->pszFilename, iLine);
     165                    RTPrintf("%s(%d): error: missing '='.\n", pArgs->pszFilename, iLine);
    166166                    return VERR_GENERAL_FAILURE;
    167167                }
     
    172172                if (!pszNameEnd)
    173173                {
    174                     printf("%s(%d): error: missing '<'.\n", pArgs->pszFilename, iLine);
     174                    RTPrintf("%s(%d): error: missing '<'.\n", pArgs->pszFilename, iLine);
    175175                    return VERR_GENERAL_FAILURE;
    176176                }
     
    178178            if (pszName == pszNameEnd)
    179179            {
    180                 printf("%s(%d): error: empty value name.\n", pArgs->pszFilename, iLine);
     180                RTPrintf("%s(%d): error: empty value name.\n", pArgs->pszFilename, iLine);
    181181                return VERR_GENERAL_FAILURE;
    182182            }
     
    185185            if (!psz)
    186186            {
    187                 printf("%s(%d): error: missing '='.\n", pArgs->pszFilename, iLine);
     187                RTPrintf("%s(%d): error: missing '='.\n", pArgs->pszFilename, iLine);
    188188                return VERR_GENERAL_FAILURE;
    189189            }
     
    204204                    if (!pszValueEnd)
    205205                    {
    206                         printf("%s(%d): error: unbalanced quote in string value.\n", pArgs->pszFilename, iLine);
     206                        RTPrintf("%s(%d): error: unbalanced quote in string value.\n", pArgs->pszFilename, iLine);
    207207                        return VERR_GENERAL_FAILURE;
    208208                    }
     
    217217                if (VBOX_FAILURE(rc))
    218218                {
    219                     printf("%s(%d): error: failed to insert string value named '%s' and with value '%s', rc=%d.\n",
    220                            pArgs->pszFilename, iLine, pszName, psz, rc);
     219                    RTPrintf("%s(%d): error: failed to insert string value named '%s' and with value '%s', rc=%d.\n",
     220                             pArgs->pszFilename, iLine, pszName, psz, rc);
    221221                    return rc;
    222222                }
     
    227227            {
    228228                /* byte string */
    229                 printf("%s(%d): error: byte string is not implemented\n", pArgs->pszFilename, iLine);
     229                RTPrintf("%s(%d): error: byte string is not implemented\n", pArgs->pszFilename, iLine);
    230230                return VERR_GENERAL_FAILURE;
    231231            }
     
    255255                if (isalpha(*psz))
    256256                {
    257                     printf("%s(%d): error: unexpected char(s) after number '%.10s'\n", pArgs->pszFilename, iLine, psz);
     257                    RTPrintf("%s(%d): error: unexpected char(s) after number '%.10s'\n", pArgs->pszFilename, iLine, psz);
    258258                    return VERR_GENERAL_FAILURE;
    259259                }
     
    262262                if (VBOX_FAILURE(rc))
    263263                {
    264                     printf("%s(%d): error: failed to insert integer value named '%s' and with value %#llx, rc=%d.\n",
    265                            pArgs->pszFilename, iLine, pszName, u64, rc);
     264                    RTPrintf("%s(%d): error: failed to insert integer value named '%s' and with value %#llx, rc=%d.\n",
     265                             pArgs->pszFilename, iLine, pszName, u64, rc);
    266266                    return rc;
    267267                }
     
    269269            else
    270270            {
    271                 printf("%s(%d): error: unknown value format.\n", pArgs->pszFilename, iLine);
     271                RTPrintf("%s(%d): error: unknown value format.\n", pArgs->pszFilename, iLine);
    272272                return VERR_GENERAL_FAILURE;
    273273            }
     
    306306                if (Args.pszFilename)
    307307                {
    308                     printf("syntax error: only one config argument!\n");
     308                    RTPrintf("syntax error: only one config argument!\n");
    309309                    return 1;
    310310                }
    311311                if (i + 1 >= argc)
    312312                {
    313                     printf("syntax error: no configuration filename!\n");
     313                    RTPrintf("syntax error: no configuration filename!\n");
    314314                    return 1;
    315315                }
     
    318318                if (!Args.pFile)
    319319                {
    320                     printf("%s: Failed to open '%s' for reading!\n", TESTCASE, Args.pszFilename);
     320                    RTPrintf("%s: Failed to open '%s' for reading!\n", TESTCASE, Args.pszFilename);
    321321                    return 1;
    322322                }
     
    327327                     || (*psz == 'h' && !psz[1]))
    328328            {
    329                 printf("syntax: %s [options]\n"
    330                        "\n"
    331                        "options (prefixed with a dash or two)\n"
    332                        "  config <filename>     Load the flat config file.\n"
    333                        "  help                  This help text.\n", argv[0]);
     329                RTPrintf("syntax: %s [options]\n"
     330                         "\n"
     331                         "options (prefixed with a dash or two)\n"
     332                         "  config <filename>     Load the flat config file.\n"
     333                         "  help                  This help text.\n", argv[0]);
    334334                return 1;
    335335            }
    336336            else
    337337            {
    338                 printf("syntax error: unknown option '%s' in arg %d.\n", psz, i);
     338                RTPrintf("syntax error: unknown option '%s' in arg %d.\n", psz, i);
    339339                return 1;
    340340            }
     
    343343        else
    344344        {
    345             printf("syntax error: Sorry dude, no idea what you're passing to me.\n"
    346                    "              arg %d '%s'\n", i, argv[i]);
     345            RTPrintf("syntax error: Sorry dude, no idea what you're passing to me.\n"
     346                     "              arg %d '%s'\n", i, argv[i]);
    347347            return 1;
    348348        }
     
    370370                if (VBOX_SUCCESS(rc))
    371371                {
    372                     printf(TESTCASE ": info: VMR3PowerOn succeeded. rc=%d\n", rc);
    373                     printf(TESTCASE ": info: main thread is taking a nap...\n");
     372                    RTPrintf(TESTCASE ": info: VMR3PowerOn succeeded. rc=%d\n", rc);
     373                    RTPrintf(TESTCASE ": info: main thread is taking a nap...\n");
    374374                    rc = RTThreadSleep(8*3600*1000); /* 8 hours */
    375                     printf(TESTCASE ": info: main thread is woke up... rc=%d\n", rc);
     375                    RTPrintf(TESTCASE ": info: main thread is woke up... rc=%d\n", rc);
    376376
    377377                    /*
     
    384384                        VMR3ReqFree(pReq);
    385385                        if (VBOX_SUCCESS(rc))
    386                             printf(TESTCASE ": info: Successfully powered off the VM. rc=%d\n", rc);
     386                            RTPrintf(TESTCASE ": info: Successfully powered off the VM. rc=%d\n", rc);
    387387                        else
    388388                        {
    389                             printf(TESTCASE ": error: VMR3PowerOff -> %d\n", rc);
     389                            RTPrintf(TESTCASE ": error: VMR3PowerOff -> %d\n", rc);
    390390                            rcRet++;
    391391                        }
     
    393393                    else
    394394                    {
    395                         printf(TESTCASE ": error: VMR3ReqCall (power off) -> %d\n", rc);
     395                        RTPrintf(TESTCASE ": error: VMR3ReqCall (power off) -> %d\n", rc);
    396396                        rcRet++;
    397397                    }
     
    400400            else
    401401            {
    402                 printf(TESTCASE ": error: VMR3ReqCall (power on) -> %d\n", rc);
     402                RTPrintf(TESTCASE ": error: VMR3ReqCall (power on) -> %d\n", rc);
    403403                rcRet++;
    404404            }
     
    411411        if (!VBOX_SUCCESS(rc))
    412412        {
    413             printf(TESTCASE ": error: failed to destroy vm! rc=%d\n", rc);
     413            RTPrintf(TESTCASE ": error: failed to destroy vm! rc=%d\n", rc);
    414414            rcRet++;
    415415        }
     
    417417    else
    418418    {
    419         printf(TESTCASE ": fatal error: failed to create vm! rc=%d\n", rc);
     419        RTPrintf(TESTCASE ": fatal error: failed to create vm! rc=%d\n", rc);
    420420        rcRet++;
    421421    }
  • trunk/src/VBox/VMM/testcase/tstVMM.cpp

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * VMM Testcase.
    44 */
     
    3535
    3636
    37 #include <stdio.h>
    38 
    39 
    4037/*******************************************************************************
    4138*   Defined Constants And Macros                                               *
     
    4441
    4542VMMR3DECL(int) VMMDoTest(PVM pVM);
     43
    4644
    4745int main(int argc, char **argv)
     
    7674        if (!VBOX_SUCCESS(rc))
    7775        {
    78             printf(TESTCASE ": error: failed to destroy vm! rc=%d\n", rc);
     76            RTPrintf(TESTCASE ": error: failed to destroy vm! rc=%d\n", rc);
    7977            rcRet++;
    8078        }
     
    8280    else
    8381    {
    84         printf(TESTCASE ": fatal error: failed to create vm! rc=%d\n", rc);
     82        RTPrintf(TESTCASE ": fatal error: failed to create vm! rc=%d\n", rc);
    8583        rcRet++;
    8684    }
  • trunk/src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp

    • Property svn:keywords set to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * Testcase for the VMMR0JMPBUF operations.
    44 */
  • trunk/src/VBox/VMM/testcase/tstVMREQ.cpp

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * VMM Testcase.
    44 */
  • trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp

    • Property svn:keywords set to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
     3 * tstVMMStructGC - Generate structure member and size checks from the GC perspective.
    24 *
    3  * tstVMMStructGC - Generate structure member and size checks from the GC
    4  *                  perspective. This is built using the VBOXGC template
    5  *                  but linked into a host ring-3 executable, rather hacky.
     5 * This is built using the VBOXGC template but linked into a host
     6 * ring-3 executable, rather hacky.
    67 */
    78
     
    196197#ifdef VBOX_WITH_PDM_LOCK
    197198    GEN_CHECK_OFF(PDM, CritSect);
    198 #endif 
     199#endif
    199200    GEN_CHECK_OFF(PDM, StatQueuedCritSectLeaves);
    200201
  • trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp

    • Property svn:keywords changed from Author Date Id Revision to Id
    r1 r23  
     1/* $Id$ */
    12/** @file
    2  *
    33 * VMM - Context switcher macros & definitions
    44 */
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