JDK-8311101 : Add test for SA's buildreplayjars command
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: svc-agent
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-06-29
  • Updated: 2023-11-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22Unresolved
Description
SA's buildreplayjars command doesn't have any tests. The command is actually broken as the ClassWriter that the buildreplayjars command relies on does not generate the classfiles completely. Many of the attributes in the generated classfiles are missing which makes the jar files emitted out by buildreplayjars unusable.
Adding a test for buildreplayjars would prevent this command from rotting again.

The test would generate the boot and app jar files using buildreplayjars command and run the app again using the generated jar files.
Comments
The test I have written can be seen here: https://github.com/openjdk/jdk/commit/1193ad94d1e29f87e58b03ef44f1a6974cf71b18 It currently doesn't work due to missing attributes in the classfiles generated by ClassWriter.
29-06-2023