VirtualBox

Changeset 103545 in vbox


Ignore:
Timestamp:
Feb 23, 2024 11:48:53 AM (9 months ago)
Author:
vboxsync
Message:

storagecfg.py, fix _getActivePoolsStartingWith and _getActiveVolumesInPoolStartingWith, added more logging for cleanupLeftovers(), fixed typos

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/ValidationKitCodingGuidelines.cpp

    r98103 r103545  
    4848 *
    4949 * Type prefixes:
    50  *      - 'b' for byte (octect).
     50 *      - 'b' for byte (octet).
    5151 *      - 'ch' for a single character.
    5252 *      - 'f' for boolean and flags.
     
    6868 *
    6969 * Other qualifiers:
    70  *      - 'c' for a count. Implies integer or long integer type. Higest
     70 *      - 'c' for a count. Implies integer or long integer type. Highest
    7171 *        priority.
    7272 *      - 'sec' for a second value. Implies long integer type.
  • trunk/src/VBox/ValidationKit/tests/storage/storagecfg.py

    r103394 r103545  
    125125            asPools = sOutput.splitlines();
    126126            for sPool in asPools:
    127                 if sPool.startswith(sPoolIdStart):
    128                     # Extract the whole name and add it to the list.
    129                     asItems = sPool.split('\t');
    130                     lstPools.append(asItems[0]);
     127                oMatchResult = re.match("%s[0-9]?[0-9]?" % sPoolIdStart, sPool)  # either re.Match obj or None
     128                if oMatchResult:
     129                    lstPools.append(oMatchResult.group(0));
    131130        return lstPools;
    132131
     
    142141            asVolumes = sOutput.splitlines();
    143142            for sVolume in asVolumes:
    144                 if sVolume.startswith(sPool + '/' + sVolumeIdStart):
    145                     # Extract the whole name and add it to the list.
    146                     asItems = sVolume.split('\t');
    147                     lstVolumes.append(asItems[0]);
     143                oMatchResult = re.match("%s/%s" % (sPool, sVolumeIdStart), sVolume)  # either re.Match obj or None
     144                if oMatchResult:
     145                    lstVolumes.append(oMatchResult.group(0));
    148146        return lstVolumes;
    149147
     
    495493                self.lstDisks = oStorOs.getDisksMatchingRegExp(oDiskCfg.getDisks());
    496494            elif oDiskCfg.isCfgList():
    497                 # Assume a list of of disks and add.
     495                # Assume a list of disks and add.
    498496                for sDisk in oDiskCfg.getDisks():
    499497                    self.lstDisks.append(StorageDisk(sDisk));
     
    679677    def cleanupLeftovers(self):
    680678        """
    681         Tries to cleanup any leftover pools and volumes from a failed previous run.
     679        Tries to clean up any leftover pools and volumes from a failed previous run.
    682680        """
    683681        reporter.log('cleanupLeftovers starts');
     
    686684
    687685        fRc = True;
    688         if os.path.exists(self.oDiskCfg.getDisks()):
    689             for sEntry in os.listdir(self.oDiskCfg.getDisks()):
     686        asDisks = self.oDiskCfg.getDisks();
     687        reporter.log("oDiskCfg.getDisks: %s" % asDisks);
     688        if os.path.exists(asDisks):
     689            for sEntry in os.listdir(asDisks):
    690690                fRc = fRc and self.oExec.rmTree(os.path.join(self.oDiskCfg.getDisks(), sEntry));
    691691        reporter.log('cleanupLeftovers ends');
  • trunk/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py

    r103336 r103545  
    494494        'testboxstor1.de.oracle.com': (True, storagecfg.DiskCfg('solaris', storagecfg.g_ksDiskCfgRegExp, r'c[3-9]t\dd0\Z')),
    495495        # Windows testbox doesn't return testboxstor2.de.oracle.com from socket.getfqdn()
    496         'testboxstor2':               (False, storagecfg.DiskCfg('win',     storagecfg.g_ksDiskCfgStatic, 'D:\\StorageTest')),
     496        'testboxstor2':               (False, storagecfg.DiskCfg('win', storagecfg.g_ksDiskCfgStatic, 'D:/StorageTest')),
    497497
    498498        # Local test configs for the testcase developer
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