VirtualBox

Changeset 103432 in vbox for trunk


Ignore:
Timestamp:
Feb 19, 2024 12:08:00 PM (8 months ago)
Author:
vboxsync
Message:

tstInt: Fixed error handling. bugref:3409

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp

    r103285 r103432  
    7272    PSUPDRVSESSION pSession;
    7373    int rc = SUPR3Init(&pSession);
    74     rcRet += rc != 0;
    7574    RTPrintf("tstInt: SUPR3Init -> rc=%Rrc\n", rc);
     75    if (RT_FAILURE(rc))
     76        return 1;
     77
    7678    char szFile[RTPATH_MAX];
     79    rc = RTPathExecDir(szFile, sizeof(szFile));
    7780    if (RT_SUCCESS(rc))
    78         rc = RTPathExecDir(szFile, sizeof(szFile));
     81        rc = RTPathAppend(szFile, sizeof(szFile), "VMMR0.r0");
    7982
    8083    char szAbsFile[RTPATH_MAX];
    8184    if (RT_SUCCESS(rc))
    82     {
    83         rc = RTPathAppend(szFile, sizeof(szFile), "VMMR0.r0");
    84         if (RT_SUCCESS(rc))
    85             rc = RTPathAbs(szFile, szAbsFile, sizeof(szAbsFile));
    86     }
     85        rc = RTPathAbs(szFile, szAbsFile, sizeof(szAbsFile));
    8786    if (RT_SUCCESS(rc))
    8887    {
     
    234233        RTPrintf("tstInt: SUPR3Term -> rc=%Rrc\n", rc);
    235234    }
    236 
    237     if (RT_FAILURE(rc))
    238         RTPrintf("Failed with rc=%Rrc\n", rc);
    239 
    240     return !!rc;
     235    else
     236    {
     237        RTPrintf("tstInt: Failed to construct VMMR0.r0 path: %Rrc\n", rc);
     238        rcRet++;
     239    }
     240
     241    return rcRet;
    241242}
    242243
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