[libcxx-commits] [PATCH] D101728: [libcxx] [test] Fix filesystem permission tests for windows

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 11 10:19:52 PDT 2021


mstorsjo added inline comments.


================
Comment at: libcxx/test/support/filesystem_test_helper.h:614
+      fs::perms::owner_write | fs::perms::group_write | fs::perms::others_write;
+  if ((P & Write) != fs::perms::none)
+    P |= Write;
----------------
Mordante wrote:
> Is it specified which of the 3 write flags Windows sets when a file isn't read-only? Or should it set all 3 of them?
I'm not sure if there's a spec somewhere; MSVC's STL sets all three in sync, and libc++ does the same. As we check whether our normalized expected flags are equal to what the implementation sets, this test will show if an implementation returns something else. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101728/new/

https://reviews.llvm.org/D101728



More information about the libcxx-commits mailing list