- Timestamp:
- Jul 12, 2016 12:31:05 PM (9 years ago)
- Location:
- trunk/src/VBox/ValidationKit/tests/storage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/storage/remoteexecutor.py
r62181 r62190 152 152 oStdIn = StdInOutBuffer(sInput); 153 153 else: 154 oStdIn = '/dev/null'; 154 oStdIn = '/dev/null'; # pylint: disable=R0204 155 155 fRc = self.oTxsSession.syncExecEx(sExec, (sExec,) + asArgs, 156 156 oStdIn = oStdIn, oStdOut = oStdOut); -
trunk/src/VBox/ValidationKit/tests/storage/storagecfg.py
r62181 r62190 230 230 fRc, _ = oExec.execBinary('sfdisk', ('--no-reread', '--wipe', 'always', '-q', '-f', sDiskPath), sFdiskScript); 231 231 if fRc: 232 sBlkDev = sDiskPath + '1'; 232 if sDiskPath.find('nvme') is not -1: 233 sBlkDev = sDiskPath + 'p1'; 234 else: 235 sBlkDev = sDiskPath + '1'; 233 236 else: 234 237 if cbVol is None: -
trunk/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py
r62181 r62190 64 64 elif eControllerType == vboxcon.StorageControllerType_LsiLogic or eControllerType == vboxcon.StorageControllerType_BusLogic: 65 65 sType = "SCSI Controller"; 66 elif eControllerType == vboxcon.StorageControllerType_NVMe: 67 sType = "NVMe Controller"; 66 68 else: 67 69 sType = "Storage Controller"; … … 250 252 self.acCpusDef = [1, 2,] 251 253 self.acCpus = self.acCpusDef; 252 self.asStorageCtrlsDef = ['AHCI', 'IDE', 'LsiLogicSAS', 'LsiLogic', 'BusLogic' ];254 self.asStorageCtrlsDef = ['AHCI', 'IDE', 'LsiLogicSAS', 'LsiLogic', 'BusLogic', 'NVMe']; 253 255 self.asStorageCtrls = self.asStorageCtrlsDef; 254 256 self.asDiskFormatsDef = ['VDI', 'VMDK', 'VHD', 'QED', 'Parallels', 'QCOW', 'iSCSI']; … … 484 486 fRc = fRc and oSession.setStorageControllerType(eStorageController, _ControllerTypeToName(eStorageController)); 485 487 488 iDevice = 0; 489 if eStorageController == vboxcon.StorageControllerType_PIIX3 or \ 490 eStorageController == vboxcon.StorageControllerType_PIIX4: 491 iDevice = 1; # Master is for the OS. 492 486 493 if sDiskFormat == "iSCSI": 487 494 listNames = []; … … 505 512 if oSession.fpApiVer >= 4.0: 506 513 oSession.o.machine.attachDevice(_ControllerTypeToName(eStorageController), \ 507 1, 0, vboxcon.DeviceType_HardDisk, oHd);514 0, iDevice, vboxcon.DeviceType_HardDisk, oHd); 508 515 else: 509 516 oSession.o.machine.attachDevice(_ControllerTypeToName(eStorageController), \ 510 1, 0, vboxcon.DeviceType_HardDisk, oHd.id);517 0, iDevice, vboxcon.DeviceType_HardDisk, oHd.id); 511 518 except: 512 519 reporter.errorXcpt('attachDevice("%s",%s,%s,HardDisk,"%s") failed on "%s"' \ … … 517 524 else: 518 525 fRc = fRc and oSession.createAndAttachHd(sDiskPath, sDiskFormat, _ControllerTypeToName(eStorageController), \ 519 cb = 300*1024*1024*1024, iPort = 1, fImmutable = False); 526 cb = 300*1024*1024*1024, iPort = 0, iDevice = iDevice, \ 527 fImmutable = False); 520 528 fRc = fRc and oSession.enableVirtEx(fHwVirt); 521 529 fRc = fRc and oSession.enableNestedPaging(fNestedPaging); … … 540 548 lstBinaryPaths = ['/bin', '/sbin', '/usr/bin', '/usr/sbin' ]; 541 549 oExecVm = remoteexecutor.RemoteExecutor(oTxsSession, lstBinaryPaths, '${SCRATCH}'); 542 oStorCfgVm = storagecfg.StorageCfg(oExecVm, 'linux', [ '/dev/sdb' ]); 550 lstDisks = [ '/dev/sdb' ]; 551 # The naming scheme for NVMe is different. 552 if eStorageController == vboxcon.StorageControllerType_NVMe: 553 lstDisks = [ '/dev/nvme0n1' ]; 554 oStorCfgVm = storagecfg.StorageCfg(oExecVm, 'linux', lstDisks); 543 555 544 556 sMountPoint = self.prepareStorage(oStorCfgVm); … … 557 569 if oSession is not None: 558 570 try: 559 oSession.o.machine.detachDevice(_ControllerTypeToName(eStorageController), 1, 0);571 oSession.o.machine.detachDevice(_ControllerTypeToName(eStorageController), 0, iDevice); 560 572 561 573 # Remove storage controller if it is not an IDE controller. … … 596 608 elif sStorageCtrl == 'BusLogic': 597 609 eStorageCtrl = vboxcon.StorageControllerType_BusLogic; 610 elif sStorageCtrl == 'NVMe': 611 eStorageCtrl = vboxcon.StorageControllerType_NVMe; 598 612 else: 599 613 eStorageCtrl = None; … … 648 662 reporter.testDone(); 649 663 reporter.testDone(); 664 665 # Cleanup storage area 666 if sDiskFormat != 'iSCSI' and not self.fUseScratch: 667 self.cleanupStorage(self.oStorCfg); 668 650 669 reporter.testDone(); 651 670 reporter.testDone();
Note:
See TracChangeset
for help on using the changeset viewer.