test/hotspot/jtreg/serviceability/sa/ClhsdbFlags.java
author jgeorge
Fri, 01 Feb 2019 11:29:31 +0530
changeset 53596 bb40a5303c84
parent 53513 8c035b34248d
child 53635 247e5ca412f5
permissions -rw-r--r--
8217473: SA: Tests using ClhsdbLauncher fail on SAP docker containers Summary: Skip the test with jtreg.SkippedException if Platform.shouldSAAttach() returns false Reviewed-by: dholmes, goetz
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     1
/*
53513
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
     2
 * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     4
 *
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     7
 * published by the Free Software Foundation.
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     8
 *
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    13
 * accompanied this code).
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    14
 *
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    18
 *
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    21
 * questions.
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    22
 */
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    23
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    24
import java.util.ArrayList;
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    25
import java.util.HashMap;
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    26
import java.util.List;
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    27
import java.util.Map;
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    28
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    29
import jdk.test.lib.apps.LingeredApp;
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    30
import jdk.test.lib.Platform;
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    31
import jdk.test.lib.Utils;
53596
bb40a5303c84 8217473: SA: Tests using ClhsdbLauncher fail on SAP docker containers
jgeorge
parents: 53513
diff changeset
    32
import jtreg.SkippedException;
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    33
50791
b1e90a8a876c 8205419: [testbug] TestJmapCore failing without SA: introduce @requires vm.hasSAandCanAttach
goetz
parents: 47918
diff changeset
    34
