With jtreg 7.1 and jdk 17.0.5 on linux, after running the test "/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect004/connect004.java" with jtreg directly, the "rerun" section of the .jtr file ends with:
.../java \
-Dtest=...
com.sun.javatest.regtest.agent.MainWrapper /tank/lujaniuk/verify-jtreg/JTwork/vmTestbase/nsk/jdb/options/connect/connect004/connect004.d/main.0.jta -arch=linux-x64 -waittime=5 -debugee.vmkind=java -transport.address=dynamic -connector=listening -transport=socket -jdb=/tank/lujaniuk/verify-jtreg/jdk-17.0.5_linux-x64_bin/jdk-17.0.5/bin/jdb -java.options=" " -workdir=. -debugee.vmkeys=" "
The class being invoked is "com.sun.javatest.regtest.agent.MainWrapper", and everything after that is passed as arguments to it. However, when reading mainwrapper source code [1], I come to the conclusion that none of those arguments are even used except the first one.
[1] https://github.com/openjdk/jtreg/blob/master/src/share/classes/com/sun/javatest/regtest/agent/MainWrapper.java
This seems to be a bug. If the flags aren't used, they shouldn't be printed. One expects to be able to copy the "rerun" output and modify it, but those modifications won't have an effect, leading people down rabbit holes.
.../java \
-Dtest=...
com.sun.javatest.regtest.agent.MainWrapper /tank/lujaniuk/verify-jtreg/JTwork/vmTestbase/nsk/jdb/options/connect/connect004/connect004.d/main.0.jta -arch=linux-x64 -waittime=5 -debugee.vmkind=java -transport.address=dynamic -connector=listening -transport=socket -jdb=/tank/lujaniuk/verify-jtreg/jdk-17.0.5_linux-x64_bin/jdk-17.0.5/bin/jdb -java.options=" " -workdir=. -debugee.vmkeys=" "
The class being invoked is "com.sun.javatest.regtest.agent.MainWrapper", and everything after that is passed as arguments to it. However, when reading mainwrapper source code [1], I come to the conclusion that none of those arguments are even used except the first one.
[1] https://github.com/openjdk/jtreg/blob/master/src/share/classes/com/sun/javatest/regtest/agent/MainWrapper.java
This seems to be a bug. If the flags aren't used, they shouldn't be printed. One expects to be able to copy the "rerun" output and modify it, but those modifications won't have an effect, leading people down rabbit holes.