-
Enhancement
-
Resolution: Fixed
-
P4
-
9, 11
-
b06
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8288024 | 11.0.17-oracle | Adithya Haradi Gopal | P4 | Resolved | Fixed | b01 |
JDK-8288188 | 11.0.17 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
The test in gc/g1/TestHumongousCodeCacheRoots.java makes sure to run with a client and server VM by spawning VMs with -client/-server parameters respectively.
When a particular type of VM is not supported, the code currently checks on failure whether this was because of unsupported compiler mode and if so, just suppresses the failing result.
A cleaner way of doing that would be to split the test into two tests, each @require'ing the particular vm flavor. And having a @run tag using -client/-server respectively. Then jtreg would supposedly not even run the test with the non-supported VM, and the setup code for spawning the extra processes could go away.
E.g.
// client test:
@...
@requires vm.flavor == client
@run main -client TestHumongousCodeCacheRootsClient
class TestHumongousCodeCacheRootsClient {
public static void main(String[] args) {
TestHumongousCodeCacheRootsHelper.main(args); // put into an
auxiliary class file...
}
}
// server test:
@...
@requires vm.flavor == client
@run main -client TestHumongousCodeCacheRootsServer
class TestHumongousCodeCacheRootsServer {
public static void main(String[] args) {
TestHumongousCodeCacheRootsHelper.main(args); // put into an
auxiliary class file...
}
}
When a particular type of VM is not supported, the code currently checks on failure whether this was because of unsupported compiler mode and if so, just suppresses the failing result.
A cleaner way of doing that would be to split the test into two tests, each @require'ing the particular vm flavor. And having a @run tag using -client/-server respectively. Then jtreg would supposedly not even run the test with the non-supported VM, and the setup code for spawning the extra processes could go away.
E.g.
// client test:
@...
@requires vm.flavor == client
@run main -client TestHumongousCodeCacheRootsClient
class TestHumongousCodeCacheRootsClient {
public static void main(String[] args) {
TestHumongousCodeCacheRootsHelper.main(args); // put into an
auxiliary class file...
}
}
// server test:
@...
@requires vm.flavor == client
@run main -client TestHumongousCodeCacheRootsServer
class TestHumongousCodeCacheRootsServer {
public static void main(String[] args) {
TestHumongousCodeCacheRootsHelper.main(args); // put into an
auxiliary class file...
}
}
- backported by
-
JDK-8288024 Improve gc/g1/TestHumongousCodeCacheRoots.java to use jtreg @requires
- Resolved
-
JDK-8288188 Improve gc/g1/TestHumongousCodeCacheRoots.java to use jtreg @requires
- Resolved
- is blocked by
-
CODETOOLS-7901116 @requires better support for VM needs
- Closed