Changeset 65963 in vbox for trunk/src/VBox/ValidationKit/tests/storage
- Timestamp:
- Mar 7, 2017 10:30:26 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 113789
- Location:
- trunk/src/VBox/ValidationKit/tests/storage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/storage/remoteexecutor.py
r65747 r65963 101 101 if self.oTxsSession is not None: 102 102 return self.oTxsSession.syncIsFile(sFile); 103 else: 104 return os.path.isfile(sFile); 103 return os.path.isfile(sFile); 105 104 106 105 def _getBinaryPath(self, sBinary): -
trunk/src/VBox/ValidationKit/tests/storage/storagecfg.py
r65746 r65963 291 291 fRc = oExec.execBinaryNoStdOut('sfdisk', ('--no-reread', '--wipe', 'always', '-q', '-f', sDiskPath), sFdiskScript); 292 292 if fRc: 293 if sDiskPath.find('nvme') is not-1:293 if sDiskPath.find('nvme') != -1: 294 294 sBlkDev = sDiskPath + 'p1'; 295 295 else: -
trunk/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py
r65731 r65963 228 228 # Extract the value 229 229 idxValue = sLine.rfind('='); 230 if idxValue is-1:230 if idxValue == -1: 231 231 raise Exception('IozoneTest: Invalid state'); 232 232 … … 243 243 244 244 for sNeedle, sTestVal in self.lstTests: 245 if sLine.rfind(sNeedle) is not-1:245 if sLine.rfind(sNeedle) != -1: 246 246 reporter.testValue(sTestVal, sLine[idxValue:idxValueEnd], 247 247 constants.valueunit.g_asNames[constants.valueunit.KILOBYTES_PER_SEC]); … … 281 281 # Get the first non blacklisted test. 282 282 asTestCfg = self.getCurrentTestCfg(); 283 while len(asTestCfg) > 0and self.isTestCfgBlacklisted(asTestCfg):283 while asTestCfg and self.isTestCfgBlacklisted(asTestCfg): 284 284 asTestCfg = self.advanceTestCfg(); 285 285 … … 305 305 if fnTestFmt is not None: 306 306 return fnTestFmt(oCfg); 307 else: 308 return oCfg; 307 return oCfg; 309 308 310 309 def isTestCfgBlacklisted(self, asTestCfg): … … 375 374 376 375 asTestCfg = self.advanceTestCfg(); 377 while len(asTestCfg) > 0and self.isTestCfgBlacklisted(asTestCfg):376 while asTestCfg and self.isTestCfgBlacklisted(asTestCfg): 378 377 asTestCfg = self.advanceTestCfg(); 379 378 … … 381 380 # categories. 382 381 reporter.testDone(fSkippedLast); 383 if len(asTestCfg) > 0:382 if asTestCfg: 384 383 idxSame = 0; 385 384 while asTestCfgCur[idxSame] == asTestCfg[idxSame]: … … 832 831 if fHardDisk: 833 832 return ('ahci', False); 834 else: 835 return ('ahci', True); 836 elif eStorageCtrl == vboxcon.StorageControllerType_PIIX4: 833 return ('ahci', True); 834 if eStorageCtrl == vboxcon.StorageControllerType_PIIX4: 837 835 return ('piix3ide', False); 838 elif eStorageCtrl == vboxcon.StorageControllerType_LsiLogicSas:836 if eStorageCtrl == vboxcon.StorageControllerType_LsiLogicSas: 839 837 return ('lsilogicsas', True); 840 elif eStorageCtrl == vboxcon.StorageControllerType_LsiLogic:838 if eStorageCtrl == vboxcon.StorageControllerType_LsiLogic: 841 839 return ('lsilogicscsi', True); 842 elif eStorageCtrl == vboxcon.StorageControllerType_BusLogic:840 if eStorageCtrl == vboxcon.StorageControllerType_BusLogic: 843 841 return ('buslogic', True); 844 elif eStorageCtrl == vboxcon.StorageControllerType_NVMe:842 if eStorageCtrl == vboxcon.StorageControllerType_NVMe: 845 843 return ('nvme', False); 846 844 … … 854 852 # Check whether the disk variant is supported by the selected format. 855 853 asVariants = self.getDiskFormatVariantsForTesting(asTestCfg[self.kiDiskFmt], [ asTestCfg[self.kiDiskVar] ]); 856 if len(asVariants) == 0:854 if not asVariants: 857 855 return False; 858 856 859 857 # For iSCSI check whether we have targets configured. 860 if asTestCfg[self.kiDiskFmt] == 'iSCSI' and len(self.asIscsiTargets) == 0:858 if asTestCfg[self.kiDiskFmt] == 'iSCSI' and not self.asIscsiTargets: 861 859 return False; 862 860 … … 879 877 if cCpus == 1: 880 878 return '1 cpu'; 881 else: 882 return '%u cpus' % (cCpus); 879 return '%u cpus' % (cCpus); 883 880 884 881 def fnFormatVirtMode(self, sVirtMode): … … 1172 1169 fRc = True; 1173 1170 asTestCfg = oTstCfgMgr.getCurrentTestCfg(); 1174 while len(asTestCfg) > 0:1171 while asTestCfg: 1175 1172 fRc = self.testOneCfg(asTestCfg[self.kiVmName], self.getStorageCtrlFromName(asTestCfg[self.kiStorageCtrl]), \ 1176 1173 asTestCfg[self.kiHostIoCache], asTestCfg[self.kiDiskFmt], asTestCfg[self.kiDiskVar],
Note:
See TracChangeset
for help on using the changeset viewer.