Changeset 78644 in vbox for trunk/src/VBox/ValidationKit/tests/additions/tdAddSharedFolders1.py
- Timestamp:
- May 22, 2019 12:29:14 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddSharedFolders1.py
r78642 r78644 3 3 4 4 """ 5 VirtualBox Validation Kit - Shared Folders 5 VirtualBox Validation Kit - Shared Folders #1. 6 6 """ 7 7 … … 43 43 from testdriver import reporter; 44 44 from testdriver import base; 45 from testdriver import vbox;46 from testdriver import vboxcon;47 from testdriver import vboxwrappers;48 45 from common import utils; 49 50 # Python 3 hacks:51 if sys.version_info[0] >= 3:52 long = int # pylint: disable=W0622,C010353 46 54 47 … … 104 97 # 105 98 sSharedFolder1 = os.path.join(self.oTstDrv.sScratchPath, 'shfl1'); 99 reporter.log2('Creating shared host folder "%s"...' % (sSharedFolder1,)); 106 100 if os.path.exists(sSharedFolder1): 107 101 try: shutil.rmtree(sSharedFolder1); … … 125 119 reporter.testStart('Automount'); 126 120 121 reporter.log2('Creating shared folder shfl1...'); 127 122 try: 128 123 oConsole = oSession.o.console; … … 137 132 while True: 138 133 fRc = oTxsSession.syncIsDir(sMountPoint1 + sGuestSlash + 'candle.dir'); 134 reporter.log2('candle.dir check -> %s' % (fRc,)); 139 135 if fRc is not False: 140 136 break; … … 142 138 reporter.error('Shared folder mounting timed out!'); 143 139 break; 144 oTstDrv.sleep(1);140 self.oTstDrv.sleep(1); 145 141 146 142 reporter.testDone(); 147 if fRc is not None:143 if fRc is not True: 148 144 return (False, oTxsSession); # skip the remainder if we cannot auto mount the folder. 149 145 … … 154 150 fSkip = 'fsperf' not in self.asTests; 155 151 if fSkip is False: 156 cMbFree = utils.getDiskUsage(sSharedFolders1); 157 if cMbFree < 16: 152 cMbFree = utils.getDiskUsage(sSharedFolder1); 153 if cMbFree >= 16: 154 reporter.log2('Free space: %u MBs' % (cMbFree,)); 155 else: 158 156 reporter.log('Skipping FsPerf because only %u MB free on %s' % (cMbFree, sSharedFolder1,)); 159 157 fSkip = True; 160 158 if fSkip is False: 161 asArgs = ['FsPerf', '-d', sMountPoint1 + sGuestSlash + 'fstestdir-1', ]; 162 if oTestVm.sGuestOsType in []: 163 asArgs.append('--no-mmap'); # Fails on older than win7 (CcCoherencyFlushAndPurgeCache). 164 fRc = oTstDrv.txsRunTest(oTxsSession, 'FsPerf', 10 * 60 * 1000, '${CDROM}/${OS/ARCH}/FsPerf${EXESUFF}', asArgs); 159 # Common arguments: 160 asArgs = ['FsPerf', '-d', sMountPoint1 + sGuestSlash + 'fstestdir-1', '-m200']; 161 162 # Skip mmap on older windows systems without CcCoherencyFlushAndPurgeCache (>= w7). 163 reporter.log2('oTestVm.sGuestOsType=%s' % (oTestVm.sGuestOsType,)); 164 if oTestVm.sGuestOsType in [ 'WindowsNT3x', 'WindowsNT4', 'Windows2000', 'WindowsXP', 'WindowsXP_64', 165 'Windows2003', 'Windows2003_64', 'WindowsVista', 'WindowsVista_64', 166 'Windows2008', 'Windows2008_64']: 167 asArgs.append('--no-mmap'); 168 169 # Configure I/O block sizes according to guest memory size: 170 cbMbRam = 128; 171 try: cbMbRam = oSession.o.machine.memorySize; 172 except: reporter.errorXcpt(); 173 reporter.log2('cbMbRam=%s' % (cbMbRam,)); 174 asArgs.append('--set-block-size=1'); 175 asArgs.append('--add-block-size=512'); 176 asArgs.append('--add-block-size=4096'); 177 asArgs.append('--add-block-size=16384'); 178 asArgs.append('--add-block-size=65536'); 179 asArgs.append('--add-block-size=1048576'); # 1 MiB 180 if cbMbRam >= 512: 181 asArgs.append('--add-block-size=33554432'); # 32 MiB 182 if cbMbRam >= 768: 183 asArgs.append('--add-block-size=134217728'); # 128 MiB 184 185 reporter.log2('Starting guest FsPerf (%s)...' % (asArgs,)); 186 fRc = self.oTstDrv.txsRunTest(oTxsSession, 'FsPerf', 10 * 60 * 1000, 187 '${CDROM}/vboxvalidationkit/${OS/ARCH}/FsPerf${EXESUFF}', asArgs); 188 reporter.log2('FsPerf -> %s' % (fRc,)); 165 189 166 190 sTestDir = os.path.join(sSharedFolder1, 'fstestdir-1');
Note:
See TracChangeset
for help on using the changeset viewer.