Changeset 77467 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Feb 26, 2019 11:46:02 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
r77429 r77467 3087 3087 % (i, len(aBufRead), curTest.cbToReadWrite)); 3088 3088 fRc = False; 3089 if fRc \3090 and curRes.aBuf is not None \3091 and curRes.aBuf != aBufRead:3089 if fRc \ 3090 and curRes.aBuf is not None \ 3091 and curRes.aBuf != aBufRead: 3092 3092 reporter.error('Test #%d failed: Read back buffer (%d bytes) does not match ' \ 3093 'written content (%d bytes)' % (i, len(curRes.aBuf), len(aBufRead))); 3094 reporter.error('Test #%d failed: Got:\n%s' % (i, binascii.hexlify(aBufRead))); 3095 reporter.error('Test #%d failed: Expected:\n%s' % (i, binascii.hexlify(curRes.aBuf))); 3093 'written content (%d bytes)' % (i, len(aBufRead), len(aBufRead))); 3094 3095 curFile.close(); 3096 3097 # Download written file from guest. 3098 aGstFiles = []; 3099 aGstFiles.append(curTest.sFile.replace('\\', '/')); 3100 self.oTstDrv.txsDownloadFiles(oSession, oTxsSession, aGstFiles, fIgnoreErrors = True); 3101 3102 # Create file with buffer content on host. 3103 sHstFileName = os.path.join(self.oTstDrv.sScratchPath, ('testGuestCtrlWriteTest%d' % i)); 3104 try: 3105 oCurTestFile = open(sHstFileName, "wb"); 3106 oCurTestFile.write(aBufRead); 3107 oCurTestFile.close(); 3108 3109 reporter.addLogFile(sHstFileName, ('testGuestCtrlFileWrite/test%d' % i), 3110 'Buffer of testGuestCtrlFileWrite test #%d' % i); 3111 except: 3112 reporter.error('Test #%d failed: Unable to create temporary buffer file "%s"' \ 3113 % (i, sHstFileName)); 3096 3114 fRc = False; 3097 3115 # Test final offset. … … 3102 3120 % (i, curOffset, resOffset)); 3103 3121 fRc = False; 3104 curFile.close(); 3122 if curFile.status == vboxcon.FileStatus_Open: 3123 curFile.close(); 3105 3124 reporter.log("File '%s' closed" % curTest.sFile); 3106 3125 except:
Note:
See TracChangeset
for help on using the changeset viewer.