From b4ba3cd01759bc902bcf389c4f98439f13feb41d Mon Sep 17 00:00:00 2001 From: kvn Date: Wed, 13 Dec 2017 11:59:55 -0800 Subject: [PATCH] 8191788: add jdk.internal.vm.compiler to --limit-modules if -Djvmci.Compiler=graal is in the command line Summary: skip tests which use --limit-modules when Graal is used as JIT compiler. Reviewed-by: alanb, mchung, dholmes, ccheung, dnsimon --- .hgignore | 2 ++ .../jtreg/runtime/SharedArchiveFile/BootAppendTests.java | 2 +- .../jtreg/runtime/appcds/jigsaw/JigsawOptionsCombo.java | 2 +- .../runtime/appcds/jigsaw/classpathtests/BootAppendTests.java | 2 +- .../runtime/appcds/jigsaw/classpathtests/ClassPathTests.java | 2 +- .../jigsaw/classpathtests/EmptyClassInBootClassPath.java | 2 +- .../jtreg/runtime/appcds/jigsaw/limitmods/LimitModsTests.java | 2 +- test/jdk/TEST.ROOT | 1 + test/jdk/com/sun/tools/attach/modules/Driver.java | 1 + test/jdk/java/lang/String/concat/WithSecurityManager.java | 3 ++- .../System/LoggerFinder/LoggerFinderAPI/LoggerFinderAPI.java | 1 + test/jdk/java/lang/instrument/TestAgentWithLimitMods.java | 3 ++- .../ManagementFactory/DefaultManagementProviderTest.java | 1 + test/jdk/java/net/SocketOption/OptionsTest.java | 3 ++- test/jdk/java/net/SocketOption/UnsupportedOptionsTest.java | 1 + .../java/nio/channels/DatagramChannel/SocketOptionTests.java | 3 ++- .../nio/channels/ServerSocketChannel/SocketOptionTests.java | 3 ++- .../jdk/java/nio/channels/SocketChannel/SocketOptionTests.java | 3 ++- test/jdk/tools/launcher/modules/limitmods/LimitModsTest.java | 1 + test/jdk/tools/launcher/modules/listmods/ListModsTest.java | 1 + .../modules/showmoduleresolution/ShowModuleResolutionTest.java | 1 + 21 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.hgignore b/.hgignore index 95446e54dc..35f87bf0e3 100644 --- a/.hgignore +++ b/.hgignore @@ -11,3 +11,5 @@ nbproject/private/ test/nashorn/script/external test/nashorn/lib NashornProfile.txt +.*/JTreport/.* +.*/JTwork/.* diff --git a/test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java b/test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java index 9cf2534d48..287d3b30ce 100644 --- a/test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java +++ b/test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java @@ -23,7 +23,7 @@ /** * @test - * @requires vm.cds + * @requires vm.cds & !vm.graal.enabled * @summary Testing -Xbootclasspath/a support for CDS * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) * @library /test/lib diff --git a/test/hotspot/jtreg/runtime/appcds/jigsaw/JigsawOptionsCombo.java b/test/hotspot/jtreg/runtime/appcds/jigsaw/JigsawOptionsCombo.java index 2513d0e5a1..a88eb2fa41 100644 --- a/test/hotspot/jtreg/runtime/appcds/jigsaw/JigsawOptionsCombo.java +++ b/test/hotspot/jtreg/runtime/appcds/jigsaw/JigsawOptionsCombo.java @@ -27,7 +27,7 @@ * @summary Test combinations of jigsaw options that affect the use of AppCDS * * AppCDS does not support uncompressed oops - * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) + * @requires ((vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)) & !vm.graal.enabled * @library /test/lib .. * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/BootAppendTests.java b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/BootAppendTests.java index 71392801fd..e35a718259 100644 --- a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/BootAppendTests.java +++ b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/BootAppendTests.java @@ -25,7 +25,7 @@ /** * @test * @summary AppCDS tests for testing -Xbootclasspath/a - * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) + * @requires ((vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)) & !vm.graal.enabled * @library /test/lib /test/hotspot/jtreg/runtime/appcds * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/ClassPathTests.java b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/ClassPathTests.java index 6f929ab227..b50cfb6bf7 100644 --- a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/ClassPathTests.java +++ b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/ClassPathTests.java @@ -24,7 +24,7 @@ /** * @test - * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) + * @requires ((vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)) & !vm.graal.enabled * @library ../.. * @library /test/lib * @modules java.base/jdk.internal.misc diff --git a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java index a635603473..63daf117cb 100644 --- a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java +++ b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java @@ -29,7 +29,7 @@ * 2) app loader will load the class from the jimage by default; * app loader will load the class from the bootclasspath if the * "--limit-modules java.base" option is specified - * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) + * @requires ((vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)) & !vm.graal.enabled * @library /test/lib /test/hotspot/jtreg/runtime/appcds * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsTests.java b/test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsTests.java index 434ddfcfae..6cceed1ae9 100644 --- a/test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsTests.java +++ b/test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsTests.java @@ -24,7 +24,7 @@ /** * @test - * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) + * @requires ((vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)) & !vm.graal.enabled * @library ../.. * @library /test/lib * @modules java.base/jdk.internal.misc diff --git a/test/jdk/TEST.ROOT b/test/jdk/TEST.ROOT index 2f00dbb7f8..0f089f1114 100644 --- a/test/jdk/TEST.ROOT +++ b/test/jdk/TEST.ROOT @@ -36,6 +36,7 @@ requires.extraPropDefns.vmOpts = -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI requires.properties= \ sun.arch.data.model \ java.runtime.name \ + vm.graal.enabled \ vm.cds # Minimum jtreg version diff --git a/test/jdk/com/sun/tools/attach/modules/Driver.java b/test/jdk/com/sun/tools/attach/modules/Driver.java index 7323709fcf..94d37531c5 100644 --- a/test/jdk/com/sun/tools/attach/modules/Driver.java +++ b/test/jdk/com/sun/tools/attach/modules/Driver.java @@ -23,6 +23,7 @@ /** * @test + * @requires !vm.graal.enabled * @modules jdk.attach * @build m/* Agent * @run main/othervm -Djdk.attach.allowAttachSelf m/p.Main jmx javaagent diff --git a/test/jdk/java/lang/String/concat/WithSecurityManager.java b/test/jdk/java/lang/String/concat/WithSecurityManager.java index 2835a3813f..475cc1938b 100644 --- a/test/jdk/java/lang/String/concat/WithSecurityManager.java +++ b/test/jdk/java/lang/String/concat/WithSecurityManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ * @test * @summary String concatenation fails with a custom SecurityManager that uses concatenation * @bug 8155090 8158851 + * @requires !vm.graal.enabled * * @compile WithSecurityManager.java * diff --git a/test/jdk/java/lang/System/LoggerFinder/LoggerFinderAPI/LoggerFinderAPI.java b/test/jdk/java/lang/System/LoggerFinder/LoggerFinderAPI/LoggerFinderAPI.java index 998b1fc675..a9f35d2259 100644 --- a/test/jdk/java/lang/System/LoggerFinder/LoggerFinderAPI/LoggerFinderAPI.java +++ b/test/jdk/java/lang/System/LoggerFinder/LoggerFinderAPI/LoggerFinderAPI.java @@ -46,6 +46,7 @@ * throwing NullPointerException. The test uses --limit-module * to force the selection of one or the other. * @author danielfuchs + * @requires !vm.graal.enabled * @build LoggerFinderAPI * @run main/othervm --limit-modules java.base,java.logging * -Djava.util.logging.SimpleFormatter.format=LOG-%4$s:-[%2$s]-%5$s%6$s%n diff --git a/test/jdk/java/lang/instrument/TestAgentWithLimitMods.java b/test/jdk/java/lang/instrument/TestAgentWithLimitMods.java index ddf51b5439..1ca4f3825e 100644 --- a/test/jdk/java/lang/instrument/TestAgentWithLimitMods.java +++ b/test/jdk/java/lang/instrument/TestAgentWithLimitMods.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,7 @@ /** * * @test + * @requires !vm.graal.enabled * @summary Tests that the -javaagent option adds the java.instrument into * the module graph * diff --git a/test/jdk/java/lang/management/ManagementFactory/DefaultManagementProviderTest.java b/test/jdk/java/lang/management/ManagementFactory/DefaultManagementProviderTest.java index e9ccd515a8..f09a51e3c0 100644 --- a/test/jdk/java/lang/management/ManagementFactory/DefaultManagementProviderTest.java +++ b/test/jdk/java/lang/management/ManagementFactory/DefaultManagementProviderTest.java @@ -26,6 +26,7 @@ * @bug 8151099 * @summary Verify platform MXBeans initialized properly with java.management * module only. No other management provider + * @requires !vm.graal.enabled * @modules java.management * @run main/othervm --limit-modules=java.management DefaultManagementProviderTest */ diff --git a/test/jdk/java/net/SocketOption/OptionsTest.java b/test/jdk/java/net/SocketOption/OptionsTest.java index 232873372e..214c2d920f 100644 --- a/test/jdk/java/net/SocketOption/OptionsTest.java +++ b/test/jdk/java/net/SocketOption/OptionsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,7 @@ /* * @test * @bug 8036979 8072384 8044773 + * @requires !vm.graal.enabled * @run main/othervm -Xcheck:jni OptionsTest * @run main/othervm -Xcheck:jni -Djava.net.preferIPv4Stack=true OptionsTest * @run main/othervm --limit-modules=java.base OptionsTest diff --git a/test/jdk/java/net/SocketOption/UnsupportedOptionsTest.java b/test/jdk/java/net/SocketOption/UnsupportedOptionsTest.java index e07cf66dd6..407811bb49 100644 --- a/test/jdk/java/net/SocketOption/UnsupportedOptionsTest.java +++ b/test/jdk/java/net/SocketOption/UnsupportedOptionsTest.java @@ -32,6 +32,7 @@ * @bug 8143554 8044773 * @summary Test checks that UnsupportedOperationException for unsupported * SOCKET_OPTIONS is thrown by both getOption() and setOption() methods. + * @requires !vm.graal.enabled * @run main UnsupportedOptionsTest * @run main/othervm --limit-modules=java.base UnsupportedOptionsTest */ diff --git a/test/jdk/java/nio/channels/DatagramChannel/SocketOptionTests.java b/test/jdk/java/nio/channels/DatagramChannel/SocketOptionTests.java index abb8b17497..00a232d9fd 100644 --- a/test/jdk/java/nio/channels/DatagramChannel/SocketOptionTests.java +++ b/test/jdk/java/nio/channels/DatagramChannel/SocketOptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,7 @@ /* @test * @bug 4640544 8044773 * @summary Unit test for setOption/getOption/options methods + * @requires !vm.graal.enabled * @run main SocketOptionTests * @run main/othervm --limit-modules=java.base SocketOptionTests */ diff --git a/test/jdk/java/nio/channels/ServerSocketChannel/SocketOptionTests.java b/test/jdk/java/nio/channels/ServerSocketChannel/SocketOptionTests.java index 1687b73f04..126d669d4c 100644 --- a/test/jdk/java/nio/channels/ServerSocketChannel/SocketOptionTests.java +++ b/test/jdk/java/nio/channels/ServerSocketChannel/SocketOptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ * @bug 4640544 8044773 * @summary Unit test for ServerSocketChannel setOption/getOption/options * methods. + * @requires !vm.graal.enabled * @run main SocketOptionTests * @run main/othervm --limit-modules=java.base SocketOptionTests */ diff --git a/test/jdk/java/nio/channels/SocketChannel/SocketOptionTests.java b/test/jdk/java/nio/channels/SocketChannel/SocketOptionTests.java index 5e75ad9a93..38b242bb4d 100644 --- a/test/jdk/java/nio/channels/SocketChannel/SocketOptionTests.java +++ b/test/jdk/java/nio/channels/SocketChannel/SocketOptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ * @bug 4640544 8044773 * @summary Unit test to check SocketChannel setOption/getOption/options * methods. + * @requires !vm.graal.enabled * @run main SocketOptionTests * @run main/othervm --limit-modules=java.base SocketOptionTests */ diff --git a/test/jdk/tools/launcher/modules/limitmods/LimitModsTest.java b/test/jdk/tools/launcher/modules/limitmods/LimitModsTest.java index e898837c72..d697067b1f 100644 --- a/test/jdk/tools/launcher/modules/limitmods/LimitModsTest.java +++ b/test/jdk/tools/launcher/modules/limitmods/LimitModsTest.java @@ -23,6 +23,7 @@ /** * @test + * @requires !vm.graal.enabled * @library /lib/testlibrary /test/lib * @modules java.desktop java.logging jdk.compiler * @build LimitModsTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.* diff --git a/test/jdk/tools/launcher/modules/listmods/ListModsTest.java b/test/jdk/tools/launcher/modules/listmods/ListModsTest.java index 913f17ee8a..38be89358a 100644 --- a/test/jdk/tools/launcher/modules/listmods/ListModsTest.java +++ b/test/jdk/tools/launcher/modules/listmods/ListModsTest.java @@ -23,6 +23,7 @@ /** * @test + * @requires !vm.graal.enabled * @library /lib/testlibrary /test/lib * @modules java.se * @build ListModsTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.* diff --git a/test/jdk/tools/launcher/modules/showmoduleresolution/ShowModuleResolutionTest.java b/test/jdk/tools/launcher/modules/showmoduleresolution/ShowModuleResolutionTest.java index 0d2a1c4c3e..d6eaedc693 100644 --- a/test/jdk/tools/launcher/modules/showmoduleresolution/ShowModuleResolutionTest.java +++ b/test/jdk/tools/launcher/modules/showmoduleresolution/ShowModuleResolutionTest.java @@ -23,6 +23,7 @@ /** * @test + * @requires !vm.graal.enabled * @modules jdk.jdeps jdk.zipfs * @library /lib/testlibrary * @build ShowModuleResolutionTest jdk.testlibrary.*