You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -1,15 +0,0 @@
|
||||
2009-02-19 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* RealTimeSignumTest.cs: Disable the tests on Mac OS X, as OS X
|
||||
doesn't support real-time signals.
|
||||
|
||||
2008-12-19 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* RealTimeSignumTest.cs: Added; unit tests for RealTimeSignum.
|
||||
Patch thanks to tim.jenks@realtimeworlds.com.
|
||||
|
||||
2005-11-28 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* ChangeLog: Started.
|
||||
* StdlibTest.cs: Moved from ../Mono.Unix. Test Mono.Unix.Native namespace.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,144 +0,0 @@
|
||||
2009-08-28 Atsushi Enomoto <atsushi@ximian.com>
|
||||
|
||||
* UnixEncodingTest.cs : upgrade to modern nunit style.
|
||||
|
||||
2009-02-20 Jonathan Pryor <jpryor@novell.com>
|
||||
|
||||
* UnixSignalTest.cs: Add tests to check for concurrent
|
||||
UnixSignal.WaitOne() invocations. Tests thanks to
|
||||
tim.jenks@realtimeworlds.com.
|
||||
|
||||
2009-02-19 Jonathan Pryor <jpryor@novell.com>
|
||||
|
||||
* UnixSignalTest.cs: Disable the tests that use RealTimeSignum on OS X,
|
||||
as OS X doesn't support real-time signals (and thus these will
|
||||
always error, often for the "wrong" reason).
|
||||
|
||||
2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
|
||||
|
||||
* UnixSignalTest.cs: Fix the RealTimeSignum constructor
|
||||
tests to take into account the fact that some signals might be
|
||||
in used by the runtime. Added a test for multiple registration
|
||||
of a rt signal.
|
||||
|
||||
2009-01-07 Geoff Norton <gnorton@novell.com>
|
||||
|
||||
* UnixSignalTest.cs: Disable the tests that storm signals on OSX.
|
||||
(They wont work)
|
||||
|
||||
2008-11-19 Jonathan Pryor <jpryor@novell.com>
|
||||
|
||||
* UnixSignalTest.cs: Add tests for RealTimeSignum constructors,
|
||||
.RealTimeSignum and .IsRealTimeSignal properties.
|
||||
Patch thanks to tim.jenks@realtimeworlds.com.
|
||||
|
||||
2008-11-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
|
||||
|
||||
* UnixSignalTest.cs: use WaitAny + 30s timeout.
|
||||
|
||||
2008-02-12 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* UnixSignalTest.cs: Fix the build.
|
||||
|
||||
2008-02-09 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* UnixSignalTest.cs: Added; tests Mono.Unix.UnixSignal.
|
||||
|
||||
2006-07-02 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* UnixPathTest.cs: Added; test UnixPath.Combine().
|
||||
|
||||
2005-12-07 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* UnixMarshalTest.cs: Make test public so that it's actually executed by
|
||||
NUnit; NUnit doesn't like private Test* methods -- rename; test
|
||||
UnixMarshal.PtrToString for a string containing 0 characters (this used to
|
||||
cause an ArgumentOutOfRangeException due to a bug).
|
||||
|
||||
2005-12-05 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* UnixUserTest.cs: s/UnixUser/UnixUserInfo/g (UnixUser is obsolete).
|
||||
|
||||
2005-12-05 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* UnixMarshalTest.cs: s/Free/FreeHeap/g (UnixMarshal.Free will be removed).
|
||||
|
||||
2005-11-28 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* UnixGroupTest.cs: The type of UnixGroupInfo.GroupId changed. UnixGroup is
|
||||
deprecated; use UnixGroupInfo instead.
|
||||
* UnixUserTest.cs: The type of UnixUserInfo.UserId changed. UnixUser if
|
||||
deprecated; use UnixUserInfo instead.
|
||||
|
||||
2005-10-26 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* UnixMarshalTest.cs: s/StringToAlloc/StringToHeap/g (UnixMarshal change).
|
||||
* UnixEncodingTest.cs: Deal with UnixEncoding.EscapeByte value change.
|
||||
|
||||
2005-10-25 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* UnixEncodingTest.cs: Added string/byte[] encoding tests for
|
||||
Mono.Unix.UnixEncoding.
|
||||
|
||||
2005-10-17 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* UnixMarshalTest.cs: Added string marshaling tests for Mono.Unix.UnixMarshal.
|
||||
|
||||
2005-06-29 Miguel de Icaza <miguel@ximian.com>
|
||||
|
||||
* StdioFileStreamTest.cs: comment out tests that depend on the
|
||||
underlying Stdio implementation.
|
||||
|
||||
2005-05-21 Ben Maurer <bmaurer@ximian.com>
|
||||
|
||||
* UnixUserTest.cs, UnixGroupTest.cs: Disable tests that might not
|
||||
work on a Solaris box with NIS. Bug #72293.
|
||||
|
||||
2005-04-29 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* StdioFileStreamTest.cs: Add FilePosition tests; remove `var = var`
|
||||
lines (added to remove warnings, but now produces other warnings).
|
||||
|
||||
2005-04-28 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* StdlibTest.cs: Calling a P/Invoke function from signal-handler context is
|
||||
*bad*, which is why I've had so much trouble getting consistent results
|
||||
getting this test to work -- it was broken by design. Instead, just save
|
||||
the signum passed to the handler (which is reentrant safe), and compare
|
||||
the saved value with the expected value after the signal handler returns.
|
||||
This should always work. Use SIGURG instead of SIGUSR1 because SIGURG is
|
||||
ignored by default (allowing us to call it without adding your own
|
||||
handler), unlike SIGUSR1 which terminates the program.
|
||||
|
||||
2005-03-28 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* StdioFileStreamTest.cs: Added; based on MonoTests.System.IO.FileStreamTest.
|
||||
|
||||
2005-02-09 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* StdlibTest.cs: Signal is currently ignored, but add Category(NotDotNet) so
|
||||
it isn't run even when we fix it. .NET 1.1 doesn't marshal delegates
|
||||
properly for signal (different calling conventions).
|
||||
Add Category(NotDotNet) for Snprintf(), as MSVCRT.dll doesn't export it.
|
||||
* UnixGroupTest.cs, UnixUserTest.cs: Don't run these under .NET, as Windows
|
||||
doesn't support the Syscall and related classes.
|
||||
|
||||
2005-02-01 Raja R Harinath <rharinath@novell.com>
|
||||
|
||||
* UnixUserTest.cs (UnixUserTest.ReentrantConstructors): Don't
|
||||
assume userid<->username mapping is a bijection.
|
||||
(UnixUserTest.NonReentrantSyscalls): Likewise.
|
||||
|
||||
2005-01-20 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* StdlibTest.cs: Ignore the signal(3) test, as it's currently hanging Mono.
|
||||
|
||||
2005-01-13 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* StdlibTest.cs: Added tests for signal(3) and snprintf(3).
|
||||
|
||||
2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
|
||||
|
||||
* ChangeLog: Started.
|
||||
* UnixGroupTest.cs, UnixUserTest.cs: Added.
|
||||
|
||||
@@ -1001,7 +1001,7 @@ namespace MonoTests.Mono.Unix {
|
||||
|
||||
Assert.AreEqual (end.Length, bytes.Length, prefix + ": byte length");
|
||||
|
||||
for (int i = 0; i < Math.Min (bytes.Length, end.Length); ++i)
|
||||
for (int i = 0; i < global::System.Math.Min (bytes.Length, end.Length); ++i)
|
||||
Assert.AreEqual (end [i], bytes [i], prefix + ": byte " + i);
|
||||
|
||||
int cc = unix.GetCharCount (end, 0, end.Length);
|
||||
@@ -1012,7 +1012,7 @@ namespace MonoTests.Mono.Unix {
|
||||
|
||||
Assert.AreEqual (start.Length, r, prefix + ": chars length");
|
||||
|
||||
for (int i = 0; i < Math.Min (r, start.Length); ++i) {
|
||||
for (int i = 0; i < global::System.Math.Min (r, start.Length); ++i) {
|
||||
Assert.AreEqual (start [i], chars [i], prefix + ": char " + i);
|
||||
}
|
||||
}
|
||||
|
||||
45
mcs/class/Mono.Posix/Test/Mono.Unix/UnixEndPointTest.cs
Normal file
45
mcs/class/Mono.Posix/Test/Mono.Unix/UnixEndPointTest.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
// UnixEndPointTest.cs: Unit tests for Mono.Unix.UnixListener
|
||||
//
|
||||
// Authors:
|
||||
// David Lechner (david@lechnology.com)
|
||||
//
|
||||
// (c) 2015 David Lechner
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
|
||||
using NUnit.Framework;
|
||||
using Mono.Unix;
|
||||
|
||||
namespace MonoTests.Mono.Unix {
|
||||
|
||||
[TestFixture]
|
||||
public class UnixEndPointTest {
|
||||
|
||||
// Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=35004
|
||||
[Test]
|
||||
public void TestCreate ()
|
||||
{
|
||||
const string socketFile = "test";
|
||||
// mangledSocketFile simulates the socket file name with a null
|
||||
// terminator and junk after the null terminator. This can be present
|
||||
// in a SocketAddress when marshaled from native code.
|
||||
const string mangledSocketFile = socketFile + "\0junk";
|
||||
|
||||
var bytes = Encoding.Default.GetBytes (mangledSocketFile);
|
||||
var socketAddress = new SocketAddress (AddressFamily.Unix, bytes.Length + 2);
|
||||
for (int i = 0; i < bytes.Length; i++) {
|
||||
socketAddress [i + 2] = bytes [i];
|
||||
}
|
||||
var dummyEndPoint = new UnixEndPoint (socketFile);
|
||||
|
||||
// testing that the Create() method strips off the null terminator and the junk
|
||||
var endPoint = (UnixEndPoint)dummyEndPoint.Create (socketAddress);
|
||||
Assert.AreEqual (socketFile, endPoint.Filename, "#A01");
|
||||
}
|
||||
}
|
||||
}
|
||||
36
mcs/class/Mono.Posix/Test/Mono.Unix/UnixListenerTest.cs
Normal file
36
mcs/class/Mono.Posix/Test/Mono.Unix/UnixListenerTest.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
// UnixListenerTest.cs: Unit tests for Mono.Unix.UnixListener
|
||||
//
|
||||
// Authors:
|
||||
// David Lechner (david@lechnology.com)
|
||||
//
|
||||
// (c) 2015 David Lechner
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
using NUnit.Framework;
|
||||
using Mono.Unix;
|
||||
|
||||
namespace MonoTests.Mono.Unix {
|
||||
|
||||
[TestFixture]
|
||||
public class UnixListenerTest {
|
||||
|
||||
// test that a socket file is created and deleted by the UnixListener
|
||||
[Test]
|
||||
public void TestSocketFileCreateDelete ()
|
||||
{
|
||||
var socketFile = Path.GetTempFileName ();
|
||||
// we just want the file name, not the file
|
||||
File.Delete (socketFile);
|
||||
|
||||
using (var listener = new UnixListener (socketFile)) {
|
||||
// creating an instance of UnixListener should create the file
|
||||
Assert.IsTrue (File.Exists (socketFile), "#A01");
|
||||
}
|
||||
// and disposing the UnixListener should delete the file
|
||||
Assert.IsFalse (File.Exists (socketFile), "#A02");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user