[libcxx-commits] [PATCH] D108326: [SystemZ][z/OS] Fix handling of dirs with filesystem tests
Muiez Ahmed via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 24 13:42:52 PDT 2021
muiez added inline comments.
================
Comment at: libcxx/test/support/filesystem_test_helper.h:145
+ // permission change for directories that do not have read permission.
+ std::string cmd = "find " + test_root.string() + " -exec chmod 777 {} \\;";
#else
----------------
ldionne wrote:
> Can we unconditionally make this change?
I tried the following test on macOS and find doesn't work for dir's with no permission, so restricting the change to z/OS could be the way to go.
```
// macOS
> mkdir -m 0 dir
> find dir -exec chmod 777 {} \;
find: dir: Permission denied
```
================
Comment at: libcxx/test/support/filesystem_test_helper.h:152
- cmd = "rm -r " + test_root.string();
+ cmd = "rm -rf " + test_root.string();
ret = std::system(cmd.c_str());
----------------
ldionne wrote:
> Why add `f`?
Attempting to remove read-only files on z/OS prompts a message asking for confirmation. The -f option is to delete read-only files immediately without asking for confirmation.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108326/new/
https://reviews.llvm.org/D108326
More information about the libcxx-commits
mailing list