VirtualBox

Changeset 79333 in vbox


Ignore:
Timestamp:
Jun 25, 2019 3:15:01 PM (6 years ago)
Author:
vboxsync
Message:

ValKit/tdAddGuestCtrl.py: Cleanups. bugref:9320

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py

    r79332 r79333  
    224224    Test for copying files from the guest to the host.
    225225    """
    226     def __init__(self, sSrc = "", sDst = "", oCreds = None, fFlags = None, oSrc = None):
     226    def __init__(self, sSrc = "", sDst = "", oCreds = None, afFlags = None, oSrc = None):
    227227        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
    228228        self.sSrc = sSrc;
    229229        self.sDst = sDst;
    230         self.fFlags = fFlags;
     230        self.afFlags = afFlags;
    231231        self.oSrc = oSrc  # type: testfileset.TestFsObj
    232232        if oSrc and not sSrc:
     
    235235class tdTestCopyFromDir(tdTestCopyFrom):
    236236
    237     def __init__(self, sSrc = "", sDst = "", oCreds = None, fFlags = None, oSrc = None, fIntoDst = False):
    238         tdTestCopyFrom.__init__(self, sSrc, sDst, oCreds, fFlags, oSrc);
     237    def __init__(self, sSrc = "", sDst = "", oCreds = None, afFlags = None, oSrc = None, fIntoDst = False):
     238        tdTestCopyFrom.__init__(self, sSrc, sDst, oCreds, afFlags, oSrc);
    239239        self.fIntoDst = fIntoDst; # hint to the verification code that sDst == oSrc, rather than sDst+oSrc.sNAme == oSrc.
    240240
     
    266266    Test for copying files from the host to the guest.
    267267    """
    268     def __init__(self, sSrc = "", sDst = "", oCreds = None, fFlags = None):
     268    def __init__(self, sSrc = "", sDst = "", oCreds = None, afFlags = None):
    269269        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
    270270        self.sSrc = sSrc;
    271271        self.sDst = sDst;
    272         self.fFlags = fFlags;
     272        self.afFlags = afFlags;
    273273
    274274class tdTestCopyToFile(tdTestCopyTo):
     
    282282    Test for directoryCreate call.
    283283    """
    284     def __init__(self, sDirectory = "", oCreds = None, fMode = 0, fFlags = None):
     284    def __init__(self, sDirectory = "", oCreds = None, fMode = 0, afFlags = None):
    285285        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
    286286        self.sDirectory = sDirectory;
    287287        self.fMode = fMode;
    288         self.fFlags = fFlags;
     288        self.afFlags = afFlags;
    289289
    290290class tdTestDirCreateTemp(tdTestGuestCtrlBase):
     
    303303    Test for the directoryOpen call.
    304304    """
    305     def __init__(self, sDirectory = "", oCreds = None, sFilter = "", fFlags = None):
     305    def __init__(self, sDirectory = "", oCreds = None, sFilter = "", afFlags = None):
    306306        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
    307307        self.sDirectory = sDirectory;
    308308        self.sFilter = sFilter;
    309         self.fFlags = fFlags or [];
     309        self.afFlags = afFlags or [];
    310310
    311311class tdTestDirRead(tdTestDirOpen):
     
    313313    Test for the opening, reading and closing a certain directory.
    314314    """
    315     def __init__(self, sDirectory = "", oCreds = None, sFilter = "", fFlags = None):
    316         tdTestDirOpen.__init__(self, sDirectory, oCreds, sFilter, fFlags);
     315    def __init__(self, sDirectory = "", oCreds = None, sFilter = "", afFlags = None):
     316        tdTestDirOpen.__init__(self, sDirectory, oCreds, sFilter, afFlags);
    317317
    318318class tdTestExec(tdTestGuestCtrlBase):
     
    321321    Has a default timeout of 5 minutes (for safety).
    322322    """
    323     def __init__(self, sCmd = "", asArgs = None, aEnv = None, fFlags = None,             # pylint: disable=too-many-arguments
     323    def __init__(self, sCmd = "", asArgs = None, aEnv = None, afFlags = None,             # pylint: disable=too-many-arguments
    324324                 timeoutMS = 5 * 60 * 1000, oCreds = None, fWaitForExit = True):
    325325        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
     
    327327        self.asArgs = asArgs if asArgs is not None else [sCmd,];
    328328        self.aEnv = aEnv;
    329         self.fFlags = fFlags or [];
     329        self.afFlags = afFlags or [];
    330330        self.timeoutMS = timeoutMS;
    331331        self.fWaitForExit = fWaitForExit;
     
    12901290    """
    12911291    Holds a guest process execution test result,
    1292     including the exit code, status + fFlags.
     1292    including the exit code, status + afFlags.
    12931293    """
    12941294    def __init__(self, fRc = False, uExitStatus = 500, iExitCode = 0, sBuf = None, cbBuf = 0, cbStdOut = None, cbStdErr = None):
     
    15551555        try:
    15561556            if self.oTstDrv.fpApiVer >= 5.0:
    1557                 oCurProgress = oGuestSession.fileCopyFromGuest(oTest.sSrc, oTest.sDst, oTest.fFlags);
     1557                oCurProgress = oGuestSession.fileCopyFromGuest(oTest.sSrc, oTest.sDst, oTest.afFlags);
    15581558            else:
    1559                 oCurProgress = oGuestSession.copyFrom(oTest.sSrc, oTest.sDst, oTest.fFlags);
     1559                oCurProgress = oGuestSession.copyFrom(oTest.sSrc, oTest.sDst, oTest.afFlags);
    15601560        except:
    15611561            reporter.maybeErrXcpt(fExpected, 'Copy from exception for sSrc="%s", sDst="%s":' % (oTest.sSrc, oTest.sDst,));
     
    16501650        reporter.log2('Copying guest dir "%s" to host "%s"' % (oTest.sSrc, oTest.sDst));
    16511651        try:
    1652             oCurProgress = oGuestSession.directoryCopyFromGuest(oTest.sSrc, oTest.sDst, oTest.fFlags);
     1652            oCurProgress = oGuestSession.directoryCopyFromGuest(oTest.sSrc, oTest.sDst, oTest.afFlags);
    16531653        except:
    16541654            reporter.maybeErrXcpt(fExpected, 'Copy dir from exception for sSrc="%s", sDst="%s":' % (oTest.sSrc, oTest.sDst,));
     
    16771677        return True;
    16781678
    1679     def gctrlCopyFileTo(self, oGuestSession, sSrc, sDst, fFlags, fIsError):
     1679    def gctrlCopyFileTo(self, oGuestSession, sSrc, sDst, afFlags, fIsError):
    16801680        """
    16811681        Helper function to copy a single file from the host to the guest.
    16821682        """
    1683         reporter.log2('Copying host file "%s" to guest "%s" (flags %s)' % (sSrc, sDst, fFlags));
     1683        reporter.log2('Copying host file "%s" to guest "%s" (flags %s)' % (sSrc, sDst, afFlags));
    16841684        try:
    16851685            if self.oTstDrv.fpApiVer >= 5.0:
    1686                 oCurProgress = oGuestSession.fileCopyToGuest(sSrc, sDst, fFlags);
     1686                oCurProgress = oGuestSession.fileCopyToGuest(sSrc, sDst, afFlags);
    16871687            else:
    1688                 oCurProgress = oGuestSession.copyTo(sSrc, sDst, fFlags);
     1688                oCurProgress = oGuestSession.copyTo(sSrc, sDst, afFlags);
    16891689        except:
    16901690            reporter.maybeErrXcpt(fIsError, 'sSrc=%s sDst=%s' % (sSrc, sDst,));
     
    17051705        return True;
    17061706
    1707     def gctrlCopyDirTo(self, oGuestSession, sSrc, sDst, fFlags, fIsError):
     1707    def gctrlCopyDirTo(self, oGuestSession, sSrc, sDst, afFlags, fIsError):
    17081708        """
    17091709        Helper function to copy a directory tree from the host to the guest.
    17101710        """
    1711         reporter.log2('Copying host directory "%s" to guest "%s" (flags %s)' % (sSrc, sDst, fFlags));
     1711        reporter.log2('Copying host directory "%s" to guest "%s" (flags %s)' % (sSrc, sDst, afFlags));
    17121712        try:
    1713             oCurProgress = oGuestSession.directoryCopyToGuest(sSrc, sDst, fFlags);
     1713            oCurProgress = oGuestSession.directoryCopyToGuest(sSrc, sDst, afFlags);
    17141714        except:
    17151715            reporter.maybeErrXcpt(fIsError, 'sSrc=%s sDst=%s' % (sSrc, sDst,));
     
    17361736        reporter.log2('Creating directory "%s"' % (oTest.sDirectory,));
    17371737        try:
    1738             oGuestSession.directoryCreate(oTest.sDirectory, oTest.fMode, oTest.fFlags);
     1738            oGuestSession.directoryCreate(oTest.sDirectory, oTest.fMode, oTest.afFlags);
    17391739        except:
    1740             reporter.maybeErrXcpt(oRes.fRc, 'Failed to create "%s" fMode=%o fFlags=%s'
    1741                                   % (oTest.sDirectory, oTest.fMode, oTest.fFlags,));
     1740            reporter.maybeErrXcpt(oRes.fRc, 'Failed to create "%s" fMode=%o afFlags=%s'
     1741                                  % (oTest.sDirectory, oTest.fMode, oTest.afFlags,));
    17421742            return not oRes.fRc;
    17431743        if oRes.fRc is not True:
     
    17631763        sDir     = oTest.sDirectory;
    17641764        sFilter  = oTest.sFilter;
    1765         fFlags   = oTest.fFlags;
     1765        afFlags  = oTest.afFlags;
    17661766        oTestVm  = oTest.oCreds.oTestVm;
    17671767        sCurDir  = oTestVm.pathJoin(sDir, sSubDir) if sSubDir else sDir;
     
    17791779
    17801780        # Open the directory:
    1781         #reporter.log2('Directory="%s", filter="%s", fFlags="%s"' % (sCurDir, sFilter, fFlags));
     1781        #reporter.log2('Directory="%s", filter="%s", afFlags="%s"' % (sCurDir, sFilter, afFlags));
    17821782        try:
    1783             oCurDir = oGuestSession.directoryOpen(sCurDir, sFilter, fFlags);
     1783            oCurDir = oGuestSession.directoryOpen(sCurDir, sFilter, afFlags);
    17841784        except:
    1785             reporter.maybeErrXcpt(fIsError, 'sCurDir=%s sFilter=%s fFlags=%s' % (sCurDir, sFilter, fFlags,))
     1785            reporter.maybeErrXcpt(fIsError, 'sCurDir=%s sFilter=%s afFlags=%s' % (sCurDir, sFilter, afFlags,))
    17861786            return (False, 0, 0, 0);
    17871787
     
    20112011        # Start the process:
    20122012        #
    2013         reporter.log2('Executing sCmd=%s, fFlags=%s, timeoutMS=%d, asArgs=%s, asEnv=%s'
    2014                       % (oTest.sCmd, oTest.fFlags, oTest.timeoutMS, oTest.asArgs, oTest.aEnv,));
     2013        reporter.log2('Executing sCmd=%s, afFlags=%s, timeoutMS=%d, asArgs=%s, asEnv=%s'
     2014                      % (oTest.sCmd, oTest.afFlags, oTest.timeoutMS, oTest.asArgs, oTest.aEnv,));
    20152015        try:
    20162016            oProcess = oGuestSession.processCreate(oTest.sCmd,
    20172017                                                   oTest.asArgs if self.oTstDrv.fpApiVer >= 5.0 else oTest.asArgs[1:],
    2018                                                    oTest.aEnv, oTest.fFlags, oTest.timeoutMS);
     2018                                                   oTest.aEnv, oTest.afFlags, oTest.timeoutMS);
    20192019        except:
    20202020            reporter.maybeErrXcpt(fIsError, 'asArgs=%s' % (oTest.asArgs,));
     
    20532053                    # What to wait for:
    20542054                    aeWaitFor = [ vboxcon.ProcessWaitForFlag_Terminate, ];
    2055                     if vboxcon.ProcessCreateFlag_WaitForStdOut in oTest.fFlags:
     2055                    if vboxcon.ProcessCreateFlag_WaitForStdOut in oTest.afFlags:
    20562056                        aeWaitFor.append(vboxcon.ProcessWaitForFlag_StdOut);
    2057                     if vboxcon.ProcessCreateFlag_WaitForStdErr in oTest.fFlags:
     2057                    if vboxcon.ProcessCreateFlag_WaitForStdErr in oTest.afFlags:
    20582058                        aeWaitFor.append(vboxcon.ProcessWaitForFlag_StdErr);
    20592059                    ## @todo Add vboxcon.ProcessWaitForFlag_StdIn.
     
    27212721                #   tdTestResultExec(fRc = True, iExitCode = 1) ]
    27222722                # [ tdTestExec(sCmd = sImageOut, asArgs = [ sImageOut, '/C', 'set', 'windir' ],
    2723                 #              fFlags = [ vboxcon.ProcessCreateFlag_WaitForStdOut, vboxcon.ProcessCreateFlag_WaitForStdErr ]),
     2723                #              afFlags = [ vboxcon.ProcessCreateFlag_WaitForStdOut, vboxcon.ProcessCreateFlag_WaitForStdErr ]),
    27242724                #   tdTestResultExec(fRc = True, sBuf = 'windir=C:\\WINDOWS\r\n') ],
    27252725                # [ tdTestExec(sCmd = sImageOut, asArgs = [ sImageOut, '/C', 'set', 'TEST_FOO' ],
    27262726                #              aEnv = [ 'TEST_FOO=BAR' ],
    2727                 #              fFlags = [ vboxcon.ProcessCreateFlag_WaitForStdOut, vboxcon.ProcessCreateFlag_WaitForStdErr ]),
     2727                #              afFlags = [ vboxcon.ProcessCreateFlag_WaitForStdOut, vboxcon.ProcessCreateFlag_WaitForStdErr ]),
    27282728                #   tdTestResultExec(fRc = True, sBuf = 'TEST_FOO=BAR\r\n') ],
    27292729                # [ tdTestExec(sCmd = sImageOut, asArgs = [ sImageOut, '/C', 'set', 'TEST_FOO' ],
    27302730                #              aEnv = [ 'TEST_FOO=BAR', 'TEST_BAZ=BAR' ],
    2731                 #              fFlags = [ vboxcon.ProcessCreateFlag_WaitForStdOut, vboxcon.ProcessCreateFlag_WaitForStdErr ]),
     2731                #              afFlags = [ vboxcon.ProcessCreateFlag_WaitForStdOut, vboxcon.ProcessCreateFlag_WaitForStdErr ]),
    27322732                #   tdTestResultExec(fRc = True, sBuf = 'TEST_FOO=BAR\r\n') ]
    27332733
     
    27712771                # [ tdTestExec(sCmd = sImageOut, asArgs = [ sImageOut, '/C', 'set', 'windir' ],
    27722772                #
    2773                 #              fFlags = [ vboxcon.ProcessCreateFlag_WaitForStdOut, vboxcon.ProcessCreateFlag_WaitForStdErr ]),
     2773                #              afFlags = [ vboxcon.ProcessCreateFlag_WaitForStdOut, vboxcon.ProcessCreateFlag_WaitForStdErr ]),
    27742774                #   tdTestResultExec(fRc = True, sBuf = 'windir=C:\\WINDOWS\r\n') ],
    27752775                # [ tdTestExec(sCmd = sImageOut, asArgs = [ sImageOut, '/C', 'set', 'TEST_FOO' ],
    27762776                #              aEnv = [ 'TEST_FOO=BAR' ],
    2777                 #              fFlags = [ vboxcon.ProcessCreateFlag_WaitForStdOut, vboxcon.ProcessCreateFlag_WaitForStdErr ]),
     2777                #              afFlags = [ vboxcon.ProcessCreateFlag_WaitForStdOut, vboxcon.ProcessCreateFlag_WaitForStdErr ]),
    27782778                #   tdTestResultExec(fRc = True, sBuf = 'TEST_FOO=BAR\r\n') ],
    27792779                # [ tdTestExec(sCmd = sImageOut, asArgs = [ sImageOut, '/C', 'set', 'TEST_FOO' ],
    27802780                #              aEnv = [ 'TEST_FOO=BAR', 'TEST_BAZ=BAR' ],
    2781                 #              fFlags = [ vboxcon.ProcessCreateFlag_WaitForStdOut, vboxcon.ProcessCreateFlag_WaitForStdErr ]),
     2781                #              afFlags = [ vboxcon.ProcessCreateFlag_WaitForStdOut, vboxcon.ProcessCreateFlag_WaitForStdErr ]),
    27822782                #   tdTestResultExec(fRc = True, sBuf = 'TEST_FOO=BAR\r\n') ]
    27832783
     
    29552955        sImage = self.getGuestSystemShell(oTestVm);
    29562956        asArgs  = [ sImage, ];
    2957         aEnv   = [];
    2958         fFlags = [];
     2957        aEnv    = [];
     2958        afFlags = [];
    29592959        try:
    29602960            oGuestProcess = oGuestSession.processCreate(sImage,
    2961                                                         asArgs if self.oTstDrv.fpApiVer >= 5.0 else asArgs[1:], aEnv, fFlags,
     2961                                                        asArgs if self.oTstDrv.fpApiVer >= 5.0 else asArgs[1:], aEnv, afFlags,
    29622962                                                        30 * 1000);
    29632963        except:
     
    31843184            [ tdTestDirCreate(sDirectory = sScratch ), tdTestResultSuccess() ],
    31853185            [ tdTestDirCreate(sDirectory = oTestVm.pathJoin(sScratch, 'foo', 'bar', 'baz'),
    3186                               fFlags = (vboxcon.DirectoryCreateFlag_Parents,) ), tdTestResultSuccess() ],
     3186                              afFlags = (vboxcon.DirectoryCreateFlag_Parents,) ), tdTestResultSuccess() ],
    31873187            [ tdTestDirCreate(sDirectory = oTestVm.pathJoin(sScratch, 'foo', 'bar', 'baz'),
    3188                               fFlags = (vboxcon.DirectoryCreateFlag_Parents,) ), tdTestResultSuccess() ],
     3188                              afFlags = (vboxcon.DirectoryCreateFlag_Parents,) ), tdTestResultSuccess() ],
    31893189            # Long random names.
    31903190            [ tdTestDirCreate(sDirectory = oTestVm.pathJoin(sScratch, self.oTestFiles.generateFilenameEx(36, 28))),
     
    33123312            # Invalid stuff.
    33133313            [ tdTestDirRead(sDirectory = ''), tdTestResultDirRead() ],
    3314             [ tdTestDirRead(sDirectory = sSystemDir, fFlags = [ 1234 ]), tdTestResultDirRead() ],
     3314            [ tdTestDirRead(sDirectory = sSystemDir, afFlags = [ 1234 ]), tdTestResultDirRead() ],
    33153315            [ tdTestDirRead(sDirectory = sSystemDir, sFilter = '*.foo'), tdTestResultDirRead() ],
    33163316            # Non-existing stuff.
     
    43734373                ## @todo Apparently Main doesn't check the flags, so the first test succeeds.
    43744374                # Both given, but invalid flags.
    4375                 [ tdTestCopyToFile(sSrc = sBigFileHst, sDst = sScratchGst, fFlags = [ 0x40000000] ), tdTestResultFailure() ],
    4376                 [ tdTestCopyToDir( sSrc = sScratchEmptyDirHst, sDst = sScratchGst, fFlags = [ 0x40000000] ),
     4375                [ tdTestCopyToFile(sSrc = sBigFileHst, sDst = sScratchGst, afFlags = [ 0x40000000] ), tdTestResultFailure() ],
     4376                [ tdTestCopyToDir( sSrc = sScratchEmptyDirHst, sDst = sScratchGst, afFlags = [ 0x40000000] ),
    43774377                  tdTestResultFailure() ],
    43784378            ]);
     
    44454445                [ tdTestCopyToDir(sSrc = sScratchEmptyDirHst, sDst = sScratchDstDir1Gst),   tdTestResultFailure() ],
    44464446                [ tdTestCopyToDir(sSrc = sScratchEmptyDirHst, sDst = sScratchDstDir1Gst,
    4447                                  fFlags = [vboxcon.DirectoryCopyFlag_CopyIntoExisting]),    tdTestResultSuccess() ],
     4447                                 afFlags = [vboxcon.DirectoryCopyFlag_CopyIntoExisting]),    tdTestResultSuccess() ],
    44484448                # Try again with trailing slash, should yield the same result:
    44494449                [ tdTestCopyToDir(sSrc = sScratchEmptyDirHst, sDst = sScratchDstDir2Gst + oTestVm.pathSep()),
     
    44524452                  tdTestResultFailure() ],
    44534453                [ tdTestCopyToDir(sSrc = sScratchEmptyDirHst, sDst = sScratchDstDir2Gst + oTestVm.pathSep(),
    4454                                   fFlags = [vboxcon.DirectoryCopyFlag_CopyIntoExisting]),
     4454                                  afFlags = [vboxcon.DirectoryCopyFlag_CopyIntoExisting]),
    44554455                  tdTestResultSuccess() ],
    44564456            ]);
     
    44694469                atTests.extend([
    44704470                    [ tdTestCopyToDir(sSrc = sScratchNonEmptyDirHst, sDst = sScratchDstDir3Gst,
    4471                                       fFlags = [vboxcon.DirectoryCopyFlag_CopyIntoExisting]),   tdTestResultSuccess() ],
     4471                                      afFlags = [vboxcon.DirectoryCopyFlag_CopyIntoExisting]),   tdTestResultSuccess() ],
    44724472                ]);
    44734473            atTests.extend([
     
    44824482            oCurTest = tTest[0]; # tdTestCopyTo
    44834483            oCurRes  = tTest[1]; # tdTestResult
    4484             reporter.log('Testing #%d, sSrc=%s, sDst=%s, fFlags=%s ...' % (i, oCurTest.sSrc, oCurTest.sDst, oCurTest.fFlags));
     4484            reporter.log('Testing #%d, sSrc=%s, sDst=%s, afFlags=%s ...' % (i, oCurTest.sSrc, oCurTest.sDst, oCurTest.afFlags));
    44854485
    44864486            oCurTest.setEnvironment(oSession, oTxsSession, oTestVm);
     
    44924492            fRc2 = False;
    44934493            if isinstance(oCurTest, tdTestCopyToFile):
    4494                 fRc2 = self.gctrlCopyFileTo(oCurGuestSession, oCurTest.sSrc, oCurTest.sDst, oCurTest.fFlags, oCurRes.fRc);
     4494                fRc2 = self.gctrlCopyFileTo(oCurGuestSession, oCurTest.sSrc, oCurTest.sDst, oCurTest.afFlags, oCurRes.fRc);
    44954495            else:
    4496                 fRc2 = self.gctrlCopyDirTo(oCurGuestSession, oCurTest.sSrc, oCurTest.sDst, oCurTest.fFlags, oCurRes.fRc);
     4496                fRc2 = self.gctrlCopyDirTo(oCurGuestSession, oCurTest.sSrc, oCurTest.sDst, oCurTest.afFlags, oCurRes.fRc);
    44974497            if fRc2 is not oCurRes.fRc:
    44984498                fRc = reporter.error('Test #%d failed: Got %s, expected %s' % (i, fRc2, oCurRes.fRc));
     
    45594559            ##
    45604560            ## Invalid flags:
    4561             #[ tdTestCopyFromFile(oSrc = oExistingFileGst, sDst = os.path.join(sScratchHst, 'somefile'), fFlags = [ 0x40000000] ),
     4561            #[ tdTestCopyFromFile(oSrc = oExistingFileGst, sDst = os.path.join(sScratchHst, 'somefile'), afFlags = [0x40000000]),
    45624562            #  tdTestResultFailure() ],
    4563             #[ tdTestCopyFromDir( oSrc = oEmptyDirGst, sDst = os.path.join(sScratchHst, 'somedir'),  fFlags = [ 0x40000000] ),
     4563            #[ tdTestCopyFromDir( oSrc = oEmptyDirGst, sDst = os.path.join(sScratchHst, 'somedir'),  afFlags = [ 0x40000000] ),
    45644564            #  tdTestResultFailure() ],
    45654565            # Non-existing sources:
     
    46294629                # Add the DirectoryCopyFlag_CopyIntoExisting flag being set and it should work.
    46304630                [ tdTestCopyFromDir(oSrc = oEmptyDirGst, sDst = sScratchDstDir1Hst,
    4631                                     fFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting, ]), tdTestResultSuccess() ],
     4631                                    afFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting, ]), tdTestResultSuccess() ],
    46324632                # Try again with trailing slash, should yield the same result:
    46334633                [ tdTestRemoveHostDir(os.path.join(sScratchDstDir1Hst, 'empty')), tdTestResult() ],
     
    46374637                  tdTestResultFailure() ],
    46384638                [ tdTestCopyFromDir(oSrc = oEmptyDirGst, sDst = sScratchDstDir1Hst + os.path.sep,
    4639                                     fFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting, ]), tdTestResultSuccess() ],
     4639                                    afFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting, ]), tdTestResultSuccess() ],
    46404640                # Copy with a different destination name just for the heck of it:
    46414641                [ tdTestCopyFromDir(oSrc = oEmptyDirGst, sDst = os.path.join(sScratchHst, 'empty2'), fIntoDst = True),
     
    46454645                [ tdTestCopyFromDir(oSrc = oNonEmptyDirGst, sDst = sScratchDstDir2Hst), tdTestResultFailure() ],
    46464646                [ tdTestCopyFromDir(oSrc = oNonEmptyDirGst, sDst = sScratchDstDir2Hst,
    4647                                     fFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting, ]), tdTestResultSuccess() ],
     4647                                    afFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting, ]), tdTestResultSuccess() ],
    46484648                # Copy the entire test tree:
    46494649                [ tdTestCopyFromDir(sSrc = self.oTestFiles.oTreeDir.sPath, sDst = sScratchDstDir3Hst), tdTestResultSuccess() ],
     
    46584658            oCurRes  = tTest[1] # type: tdTestResult
    46594659            if isinstance(oCurTest, tdTestCopyFrom):
    4660                 reporter.log('Testing #%d, %s: sSrc="%s", sDst="%s", fFlags="%s" ...'
     4660                reporter.log('Testing #%d, %s: sSrc="%s", sDst="%s", afFlags="%s" ...'
    46614661                             % (i, "directory" if isinstance(oCurTest, tdTestCopyFromDir) else "file",
    4662                                 oCurTest.sSrc, oCurTest.sDst, oCurTest.fFlags,));
     4662                                oCurTest.sSrc, oCurTest.sDst, oCurTest.afFlags,));
    46634663            else:
    46644664                reporter.log('Testing #%d, tdTestRemoveHostDir "%s"  ...' % (i, oCurTest.sDir,));
     
    46834683                if fRc2 != oCurRes.fRc:
    46844684                    fRc = reporter.error('Test #%d failed: Got %s, expected %s' % (i, fRc2, oCurRes.fRc));
    4685                     fRc2 = False;
    46864685
    46874686                fRc = oCurTest.closeSession() and fRc;
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