Imported Upstream version 4.6.0.125

Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-08-03 10:59:49 +00:00
parent a569aebcfd
commit e79aa3c0ed
17047 changed files with 3137615 additions and 392334 deletions

View File

@@ -1,237 +0,0 @@
2009-09-26 Sebastien Pouliot <sebastien@ximian.com>
* SocketAsyncEventArgsTest.cs: New. Unit tests
2009-06-28 Gert Driesen <drieseng@users.sourceforge.net>
* SocketTest.cs: Added tests for argument checks, and improved tests
for disposed socket.
2009-06-28 Gert Driesen <drieseng@users.sourceforge.net>
* IPv6MulticastOptionTest.cs: Added .ctor and property tests.
* MulticastOptionTest.cs: Added .ctor and property tests.
* SocketTest.cs: Fixed compiler warnings. Improved tests for
closed socket. Added tests fr GetSocketOption, and SetSocketOption
overloads (for Linger, DontLinger, AddMembership and DropMembership).
* UdpClientTest.cs: Added .ctor and JoinMulticastGroup tests.
2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
* SocketTest.cs: tests for DontLinger.
2009-06-26 Robert Jordan <robertj@gmx.net>
* *.cs: Upgrade to new NUnit style.
2009-01-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
* SocketTest.cs:
(TestSelect1) avoid RST by reading the bytes from the client.
2009-01-07 Geoff Norton <gnorton@novell.com>
* SocketTest.cs: Disable some tests on the Mac that rely on socket
options that are unavailable.
2008-12-03 Gonzalo Paniagua Javier <gonzalo@novell.com>
* UdpClientTest.cs: test closing a UDP socket while receiving.
2008-11-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
* SocketTest.cs: added test case based on the one in bug
#443346.
2008-06-19 Dick Porter <dick@ximian.com>
* SocketTest.cs: Tests for generic Send() and Receive() methods.
2007-11-22 Gert Driesen <drieseng@users.sourceforge.net>
* UdpClientTest.cs: Fixed line endings.
2007-11-02 Zoltan Varga <vargaz@gmail.com>
* SocketTest.cs: Disable the send/receive buffer size tests.
2007-10-30 Dick Porter <dick@ximian.com>
* UdpClientTest.cs: Test for 324033.
2007-10-21 Robert Jordan <robertj@gmx.net>
* SocketTest.cs: Enable GetHashCodeTest.
2007-08-15 Gert Driesen <drieseng@users.sourceforge.net>
* SocketTest.cs: Improved EndConnect test. Added test for bug #82446,
and marked it NotWorking for 2.0 profile.
2007-05-14 Dick Porter <dick@ximian.com>
* SocketTest.cs: Tests for bug 75705
2007-04-21 Gert Driesen <drieseng@users.sourceforge.net>
* TcpClientTest.cs: Enabled test for bug #81105.
2007-04-20 Gert Driesen <drieseng@users.sourceforge.net>
* TcpClientTest.cs: ... and disable it again, since it fails buildbot
sles-9 x86-64.
2007-04-20 Gert Driesen <drieseng@users.sourceforge.net>
* TcpClientTest.cs: Re-enabled test for bug #81105 since it passes
on both linux and windows. I'll monitor the build bots to spot if it
breaks the tests.
2007-03-11 Gert Driesen <drieseng@users.sourceforge.net>
* TcpClientTest.cs: Added test for bug #81105.
2007-03-07 Vladimir Krasnov <vladimirk@mainsoft.com>
* SocketTest.jvm.cs: removed not supported calls for TARGET_JVM because
of validation failures
2007-02-08 Ilya Kharmatsky <ilyak -at- mainsoft.com>
* SocketTest.jvm.cs: added 'Ignore' attributes for non working tests.
2007-01-30 Ilya Kharmatsky <ilyak -at- mainsoft.com>
* SocketTest.jvm.cs: added - forked out from SocketTest.cs due to
a lot 'TARGET_JVM' specific changes.
2007-01-26 Dick Porter <dick@ximian.com>
* SocketTest.cs: New test for SO_ERROR reading, returning the same
value over and over.
2007-01-25 Ilya Kharmatsky <ilyak -at- mainsoft.com>
* UdbClientTest.cs: Added Ignore attribute for entire test fixture
under TARGET_JVM directive.
2007-01-24 Dick Porter <dick@ximian.com>
* NetworkStreamTest.cs: Test 2.0 ReadTimeout property
2007-01-23 Dick Porter <dick@ximian.com>
* TcpListenerTest.cs: Test 2.0 Start(int) overload
* TcpClientTest.cs: Test 2.0 Connect(IPAddress[], port) overload
2007-01-11 Dick Porter <dick@ximian.com>
* SocketTest.cs:
* UdpClientTest.cs: Test 2.0 additions
2006-11-24 Dick Porter <dick@ximian.com>
* SocketTest.cs: Add a test for async non blocking connects that
should fail, leaving Socket.Connected == false. Based on test
case in bug 79878.
2005-09-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* SocketTest.cs: added a bunch of tests expecting
ObjectDisposedException to be thrown.
2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* SocketTest.cs: added new test for Select.
2005-06-04 Gert Driesen <drieseng@users.sourceforge.net>
* SocketTest.cs: added test for bug #75158 (incompatible address).
2005-06-04 Gert Driesen <drieseng@users.sourceforge.net>
* SocketTest.cs: use IPAddress.Loopback in IPEndPoint to allow
AcceptBlockingStatus test to pass on both Mono and MS.NET.
2005-06-04 Gert Driesen <drieseng@users.sourceforge.net>
* SocketTest.cs: added test for bug #75154.
2005-06-04 Gert Driesen <drieseng@users.sourceforge.net>
* TcpListenerTest.cs: remove NotDotNet category from TcpListener
test as its working just fine on both MS.NET 1.x and 2.0.
2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* TcpListenerTest.cs: actually connect the socket to the listener. Fixes
the test.
2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
* NetworkStreamCas.cs: New. CAS unit tests for NetworkStream.
* SocketCas.cs: New. CAS unit tests for Socket.
* SocketTest.cs: Make some fields public so they can be reused.
* TcpClientCas.cs: New. CAS unit tests for TcpClient (currently
commented as the Begin* methods aren't yet implemented).
2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* SocketTest.cs: added test for setting a boolean socket option.
2005-03-06 Nick Drochak <ndrochak@ieee.org>
* TcpClientTest.cs: Choose a different port so test will pass on MS.NET
* TcpListenerTest.cs: Ignore test that doesn't play well on MS.NET
2005-02-23 Dick Porter <dick@ximian.com>
* UdpClientTest.cs: Added, with UdpClientBroadcastTest from Chris
Bacon <chris.bacon@docobo.co.uk>
2005-02-01 Zoltan Varga <vargaz@freemail.hu>
* SocketTest.cs: Mark some tests with [Category ("InetAccess")].
2005-01-08 Nick Drochak <ndrochak@ieee.org>
* SocketTest.cs: Ignore test on MS.NET
2004-10-14 Dick Porter <dick@ximian.com>
* SocketTest.cs: Test the blocking status of accepted sockets
2004-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* SocketTest.cs: added test for Select with empty lists. Changed the
'bogus' address of EndConnect test.
2003-12-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* SocketTest.cs: new test for asynchronous connection failure.
Test by Brad FitzpatrickBrad Fitzpatrick <brad@danga.com>.
2003-08-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* TcpListenerTest.cs: added more tests.
2003-07-16 Peter Williams <peter@newton.cx>
* TcpListenerTest.cs: Initialize outSock to null to
prevent an mcs compile error.
2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
* TcpListenerTest.cs: Forced IPv4 listener test.
2002-11-03 Phillip Pearson <pp@myelin.co.nz>
* AllTests.cs: Fixed Lawrence's e-mail address.
2002-05-17 Lawrence Pit <loz@cable.a2000.nl>
* AllTests.cs: added

View File

@@ -106,11 +106,11 @@ namespace MonoTests.System.Net.Sockets
bool res = clientSocket.SendAsync (e);
if (res) {
if (!m.WaitOne (1500))
throw new TimeoutException ();
Assert.Fail ("Timeout #1");
}
if (!mainEvent.WaitOne (1500))
throw new TimeoutException ();
Assert.Fail ("Timeout #2");
if (error != null)
throw error;
@@ -124,13 +124,13 @@ namespace MonoTests.System.Net.Sockets
res = clientSocket.SendAsync (e);
if (res) {
if (!m.WaitOne (1500))
throw new TimeoutException ();
Assert.Fail ("Timeout #3");
}
if (!mainEvent.WaitOne (1500))
throw new TimeoutException ();
Assert.Fail ("Timeout #4");
if (error != null)
throw error;
}
}
}
}

