Changeset 62039 in vbox for trunk/src/VBox/ValidationKit/tests/storage
- Timestamp:
- Jul 6, 2016 9:42:47 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py
r62036 r62039 45 45 # Validation Kit imports. 46 46 from common import constants; 47 from common import utils; 47 48 from testdriver import reporter; 48 49 from testdriver import base; … … 378 379 # 379 380 380 def test1Benchmark(self, s Benchmark, oTxsSession = None):381 def test1Benchmark(self, sTargetOs, sBenchmark, oTxsSession = None): 381 382 """ 382 383 Runs the given benchmark on the test host. … … 384 385 lstBinaryPaths = ['/bin', '/sbin', '/usr/bin', '/usr/sbin', \ 385 386 '/opt/csw/bin', '/usr/ccs/bin', '/usr/sfw/bin']; 386 387 387 oExecutor = remoteexecutor.RemoteExecutor(oTxsSession, lstBinaryPaths, self.sScratchPath); 388 oTst = None; 389 if sBenchmark == 'iozone': 390 oTst = IozoneTest(oExecutor); 391 elif sBenchmark == 'fio': 392 oTst = FioTest(oExecutor); # pylint: disable=R0204 393 394 if oTst is not None: 395 reporter.testStart(sBenchmark); 396 397 # Create a basic pool with the default configuration. 398 oStorCfg = storagecfg.StorageCfg(oExecutor, socket.gethostname().lower()); 399 fRc, sPoolId = oStorCfg.createStoragePool(oExecutor); 388 389 # Create a basic pool with the default configuration. 390 oStorCfg = storagecfg.StorageCfg(oExecutor, socket.gethostname().lower()); 391 fRc, sPoolId = oStorCfg.createStoragePool(oExecutor); 392 if fRc: 393 fRc, sMountpoint = oStorCfg.createVolume(sPoolId); 400 394 if fRc: 401 fRc, sMountpoint = oStorCfg.createVolume(sPoolId); 402 _ = sMountpoint; 403 if fRc: 404 oTst = IozoneTest(oExecutor); 395 396 # Create a basic config 397 dCfg = { 398 'RecordSize': '64k', 399 'TestsetSize': '20g', 400 'QueueDepth': '32', 401 'FilePath': sMountpoint, 402 'TargetOs': sTargetOs 403 }; 404 405 oTst = None; 406 if sBenchmark == 'iozone': 407 oTst = IozoneTest(oExecutor, dCfg); 408 elif sBenchmark == 'fio': 409 oTst = FioTest(oExecutor, dCfg); # pylint: disable=R0204 410 411 if oTst is not None: 412 reporter.testStart(sBenchmark); 405 413 fRc = oTst.prepare(); 406 414 if fRc: … … 414 422 415 423 oTst.cleanup(); 424 reporter.testDone(); 416 425 else: 417 426 reporter.testFailure('Creating a storage pool on the target failed'); 418 427 419 428 oStorCfg.cleanup(); 420 reporter.testDone(); 421 422 return fRc; 423 424 def test1Benchmarks(self, oTxsSession = None): 429 430 return fRc; 431 432 def test1Benchmarks(self, sTargetOs, oTxsSession = None): 425 433 """ 426 434 Runs all the configured benchmarks on the target. … … 428 436 reporter.testStart('Host'); 429 437 for sTest in self.asTests: 430 self.test1Benchmark(sT est, oTxsSession);438 self.test1Benchmark(sTargetOs, sTest, oTxsSession); 431 439 reporter.testDone(); 432 440 … … 439 447 fRc = True; 440 448 if self.fTestHost: 441 fRc = self.test1Benchmarks( )449 fRc = self.test1Benchmarks(utils.getHostOs()); 442 450 443 451 # Loop thru the test VMs.
Note:
See TracChangeset
for help on using the changeset viewer.