DescriptionMake all the files mapped in when running base_unittests read only.
This means no file can be opened for write during the test run.
Make CopyFileUnsafe() reset the RO bit on Windows.
Add a tests that confirms the current CopyFile() behavior:
- On Windows, CopyFile() copies the ACL but now strips the READONLY bit.
- On OSX, CopyFile() copies the ACL.
- On anything else, ACL is not copied.
Rationale:
On anything-but-Windows, deleting a file require write access on the directory.
On Windows, deleting a file require not having the RO bit on the file.
CopyFile() affects the file but not the directory.
On isolated testing, the read only bit will be set on the file being copied,
causing the test to fail to delete the files.
This has wide implications in the unit tests. CopyFile() is mostly (but not
exclusively) used in unit tests.
R=thakis@chromium.org, vadimsh@chromium.org
BUG=116251
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244947
Patch Set 1 #Patch Set 2 : Fix CopyFile() on Windows #
Total comments: 4
Patch Set 3 : Add new unit test CopyFileACL #
Total comments: 1
Messages
Total messages: 13 (0 generated)
|