View File

@@ -1 +1 @@
b2e9eba4a8518bcdbcccdc6031b2c323af6ce88b
f4586a253f8ce09c2b2178d6f5e08ad53b55445a

View File

@@ -35,12 +35,13 @@ namespace MonoTests.System.Net.Sockets
Socket lSock = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
lSock.Bind(new IPEndPoint(IPAddress.Any, 8765));
var port = NetworkHelpers.FindFreePort ();
lSock.Bind(new IPEndPoint(IPAddress.Any, port));
lSock.Listen(-1);
// connect to it with a TcpClient
TcpClient outClient = new TcpClient("localhost", 8765);
TcpClient outClient = new TcpClient("localhost", port);
Socket inSock = lSock.Accept();
@@ -77,9 +78,10 @@ namespace MonoTests.System.Net.Sockets
[Test] // bug #81105
public void CloseTest ()
{
IPEndPoint localEP = new IPEndPoint (IPAddress.Loopback, 8765);
var port = NetworkHelpers.FindFreePort ();
IPEndPoint localEP = new IPEndPoint (IPAddress.Loopback, port);
using (SocketResponder sr = new SocketResponder (localEP, s => CloseRequestHandler (s))) {
TcpClient tcpClient = new TcpClient (IPAddress.Loopback.ToString (), 8765);
TcpClient tcpClient = new TcpClient (IPAddress.Loopback.ToString (), port);
NetworkStream ns = tcpClient.GetStream ();
Assert.IsNotNull (ns, "#A1");
Assert.AreEqual (0, tcpClient.Available, "#A2");
@@ -104,7 +106,7 @@ namespace MonoTests.System.Net.Sockets
}
using (SocketResponder sr = new SocketResponder (localEP, s => CloseRequestHandler (s))) {
TcpClient tcpClient = new TcpClient (IPAddress.Loopback.ToString (), 8765);
TcpClient tcpClient = new TcpClient (IPAddress.Loopback.ToString (), port);
Assert.AreEqual (0, tcpClient.Available, "#B1");
Assert.IsTrue (tcpClient.Connected, "#B2");
// Assert.IsFalse (tcpClient.ExclusiveAddressUse, "#B3");

View File

@@ -15,6 +15,8 @@ using System.Net;
using System.Net.Sockets;
using NUnit.Framework;
using MonoTests.Helpers;
namespace MonoTests.System.Net.Sockets
{
[TestFixture]
@@ -23,8 +25,9 @@ namespace MonoTests.System.Net.Sockets
[Test]
public void TcpListener ()
{
var port = NetworkHelpers.FindFreePort ();
// listen with a new listener (IPv4 is the default)
TcpListener inListener = new TcpListener (8766);
TcpListener inListener = new TcpListener (port);
inListener.Start();
@@ -37,7 +40,7 @@ namespace MonoTests.System.Net.Sockets
/// Only keep IPv4 addresses, our Server is in IPv4 only mode.
outSock = new Socket (address.AddressFamily, SocketType.Stream,
ProtocolType.IP);
IPEndPoint remote = new IPEndPoint (address, 8766);
IPEndPoint remote = new IPEndPoint (address, port);
outSock.Connect (remote);
break;
}
@@ -106,7 +109,7 @@ namespace MonoTests.System.Net.Sockets
class MyListener : TcpListener
{
public MyListener ()
: base (IPAddress.Loopback, 5000)
: base (IPAddress.Loopback, NetworkHelpers.FindFreePort ())
{
}
@@ -171,7 +174,8 @@ namespace MonoTests.System.Net.Sockets
[Test]
public void StartListenMoreThan5 ()
{
TcpListener listen = new TcpListener (IPAddress.Loopback, 1234);
var port = NetworkHelpers.FindFreePort ();
TcpListener listen = new TcpListener (IPAddress.Loopback, port);
listen.Start (6);
listen.Stop ();

View File

@@ -1064,6 +1064,26 @@ namespace MonoTests.System.Net.Sockets {
client.Close ();
}
[Test] // #6057
public void ReceiveIPv6 ()
{
if (!Socket.OSSupportsIPv6)
Assert.Ignore ("IPv6 not enabled.");
int PORT = 9997;
using(var udpClient = new UdpClient (PORT, AddressFamily.InterNetworkV6))
using(var udpClient2 = new UdpClient (PORT+1, AddressFamily.InterNetworkV6))
{
var dataSent = new byte [] {1,2,3};
udpClient2.SendAsync (dataSent, dataSent.Length, "::1", PORT);
IPEndPoint endPoint = new IPEndPoint (IPAddress.IPv6Any, 0);
var data = udpClient.Receive (ref endPoint);
Assert.AreEqual (dataSent.Length, data.Length);
}
}
/* No test for Ttl default as it is platform dependent */