Mercurial > hg > graal-compiler
comparison test/compiler/7009359/Test7009359.java @ 8049:c703f9c4b025
8002169: TEST_BUG: compiler/7009359/Test7009359.java sometimes times out
Summary: make the test less prone to timeout by reducing the amount of iteration and allowing main to be compiled
Reviewed-by: jrose
author | kmo |
---|---|
date | Tue, 12 Feb 2013 07:39:42 -0800 |
parents | 2ddb2fab82cb |
children |
comparison
equal
deleted
inserted
replaced
8047:1e5e28bac299 | 8049:c703f9c4b025 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2010, 2013, 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. |
25 /** | 25 /** |
26 * @test | 26 * @test |
27 * @bug 7009359 | 27 * @bug 7009359 |
28 * @summary HS with -XX:+AggressiveOpts optimize new StringBuffer(null) so it does not throw NPE as expected | 28 * @summary HS with -XX:+AggressiveOpts optimize new StringBuffer(null) so it does not throw NPE as expected |
29 * | 29 * |
30 * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:+OptimizeStringConcat -XX:CompileCommand=exclude,Test7009359,main Test7009359 | 30 * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:+OptimizeStringConcat -XX:CompileCommand=dontinline,Test7009359,stringmakerBUG Test7009359 |
31 * | 31 * |
32 */ | 32 */ |
33 | 33 |
34 public class Test7009359 { | 34 public class Test7009359 { |
35 public static void main (String[] args) { | 35 public static void main (String[] args) { |
36 for(int i = 0; i < 1000000; i++) { | 36 for(int i = 0; i < 100000; i++) { |
37 if(!stringmakerBUG(null).equals("NPE")) { | 37 if(!stringmakerBUG(null).equals("NPE")) { |
38 System.out.println("StringBuffer(null) does not throw NPE"); | 38 System.out.println("StringBuffer(null) does not throw NPE"); |
39 System.exit(97); | 39 System.exit(97); |
40 } | 40 } |
41 } | 41 } |