annotate test/runtime/SharedArchiveFile/DefaultUseWithClient.java @ 14476:4510a3502166

8034898: [TESTBUG]: Zero failure project - tag all Runtime JTReg bugs that fail nightly Summary: Use @ignore to exclude failing tests Reviewed-by: coleenp, ctornqvi, mseledtsov Contributed-by: george.triantafillou@oracle.com
author gtriantafill
date Thu, 20 Feb 2014 16:38:45 -0500
parents efc27a069897
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14275
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
1 /*
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
4 *
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
7 * published by the Free Software Foundation.
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
8 *
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
13 * accompanied this code).
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
14 *
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
18 *
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
21 * questions.
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
22 */
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
23
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
24 /*
14476
4510a3502166 8034898: [TESTBUG]: Zero failure project - tag all Runtime JTReg bugs that fail nightly
gtriantafill
parents: 14275
diff changeset
25 * @ignore 8032224
14275
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
26 * @test DefaultUseWithClient
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
27 * @summary Test default behavior of sharing with -client
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
28 * @library /testlibrary
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
29 * @run main DefaultUseWithClient
14476
4510a3502166 8034898: [TESTBUG]: Zero failure project - tag all Runtime JTReg bugs that fail nightly
gtriantafill
parents: 14275
diff changeset
30 * @bug 8032224
14275
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
31 */
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
32
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
33 import com.oracle.java.testlibrary.*;
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
34 import java.io.File;
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
35
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
36 public class DefaultUseWithClient {
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
37 public static void main(String[] args) throws Exception {
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
38 String fileName = "test.jsa";
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
39
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
40 // On 32-bit windows CDS should be on by default in "-client" config
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
41 // Skip this test on any other platform
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
42 boolean is32BitWindows = (Platform.isWindows() && Platform.is32bit());
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
43 if (!is32BitWindows) {
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
44 System.out.println("Test only applicable on 32-bit Windows. Skipping");
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
45 return;
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
46 }
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
47
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
48 // create the archive
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
49 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
50 "-XX:+UnlockDiagnosticVMOptions",
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
51 "-XX:SharedArchiveFile=./" + fileName,
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
52 "-Xshare:dump");
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
53 OutputAnalyzer output = new OutputAnalyzer(pb.start());
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
54 output.shouldHaveExitValue(0);
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
55
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
56 pb = ProcessTools.createJavaProcessBuilder(
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
57 "-XX:+UnlockDiagnosticVMOptions",
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
58 "-XX:SharedArchiveFile=./" + fileName,
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
59 "-client",
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
60 "-version");
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
61
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
62 output = new OutputAnalyzer(pb.start());
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
63 output.shouldContain("sharing");
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
64 output.shouldHaveExitValue(0);
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
65 }
efc27a069897 8031151: Add basic CDS tests
mseledtsov
parents:
diff changeset
66 }