VirtualBox

Ignore:
Timestamp:
May 12, 2020 6:45:25 PM (5 years ago)
Author:
vboxsync
Message:

Validation Kit/tdAddSharedFolders1.py: Work around some oddities (build issue, bug?) wrt FsPerf not being executable on the combined .ISO created by fs/isomakercmd, by first copying the desired executable to the guest's temp first, make it executable and run from there.

File:
1 edited

Legend:

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

    r84266 r84278  
    281281            reporter.log2('Starting guest FsPerf (%s)...' % (asArgs,));
    282282            sFsPerfPath = self._locateGstFsPerf(oTxsSession);
    283             fRc = self.oTstDrv.txsRunTest(oTxsSession, 'FsPerf', 30 * 60 * 1000, sFsPerfPath, asArgs,
     283
     284            ## @todo For some odd reason the combined GA/VaKit .ISO (by IPRT/fs/isomakercmd)
     285            #        sometimes (?) contains FsPerf as non-executable (-r--r--r-- 1 root root) on Linux.
     286            #
     287            #        So work around this for now by copying the desired FsPerf binary to the temp directory,
     288            #        make it executable and execute it from there.
     289            fISOMakerCmdIsBuggy = oTestVm.isLinux();
     290            if fISOMakerCmdIsBuggy:
     291                if oTestVm.isWindows() \
     292                or oTestVm.isOS2():
     293                    sFsPerfPathTemp = "C:\\Temp\\";
     294                    sCopy           = "cmd.exe";
     295                    sCopyArgs       = ( "/C", "copy", "/Y" );
     296                else:
     297                    sFsPerfPathTemp = "/var/tmp/";
     298                    sCopy           = "cp";
     299                    sCopyArgs       = ( "-a", "-v" );
     300                sFsPerfPathTemp += "FsPerf${EXESUFF}";
     301                fRc = self.oTstDrv.txsRunTest(oTxsSession, 'Copying FsPerf', 60 * 1000,
     302                                              sCopy, ( sCopy, sCopyArgs, sFsPerfPath, sFsPerfPathTemp ),
     303                                              fCheckSessionStatus = True);
     304                fRc = fRc and oTxsSession.syncChMod(sFsPerfPathTemp, 0o755);
     305                if fRc:
     306                    sFsPerfPath = sFsPerfPathTemp;
     307
     308            fRc = self.oTstDrv.txsRunTest(oTxsSession, 'Running FsPerf', 30 * 60 * 1000, sFsPerfPath, asArgs,
    284309                                          fCheckSessionStatus = True);
    285310            reporter.log2('FsPerf -> %s' % (fRc,));
    286             fRc = True;
    287311            if fRc:
    288312                # Do a bit of diagnosis to find out why this failed.
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