On Tue, 29 Aug 2023 00:16:46 GMT, Erik Joelsson <er...@openjdk.org> wrote:
> On Windows, when a directory exists in the "unix" root with the same name as > a directory in the "test" dir, fixpath will corrupt test arguments to jtreg > (and possibly other arguments as well). Fixpath sees a string like this: > > test/jdk/foo > > It looks for the first `/` and checks if the first element following that, > until the next `/`, is an existing directory in the unix filesystem root. In > this case, the reporter had a directory named "/jdk" which satisfies this > heuristic check. This makes fixpath assume that the `/jdk/foo` part is an > absolute unix path that needs to be rewritten to a Windows path. > > My suggested fix is to look at the prefix part, "test" in this case, and see > if that itself is a valid path in the current working directory, as that > would indicate that the string is intended to be a relative path. > > I think we also need to account for possible prefixes with `:` and `=` here > to handle a string like: > > jtreg:test/jdk/foo > > In that case we need to remove anything up to the last `:` before we try to > match it as a relative directory. (Same thing applies to `=`) > > Changing the heuristics of fixpath is rather sensitive and risky. I would > appreciate help from people using Windows with trying this patch with some of > your regular workflows. The GitHub Actions failures look terrifying, but all of them are just a failing JTReg download for some reason (Not related to the change). Will recompile with this change and report back as soon as I can ------------- PR Comment: https://git.openjdk.org/jdk/pull/15461#issuecomment-1696737213