equal
deleted
inserted
replaced
23 */ |
23 */ |
24 |
24 |
25 /* |
25 /* |
26 * @test |
26 * @test |
27 * @summary Ensure that support for AppCDS custom class loaders are not enabled on unsupported platforms. |
27 * @summary Ensure that support for AppCDS custom class loaders are not enabled on unsupported platforms. |
28 * The only supported platforms are Linux/AMD64 and 64-bit Solaris. |
|
29 * (NOTE: AppCDS does not support uncompressed oops) |
28 * (NOTE: AppCDS does not support uncompressed oops) |
30 * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) |
29 * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) |
|
30 * @requires vm.cds |
31 * @library /test/lib /test/hotspot/jtreg/runtime/appcds |
31 * @library /test/lib /test/hotspot/jtreg/runtime/appcds |
32 * @modules java.base/jdk.internal.misc |
32 * @modules java.base/jdk.internal.misc |
33 * java.management |
33 * java.management |
34 * jdk.jartool/sun.tools.jar |
34 * jdk.jartool/sun.tools.jar |
35 * @compile test-classes/SimpleHello.java |
35 * @compile test-classes/SimpleHello.java |
53 "CustomLoadee id: 2 super: 1 source: " + appJar |
53 "CustomLoadee id: 2 super: 1 source: " + appJar |
54 }; |
54 }; |
55 |
55 |
56 OutputAnalyzer out = TestCommon.dump(appJar, classlist); |
56 OutputAnalyzer out = TestCommon.dump(appJar, classlist); |
57 |
57 |
58 if ((Platform.isSolaris() && Platform.is64bit()) || |
58 if (Platform.areCustomLoadersSupportedForCDS()) { |
59 (Platform.isLinux() && Platform.isX64())) { |
|
60 out.shouldNotContain(PLATFORM_NOT_SUPPORTED_WARNING); |
59 out.shouldNotContain(PLATFORM_NOT_SUPPORTED_WARNING); |
61 out.shouldHaveExitValue(0); |
60 out.shouldHaveExitValue(0); |
62 } else { |
61 } else { |
63 out.shouldContain(PLATFORM_NOT_SUPPORTED_WARNING); |
62 out.shouldContain(PLATFORM_NOT_SUPPORTED_WARNING); |
64 out.shouldHaveExitValue(1); |
63 out.shouldHaveExitValue(1); |