equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2017, 2018, 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. |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 8164437 |
26 * @bug 8164437 8194486 |
27 * @summary GSSContext type when jdk.security.jgss is not available |
27 * @summary GSSContext type when jdk.security.jgss is not available |
28 * @library /test/lib |
28 * @library /test/lib |
29 * @compile -XDignore.symbol.file ModuleName.java |
29 * @compile -XDignore.symbol.file ModuleName.java |
30 * @build jdk.test.lib.Utils |
30 * @build jdk.test.lib.Utils |
31 * jdk.test.lib.Asserts |
31 * jdk.test.lib.Asserts |
32 * jdk.test.lib.JDKToolFinder |
32 * jdk.test.lib.JDKToolFinder |
33 * jdk.test.lib.JDKToolLauncher |
33 * jdk.test.lib.JDKToolLauncher |
34 * jdk.test.lib.Platform |
34 * jdk.test.lib.Platform |
35 * jdk.test.lib.process.* |
35 * jdk.test.lib.process.* |
36 * @run main/othervm ModuleName |
36 * @run main jdk.test.lib.FileInstaller TestHosts TestHosts |
|
37 * @run main/othervm -Djdk.net.hosts.file=TestHosts ModuleName |
37 */ |
38 */ |
38 |
39 |
39 import jdk.test.lib.process.ProcessTools; |
40 import jdk.test.lib.process.ProcessTools; |
40 import sun.security.jgss.GSSUtil; |
41 import sun.security.jgss.GSSUtil; |
41 |
42 |
56 Stream.of(jdk.internal.misc.VM.getRuntimeArguments()) |
57 Stream.of(jdk.internal.misc.VM.getRuntimeArguments()) |
57 .filter(arg -> arg.startsWith("--add-exports=") || |
58 .filter(arg -> arg.startsWith("--add-exports=") || |
58 arg.startsWith("--add-opens=")) |
59 arg.startsWith("--add-opens=")) |
59 .forEach(cmd::add); |
60 .forEach(cmd::add); |
60 cmd.addAll(List.of( |
61 cmd.addAll(List.of( |
|
62 "-Djdk.net.hosts.file=TestHosts", |
61 "-Dtest.src=" + System.getProperty("test.src"), |
63 "-Dtest.src=" + System.getProperty("test.src"), |
62 "--add-modules", |
64 "--add-modules", |
63 "java.base,java.security.jgss,jdk.security.auth", |
65 "java.base,java.security.jgss,jdk.security.auth", |
64 "--limit-modules", |
66 "--limit-modules", |
65 "java.security.jgss,jdk.security.auth", |
67 "java.security.jgss,jdk.security.auth", |