[PATCH] D154130: [lit] Avoid os.path.realpath on Windows due to MAX_PATH limitations

Joel E. Denny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 14 13:12:40 PDT 2023


jdenny added a comment.

In D154130#4502036 <https://reviews.llvm.org/D154130#4502036>, @MrTrillian wrote:

> In D154130#4487292 <https://reviews.llvm.org/D154130#4487292>, @jdenny wrote:
>
>> 3. Extend lit's own test suite to cover it.
>
> I submitted an update with your suggestions #1 and #2 but this #3 is much more difficult because of the nature of `%{t:real}`.

Thanks for doing that. I'll try to review more carefully soon, hopefully early next week.

> I'm not sure I can have a source/target path that includes symlinks in a way that allows me to test this, and even more so with substitute drives since we can't know which drive letters are unallocated.

Not being a windows person, it's hard for me to answer about substitute drives, but I understand your concern.

One possible approach is to verify the relationships among the various flavors of a substitution (e.g., `%t`, `%{t:real}`, etc.), and hope (or ensure) that some CI configs that run check-lit will use substitute drives for the source and/or build directory.  The tests should pass regardless.

A less desirable approach is just to do minimal sanity checks, such as checking that the base file name is the same across all flavors of a substitution.

Of course, the least desirable approach is to depend on other subprojects' test suites to catch lit bugs.  It's easier for lit developers to identify lit bugs when check-lit itself shows them, preferably locally but possibly in CI.

Thanks for taking a look at this.


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

https://reviews.llvm.org/D154130



More information about the cfe-commits mailing list