From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15358 invoked by alias); 13 Mar 2008 04:57:22 -0000 Received: (qmail 15345 invoked by uid 22791); 13 Mar 2008 04:57:20 -0000 X-Spam-Check-By: sourceware.org Received: from smtp1.dnsmadeeasy.com (HELO smtp1.dnsmadeeasy.com) (205.234.170.144) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Mar 2008 04:57:01 +0000 Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id 1BCA8315AF8 for ; Thu, 13 Mar 2008 04:57:00 +0000 (UTC) X-Authenticated-Name: js.dnsmadeeasy X-Transit-System: In case of SPAM please contact abuse@dnsmadeeasy.com Received: from avtrex.com (unknown [67.116.42.147]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP for ; Thu, 13 Mar 2008 04:56:59 +0000 (UTC) Received: from [192.168.7.221] ([192.168.7.221]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 12 Mar 2008 21:56:57 -0700 Message-ID: <47D8B416.3090101@avtrex.com> Date: Thu, 13 Mar 2008 04:57:00 -0000 From: David Daney User-Agent: Thunderbird 1.5.0.12 (X11/20071019) MIME-Version: 1.0 To: mauve-patches Subject: FYI: New java.net.Socet test. Content-Type: multipart/mixed; boundary="------------050804020007000304070309" X-IsSubscribed: yes Mailing-List: contact mauve-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-patches-owner@sourceware.org X-SW-Source: 2008/txt/msg00020.txt.bz2 This is a multi-part message in MIME format. --------------050804020007000304070309 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 275 This is a patch I have had in my local tree for a while. I wrote it when I was hacking around on libgcj's Socket code. Commited. 2008-03-12 David Daney * gnu/testlet/java/net/Socket/jdk14.java (test): Add 'bind to any local address' test. --------------050804020007000304070309 Content-Type: text/x-patch; name="mauve.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mauve.patch" Content-length: 993 Index: gnu/testlet/java/net/Socket/jdk14.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/Socket/jdk14.java,v retrieving revision 1.6 diff -u -p -r1.6 jdk14.java --- gnu/testlet/java/net/Socket/jdk14.java 8 Nov 2005 21:49:39 -0000 1.6 +++ gnu/testlet/java/net/Socket/jdk14.java 13 Mar 2008 04:50:10 -0000 @@ -78,5 +78,29 @@ public class jdk14 implements Testlet server.close(); } catch(IOException ignored) {} } + + try + { + harness.checkPoint("bind to any local address"); + sock = new Socket(); + InetAddress ia = null; + InetSocketAddress sa = new InetSocketAddress(ia, 30006); + sock.bind(sa); + harness.check(true); + } + catch (Exception e) + { + harness.debug(e); + harness.fail("unexpected error: bind() threw an exception"); + } + finally + { + try + { + if (sock != null) + sock.close(); + } + catch(IOException ignored) {} + } } } --------------050804020007000304070309--