[PATCH] D58801: [Support] Implement is_local_impl with AIX mntctl

Miloš Stojanović via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 07:06:54 PDT 2019


mstojanovic added inline comments.


================
Comment at: llvm/trunk/unittests/Support/Path.cpp:1495
 
+TEST_F(FileSystemTest, is_local) {
+  bool TestDirectoryIsLocal;
----------------
mstojanovic wrote:
> hubert.reinterpretcast wrote:
> > mstojanovic wrote:
> > > This test fails if `/tmp` in on an nfs. I believe the original test was removed in rL297260 for the same reason.
> > This checks that a file and its containing directory are equally local or remote. If you are noticing a failure, then it seems the implementation of the query on your system may be reporting on the mountpoint instead of the mounted filesystem.
> The problem isn't in the actual test, it's in the cleanup process afterwards. The temp file isn't really deleted, only silly renamed into `.nfsXXXXX` and when the program tries to delete the `file-system-test-YYYYY` directory it outputs an error message: Directory not empty.
> The simplest way to reproduce this is to hard code the TestDirectory path to a directory created on an nfs.
Adding `::close(FD)` at the end seems to fix it.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D58801





More information about the llvm-commits mailing list