vbox的更動 62052 路徑 trunk/src/VBox/ValidationKit
- 時間撮記:
- 2016-7-6 下午12:41:01 (8 年 以前)
- 位置:
- trunk/src/VBox/ValidationKit/tests/storage
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/ValidationKit/tests/storage/storagecfg.py
r62037 r62052 117 117 fRc = True; 118 118 if sZPoolRaid is not None: 119 fRc = oExec.execBinary('zpool', ('create', sPool, sZPoolRaid,) + asDisks);119 fRc = oExec.execBinary('zpool', ('create', '-f', sPool, sZPoolRaid,) + tuple(asDisks)); 120 120 else: 121 121 fRc = False; … … 214 214 215 215 kdStorageCfgs = { 216 'testboxstor1 ': ('solaris', 'c[3-9]t*d0')216 'testboxstor1.de.oracle.com': ('solaris', 'c[3-9]t\dd0\Z') 217 217 }; 218 218 … … 315 315 316 316 # Find a name for the pool 317 sPool = 'pool' + s elf.iPoolId;317 sPool = 'pool' + str(self.iPoolId); 318 318 self.iPoolId += 1; 319 319 … … 359 359 sMountPoint = None; 360 360 if self.dPools.has_key(sPool): 361 sVol = 'vol' + s elf.iVolId;361 sVol = 'vol' + str(self.iVolId); 362 362 sMountPoint = self.oStorOs.getMntBase() + '/' + sVol; 363 363 self.iVolId += 1; … … 382 382 fRc = self.oStorOs.destroyVolume(self.oExec, sPool, sVol); 383 383 if fRc: 384 self.dVols.pop(s Vol);385 else: 386 fRc = False; 387 388 return fRc; 389 384 self.dVols.pop(sMountPoint); 385 else: 386 fRc = False; 387 388 return fRc; 389 -
trunk/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py
r62039 r62052 74 74 75 75 kdHostIoEngine = { 76 'solaris': 'solarisaio',77 'linux': 'libaio'76 'solaris': ('solarisaio', False), 77 'linux': ('libaio', True) 78 78 }; 79 79 … … 87 87 88 88 sTargetOs = self.dCfg.get('TargetOs', 'linux'); 89 sIoEngine = self.kdHostIoEngine.get(sTargetOs);89 sIoEngine, fDirectIo = self.kdHostIoEngine.get(sTargetOs); 90 90 if sIoEngine is None: 91 91 return False; … … 97 97 cfgBuf.write('iodepth=' + self.dCfg.get('QueueDepth', '32') + '\n'); 98 98 cfgBuf.write('size=' + self.dCfg.get('TestsetSize', '2g') + '\n'); 99 cfgBuf.write('direct=1\n'); 99 if fDirectIo: 100 cfgBuf.write('direct=1\n'); 101 else: 102 cfgBuf.write('direct=0\n'); 100 103 cfgBuf.write('directory=' + self.dCfg.get('FilePath', '/mnt') + '\n'); 101 104 … … 116 119 cfgBuf.write('stonewall\n'); 117 120 118 self.sCfgFileId = self.oExecutor.copyString(cfgBuf , 'aio-test', cMsTimeout);121 self.sCfgFileId = self.oExecutor.copyString(cfgBuf.getvalue(), 'aio-test', cMsTimeout); 119 122 return self.sCfgFileId is not None; 120 123 … … 157 160 self.sQueueDepth = dCfg.get('QueueDepth', '32'); 158 161 self.sFilePath = dCfg.get('FilePath', '/mnt/iozone'); 162 self.fDirectIo = True; 163 164 sTargetOs = dCfg.get('TargetOs'); 165 if sTargetOs == 'solaris': 166 self.fDirectIo = False; 159 167 160 168 def prepare(self, cMsTimeout = 30000): … … 165 173 def run(self, cMsTimeout = 30000): 166 174 """ Runs the testcase """ 167 fRc, sOutput = self.oExecutor.execBinary('iozone', ('-r', self.sRecordSize, '-s', self.sTestsetSize, \ 168 '-t', '1', '-T', '-I', \ 169 '-H', self.sQueueDepth,'-F', self.sFilePath)); 175 tupArgs = ('-r', self.sRecordSize, '-s', self.sTestsetSize, \ 176 '-t', '1', '-T', '-H', self.sQueueDepth, '-F', self.sFilePath + '/iozone.tmp'); 177 if self.fDirectIo: 178 tupArgs += ('-I',); 179 fRc, sOutput = self.oExecutor.execBinary('iozone', tupArgs); 170 180 if fRc: 171 181 self.sResult = sOutput; … … 389 399 # Create a basic pool with the default configuration. 390 400 oStorCfg = storagecfg.StorageCfg(oExecutor, socket.gethostname().lower()); 391 fRc, sPoolId = oStorCfg.createStoragePool( oExecutor);401 fRc, sPoolId = oStorCfg.createStoragePool(); 392 402 if fRc: 393 403 fRc, sMountpoint = oStorCfg.createVolume(sPoolId); 394 404 if fRc: 395 396 405 # Create a basic config 397 406 dCfg = { … … 424 433 reporter.testDone(); 425 434 else: 426 reporter.testFailure('Creating a storage poolon the target failed');435 reporter.testFailure('Creating a storage volume on the target failed'); 427 436 428 437 oStorCfg.cleanup(); 438 else: 439 reporter.testFailure('Creating a storage pool on the target failed'); 429 440 430 441 return fRc;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器