VirtualBox

Ignore:
Timestamp:
Mar 12, 2024 12:16:04 PM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162175
Message:

ValKit, storage test fix, cleanup function can remove files now as well, host storage test stage checks if directory exists

Location:
trunk/src/VBox/ValidationKit/tests/storage
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/storage/remoteexecutor.py

    r103587 r103806  
    309309        else:
    310310            try:
    311                 reporter.log("rmTree (%s) using shutil.rmtree function" % sDir);
    312                 shutil.rmtree(sDir);
     311                if os.path.isfile(sDir):
     312                    reporter.log("deleting file: %s" % sDir)
     313                    os.remove(sDir)
     314                else:
     315                    reporter.log("rmTree (%s) using shutil.rmtree function" % sDir);
     316                    shutil.rmtree(sDir);
    313317            except:
    314318                fRc = False;
  • trunk/src/VBox/ValidationKit/tests/storage/storagecfg.py

    r103576 r103806  
    224224        if lstPools is not None:
    225225            for sPool in lstPools:
     226                fRc2 = fRc3 = False  # flags for volumes and pools destruction results
    226227                lstVolumes = self._getActiveVolumesInPoolStartingWith(oExec, sPool, sVolIdStart);
    227228                reporter.log('lstVolumes: %s' % lstVolumes)
     
    231232                    for sVolume in lstVolumes:
    232233                        fRc2 = oExec.execBinary('zfs', ('destroy', sVolume));
    233                         if not fRc2:
    234                             fRc = fRc2
    235234                    reporter.log('destroying volumes ends');
    236235
    237                     # Destroy the pool
    238                     reporter.log('destroying pools starts');
    239                     fRc2 = self.destroyPool(oExec, sPool);
    240                     reporter.log('destroying pools ends');
    241                     if not fRc2:
    242                         fRc = fRc2;
    243                 else:
     236                # Destroy the pool
     237                reporter.log('destroying pools starts');
     238                fRc3 = self.destroyPool(oExec, sPool);
     239                reporter.log('destroying pools ends');
     240                if not (fRc2 or fRc3):
    244241                    fRc = False;
    245242        else:
  • trunk/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py

    r103545 r103806  
    14561456                        fMode = 0o777;
    14571457                        sDir  = os.path.join(sMountPoint, 'test');
    1458                         if self.oStorCfg.mkDirOnVolume(sMountPoint, 'test', fMode):
    1459                             sMountPoint = sDir;
     1458                        if os.path.exists(sDir) or self.oStorCfg.mkDirOnVolume(sMountPoint, 'test', fMode):
     1459                            sMountPoint = sDir
    14601460                        else:
    14611461                            reporter.error('Creating volume directory "%s" (mode %x) failed' % (sDir, fMode,));
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