8c3df05684565cf90b5adcb6a065861464fa729d |
|
24-Oct-2016 |
Shubham Ajmera <shubhamajmera@google.com> |
Add unit tests for sun.nio.fs.UnixSecureDirectoryStream Also, some constants(O_NOFOLLOW) in UnixConstants were not correct for arm64 and arm. They were generated on an x86 system. Therefore, instead of maintaining a separate set of UnixConstants, the values are now taken from android.system.OsConstants. S_IAMB are access mode bits, therefore, calculated by taking OR of all the read, write and execute permissions bits for owner, group and other. AT_SYMLINK_NOFOLLOW is used by fstatat when a symbolic link is passed. With AT_SYMLINK_NOLLOW, it doesn't dereference and instead return information about the link, and with it, returns the information about the target. There is no suitable alternative for the flag in android.system.OsConstant, therefore, left untouched. With AT_REMOVEDIR, unlinkat works equivalent to rmdir. Again there is no suitable alternative for the flag in android.system.OsConstant, therefore, left unchanged. Bug: 29031119 Bug: 32203242 Test: cts-tradefed run cts -m CtsLibcoreTestCases -t \ libcore.java.nio.file.DefaultSecureDirectoryStreamTest Change-Id: Ie7f8ce46d19e3549cc69dba4cb2a9717df1cca18
|