8343529: serviceability/sa/ClhsdbWhere.java fails AssertionFailure: Corrupted constant pool
8307318: Test serviceability/sa/ClhsdbCDSJstackPrintAll.java failed: ArrayIndexOutOfBoundsException Reviewed-by: kevinw, amenkov
This commit is contained in:
parent
13987b4244
commit
21e0fb8648
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -51,6 +51,10 @@ public class ClhsdbCDSJstackPrintAll {
|
|||||||
CDSTestUtils.createArchiveAndCheck(opts);
|
CDSTestUtils.createArchiveAndCheck(opts);
|
||||||
|
|
||||||
ClhsdbLauncher test = new ClhsdbLauncher();
|
ClhsdbLauncher test = new ClhsdbLauncher();
|
||||||
|
// This test could possibly cause some unexpected SA exceptions because one
|
||||||
|
// or more threads are active during the stack trace. Ignore them. The threads
|
||||||
|
// we care about should still be present in the output.
|
||||||
|
test.ignoreExceptions();
|
||||||
theApp = LingeredApp.startApp(
|
theApp = LingeredApp.startApp(
|
||||||
"-XX:+UnlockDiagnosticVMOptions",
|
"-XX:+UnlockDiagnosticVMOptions",
|
||||||
"-XX:SharedArchiveFile=" + sharedArchiveName,
|
"-XX:SharedArchiveFile=" + sharedArchiveName,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -41,9 +41,15 @@ import jdk.test.lib.SA.SATestUtils;
|
|||||||
public class ClhsdbLauncher {
|
public class ClhsdbLauncher {
|
||||||
|
|
||||||
private Process toolProcess;
|
private Process toolProcess;
|
||||||
|
private boolean ignoreExceptions;
|
||||||
|
|
||||||
public ClhsdbLauncher() {
|
public ClhsdbLauncher() {
|
||||||
toolProcess = null;
|
toolProcess = null;
|
||||||
|
ignoreExceptions = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ignoreExceptions() {
|
||||||
|
ignoreExceptions = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -147,12 +153,14 @@ public class ClhsdbLauncher {
|
|||||||
// -Xcheck:jni might be set via TEST_VM_OPTS. Make sure there are no warnings.
|
// -Xcheck:jni might be set via TEST_VM_OPTS. Make sure there are no warnings.
|
||||||
oa.shouldNotMatch("^WARNING: JNI local refs:.*$");
|
oa.shouldNotMatch("^WARNING: JNI local refs:.*$");
|
||||||
oa.shouldNotMatch("^WARNING in native method:.*$");
|
oa.shouldNotMatch("^WARNING in native method:.*$");
|
||||||
|
if (!ignoreExceptions) {
|
||||||
// This will detect most SA failures, including during the attach.
|
// This will detect most SA failures, including during the attach.
|
||||||
oa.shouldNotMatch("^sun.jvm.hotspot.debugger.DebuggerException:.*$");
|
oa.shouldNotMatch("^sun.jvm.hotspot.debugger.DebuggerException:.*$");
|
||||||
oa.shouldNotMatch("sun.jvm.hotspot.utilities.AssertionFailure");
|
oa.shouldNotMatch("sun.jvm.hotspot.utilities.AssertionFailure");
|
||||||
// This will detect unexpected exceptions, like NPEs and asserts, that are caught
|
// This will detect unexpected exceptions, like NPEs and asserts, that are caught
|
||||||
// by sun.jvm.hotspot.CommandProcessor.
|
// by sun.jvm.hotspot.CommandProcessor.
|
||||||
oa.shouldNotMatch("^Error: .*$");
|
oa.shouldNotMatch("^Error: .*$");
|
||||||
|
}
|
||||||
|
|
||||||
String[] parts = output.split("hsdb>");
|
String[] parts = output.split("hsdb>");
|
||||||
for (String cmd : commands) {
|
for (String cmd : commands) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -45,6 +45,10 @@ public class ClhsdbWhere {
|
|||||||
LingeredApp theApp = null;
|
LingeredApp theApp = null;
|
||||||
try {
|
try {
|
||||||
ClhsdbLauncher test = new ClhsdbLauncher();
|
ClhsdbLauncher test = new ClhsdbLauncher();
|
||||||
|
// This test could possibly cause some unexpected SA exceptions because one
|
||||||
|
// or more threads are active during the stack trace. Ignore them. The threads
|
||||||
|
// we care about should still be present in the output.
|
||||||
|
test.ignoreExceptions();
|
||||||
theApp = LingeredApp.startApp();
|
theApp = LingeredApp.startApp();
|
||||||
System.out.println("Started LingeredApp with pid " + theApp.getPid());
|
System.out.println("Started LingeredApp with pid " + theApp.getPid());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user