Changeset 95786 in vbox for trunk/src/VBox/ValidationKit/tests
- Timestamp:
- Jul 22, 2022 10:14:40 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/api/tdTreeDepth1.py
r95779 r95786 78 78 assert oVM is not None 79 79 80 # create chain with 300disk images (medium tree depth limit)80 # create chain with up to 64 disk images (medium tree depth limit) 81 81 fRc = True 82 82 oSession = self.oTstDrv.openSession(oVM) 83 cImages = 38 #00 83 cImages = random.randrange(1, 64); 84 reporter.log('Creating chain with %d disk images' % (cImages)) 84 85 for i in range(1, cImages + 1): 85 86 sHddPath = os.path.join(self.oTstDrv.sScratchPath, 'Test' + str(i) + '.vdi') … … 121 122 reporter.log('API reports %i base images' % (cBaseImages)) 122 123 fRc = fRc and cBaseImages == 0 124 if cBaseImages != 0: 125 reporter.error('Got %d initial base images, expected %d' % (cBaseImages, 0)); 123 126 124 127 # re-register to test loading of settings … … 138 141 reporter.log('API reports %i base images' % (cBaseImages)) 139 142 fRc = fRc and cBaseImages == 0 140 141 assert fRc is True 143 if cBaseImages != 0: 144 reporter.error('Got %d base images after unregistering, expected %d' % (cBaseImages, 0)); 145 142 146 except: 143 147 reporter.errorXcpt() … … 163 167 fRc = fRc and oSession.saveSettings() 164 168 165 # take 250 snapshots (snapshot tree depth limit) 166 cSnapshots = 13 #00 169 # take up to 200 snapshots (255 is the snapshot tree depth limit) 170 cSnapshots = random.randrange(1, 200); ## @todo r=andy BUGBUG When specifying 254 here, it fails with object 251. 171 reporter.log('Taking %d snapshots' % (cSnapshots)) 167 172 for i in range(1, cSnapshots + 1): 168 173 fRc = fRc and oSession.takeSnapshot('Snapshot ' + str(i)) … … 171 176 reporter.log('API reports %i snapshots' % (oVM.snapshotCount)) 172 177 fRc = fRc and oVM.snapshotCount == cSnapshots 173 174 assert fRc is True178 if oVM.snapshotCount != cSnapshots: 179 reporter.error('Got %d initial snapshots, expected %d' % (oVM.snapshotCount, cSnapshots)); 175 180 176 181 # unregister, making sure the images are closed … … 197 202 reporter.log('API reports %i base images' % (cBaseImages)) 198 203 fRc = fRc and cBaseImages == 0 204 if cBaseImages != 0: 205 reporter.error('Got %d initial base images, expected %d' % (cBaseImages, 0)); 199 206 200 207 # re-register to test loading of settings … … 207 214 reporter.log('API reports %i snapshots' % (oVM.snapshotCount)) 208 215 fRc = fRc and oVM.snapshotCount == cSnapshots 216 if oVM.snapshotCount != cSnapshots: 217 reporter.error('Got %d snapshots after re-registering, expected %d' % (oVM.snapshotCount, cSnapshots)); 209 218 210 219 reporter.log('unregistering VM') … … 215 224 reporter.log('API reports %i base images' % (cBaseImages)) 216 225 fRc = fRc and cBaseImages == 0 217 218 assert fRc is True226 if cBaseImages != 0: 227 reporter.error('Got %d base images after unregistering, expected %d' % (cBaseImages, 0)); 219 228 except: 220 229 reporter.errorXcpt()
Note:
See TracChangeset
for help on using the changeset viewer.