/**
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    35
 * @test
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    36
 * @bug 8190198
53513
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
    37
 * @bug 8217612
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    38
 * @summary Test clhsdb flags command
50791
b1e90a8a876c 8205419: [testbug] TestJmapCore failing without SA: introduce @requires vm.hasSAandCanAttach
goetz
parents: 47918
diff changeset
    39
 * @requires vm.hasSA
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    40
 * @library /test/lib
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    41
 * @run main/othervm ClhsdbFlags
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    42
 */
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    43
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    44
public class ClhsdbFlags {
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    45
53513
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
    46
    public static void runBasicTest() throws Exception {
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
    47
        System.out.println("Starting ClhsdbFlags basic test");
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    48
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    49
        LingeredApp theApp = null;
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    50
        try {
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    51
            ClhsdbLauncher test = new ClhsdbLauncher();
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    52
            List<String> vmArgs = new ArrayList<String>();
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    53
            vmArgs.add("-XX:+UnlockExperimentalVMOptions");
47918
a82c9f231737 8191401: [TESTBUG] serviceability/sa/ClhsdbFlags.java can fail due to UseJVMCICompiler
sballal
parents: 47899
diff changeset
    54
            vmArgs.add("-XX:+UnlockDiagnosticVMOptions");
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    55
            vmArgs.add("-XX:-MaxFDLimit");
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    56
            vmArgs.addAll(Utils.getVmOptions());
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    57
            theApp = LingeredApp.startApp(vmArgs);
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    58
            System.out.println("Started LingeredApp with pid " + theApp.getPid());
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    59
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    60
            List<String> cmds = List.of(
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    61
                    "flags", "flags -nd",
47918
a82c9f231737 8191401: [TESTBUG] serviceability/sa/ClhsdbFlags.java can fail due to UseJVMCICompiler
sballal
parents: 47899
diff changeset
    62
                    "flags UnlockDiagnosticVMOptions", "flags MaxFDLimit",
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    63
                    "flags MaxJavaStackTraceDepth");
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    64
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    65
            Map<String, List<String>> expStrMap = new HashMap<>();
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    66
            expStrMap.put("flags", List.of(
47918
a82c9f231737 8191401: [TESTBUG] serviceability/sa/ClhsdbFlags.java can fail due to UseJVMCICompiler
sballal
parents: 47899
diff changeset
    67
                    "UnlockDiagnosticVMOptions = true",
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    68
                    "MaxFDLimit = false",
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    69
                    "MaxJavaStackTraceDepth = 1024",
47918
a82c9f231737 8191401: [TESTBUG] serviceability/sa/ClhsdbFlags.java can fail due to UseJVMCICompiler
sballal
parents: 47899
diff changeset
    70
                    "VerifyMergedCPBytecodes",
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    71
                    "ConcGCThreads", "UseThreadPriorities",
47918
a82c9f231737 8191401: [TESTBUG] serviceability/sa/ClhsdbFlags.java can fail due to UseJVMCICompiler
sballal
parents: 47899
diff changeset
    72
                    "ShowHiddenFrames"));
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    73
            expStrMap.put("flags -nd", List.of(
47918
a82c9f231737 8191401: [TESTBUG] serviceability/sa/ClhsdbFlags.java can fail due to UseJVMCICompiler
sballal
parents: 47899
diff changeset
    74
                    "UnlockDiagnosticVMOptions = true",
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    75
                    "MaxFDLimit = false",
47918
a82c9f231737 8191401: [TESTBUG] serviceability/sa/ClhsdbFlags.java can fail due to UseJVMCICompiler
sballal
parents: 47899
diff changeset
    76
                    "InitialHeapSize",
a82c9f231737 8191401: [TESTBUG] serviceability/sa/ClhsdbFlags.java can fail due to UseJVMCICompiler
sballal
parents: 47899
diff changeset
    77
                    "MaxHeapSize"));
a82c9f231737 8191401: [TESTBUG] serviceability/sa/ClhsdbFlags.java can fail due to UseJVMCICompiler
sballal
parents: 47899
diff changeset
    78
            expStrMap.put("flags UnlockDiagnosticVMOptions", List.of(
a82c9f231737 8191401: [TESTBUG] serviceability/sa/ClhsdbFlags.java can fail due to UseJVMCICompiler
sballal
parents: 47899
diff changeset
    79
                    "UnlockDiagnosticVMOptions = true"));
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    80
            expStrMap.put("flags MaxFDLimit", List.of(
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    81
                    "MaxFDLimit = false"));
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    82
            expStrMap.put("flags MaxJavaStackTraceDepth", List.of(
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    83
                    "MaxJavaStackTraceDepth = 1024"));
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    84
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    85
            test.run(theApp.getPid(), cmds, expStrMap, null);
53596
bb40a5303c84 8217473: SA: Tests using ClhsdbLauncher fail on SAP docker containers
jgeorge
parents: 53513
diff changeset
    86
        } catch (SkippedException se) {
bb40a5303c84 8217473: SA: Tests using ClhsdbLauncher fail on SAP docker containers
jgeorge
parents: 53513
diff changeset
    87
            throw se;
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    88
        } catch (Exception ex) {
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    89
            throw new RuntimeException("Test ERROR " + ex, ex);
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    90
        } finally {
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    91
            LingeredApp.stopApp(theApp);
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    92
        }
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    93
        System.out.println("Test PASSED");
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    94
    }
53513
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
    95
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
    96
    public static void runAllTypesTest() throws Exception {
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
    97
        System.out.println("Starting ClhsdbFlags all types test");
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
    98
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
    99
        LingeredApp theApp = null;
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   100
        try {
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   101
            ClhsdbLauncher test = new ClhsdbLauncher();
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   102
            List<String> vmArgs = new ArrayList<String>();
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   103
            vmArgs.add("-XX:+UnlockDiagnosticVMOptions");   // bool
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   104
            vmArgs.add("-XX:ActiveProcessorCount=1");       // int
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   105
            vmArgs.add("-XX:ParallelGCThreads=1");          // uint
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   106
            vmArgs.add("-XX:MaxJavaStackTraceDepth=1024");  // intx
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   107
            vmArgs.add("-XX:LogEventsBufferEntries=10");    // uintx
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   108
            vmArgs.add("-XX:HeapSizePerGCThread=32m");      // size_t
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   109
            vmArgs.add("-XX:NativeMemoryTracking=off");     // ccstr
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   110
            vmArgs.add("-XX:OnError='echo error'");         // ccstrlist
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   111
            vmArgs.add("-XX:CompileThresholdScaling=1.0");  // double
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   112
            vmArgs.add("-XX:ErrorLogTimeout=120");          // uint64_t
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   113
            vmArgs.addAll(Utils.getVmOptions());
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   114
            theApp = LingeredApp.startApp(vmArgs);
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   115
            System.out.println("Started LingeredApp with pid " + theApp.getPid());
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   116
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   117
            List<String> cmds = List.of("flags");
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   118
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   119
            Map<String, List<String>> expStrMap = new HashMap<>();
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   120
            expStrMap.put("flags", List.of(
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   121
                    "UnlockDiagnosticVMOptions = true",
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   122
                    "ActiveProcessorCount = 1",
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   123
                    "ParallelGCThreads = 1",
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   124
                    "MaxJavaStackTraceDepth = 1024",
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   125
                    "LogEventsBufferEntries = 10",
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   126
                    "HeapSizePerGCThread = 3",
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   127
                    "NativeMemoryTracking = \"off\"",
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   128
                    "OnError = \"'echo error'\"",
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   129
                    "CompileThresholdScaling = 1.0",
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   130
                    "ErrorLogTimeout = 120"));
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   131
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   132
            test.run(theApp.getPid(), cmds, expStrMap, null);
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   133
        } catch (Exception ex) {
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   134
            throw new RuntimeException("Test ERROR " + ex, ex);
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   135
        } finally {
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   136
            LingeredApp.stopApp(theApp);
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   137
        }
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   138
        System.out.println("Test PASSED");
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   139
    }
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   140
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   141
    public static void main(String[] args) throws Exception {
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   142
        runBasicTest();
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   143
        runAllTypesTest();
8c035b34248d 8217612: (CL)HSDB cannot show some JVM flags
ysuenaga
parents: 50791
diff changeset
   144
    }
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
   145
}