8268539: several serviceability/sa tests should be run in driver mode

Reviewed-by: sspitsyn
This commit is contained in:
Igor Ignatyev 2021-06-10 17:06:19 +00:00
parent 72672277e4
commit 78cb6776b6
23 changed files with 40 additions and 40 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2021, 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
@ -27,7 +27,7 @@
* @summary Test the jhsdb jmap -clstats command with CDS enabled * @summary Test the jhsdb jmap -clstats command with CDS enabled
* @requires vm.hasSA & vm.cds * @requires vm.hasSA & vm.cds
* @library /test/lib * @library /test/lib
* @run main/othervm/timeout=2400 CDSJMapClstats * @run driver/timeout=2400 CDSJMapClstats
*/ */
import java.util.stream.Collectors; import java.util.stream.Collectors;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2021, 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
@ -39,7 +39,7 @@ import jtreg.SkippedException;
* @summary Test clhsdb dumpclass command * @summary Test clhsdb dumpclass command
* @requires vm.hasSA * @requires vm.hasSA
* @library /test/lib * @library /test/lib
* @run main/othervm ClhsdbDumpclass * @run driver ClhsdbDumpclass
*/ */
public class ClhsdbDumpclass { public class ClhsdbDumpclass {
@ -70,8 +70,8 @@ public class ClhsdbDumpclass {
// Run javap on the generated class file to make sure it's valid. // Run javap on the generated class file to make sure it's valid.
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("javap"); JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("javap");
launcher.addVMArgs(Utils.getTestJavaOpts()); launcher.addVMArgs(Utils.getTestJavaOpts());
launcher.addToolArg(APP_DOT_CLASSNAME); launcher.addToolArg(classFile.toString());
System.out.println("> javap " + APP_DOT_CLASSNAME); System.out.println("> javap " + classFile.toString());
List<String> cmdStringList = Arrays.asList(launcher.getCommand()); List<String> cmdStringList = Arrays.asList(launcher.getCommand());
ProcessBuilder pb = new ProcessBuilder(cmdStringList); ProcessBuilder pb = new ProcessBuilder(cmdStringList);
Process javap = pb.start(); Process javap = pb.start();

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2021, 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
@ -37,7 +37,7 @@ import jtreg.SkippedException;
* @summary Test clhsdb flags command * @summary Test clhsdb flags command
* @requires vm.hasSA * @requires vm.hasSA
* @library /test/lib * @library /test/lib
* @run main/othervm ClhsdbFlags * @run driver ClhsdbFlags
*/ */
public class ClhsdbFlags { public class ClhsdbFlags {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, Red Hat Inc. All rights reserved. * Copyright (c) 2019, Red Hat Inc. 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.
* *
@ -38,7 +38,7 @@ import jdk.test.lib.process.OutputAnalyzer;
* @requires vm.hasSA * @requires vm.hasSA
* @requires vm.opt.DeoptimizeALot != true * @requires vm.opt.DeoptimizeALot != true
* @library /test/lib * @library /test/lib
* @run main/othervm ClhsdbJstackXcompStress * @run driver ClhsdbJstackXcompStress
*/ */
public class ClhsdbJstackXcompStress { public class ClhsdbJstackXcompStress {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2021, 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
@ -28,7 +28,7 @@
* @library /test/lib * @library /test/lib
* @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.misc
* @modules java.management * @modules java.management
* @run main DeadlockDetectionTest * @run driver DeadlockDetectionTest
*/ */
import java.util.stream.Collectors; import java.util.stream.Collectors;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2021, 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
@ -31,7 +31,7 @@ import jdk.test.lib.Utils;
* @test * @test
* @requires vm.hasSA * @requires vm.hasSA
* @library /test/lib * @library /test/lib
* @run main JhsdbThreadInfoTest * @run driver JhsdbThreadInfoTest
*/ */
public class JhsdbThreadInfoTest { public class JhsdbThreadInfoTest {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2021, 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
@ -52,7 +52,7 @@ import jdk.test.lib.Utils;
* jdk.hotspot.agent/sun.jvm.hotspot.oops * jdk.hotspot.agent/sun.jvm.hotspot.oops
* jdk.hotspot.agent/sun.jvm.hotspot.debugger * jdk.hotspot.agent/sun.jvm.hotspot.debugger
* jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser * jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser
* @run main TestCpoolForInvokeDynamic * @run driver TestCpoolForInvokeDynamic
*/ */
public class TestCpoolForInvokeDynamic { public class TestCpoolForInvokeDynamic {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2021, 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
@ -50,7 +50,7 @@ import jdk.test.lib.Utils;
* jdk.hotspot.agent/sun.jvm.hotspot.utilities * jdk.hotspot.agent/sun.jvm.hotspot.utilities
* jdk.hotspot.agent/sun.jvm.hotspot.oops * jdk.hotspot.agent/sun.jvm.hotspot.oops
* jdk.hotspot.agent/sun.jvm.hotspot.debugger * jdk.hotspot.agent/sun.jvm.hotspot.debugger
* @run main TestDefaultMethods * @run driver TestDefaultMethods
*/ */
public class TestDefaultMethods { public class TestDefaultMethods {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2021, 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
@ -48,7 +48,7 @@ import jdk.test.lib.hprof.model.Snapshot;
* jdk.hotspot.agent/sun.jvm.hotspot.utilities * jdk.hotspot.agent/sun.jvm.hotspot.utilities
* jdk.hotspot.agent/sun.jvm.hotspot.oops * jdk.hotspot.agent/sun.jvm.hotspot.oops
* jdk.hotspot.agent/sun.jvm.hotspot.debugger * jdk.hotspot.agent/sun.jvm.hotspot.debugger
* @run main/othervm TestHeapDumpForInvokeDynamic * @run driver TestHeapDumpForInvokeDynamic
*/ */
public class TestHeapDumpForInvokeDynamic { public class TestHeapDumpForInvokeDynamic {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2021, 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
@ -39,7 +39,7 @@ import jdk.test.lib.SA.SATestUtils;
* @requires os.arch=="amd64" | os.arch=="x86_64" * @requires os.arch=="amd64" | os.arch=="x86_64"
* @requires os.family=="windows" | os.family == "linux" | os.family == "mac" * @requires os.family=="windows" | os.family == "linux" | os.family == "mac"
* @library /test/lib * @library /test/lib
* @run main/othervm TestJhsdbJstackLineNumbers * @run driver TestJhsdbJstackLineNumbers
*/ */
/* /*

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2021, 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
@ -31,7 +31,7 @@ import jdk.test.lib.Utils;
* @test * @test
* @requires vm.hasSA * @requires vm.hasSA
* @library /test/lib * @library /test/lib
* @run main/othervm TestJhsdbJstackLock * @run driver TestJhsdbJstackLock
*/ */
public class TestJhsdbJstackLock { public class TestJhsdbJstackLock {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2021, 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
@ -38,7 +38,7 @@ import jdk.test.lib.process.OutputAnalyzer;
* @bug 8208091 * @bug 8208091
* @requires (os.family == "linux") & (vm.hasSA) * @requires (os.family == "linux") & (vm.hasSA)
* @library /test/lib * @library /test/lib
* @run main/othervm TestJhsdbJstackMixed * @run driver TestJhsdbJstackMixed
*/ */
public class TestJhsdbJstackMixed { public class TestJhsdbJstackMixed {

View File

@ -41,7 +41,7 @@ import jdk.test.lib.SA.SATestUtils;
* @modules jdk.hotspot.agent/sun.jvm.hotspot * @modules jdk.hotspot.agent/sun.jvm.hotspot
* jdk.hotspot.agent/sun.jvm.hotspot.oops * jdk.hotspot.agent/sun.jvm.hotspot.oops
* jdk.hotspot.agent/sun.jvm.hotspot.runtime * jdk.hotspot.agent/sun.jvm.hotspot.runtime
* @run main TestObjectMonitorIterate * @run driver TestObjectMonitorIterate
*/ */
public class TestObjectMonitorIterate { public class TestObjectMonitorIterate {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2021, 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
@ -44,7 +44,7 @@ import jdk.test.lib.Utils;
* @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.misc
* jdk.hotspot.agent/sun.jvm.hotspot * jdk.hotspot.agent/sun.jvm.hotspot
* jdk.hotspot.agent/sun.jvm.hotspot.utilities * jdk.hotspot.agent/sun.jvm.hotspot.utilities
* @run main/othervm TestRevPtrsForInvokeDynamic * @run driver TestRevPtrsForInvokeDynamic
*/ */
public class TestRevPtrsForInvokeDynamic { public class TestRevPtrsForInvokeDynamic {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2021, 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
@ -38,7 +38,7 @@ import jdk.test.lib.SA.SATestUtils;
* @summary Test "jhsdb jinfo --sysprops", "jinfo -sysprops", and clhsdb "sysprops" commands * @summary Test "jhsdb jinfo --sysprops", "jinfo -sysprops", and clhsdb "sysprops" commands
* @requires vm.hasSA * @requires vm.hasSA
* @library /test/lib * @library /test/lib
* @run main/othervm TestSysProps * @run driver TestSysProps
*/ */
public class TestSysProps { public class TestSysProps {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2021, 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
@ -49,7 +49,7 @@ import jdk.test.lib.SA.SATestUtils;
* java.management/sun.management * java.management/sun.management
* jdk.internal.jvmstat/sun.jvmstat.monitor * jdk.internal.jvmstat/sun.jvmstat.monitor
* @build JMapHProfLargeHeapProc * @build JMapHProfLargeHeapProc
* @run main JMapHProfLargeHeapTest * @run driver JMapHProfLargeHeapTest
*/ */
public class JMapHProfLargeHeapTest { public class JMapHProfLargeHeapTest {

View File

@ -38,7 +38,7 @@ import jtreg.SkippedException;
* @requires vm.hasSA * @requires vm.hasSA
* @requires os.family != "windows" * @requires os.family != "windows"
* @library /test/lib * @library /test/lib
* @run main/othervm ClhsdbAttachToDebugServer * @run driver ClhsdbAttachToDebugServer
*/ */
public class ClhsdbAttachToDebugServer { public class ClhsdbAttachToDebugServer {

View File

@ -37,7 +37,7 @@ import jtreg.SkippedException;
* @requires vm.hasSA * @requires vm.hasSA
* @requires os.family != "windows" * @requires os.family != "windows"
* @library /test/lib * @library /test/lib
* @run main/othervm ClhsdbTestConnectArgument * @run driver ClhsdbTestConnectArgument
*/ */
public class ClhsdbTestConnectArgument { public class ClhsdbTestConnectArgument {

View File

@ -30,7 +30,7 @@
* @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.misc
* @library /test/lib * @library /test/lib
* *
* @run main/othervm DebugdConnectTest * @run driver DebugdConnectTest
*/ */
import java.io.IOException; import java.io.IOException;

View File

@ -38,7 +38,7 @@ import jtreg.SkippedException;
* @requires vm.hasSA * @requires vm.hasSA
* @requires os.family != "windows" * @requires os.family != "windows"
* @library /test/lib * @library /test/lib
* @run main/othervm DisableRegistryTest * @run driver DisableRegistryTest
*/ */
public class DisableRegistryTest { public class DisableRegistryTest {

View File

@ -35,7 +35,7 @@ import jtreg.SkippedException;
* @requires vm.hasSA * @requires vm.hasSA
* @requires (os.family != "windows") & (os.family != "mac") * @requires (os.family != "windows") & (os.family != "mac")
* @library /test/lib * @library /test/lib
* @run main/othervm PmapOnDebugdTest * @run driver PmapOnDebugdTest
*/ */
public class PmapOnDebugdTest { public class PmapOnDebugdTest {

View File

@ -38,7 +38,7 @@ import jtreg.SkippedException;
* @requires vm.hasSA * @requires vm.hasSA
* @requires os.family != "windows" * @requires os.family != "windows"
* @library /test/lib * @library /test/lib
* @run main/othervm RunCommandOnServerTest * @run driver RunCommandOnServerTest
*/ */
public class RunCommandOnServerTest { public class RunCommandOnServerTest {

View File

@ -31,7 +31,7 @@
* @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.misc
* @library /test/lib * @library /test/lib
* *
* @run main/othervm SADebugDTest * @run driver SADebugDTest
*/ */
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;