Changeset 103390 in vbox for trunk/src/VBox/ValidationKit/tests
- Timestamp:
- Feb 15, 2024 2:46:48 PM (14 months ago)
- svn:sync-xref-src-repo-rev:
- 161708
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/storage/storagecfg.py
r103336 r103390 42 42 import os; 43 43 import re; 44 from testdriver import reporter; 44 45 45 46 … … 206 207 Destroys the given storage pool. 207 208 """ 208 fRc = oExec.execBinary NoStdOut('zpool', ('destroy', sPool));209 fRc = oExec.execBinary('zpool', ('destroy', sPool)); 209 210 return fRc; 210 211 … … 214 215 parameters. 215 216 """ 216 fRc = True; 217 reporter.log('cleanupPoolsAndVolumes starts') 218 fRc = True 217 219 lstPools = self._getActivePoolsStartingWith(oExec, sPoolIdStart); 220 reporter.log('lstPools: %s' % lstPools) 218 221 if lstPools is not None: 219 222 for sPool in lstPools: 220 223 lstVolumes = self._getActiveVolumesInPoolStartingWith(oExec, sPool, sVolIdStart); 224 reporter.log('lstVolumes: %s' % lstVolumes) 221 225 if lstVolumes is not None: 222 226 # Destroy all the volumes first 227 reporter.log('destroying volumes starts') 223 228 for sVolume in lstVolumes: 224 fRc2 = oExec.execBinary NoStdOut('zfs', ('destroy', sVolume));229 fRc2 = oExec.execBinary('zfs', ('destroy', sVolume)); 225 230 if not fRc2: 226 fRc = fRc2; 231 fRc = fRc2 232 reporter.log('destroying volumes ends') 227 233 228 234 # Destroy the pool 235 reporter.log('destroying pools starts') 229 236 fRc2 = self.destroyPool(oExec, sPool); 237 reporter.log('destroying pools ends') 230 238 if not fRc2: 231 239 fRc = fRc2; … … 234 242 else: 235 243 fRc = False; 236 237 return fRc ;244 reporter.log('cleanupPoolsAndVolumes is finished') 245 return fRc 238 246 239 247 def createRamDisk(self, oExec, cbRamDisk): … … 673 681 Tries to cleanup any leftover pools and volumes from a failed previous run. 674 682 """ 683 reporter.log('cleanupLeftovers starts') 675 684 if not self.oDiskCfg.isCfgStaticDir(): 676 685 return self.oStorOs.cleanupPoolsAndVolumes(self.oExec, 'pool', 'vol'); … … 680 689 for sEntry in os.listdir(self.oDiskCfg.getDisks()): 681 690 fRc = fRc and self.oExec.rmTree(os.path.join(self.oDiskCfg.getDisks(), sEntry)); 682 683 return fRc; 691 reporter.log('cleanupLeftovers ends') 692 return fRc;
Note:
See TracChangeset
for help on using the changeset viewer.