8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
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 /* @test
25 * @bug 4889870 4890033
26 * @summary java -Xcheck:jni failing in net code on Solaris / [Datagram]Socket.getLocalAddress() failure
27 * @library /test/lib
28 * @run main/othervm -Xcheck:jni CheckJNI
29 */
30
31 import java.net.*;
32 import java.util.*;
33 import java.util.stream.Collectors;
34 import jdk.test.lib.NetworkConfiguration;
35
36 public class CheckJNI {
37 static Socket s;
38 static ServerSocket server;
39 static DatagramSocket dg1, dg2;
40
41 public static void main (String[] args) throws Exception {
42 /* try to invoke as much java.net native code as possible */
43
44 System.out.println ("Testing IPv4 Socket/ServerSocket");
45 server = new ServerSocket (0);
46 s = new Socket ("127.0.0.1", server.getLocalPort());
47 s.close();
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
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 /* @test
25 * @bug 4889870 4890033
26 * @summary java -Xcheck:jni failing in net code on Solaris / [Datagram]Socket.getLocalAddress() failure
27 * @library /test/lib
28 * @build jdk.test.lib.NetworkConfiguration
29 * jdk.test.lib.Utils
30 * jdk.test.lib.Asserts
31 * jdk.test.lib.JDKToolFinder
32 * jdk.test.lib.JDKToolLauncher
33 * jdk.test.lib.Platform
34 * jdk.test.lib.process.*
35 * @run main/othervm -Xcheck:jni CheckJNI
36 */
37
38 import java.net.*;
39 import java.util.*;
40 import java.util.stream.Collectors;
41 import jdk.test.lib.NetworkConfiguration;
42
43 public class CheckJNI {
44 static Socket s;
45 static ServerSocket server;
46 static DatagramSocket dg1, dg2;
47
48 public static void main (String[] args) throws Exception {
49 /* try to invoke as much java.net native code as possible */
50
51 System.out.println ("Testing IPv4 Socket/ServerSocket");
52 server = new ServerSocket (0);
53 s = new Socket ("127.0.0.1", server.getLocalPort());
54 s.close();
|