VirtualBox

Ignore:
Timestamp:
Apr 12, 2018 12:23:29 PM (7 years ago)
Author:
vboxsync
Message:

Guest Control/Main: More bugfixes for copyTo/copyFrom tasks, along with test cases.

File:
1 edited

Legend:

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

    r71828 r71847  
    33703370                                     sDst = sScratchHst + "/"),
    33713371                      tdTestResult(fRc = True) ],
    3372                     # Destination is a directory (should fail).
     3372                    # Destination is a directory (without a trailing slash, should also work).
    33733373                    # See "cp" syntax.
    33743374                    [ tdTestCopyFrom(sUser = sUser, sPassword = sPassword, sSrc = 'C:\\Windows\\system32\\ole32.dll',
    33753375                                     sDst = sScratchHst),
     3376                      tdTestResult(fRc = True) ],
     3377                    # Destination is a non-existing directory.
     3378                    [ tdTestCopyFrom(sUser = sUser, sPassword = sPassword, sSrc = 'C:\\Windows\\system32\\ole32.dll',
     3379                                     sDst = sScratchHst + "/non-existing-directory/"),
    33763380                      tdTestResult(fRc = False) ]
    33773381                ]);
     
    33843388                    # Copying entire directories (destination is "<sScratch>", which exists, which should fail).
    33853389                    [ tdTestCopyFrom(sUser = sUser, sPassword = sPassword, sSrc = 'C:\\Windows\\Web',
    3386                                     sDst = sScratchHst),
     3390                                     sDst = sScratchHst),
    33873391                      tdTestResult(fRc = False) ],
    3388                     # Copying entire directories (destination is "<sScratch>\Web").
    3389                     # Should fail, as the corresponding flag is missing.
     3392                    # Ditto, with trailing slash.
    33903393                    [ tdTestCopyFrom(sUser = sUser, sPassword = sPassword, sSrc = 'C:\\Windows\\Web',
    3391                                     sDst = sScratchHst + "/"),
     3394                                     sDst = sScratchHst + "/"),
    33923395                      tdTestResult(fRc = False) ],
    3393                     # Next try with correct flag being set.
     3396                    # Next try with the DirectoryCopyFlag_CopyIntoExisting flag being set.
    33943397                    [ tdTestCopyFrom(sUser = sUser, sPassword = sPassword, sSrc = 'C:\\Windows\\Web',
    3395                                     sDst = sScratchHst + "/", aFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting ]),
     3398                                     sDst = sScratchHst, aFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting ]),
    33963399                      tdTestResult(fRc = True) ],
    3397                     # Copying contents of directories (destination is "<sScratch>/").
     3400                    # Ditto, with trailing slash.
     3401                    [ tdTestCopyFrom(sUser = sUser, sPassword = sPassword, sSrc = 'C:\\Windows\\Web',
     3402                                     sDst = sScratchHst + "/", aFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting ]),
     3403                      tdTestResult(fRc = True) ],
     3404                    # Copying contents of directories into a non-existing directory chain on the host which fail.
    33983405                    [ tdTestCopyFrom(sUser = sUser, sPassword = sPassword, sSrc = 'C:\\Windows\\Web\\',
    3399                                     sDst = sScratchHst + "/", aFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting ]),
     3406                                     sDst = sScratchHst + "/not/existing/", aFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting ]),
     3407                      tdTestResult(fRc = False) ],
     3408                    # Copying contents of directories into a non-existing directory on the host, which should succeed.
     3409                    [ tdTestCopyFrom(sUser = sUser, sPassword = sPassword, sSrc = 'C:\\Windows\\Web\\',
     3410                                     sDst = sScratchHst + "/no-existing/", aFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting ]),
    34003411                      tdTestResult(fRc = True) ]
    34013412                ]);
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