12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import com.oracle.java.testlibrary.*;
25
26 /*
27 * @test
28 * @bug 8006997
29 * @summary ContendedPaddingWidth should be range-checked
30 *
31 * @library /testlibrary
32 * @run main Options
33 */
34 public class Options {
35
36 public static void main(String[] args) throws Exception {
37 ProcessBuilder pb;
38 OutputAnalyzer output;
39
40 pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=-128", "-version");
41 output = new OutputAnalyzer(pb.start());
42 output.shouldContain("ContendedPaddingWidth");
43 output.shouldContain("must be in between");
44 output.shouldHaveExitValue(1);
45
46 pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=-8", "-version");
47 output = new OutputAnalyzer(pb.start());
48 output.shouldContain("ContendedPaddingWidth");
49 output.shouldContain("must be in between");
50 output.shouldHaveExitValue(1);
51
|
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import com.oracle.java.testlibrary.*;
25
26 /*
27 * @test
28 * @bug 8006997
29 * @summary ContendedPaddingWidth should be range-checked
30 *
31 * @library /testlibrary
32 * @build com.oracle.java.testlibrary.*
33 * @run main Options
34 */
35 public class Options {
36
37 public static void main(String[] args) throws Exception {
38 ProcessBuilder pb;
39 OutputAnalyzer output;
40
41 pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=-128", "-version");
42 output = new OutputAnalyzer(pb.start());
43 output.shouldContain("ContendedPaddingWidth");
44 output.shouldContain("must be in between");
45 output.shouldHaveExitValue(1);
46
47 pb = ProcessTools.createJavaProcessBuilder("-XX:ContendedPaddingWidth=-8", "-version");
48 output = new OutputAnalyzer(pb.start());
49 output.shouldContain("ContendedPaddingWidth");
50 output.shouldContain("must be in between");
51 output.shouldHaveExitValue(1);
52
|