VirtualBox

Changeset 79133 in vbox


Ignore:
Timestamp:
Jun 13, 2019 3:27:38 PM (6 years ago)
Author:
vboxsync
Message:

tdAddGuestCtrl.py,Main: Added @todos for incorrect directoryOpen behavior. bugref:9320

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r79065 r79133  
    1292112921          may change in the future.</note>
    1292212922
     12923        <note>One idiosyncrasy of the current implementation is that you will NOT
     12924          get VBOX_E_OBJECT_NOT_FOUND returned here if the directory doesn't exist.
     12925          Instead the read function will fail with VBOX_E_IPRT_ERROR.  This will
     12926          be fixed soon.</note>
     12927
    1292312928        <result name="VBOX_E_OBJECT_NOT_FOUND">
    1292412929          Directory to open was not found.
  • trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp

    r77587 r79133  
    104104         * Note: No guest rc available because operation is asynchronous.
    105105         */
    106         vrc = mData.mProcessTool.init(mSession, procInfo,
    107                                       true /* Async */, NULL /* Guest rc */);
    108     }
    109 
     106        vrc = mData.mProcessTool.init(mSession, procInfo, true /* Async */, NULL /* Guest rc */);
     107
     108/** @todo r=bird: IGuest::directoryOpen need to fail if the directory doesn't
     109 *        exist like it is documented to do.  It seems this async approach or
     110 *        something is delaying such errors till GuestDirectory::read() is
     111 *        called, which is clearly messed up.
     112 */
     113    }
     114
     115    /* Confirm a successful initialization when it's the case. */
    110116    if (RT_SUCCESS(vrc))
    111     {
    112         /* Confirm a successful initialization when it's the case. */
    113117        autoInitSpan.setSucceeded();
    114         return vrc;
    115     }
    116118    else
    117119        autoInitSpan.setFailed();
    118 
    119120    return vrc;
    120121}
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r78758 r79133  
    11311131    HRESULT hr = pDirectory.createObject();
    11321132    if (FAILED(hr))
    1133         return VERR_COM_UNEXPECTED;
     1133        return Global::vboxStatusCodeFromCOM(hr);
    11341134
    11351135    /* Register a new object ID. */
    11361136    uint32_t idObject;
    1137     int rc = i_objectRegister(pDirectory, SESSIONOBJECTTYPE_DIRECTORY, &idObject);
    1138     if (RT_FAILURE(rc))
     1137    int vrc = i_objectRegister(pDirectory, SESSIONOBJECTTYPE_DIRECTORY, &idObject);
     1138    if (RT_FAILURE(vrc))
    11391139    {
    11401140        pDirectory.setNull();
    1141         return rc;
     1141        return vrc;
    11421142    }
    11431143
     
    11451145    AssertPtr(pConsole);
    11461146
    1147     int vrc = pDirectory->init(pConsole, this /* Parent */, idObject, openInfo);
     1147    vrc = pDirectory->init(pConsole, this /* Parent */, idObject, openInfo);
    11481148    if (RT_FAILURE(vrc))
    11491149        return vrc;
     
    34263426    openInfo.mFlags = fFlags;
    34273427
    3428     ComObjPtr <GuestDirectory> pDirectory; int rcGuest;
     3428    ComObjPtr<GuestDirectory> pDirectory; int rcGuest;
    34293429    int vrc = i_directoryOpen(openInfo, pDirectory, &rcGuest);
    34303430    if (RT_SUCCESS(vrc))
  • trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py

    r79132 r79133  
    12361236        cOthers  = 0;    # Other files.
    12371237
    1238         #
     1238        ##
     1239        ## @todo r=bird: Unlike fileOpen, directoryOpen will not fail if the directory does not exist.
     1240        ##       This is of course a bug in the implementation, as it is documented to return
     1241        ##       VBOX_E_OBJECT_NOT_FOUND or VBOX_E_IPRT_ERROR!
     1242        ##
     1243
    12391244        # Open the directory:
    1240         #
    1241         # Note! Unlike fileOpen, directoryOpen will not fail if the directory does not exist.
    1242         #       Looks like it won't do nothing till you read from it.
    1243         #
    12441245        #reporter.log2('Directory="%s", filter="%s", fFlags="%s"' % (sCurDir, sFilter, fFlags));
    12451246        try:
     
    12551256            except Exception as oXcpt:
    12561257                if vbox.ComError.notEqual(oXcpt, vbox.ComError.VBOX_E_OBJECT_NOT_FOUND):
     1258                    ##
     1259                    ## @todo r=bird: Change this to reporter.errorXcpt() once directoryOpen() starts
     1260                    ##       working the way it is documented.
     1261                    ##
    12571262                    reporter.maybeErrXcpt(fIsError, 'Error reading directory "%s":' % (sCurDir,)); # See above why 'maybe'.
    12581263                    fRc = False;
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