Changeset 77368 in vbox for trunk/src/VBox/ValidationKit/tests
- Timestamp:
- Feb 19, 2019 5:32:22 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128910
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
r77355 r77368 2615 2615 ]); 2616 2616 2617 if oTestVm.sVmName == "tst-xppro": 2618 aaTests.extend([ 2619 # Reading directories. 2620 [ tdTestDirRead(sUser = sUser, sPassword = sPassword, sDirectory = '../../Windows/Media'), 2621 tdTestResultDirRead(fRc = True, numFiles = 36) ], 2622 [ tdTestDirRead(sUser = sUser, sPassword = sPassword, sDirectory = 'c:\\Windows\\Help'), 2623 tdTestResultDirRead(fRc = True, numDirs = 13, numFiles = 569) ], 2624 [ tdTestDirRead(sUser = sUser, sPassword = sPassword, sDirectory = 'c:\\Windows\\Web'), 2625 tdTestResultDirRead(fRc = True, numDirs = 3, numFiles = 55) ] 2626 ]); 2627 2628 if oTestVm.sVmName == "tst-xpsp2": 2617 if oTestVm.sVmName.startswith('tst-xpsp2'): 2629 2618 aaTests.extend([ 2630 2619 # Reading directories. … … 2822 2811 2823 2812 # Some test VM specific tests. 2824 if oTestVm.sVmName == 'tst-xppro':2825 aoTests += [ tdTestSessionEx([ tdStepStatFileSize('c:\\Windows\\system32\\kernel32.dll', 9 26720), ]) ];2813 if oTestVm.sVmName.startswith('tst-xpsp2'): 2814 aoTests += [ tdTestSessionEx([ tdStepStatFileSize('c:\\Windows\\system32\\kernel32.dll', 983552), ]) ]; 2826 2815 2827 2816 # … … 2902 2891 ]); 2903 2892 2904 if oTestVm.sKind == "WindowsXP": 2905 aaTests.extend([ 2906 # Reading from beginning. 2907 [ tdTestFileReadWrite(sUser = sUser, sPassword = sPassword, sFile = 'C:\\Windows\\System32\\eula.txt', \ 2908 sOpenMode = 'r', sDisposition = 'oe', cbToReadWrite = 33), 2909 tdTestResultFileReadWrite(fRc = True, aBuf = 'Microsoft Windows XP Professional', \ 2910 cbProcessed = 33, cbOffset = 33) ], 2911 # Reading from offset. 2912 [ tdTestFileReadWrite(sUser = sUser, sPassword = sPassword, sFile = 'C:\\Windows\\System32\\eula.txt', \ 2913 sOpenMode = 'r', sDisposition = 'oe', cbOffset = 17782, cbToReadWrite = 26), 2914 tdTestResultFileReadWrite(fRc = True, aBuf = 'LINKS TO THIRD PARTY SITES', \ 2915 cbProcessed = 26, cbOffset = 17782 + 26) ] 2916 ]); 2893 # Note: tst-xppro has other contents in eula.txt. 2894 if oTestVm.sVmName.startswith('tst-xpsp2'): 2895 aaTests.extend([ 2896 # Reading from beginning. 2897 [ tdTestFileReadWrite(sUser = sUser, sPassword = sPassword, sFile = 'C:\\Windows\\System32\\eula.txt', 2898 sOpenMode = 'r', sDisposition = 'oe', cbToReadWrite = 33), 2899 tdTestResultFileReadWrite(fRc = True, aBuf = 'Microsoft(r) Windows(r) XP Profes', 2900 cbProcessed = 33, cbOffset = 33) ], 2901 # Reading from offset. 2902 [ tdTestFileReadWrite(sUser = sUser, sPassword = sPassword, sFile = 'C:\\Windows\\System32\\eula.txt', 2903 sOpenMode = 'r', sDisposition = 'oe', cbOffset = 17769, cbToReadWrite = 31), 2904 tdTestResultFileReadWrite(fRc = True, aBuf = 'only with the HARDWARE. If\x0d\x0a ', 2905 cbProcessed = 31, cbOffset = 17769 + 31) ] 2906 ]); 2917 2907 2918 2908 fRc = True; … … 2928 2918 break; 2929 2919 try: 2920 fRc2 = True; 2930 2921 if curTest.cbOffset > 0: # The offset parameter is gone. 2931 2922 if self.oTstDrv.fpApiVer >= 5.0: … … 2941 2932 reporter.error('Test #%d failed: Initial offset on open does not match: Got %d, expected %d' \ 2942 2933 % (i, curOffset, resOffset)); 2943 fRc = False;2934 fRc2 = False; 2944 2935 else: 2945 2936 if self.oTstDrv.fpApiVer >= 5.0: … … 2949 2940 curFile = curGuestSession.fileOpen(curTest.sFile, curTest.sOpenMode, curTest.sDisposition, \ 2950 2941 curTest.lCreationMode); 2951 if fRc \2942 if fRc2 \ 2952 2943 and curTest.cbToReadWrite > 0: 2953 2944 ## @todo Split this up in 64K reads. Later. … … 2958 2949 reporter.error('Test #%d failed: Read buffer length does not match: Got %d, expected %d' \ 2959 2950 % (i, len(aBufRead), curRes.cbProcessed)); 2960 fRc = False;2961 if fRc :2951 fRc2 = False; 2952 if fRc2: 2962 2953 if curRes.aBuf is not None \ 2963 2954 and bytes(curRes.aBuf) != bytes(aBufRead): 2964 reporter.error('Test #%d failed: Got buffer \n%s (%d bytes), expected\n%s(%d bytes)' \2965 % (i, map(hex, map(ord, aBufRead)), len(aBufRead), \2955 reporter.error('Test #%d failed: Got buffer:\n"%s" (%d bytes)\nExpected buffer:\n"%s" (%d bytes)' \ 2956 % (i, map(hex, map(ord, aBufRead)), len(aBufRead), 2966 2957 map(hex, map(ord, curRes.aBuf)), len(curRes.aBuf))); 2967 reporter.error('Test #%d failed: Got buffer \n%s, expected\n%s' \2958 reporter.error('Test #%d failed: Got buffer:\n"%s"\nExpected buffer:\n"%s"' \ 2968 2959 % (i, aBufRead, curRes.aBuf)); 2969 fRc = False;2960 fRc2 = False; 2970 2961 # Test final offset. 2971 2962 curOffset = long(curFile.offset); … … 2974 2965 reporter.error('Test #%d failed: Final offset does not match: Got %d, expected %d' \ 2975 2966 % (i, curOffset, resOffset)); 2967 fRc2 = False; 2968 curFile.close(); 2969 2970 if fRc2 != curRes.fRc: 2971 reporter.error('Test #%d failed: Got %s, expected %s' % (i, fRc2, curRes.fRc)); 2976 2972 fRc = False; 2977 curFile.close(); 2973 2978 2974 except: 2979 2975 reporter.logXcpt('Opening "%s" failed:' % (curTest.sFile,)); … … 2981 2977 2982 2978 curTest.closeSession(); 2983 2984 if fRc != curRes.fRc:2985 reporter.error('Test #%d failed: Got %s, expected %s' % (i, fRc, curRes.fRc));2986 fRc = False;2987 break;2988 2979 2989 2980 return (fRc, oTxsSession);
Note:
See TracChangeset
for help on using the changeset viewer.