Changeset 97586 in vbox for trunk/src/VBox/ValidationKit/tests/additions
- Timestamp:
- Nov 17, 2022 7:55:49 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
r97567 r97586 4744 4744 sScratchDstDir3Gst = oTestVm.pathJoin(sScratchGst, 'dstdir3'); 4745 4745 sScratchDstDir4Gst = oTestVm.pathJoin(sScratchGst, 'dstdir4'); 4746 sScratchDotDotDirGst = oTestVm.pathJoin(sScratchGst, '..'); 4746 4747 #sScratchGstNotExist = oTestVm.pathJoin(self.oTstDrv.getGuestTempDir(oTestVm), 'no-such-file-or-directory'); 4747 4748 sScratchHstNotExist = os.path.join(self.oTstDrv.sScratchPath, 'no-such-file-or-directory'); … … 4795 4796 except: 4796 4797 return reporter.errorXcpt('sEmptyFileHst=%s' % (sEmptyFileHst,)); 4798 4799 # os.path.join() is too clever for "..", so we just build up the path here ourselves. 4800 sScratchDotDotFileHst = sScratchHst + os.path.sep + '..' + os.path.sep + 'gctrl-empty.data'; 4797 4801 4798 4802 # … … 4926 4930 afFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting, ]), tdTestResultSuccess() ], 4927 4931 ]); 4932 # 4933 # Dotdot path handling. 4934 # 4935 if self.oTstDrv.fpApiVer >= 6.1: 4936 atTests.extend([ 4937 # Test if copying stuff from a host dotdot ".." directory works. 4938 [ tdTestCopyToFile(sSrc = sScratchDotDotFileHst, sDst = sScratchDstDir1Gst + oTestVm.pathSep()), 4939 tdTestResultSuccess() ], 4940 # Test if copying stuff from the host to a guest's dotdot ".." directory works. 4941 # That should fail on destinations. 4942 [ tdTestCopyToFile(sSrc = sEmptyFileHst, sDst = sScratchDotDotDirGst), tdTestResultFailure() ], 4943 ]); 4928 4944 4929 4945 fRc = True; … … 4967 4983 sScratchDstDir3Hst = os.path.join(sScratchHst, "dstdir3"); 4968 4984 sScratchDstDir4Hst = os.path.join(sScratchHst, "dstdir4"); 4985 # os.path.join() is too clever for "..", so we just build up the path here ourselves. 4986 sScratchDotDotDirHst = sScratchHst + os.path.sep + '..' + os.path.sep; 4969 4987 oExistingFileGst = self.oTestFiles.chooseRandomFile(); 4970 4988 oNonEmptyDirGst = self.oTestFiles.chooseRandomDirFromTree(fNonEmpty = True); … … 4980 4998 else: 4981 4999 sScratchHstInvalid = None; 5000 5001 sScratchDotDotDirGst = oTestVm.pathJoin(self.oTstDrv.getGuestTempDir(oTestVm), '..'); 4982 5002 4983 5003 if os.path.exists(sScratchHst): … … 5124 5144 afFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting, ]), tdTestResultSuccess() ], 5125 5145 ]); 5146 # 5147 # Dotdot path handling. 5148 # 5149 if self.oTstDrv.fpApiVer >= 6.1: 5150 atTests.extend([ 5151 # Test if copying stuff from a guest dotdot ".." directory works. 5152 [ tdTestCopyFromDir(sSrc = sScratchDotDotDirGst, sDst = sScratchDstDir1Hst + os.path.sep, 5153 afFlags = [ vboxcon.DirectoryCopyFlag_CopyIntoExisting, ]), 5154 tdTestResultFailure() ], 5155 # Test if copying stuff from the guest to a host's dotdot ".." directory works. 5156 # That should fail on destinations. 5157 [ tdTestCopyFromFile(oSrc = oExistingFileGst, sDst = sScratchDotDotDirHst), tdTestResultFailure() ], 5158 ]); 5126 5159 5127 5160 reporter.log2('Executing tests ...');
Note:
See TracChangeset
for help on using the changeset viewer.