Thu, 14 Feb 2013 09:11:43 +0100
8006398: Add regression tests for deprectated GCs
Reviewed-by: ehelin, jwilhelm, jmasa
1.1 --- a/test/TEST.ROOT Fri Feb 15 13:36:56 2013 -0800 1.2 +++ b/test/TEST.ROOT Thu Feb 14 09:11:43 2013 +0100 1.3 @@ -28,4 +28,4 @@ 1.4 # DO NOT EDIT without first contacting hotspot-regtest@sun.com 1.5 1.6 # The list of keywords supported in this test suite 1.7 -keys=cte_test jcmd nmt regression 1.8 +keys=cte_test jcmd nmt regression gc
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/test/gc/startup_warnings/TestCMS.java Thu Feb 14 09:11:43 2013 +0100 2.3 @@ -0,0 +1,46 @@ 2.4 +/* 2.5 +* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 2.6 +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.7 +* 2.8 +* This code is free software; you can redistribute it and/or modify it 2.9 +* under the terms of the GNU General Public License version 2 only, as 2.10 +* published by the Free Software Foundation. 2.11 +* 2.12 +* This code is distributed in the hope that it will be useful, but WITHOUT 2.13 +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2.14 +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2.15 +* version 2 for more details (a copy is included in the LICENSE file that 2.16 +* accompanied this code). 2.17 +* 2.18 +* You should have received a copy of the GNU General Public License version 2.19 +* 2 along with this work; if not, write to the Free Software Foundation, 2.20 +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2.21 +* 2.22 +* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2.23 +* or visit www.oracle.com if you need additional information or have any 2.24 +* questions. 2.25 +*/ 2.26 + 2.27 +/* 2.28 +* @test TestCMS 2.29 +* @key gc 2.30 +* @bug 8006398 2.31 +* @summary Test that CMS does not print a warning message 2.32 +* @library /testlibrary 2.33 +*/ 2.34 + 2.35 +import com.oracle.java.testlibrary.OutputAnalyzer; 2.36 +import com.oracle.java.testlibrary.ProcessTools; 2.37 + 2.38 + 2.39 +public class TestCMS { 2.40 + 2.41 + public static void main(String args[]) throws Exception { 2.42 + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseConcMarkSweepGC", "-version"); 2.43 + OutputAnalyzer output = new OutputAnalyzer(pb.start()); 2.44 + output.shouldNotContain("warning"); 2.45 + output.shouldNotContain("error"); 2.46 + output.shouldHaveExitValue(0); 2.47 + } 2.48 + 2.49 +}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/test/gc/startup_warnings/TestCMSIncrementalMode.java Thu Feb 14 09:11:43 2013 +0100 3.3 @@ -0,0 +1,46 @@ 3.4 + 3.5 +/* 3.6 +* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 3.7 +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.8 +* 3.9 +* This code is free software; you can redistribute it and/or modify it 3.10 +* under the terms of the GNU General Public License version 2 only, as 3.11 +* published by the Free Software Foundation. 3.12 +* 3.13 +* This code is distributed in the hope that it will be useful, but WITHOUT 3.14 +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3.15 +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3.16 +* version 2 for more details (a copy is included in the LICENSE file that 3.17 +* accompanied this code). 3.18 +* 3.19 +* You should have received a copy of the GNU General Public License version 3.20 +* 2 along with this work; if not, write to the Free Software Foundation, 3.21 +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3.22 +* 3.23 +* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3.24 +* or visit www.oracle.com if you need additional information or have any 3.25 +* questions. 3.26 +*/ 3.27 + 3.28 +/* 3.29 +* @test TestCMSIncrementalMode 3.30 +* @key gc 3.31 +* @bug 8006398 3.32 +* @summary Test that the deprecated CMSIncrementalMode print a warning message 3.33 +* @library /testlibrary 3.34 +*/ 3.35 + 3.36 +import com.oracle.java.testlibrary.OutputAnalyzer; 3.37 +import com.oracle.java.testlibrary.ProcessTools; 3.38 + 3.39 +public class TestCMSIncrementalMode { 3.40 + 3.41 + public static void main(String args[]) throws Exception { 3.42 + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseConcMarkSweepGC", "-XX:+CMSIncrementalMode", "-version"); 3.43 + OutputAnalyzer output = new OutputAnalyzer(pb.start()); 3.44 + output.shouldContain("warning: Using incremental CMS is deprecated and will likely be removed in a future release"); 3.45 + output.shouldNotContain("error"); 3.46 + output.shouldHaveExitValue(0); 3.47 + } 3.48 + 3.49 +}
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/test/gc/startup_warnings/TestCMSNoIncrementalMode.java Thu Feb 14 09:11:43 2013 +0100 4.3 @@ -0,0 +1,45 @@ 4.4 +/* 4.5 +* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 4.6 +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.7 +* 4.8 +* This code is free software; you can redistribute it and/or modify it 4.9 +* under the terms of the GNU General Public License version 2 only, as 4.10 +* published by the Free Software Foundation. 4.11 +* 4.12 +* This code is distributed in the hope that it will be useful, but WITHOUT 4.13 +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 4.14 +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 4.15 +* version 2 for more details (a copy is included in the LICENSE file that 4.16 +* accompanied this code). 4.17 +* 4.18 +* You should have received a copy of the GNU General Public License version 4.19 +* 2 along with this work; if not, write to the Free Software Foundation, 4.20 +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 4.21 +* 4.22 +* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 4.23 +* or visit www.oracle.com if you need additional information or have any 4.24 +* questions. 4.25 +*/ 4.26 + 4.27 +/* 4.28 +* @test TestCMSNoIncrementalMode 4.29 +* @key gc 4.30 +* @bug 8006398 4.31 +* @summary Test that CMS with incremental mode turned off does not print a warning message 4.32 +* @library /testlibrary 4.33 +*/ 4.34 + 4.35 +import com.oracle.java.testlibrary.OutputAnalyzer; 4.36 +import com.oracle.java.testlibrary.ProcessTools; 4.37 + 4.38 +public class TestCMSNoIncrementalMode { 4.39 + 4.40 + public static void main(String args[]) throws Exception { 4.41 + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseConcMarkSweepGC", "-XX:-CMSIncrementalMode", "-version"); 4.42 + OutputAnalyzer output = new OutputAnalyzer(pb.start()); 4.43 + output.shouldNotContain("warning"); 4.44 + output.shouldNotContain("error"); 4.45 + output.shouldHaveExitValue(0); 4.46 + } 4.47 + 4.48 +}
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/test/gc/startup_warnings/TestDefNewCMS.java Thu Feb 14 09:11:43 2013 +0100 5.3 @@ -0,0 +1,45 @@ 5.4 +/* 5.5 +* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 5.6 +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5.7 +* 5.8 +* This code is free software; you can redistribute it and/or modify it 5.9 +* under the terms of the GNU General Public License version 2 only, as 5.10 +* published by the Free Software Foundation. 5.11 +* 5.12 +* This code is distributed in the hope that it will be useful, but WITHOUT 5.13 +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 5.14 +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 5.15 +* version 2 for more details (a copy is included in the LICENSE file that 5.16 +* accompanied this code). 5.17 +* 5.18 +* You should have received a copy of the GNU General Public License version 5.19 +* 2 along with this work; if not, write to the Free Software Foundation, 5.20 +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 5.21 +* 5.22 +* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 5.23 +* or visit www.oracle.com if you need additional information or have any 5.24 +* questions. 5.25 +*/ 5.26 + 5.27 +/* 5.28 +* @test TestDefNewCMS 5.29 +* @key gc 5.30 +* @bug 8006398 5.31 +* @summary Test that the deprecated DefNew+CMS combination print a warning message 5.32 +* @library /testlibrary 5.33 +*/ 5.34 + 5.35 +import com.oracle.java.testlibrary.OutputAnalyzer; 5.36 +import com.oracle.java.testlibrary.ProcessTools; 5.37 + 5.38 +public class TestDefNewCMS { 5.39 + 5.40 + public static void main(String args[]) throws Exception { 5.41 + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:-UseParNewGC", "-XX:+UseConcMarkSweepGC", "-version"); 5.42 + OutputAnalyzer output = new OutputAnalyzer(pb.start()); 5.43 + output.shouldContain("warning: Using the DefNew young collector with the CMS collector is deprecated and will likely be removed in a future release"); 5.44 + output.shouldNotContain("error"); 5.45 + output.shouldHaveExitValue(0); 5.46 + } 5.47 + 5.48 +}
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/test/gc/startup_warnings/TestG1.java Thu Feb 14 09:11:43 2013 +0100 6.3 @@ -0,0 +1,45 @@ 6.4 +/* 6.5 +* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 6.6 +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6.7 +* 6.8 +* This code is free software; you can redistribute it and/or modify it 6.9 +* under the terms of the GNU General Public License version 2 only, as 6.10 +* published by the Free Software Foundation. 6.11 +* 6.12 +* This code is distributed in the hope that it will be useful, but WITHOUT 6.13 +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 6.14 +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 6.15 +* version 2 for more details (a copy is included in the LICENSE file that 6.16 +* accompanied this code). 6.17 +* 6.18 +* You should have received a copy of the GNU General Public License version 6.19 +* 2 along with this work; if not, write to the Free Software Foundation, 6.20 +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 6.21 +* 6.22 +* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 6.23 +* or visit www.oracle.com if you need additional information or have any 6.24 +* questions. 6.25 +*/ 6.26 + 6.27 +/* 6.28 +* @test TestG1 6.29 +* @key gc 6.30 +* @bug 8006398 6.31 +* @summary Test that the G1 collector does not print a warning message 6.32 +* @library /testlibrary 6.33 +*/ 6.34 + 6.35 +import com.oracle.java.testlibrary.OutputAnalyzer; 6.36 +import com.oracle.java.testlibrary.ProcessTools; 6.37 + 6.38 +public class TestG1 { 6.39 + 6.40 + public static void main(String args[]) throws Exception { 6.41 + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC", "-version"); 6.42 + OutputAnalyzer output = new OutputAnalyzer(pb.start()); 6.43 + output.shouldNotContain("warning"); 6.44 + output.shouldNotContain("error"); 6.45 + output.shouldHaveExitValue(0); 6.46 + } 6.47 + 6.48 +}
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/test/gc/startup_warnings/TestIncGC.java Thu Feb 14 09:11:43 2013 +0100 7.3 @@ -0,0 +1,46 @@ 7.4 +/* 7.5 +* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 7.6 +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.7 +* 7.8 +* This code is free software; you can redistribute it and/or modify it 7.9 +* under the terms of the GNU General Public License version 2 only, as 7.10 +* published by the Free Software Foundation. 7.11 +* 7.12 +* This code is distributed in the hope that it will be useful, but WITHOUT 7.13 +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 7.14 +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 7.15 +* version 2 for more details (a copy is included in the LICENSE file that 7.16 +* accompanied this code). 7.17 +* 7.18 +* You should have received a copy of the GNU General Public License version 7.19 +* 2 along with this work; if not, write to the Free Software Foundation, 7.20 +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 7.21 +* 7.22 +* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 7.23 +* or visit www.oracle.com if you need additional information or have any 7.24 +* questions. 7.25 +*/ 7.26 + 7.27 +/* 7.28 +* @test TestIncGC 7.29 +* @key gc 7.30 +* @bug 8006398 7.31 +* @summary Test that the deprecated -Xincgc print a warning message 7.32 +* @library /testlibrary 7.33 +*/ 7.34 + 7.35 +import com.oracle.java.testlibrary.OutputAnalyzer; 7.36 +import com.oracle.java.testlibrary.ProcessTools; 7.37 + 7.38 + 7.39 +public class TestIncGC { 7.40 + 7.41 + public static void main(String args[]) throws Exception { 7.42 + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xincgc", "-version"); 7.43 + OutputAnalyzer output = new OutputAnalyzer(pb.start()); 7.44 + output.shouldContain("warning: Using incremental CMS is deprecated and will likely be removed in a future release"); 7.45 + output.shouldNotContain("error"); 7.46 + output.shouldHaveExitValue(0); 7.47 + } 7.48 + 7.49 +}
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/test/gc/startup_warnings/TestParNewCMS.java Thu Feb 14 09:11:43 2013 +0100 8.3 @@ -0,0 +1,46 @@ 8.4 +/* 8.5 +* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 8.6 +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 8.7 +* 8.8 +* This code is free software; you can redistribute it and/or modify it 8.9 +* under the terms of the GNU General Public License version 2 only, as 8.10 +* published by the Free Software Foundation. 8.11 +* 8.12 +* This code is distributed in the hope that it will be useful, but WITHOUT 8.13 +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 8.14 +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 8.15 +* version 2 for more details (a copy is included in the LICENSE file that 8.16 +* accompanied this code). 8.17 +* 8.18 +* You should have received a copy of the GNU General Public License version 8.19 +* 2 along with this work; if not, write to the Free Software Foundation, 8.20 +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 8.21 +* 8.22 +* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 8.23 +* or visit www.oracle.com if you need additional information or have any 8.24 +* questions. 8.25 +*/ 8.26 + 8.27 +/* 8.28 +* @test TestParNewCMS 8.29 +* @key gc 8.30 +* @bug 8006398 8.31 +* @summary Test that the combination ParNew+CMS does not print a warning message 8.32 +* @library /testlibrary 8.33 +*/ 8.34 + 8.35 +import com.oracle.java.testlibrary.OutputAnalyzer; 8.36 +import com.oracle.java.testlibrary.ProcessTools; 8.37 + 8.38 + 8.39 +public class TestParNewCMS { 8.40 + 8.41 + public static void main(String args[]) throws Exception { 8.42 + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParNewGC", "-XX:+UseConcMarkSweepGC", "-version"); 8.43 + OutputAnalyzer output = new OutputAnalyzer(pb.start()); 8.44 + output.shouldNotContain("warning"); 8.45 + output.shouldNotContain("error"); 8.46 + output.shouldHaveExitValue(0); 8.47 + } 8.48 + 8.49 +}
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/test/gc/startup_warnings/TestParNewSerialOld.java Thu Feb 14 09:11:43 2013 +0100 9.3 @@ -0,0 +1,46 @@ 9.4 +/* 9.5 +* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 9.6 +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 9.7 +* 9.8 +* This code is free software; you can redistribute it and/or modify it 9.9 +* under the terms of the GNU General Public License version 2 only, as 9.10 +* published by the Free Software Foundation. 9.11 +* 9.12 +* This code is distributed in the hope that it will be useful, but WITHOUT 9.13 +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 9.14 +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 9.15 +* version 2 for more details (a copy is included in the LICENSE file that 9.16 +* accompanied this code). 9.17 +* 9.18 +* You should have received a copy of the GNU General Public License version 9.19 +* 2 along with this work; if not, write to the Free Software Foundation, 9.20 +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 9.21 +* 9.22 +* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 9.23 +* or visit www.oracle.com if you need additional information or have any 9.24 +* questions. 9.25 +*/ 9.26 + 9.27 +/* 9.28 +* @test TestParNewSerialOld 9.29 +* @key gc 9.30 +* @bug 8006398 9.31 +* @summary Test that the deprecated ParNew+SerialOld combination print a warning message 9.32 +* @library /testlibrary 9.33 +*/ 9.34 + 9.35 +import com.oracle.java.testlibrary.OutputAnalyzer; 9.36 +import com.oracle.java.testlibrary.ProcessTools; 9.37 + 9.38 + 9.39 +public class TestParNewSerialOld { 9.40 + 9.41 + public static void main(String args[]) throws Exception { 9.42 + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParNewGC", "-version"); 9.43 + OutputAnalyzer output = new OutputAnalyzer(pb.start()); 9.44 + output.shouldContain("warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release"); 9.45 + output.shouldNotContain("error"); 9.46 + output.shouldHaveExitValue(0); 9.47 + } 9.48 + 9.49 +}
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/test/gc/startup_warnings/TestParallelGC.java Thu Feb 14 09:11:43 2013 +0100 10.3 @@ -0,0 +1,46 @@ 10.4 +/* 10.5 +* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 10.6 +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 10.7 +* 10.8 +* This code is free software; you can redistribute it and/or modify it 10.9 +* under the terms of the GNU General Public License version 2 only, as 10.10 +* published by the Free Software Foundation. 10.11 +* 10.12 +* This code is distributed in the hope that it will be useful, but WITHOUT 10.13 +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10.14 +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 10.15 +* version 2 for more details (a copy is included in the LICENSE file that 10.16 +* accompanied this code). 10.17 +* 10.18 +* You should have received a copy of the GNU General Public License version 10.19 +* 2 along with this work; if not, write to the Free Software Foundation, 10.20 +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 10.21 +* 10.22 +* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 10.23 +* or visit www.oracle.com if you need additional information or have any 10.24 +* questions. 10.25 +*/ 10.26 + 10.27 +/* 10.28 +* @test TestParallelGC 10.29 +* @key gc 10.30 +* @bug 8006398 10.31 +* @summary Test that ParallelGC does not print a warning message 10.32 +* @library /testlibrary 10.33 +*/ 10.34 + 10.35 +import com.oracle.java.testlibrary.OutputAnalyzer; 10.36 +import com.oracle.java.testlibrary.ProcessTools; 10.37 + 10.38 + 10.39 +public class TestParallelGC { 10.40 + 10.41 + public static void main(String args[]) throws Exception { 10.42 + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParallelGC", "-version"); 10.43 + OutputAnalyzer output = new OutputAnalyzer(pb.start()); 10.44 + output.shouldNotContain("warning"); 10.45 + output.shouldNotContain("error"); 10.46 + output.shouldHaveExitValue(0); 10.47 + } 10.48 + 10.49 +}
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 11.2 +++ b/test/gc/startup_warnings/TestParallelScavengeSerialOld.java Thu Feb 14 09:11:43 2013 +0100 11.3 @@ -0,0 +1,46 @@ 11.4 +/* 11.5 +* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 11.6 +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 11.7 +* 11.8 +* This code is free software; you can redistribute it and/or modify it 11.9 +* under the terms of the GNU General Public License version 2 only, as 11.10 +* published by the Free Software Foundation. 11.11 +* 11.12 +* This code is distributed in the hope that it will be useful, but WITHOUT 11.13 +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11.14 +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11.15 +* version 2 for more details (a copy is included in the LICENSE file that 11.16 +* accompanied this code). 11.17 +* 11.18 +* You should have received a copy of the GNU General Public License version 11.19 +* 2 along with this work; if not, write to the Free Software Foundation, 11.20 +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 11.21 +* 11.22 +* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 11.23 +* or visit www.oracle.com if you need additional information or have any 11.24 +* questions. 11.25 +*/ 11.26 + 11.27 +/* 11.28 +* @test TestParallelScavengeSerialOld 11.29 +* @key gc 11.30 +* @bug 8006398 11.31 +* @summary Test that the ParallelScavenge+SerialOld combination does not print a warning message 11.32 +* @library /testlibrary 11.33 +*/ 11.34 + 11.35 +import com.oracle.java.testlibrary.OutputAnalyzer; 11.36 +import com.oracle.java.testlibrary.ProcessTools; 11.37 + 11.38 + 11.39 +public class TestParallelScavengeSerialOld { 11.40 + 11.41 + public static void main(String args[]) throws Exception { 11.42 + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParallelGC", "-XX:-UseParallelOldGC", "-version"); 11.43 + OutputAnalyzer output = new OutputAnalyzer(pb.start()); 11.44 + output.shouldNotContain("warning"); 11.45 + output.shouldNotContain("error"); 11.46 + output.shouldHaveExitValue(0); 11.47 + } 11.48 + 11.49 +}
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 12.2 +++ b/test/gc/startup_warnings/TestSerialGC.java Thu Feb 14 09:11:43 2013 +0100 12.3 @@ -0,0 +1,46 @@ 12.4 +/* 12.5 +* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 12.6 +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 12.7 +* 12.8 +* This code is free software; you can redistribute it and/or modify it 12.9 +* under the terms of the GNU General Public License version 2 only, as 12.10 +* published by the Free Software Foundation. 12.11 +* 12.12 +* This code is distributed in the hope that it will be useful, but WITHOUT 12.13 +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12.14 +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12.15 +* version 2 for more details (a copy is included in the LICENSE file that 12.16 +* accompanied this code). 12.17 +* 12.18 +* You should have received a copy of the GNU General Public License version 12.19 +* 2 along with this work; if not, write to the Free Software Foundation, 12.20 +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 12.21 +* 12.22 +* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 12.23 +* or visit www.oracle.com if you need additional information or have any 12.24 +* questions. 12.25 +*/ 12.26 + 12.27 +/* 12.28 +* @test TestSerialGC 12.29 +* @key gc 12.30 +* @bug 8006398 12.31 +* @summary Test that SerialGC does not print a warning message 12.32 +* @library /testlibrary 12.33 +*/ 12.34 + 12.35 +import com.oracle.java.testlibrary.OutputAnalyzer; 12.36 +import com.oracle.java.testlibrary.ProcessTools; 12.37 + 12.38 + 12.39 +public class TestSerialGC { 12.40 + 12.41 + public static void main(String args[]) throws Exception { 12.42 + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseSerialGC", "-version"); 12.43 + OutputAnalyzer output = new OutputAnalyzer(pb.start()); 12.44 + output.shouldNotContain("warning"); 12.45 + output.shouldNotContain("error"); 12.46 + output.shouldHaveExitValue(0); 12.47 + } 12.48 + 12.49 +}