On Thu, 20 Apr 2023 02:32:37 GMT, Chen Liang <[email protected]> wrote:
> This patch replaces `FIXPATH` with `FixPath` on individual path argumenets.
> The root cause might be that JMH requires passing VM args to benchmarks in
> quotes, which might have triggered incorrect detections in `FIXPATH` (as in
> comparison, `$1_MICRO_JAVA_OPTIONS +=
> --add-opens=java.base/java.io=ALL-UNNAMED` right above this patch seems to
> work fine)
> Also removed a useless and wrong Java flag to the java running javac,
> originally intended to enable running `make test TEST="loom.obsolete"`
> benchmarks.
>
> Since I only have a windows cygwin environment, I am not quite sure if this
> works elsewhere.
Simpler reproducer:
bash -x /mnt/h/openjdk/git-jdk2/build/windows-release/fixpath print
'-Djava.library.path=/mnt/h/openjdk/git-jdk2/build/windows-release/images/test/micro/native
--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-exports=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.attribute=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.instruction=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.java.lang.constant=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.components=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.impl=ALL-UNNAMED'
Shows:
++ print_command_line
'-Djava.library.path=/mnt/h/openjdk/git-jdk2/build/windows-release/images/test/micro/native
--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-exports=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.attribute=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.instruction=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.java.lang.constant=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.components=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.impl=ALL-UNNAMED'
++ converted_args=
++ for arg in "$@"
++ [[
-Djava.library.path=/mnt/h/openjdk/git-jdk2/build/windows-release/images/test/micro/native
--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-exports=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.attribute=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.instruction=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.java.lang.constant=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.components=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.impl=ALL-UNNAMED =~ ^@(.*$) ]]
++ convert_path
'-Djava.library.path=/mnt/h/openjdk/git-jdk2/build/windows-release/images/test/micro/native
--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-exports=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.attribute=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.instruction=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.java.lang.constant=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.components=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.impl=ALL-UNNAMED'
++ [[
-Djava.library.path=/mnt/h/openjdk/git-jdk2/build/windows-release/images/test/micro/native
--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-exports=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.attribute=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.instruction=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.java.lang.constant=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.components=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.impl=ALL-UNNAMED =~ : ]]
++
arg='-Djava.library.path=/mnt/h/openjdk/git-jdk2/build/windows-release/images/test/micro/native
--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-exports=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.attribute=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.instruction=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.java.lang.constant=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.components=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.impl=ALL-UNNAMED'
++ winpath=
++ [[
-Djava.library.path=/mnt/h/openjdk/git-jdk2/build/windows-release/images/test/micro/native
--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-exports=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.attribute=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.instruction=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.java.lang.constant=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.components=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.impl=ALL-UNNAMED =~
^([^/]*|-[^:=]*[:=]|.*file://|/[a-zA-Z:]{1,3}:?)(/mnt/)([a-z])(/[^/]+.*$) ]]
++ prefix=-Djava.library.path=
++ winpath='h:/openjdk/git-jdk2/build/windows-release/images/test/micro/native
--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-exports=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.attribute=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.instruction=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.java.lang.constant=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.components=ALL-UNNAMED
--add-exports=java.base/jdk.internal.classfile.impl=ALL-UNNAMED'
++ [[ 20 -eq 2 ]]
++ [[ '' != true ]]
++ winpath='h:\openjdk\git-jdk2\build\windows-release\images\test\micro\native
--add-exports=java.base\jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-exports=java.base\jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.attribute=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.constantpool=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.instruction=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.java.lang.constant=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.components=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.impl=ALL-UNNAMED'
++ [[ h:\openjdk\git-jdk2\build\windows-release\images\test\micro\native
--add-exports=java.base\jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-exports=java.base\jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.attribute=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.constantpool=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.instruction=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.java.lang.constant=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.components=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.impl=ALL-UNNAMED != '' ]]
++
result='-Djava.library.path=h:\openjdk\git-jdk2\build\windows-release\images\test\micro\native
--add-exports=java.base\jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-exports=java.base\jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.attribute=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.constantpool=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.instruction=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.java.lang.constant=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.components=ALL-UNNAMED
--add-exports=java.base\jdk.internal.classfile.impl=ALL-UNNAMED'
i.e. fixpath thinks all of the stuff after `/mnt/h` is a part of the path
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13550#issuecomment-1516780474