author | lana |
Thu, 04 Feb 2016 11:28:20 -0800 | |
changeset 35720 | e66a02d55e71 |
parent 35232 | 76aed99c0ddd |
child 35858 | 6e704583a38f |
permissions | -rw-r--r-- |
33736
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
1 |
/* |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
2 |
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
4 |
* |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
8 |
* |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
13 |
* accompanied this code). |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
14 |
* |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
18 |
* |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
21 |
* questions. |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
22 |
*/ |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
23 |
|
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
24 |
/* |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
25 |
* @test |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
26 |
* @bug 8139564 |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
27 |
* @summary defaultmethods=debug should have logging from each of the statements in the code |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
28 |
* @library /testlibrary |
35082
48c95c24f175
8146481: Disable runtime/logging/DefaultMethodsTest.java
rprotacio
parents:
34631
diff
changeset
|
29 |
* @ignore 8146435 |
33736
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
30 |
* @modules java.base/sun.misc |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
31 |
* java.management |
35193
1e85994e9f56
8145445: [TESTBUG] runtime/logging tests need to properly build and import libraries
rprotacio
parents:
34631
diff
changeset
|
32 |
* @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools |
34631
a8fd6c2a4a11
8144536: Clean up Unified Logging test directory
rprotacio
parents:
33736
diff
changeset
|
33 |
* @run driver DefaultMethodsTest |
33736
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
34 |
*/ |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
35 |
|
35193
1e85994e9f56
8145445: [TESTBUG] runtime/logging tests need to properly build and import libraries
rprotacio
parents:
34631
diff
changeset
|
36 |
import jdk.test.lib.OutputAnalyzer; |
1e85994e9f56
8145445: [TESTBUG] runtime/logging tests need to properly build and import libraries
rprotacio
parents:
34631
diff
changeset
|
37 |
import jdk.test.lib.ProcessTools; |
33736
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
38 |
|
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
39 |
public class DefaultMethodsTest { |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
40 |
public static void main(String[] args) throws Exception { |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
41 |
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
42 |
"-Xlog:defaultmethods=debug", "-version"); |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
43 |
OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
44 |
output.shouldContain("Slots that need filling:"); |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
45 |
output.shouldContain("requires default method processing"); |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
46 |
output.shouldContain("Looking for default methods for slot "); |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
47 |
output.shouldContain("Creating defaults and overpasses..."); |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
48 |
output.shouldContain("for slot: "); |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
49 |
output.shouldContain("Default method processing complete"); |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
50 |
output.shouldContain("overpass methods"); |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
51 |
output.shouldContain("default methods"); |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
52 |
output.shouldHaveExitValue(0); |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
53 |
} |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
54 |
} |
1b3950243443
8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents:
diff
changeset
|
55 |