Skip to content

Commit

Permalink
[Misc] Take VMoptions set in jtreg to LingeredApp
Browse files Browse the repository at this point in the history
Summary: LingeredApp is started without jtreg's vm options. It will lead
to testing error due to inconsistent vm options for dumping cds and
applying cds.
Testing: jtreg
Reviewer: raodao, lvfei
Issue: #904
  • Loading branch information
ziyilin committed Dec 24, 2024
1 parent 6c13dc0 commit c9e3a3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/lib/jdk/test/lib/apps/LingeredApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.attribute.FileTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -438,7 +439,9 @@ public static LingeredApp startApp(List<String> cmd) throws IOException {
LingeredApp a = new LingeredApp();
a.createLock();
try {
a.runApp(cmd);
List<String> opts = new ArrayList<>();
Collections.addAll(opts, Utils.prependTestJavaOpts(cmd.toArray(new String[0])));
a.runApp(opts);
a.waitAppReady(appWaitTime);
} catch (Exception ex) {
a.deleteLock();
Expand Down

0 comments on commit c9e3a3c

Please sign in to comment.