VirtualBox

Ignore:
Timestamp:
Feb 15, 2024 2:46:48 PM (14 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161708
Message:

tests/storage, storagecfg.py: added logging for cleanupPoolsAndVolumes function

File:
1 edited

Legend:

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

    r103336 r103390  
    4242import os;
    4343import re;
     44from testdriver import reporter;
    4445
    4546
     
    206207        Destroys the given storage pool.
    207208        """
    208         fRc = oExec.execBinaryNoStdOut('zpool', ('destroy', sPool));
     209        fRc = oExec.execBinary('zpool', ('destroy', sPool));
    209210        return fRc;
    210211
     
    214215        parameters.
    215216        """
    216         fRc = True;
     217        reporter.log('cleanupPoolsAndVolumes starts')
     218        fRc = True
    217219        lstPools = self._getActivePoolsStartingWith(oExec, sPoolIdStart);
     220        reporter.log('lstPools: %s' % lstPools)
    218221        if lstPools is not None:
    219222            for sPool in lstPools:
    220223                lstVolumes = self._getActiveVolumesInPoolStartingWith(oExec, sPool, sVolIdStart);
     224                reporter.log('lstVolumes: %s' % lstVolumes)
    221225                if lstVolumes is not None:
    222226                    # Destroy all the volumes first
     227                    reporter.log('destroying volumes starts')
    223228                    for sVolume in lstVolumes:
    224                         fRc2 = oExec.execBinaryNoStdOut('zfs', ('destroy', sVolume));
     229                        fRc2 = oExec.execBinary('zfs', ('destroy', sVolume));
    225230                        if not fRc2:
    226                             fRc = fRc2;
     231                            fRc = fRc2
     232                    reporter.log('destroying volumes ends')
    227233
    228234                    # Destroy the pool
     235                    reporter.log('destroying pools starts')
    229236                    fRc2 = self.destroyPool(oExec, sPool);
     237                    reporter.log('destroying pools ends')
    230238                    if not fRc2:
    231239                        fRc = fRc2;
     
    234242        else:
    235243            fRc = False;
    236 
    237         return fRc;
     244        reporter.log('cleanupPoolsAndVolumes is finished')
     245        return fRc
    238246
    239247    def createRamDisk(self, oExec, cbRamDisk):
     
    673681        Tries to cleanup any leftover pools and volumes from a failed previous run.
    674682        """
     683        reporter.log('cleanupLeftovers starts')
    675684        if not self.oDiskCfg.isCfgStaticDir():
    676685            return self.oStorOs.cleanupPoolsAndVolumes(self.oExec, 'pool', 'vol');
     
    680689            for sEntry in os.listdir(self.oDiskCfg.getDisks()):
    681690                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.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette