VirtualBox

Changeset 99462 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Apr 19, 2023 3:50:53 PM (22 months ago)
Author:
vboxsync
Message:

Validation Kit/Shared Folders: Fixes for really old Linux guests (coreutils location).

File:
1 edited

Legend:

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

    r98651 r99462  
    308308                    sCopyArgs       = ( sCopy, "/C", "copy", "/Y",  sFsPerfPath, sFsPerfPathTemp );
    309309                else:
    310                     sCopy           = oTestVm.pathJoin(self.oTstDrv.getGuestSystemDir(oTestVm), 'cp');
    311                     sCopyArgs       = ( sCopy, "-a", "-v", sFsPerfPath, sFsPerfPathTemp );
     310                    # Really old guests (like OL 6) have their coreutils in /bin instead of symlinking /bin to /usr/bin.
     311                    if self.oTstDrv.txsIsFile(oSession, oTxsSession, "/bin/cp", fIgnoreErrors = True):
     312                        sCopy = "/bin/cp";
     313                    else:
     314                        sCopy = oTestVm.pathJoin(self.oTstDrv.getGuestSystemDir(oTestVm), 'cp');
     315                    sCopyArgs = ( sCopy, "-a", "-v", sFsPerfPath, sFsPerfPathTemp );
    312316                fRc = self.oTstDrv.txsRunTest(oTxsSession, 'Copying FsPerf', 60 * 1000,
    313317                                              sCopy, sCopyArgs, fCheckSessionStatus = True);
     
    323327                if     not oTestVm.isWindows() \
    324328                   and not oTestVm.isOS2():
    325                     sCmdLs = oTestVm.pathJoin(self.oTstDrv.getGuestSystemDir(oTestVm), 'ls');
     329                    # Really old guests (like OL 6) have their coreutils in /bin instead of symlinking /bin to /usr/bin.
     330                    if self.oTstDrv.txsIsFile(oSession, oTxsSession, "/bin/ls", fIgnoreErrors = True):
     331                        sCmdLs = "/bin/ls";
     332                    else:
     333                        sCmdLs = oTestVm.pathJoin(self.oTstDrv.getGuestSystemDir(oTestVm), 'ls');
    326334                    oTxsSession.syncExec(sCmdLs, (sCmdLs, "-al", sFsPerfPath), fIgnoreErrors = True);
    327335                    oTxsSession.syncExec(sCmdLs, (sCmdLs, "-al", "-R", "/opt"), fIgnoreErrors = True);
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