author | kvn |
Thu, 07 Jun 2018 17:38:34 -0700 | |
changeset 50455 | 2b73cce96dce |
parent 47216 | 71c04702a3d5 |
child 53523 | 4c5184c56dc2 |
permissions | -rw-r--r-- |
15747 | 1 |
/* |
50455
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. |
41705
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
4 |
* |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
7 |
* published by the Free Software Foundation. |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
8 |
* |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
13 |
* accompanied this code). |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
14 |
* |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
18 |
* |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
21 |
* questions. |
332239c052cc
8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents:
40631
diff
changeset
|
22 |
*/ |
15747 | 23 |
|
24 |
/* |
|
50455
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
47216
diff
changeset
|
25 |
* @test TestCMS |
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
47216
diff
changeset
|
26 |
* @key gc |
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
47216
diff
changeset
|
27 |
* @bug 8006398 8155948 8179013 |
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
47216
diff
changeset
|
28 |
* @summary Test that CMS prints a warning message |
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
47216
diff
changeset
|
29 |
* @requires !vm.graal.enabled |
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
47216
diff
changeset
|
30 |
* @library /test/lib |
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
47216
diff
changeset
|
31 |
* @modules java.base/jdk.internal.misc |
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
47216
diff
changeset
|
32 |
* java.management |
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
47216
diff
changeset
|
33 |
*/ |
15747 | 34 |
|
40631
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
36851
diff
changeset
|
35 |
import jdk.test.lib.process.ProcessTools; |
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
36851
diff
changeset
|
36 |
import jdk.test.lib.process.OutputAnalyzer; |
15747 | 37 |
|
38 |
public class TestCMS { |
|
39 |
||
41708
82f5dc0dfccf
8155948: Add message for CMS deprecation for Oracle builds
jmasa
parents:
40631
diff
changeset
|
40 |
public static void runTest(String[] args) throws Exception { |
82f5dc0dfccf
8155948: Add message for CMS deprecation for Oracle builds
jmasa
parents:
40631
diff
changeset
|
41 |
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args); |
15747 | 42 |
OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
44741
c5de7263722b
8179013: Deprecate the Concurrent Mark Sweep (CMS) Garbage Collector
ehelin
parents:
41709
diff
changeset
|
43 |
output.shouldContain("deprecated"); |
15747 | 44 |
output.shouldNotContain("error"); |
45 |
output.shouldHaveExitValue(0); |
|
46 |
} |
|
47 |
||
41708
82f5dc0dfccf
8155948: Add message for CMS deprecation for Oracle builds
jmasa
parents:
40631
diff
changeset
|
48 |
public static void main(String args[]) throws Exception { |
82f5dc0dfccf
8155948: Add message for CMS deprecation for Oracle builds
jmasa
parents:
40631
diff
changeset
|
49 |
runTest(new String[] {"-XX:+UseConcMarkSweepGC", "-version"}); |
82f5dc0dfccf
8155948: Add message for CMS deprecation for Oracle builds
jmasa
parents:
40631
diff
changeset
|
50 |
runTest(new String[] {"-Xconcgc", "-version"}); |
82f5dc0dfccf
8155948: Add message for CMS deprecation for Oracle builds
jmasa
parents:
40631
diff
changeset
|
51 |
runTest(new String[] {"-Xnoconcgc", "-version"}); |
82f5dc0dfccf
8155948: Add message for CMS deprecation for Oracle builds
jmasa
parents:
40631
diff
changeset
|
52 |
} |
82f5dc0dfccf
8155948: Add message for CMS deprecation for Oracle builds
jmasa
parents:
40631
diff
changeset
|
53 |
|
15747 | 54 |
} |