comparison test/runtime/SharedArchiveFile/CdsDifferentObjectAlignment.java @ 20488:9c8439756c05

8052313: Backport CDS tests from JDK-9 to jdk8_u40 Summary: Copied CDS tests from jdk-9 to jdk8u40 Reviewed-by: ccheung, dholmes
author mseledtsov
date Fri, 19 Sep 2014 11:12:39 -0400
parents 1e9094165098
children 7848fc12602b
comparison
equal deleted inserted replaced
20487:88467a76a382 20488:9c8439756c05
1 /* 1 /*
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
27 * Using different object alignment for each dump/load pair. 27 * Using different object alignment for each dump/load pair.
28 * This is a negative test; using object alignment for loading that 28 * This is a negative test; using object alignment for loading that
29 * is different from object alignment for creating a CDS file 29 * is different from object alignment for creating a CDS file
30 * should fail when loading. 30 * should fail when loading.
31 * @library /testlibrary 31 * @library /testlibrary
32 * @bug 8025642
32 */ 33 */
33 34
34 import com.oracle.java.testlibrary.*; 35 import com.oracle.java.testlibrary.*;
35 36
36 public class CdsDifferentObjectAlignment { 37 public class CdsDifferentObjectAlignment {
80 "The shared archive file's ObjectAlignmentInBytes of %d " + 81 "The shared archive file's ObjectAlignmentInBytes of %d " +
81 "does not equal the current ObjectAlignmentInBytes of %d", 82 "does not equal the current ObjectAlignmentInBytes of %d",
82 createAlignment, 83 createAlignment,
83 loadAlignment); 84 loadAlignment);
84 85
85 output.shouldContain(expectedErrorMsg); 86 try {
87 output.shouldContain(expectedErrorMsg);
88 } catch (RuntimeException e) {
89 output.shouldContain("Unable to use shared archive");
90 }
86 output.shouldHaveExitValue(1); 91 output.shouldHaveExitValue(1);
87 } 92 }
88 } 93 }