[PATCH] D38015: [lit] Use inodes instead of realpaths in the config map

David L. Jones via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 20:03:58 PDT 2017


dlj added a comment.

I think the previous logic should have yielded a fairly stable identifier... do you have an example off-hand of a case that fails?

(i.e., I would have expected the call to os.path.realpath() to have done the moral equivalent of looking up a canonical path based on the inode, which normpath() alone won't do.)



================
Comment at: llvm/utils/lit/lit/discovery.py:51
         if config_map:
-            cfgpath = os.path.realpath(cfgpath)
-            cfgpath = os.path.normpath(cfgpath)
-            cfgpath = os.path.normcase(cfgpath)
-            target = config_map.get(cfgpath)
+            source_inode = os.stat(cfgpath)
+            target = config_map.get(source_inode)
----------------
.st_ino?


https://reviews.llvm.org/D38015





More information about the llvm-commits mailing list