You've already forked linux-packaging-mono
Imported Upstream version 5.12.0.220
Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
This commit is contained in:
parent
8bd104cef2
commit
8fc30896db
@ -101,6 +101,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void AddCountSignalStressTestCase ()
|
||||
{
|
||||
var evt = new CountdownEvent (5);
|
||||
@ -352,6 +353,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void WaitTestCase()
|
||||
{
|
||||
var evt = new CountdownEvent (5);
|
||||
|
@ -99,7 +99,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("InterpreterNotWorking")] /* crashes on linux/armv7 */
|
||||
[Category ("NotWorkingRuntimeInterpreter")] /* crashes on linux/armv7 */
|
||||
public void TestCompareExchange_Flt ()
|
||||
{
|
||||
flt = flt_1;
|
||||
|
@ -83,6 +83,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void WaitTest()
|
||||
{
|
||||
int count = 0;
|
||||
|
@ -124,6 +124,7 @@ namespace MonoTests.System.Threading
|
||||
*/
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestWaitAndSignal1()
|
||||
{
|
||||
Mutex Sem = new Mutex (false);
|
||||
@ -143,6 +144,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestWaitAndForget1()
|
||||
{
|
||||
Mutex Sem = new Mutex(false);
|
||||
|
@ -60,6 +60,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestIsReaderLockHeld ()
|
||||
{
|
||||
rwlock = new ReaderWriterLock ();
|
||||
@ -76,6 +77,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestIsWriterLockHeld ()
|
||||
{
|
||||
rwlock = new ReaderWriterLock ();
|
||||
@ -92,6 +94,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestAcquireLocks ()
|
||||
{
|
||||
rwlock = new ReaderWriterLock ();
|
||||
@ -157,6 +160,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestReleaseRestoreReaderLock ()
|
||||
{
|
||||
rwlock = new ReaderWriterLock ();
|
||||
@ -177,6 +181,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestReleaseRestoreWriterLock ()
|
||||
{
|
||||
rwlock = new ReaderWriterLock ();
|
||||
@ -197,6 +202,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestUpgradeDowngradeLock ()
|
||||
{
|
||||
rwlock = new ReaderWriterLock ();
|
||||
@ -244,6 +250,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestReaderMustWaitWriter ()
|
||||
{
|
||||
// A thread cannot get the reader lock if there are other threads
|
||||
@ -286,6 +293,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestBug_55909 ()
|
||||
{
|
||||
rwlock = new ReaderWriterLock ();
|
||||
@ -313,6 +321,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestBug_55909_bis ()
|
||||
{
|
||||
rwlock = new ReaderWriterLock ();
|
||||
|
@ -65,6 +65,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void WaitStressTest()
|
||||
{
|
||||
int count = -1;
|
||||
|
@ -111,6 +111,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void LockUnicityTest ()
|
||||
{
|
||||
ParallelTestHelper.Repeat (delegate {
|
||||
|
@ -52,6 +52,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void ThreadedTest ()
|
||||
{
|
||||
AssertThreadLocal ();
|
||||
@ -134,6 +135,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void PerThreadException ()
|
||||
{
|
||||
int callTime = 0;
|
||||
|
@ -255,5 +255,31 @@ namespace MonoTests.System.Threading
|
||||
Assert.AreEqual (0, var_3, "var_3");
|
||||
}
|
||||
|
||||
#if !MOBILE
|
||||
// This is test related to bug https://bugzilla.xamarin.com/show_bug.cgi?id=41294.
|
||||
// The bug is that the performance counters return 0.
|
||||
// "Work Items Added" and "# of Threads" are fixed, the others are not.
|
||||
[Test]
|
||||
public void PerformanceCounter_WorkItems ()
|
||||
{
|
||||
var workItems = new PerformanceCounter ("Mono Threadpool", "Work Items Added");
|
||||
var threads = new PerformanceCounter ("Mono Threadpool", "# of Threads");
|
||||
|
||||
var workItems0 = workItems.NextValue();
|
||||
|
||||
int N = 99;
|
||||
for (var i = 0; i < N; i++)
|
||||
ThreadPool.QueueUserWorkItem (_ => {});
|
||||
|
||||
var workItems1 = workItems.NextValue();
|
||||
var threads0 = threads.NextValue();
|
||||
|
||||
//Console.WriteLine ("workItems0:{0} workItems1:{1}", workItems0, workItems1);
|
||||
//Console.WriteLine ("threads:{0}", threads0);
|
||||
|
||||
Assert.AreEqual (N, workItems1 - workItems0, "#1");
|
||||
Assert.IsTrue (threads0 > 0, "#2");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -252,6 +252,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test] // bug #325566
|
||||
[Category ("MultiThreaded")]
|
||||
public void GetHashCodeTest ()
|
||||
{
|
||||
C1Test test1 = new C1Test ();
|
||||
@ -281,6 +282,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test] // bug #82700
|
||||
[Category ("MultiThreaded")]
|
||||
public void ManagedThreadId ()
|
||||
{
|
||||
C1Test test1 = new C1Test ();
|
||||
@ -307,7 +309,7 @@ namespace MonoTests.System.Threading
|
||||
|
||||
[Test]
|
||||
[Category ("NotDotNet")] // it hangs.
|
||||
[Category ("InterpreterNotWorking")] /* crashes on linux/arm64 */
|
||||
[Category ("NotWorkingRuntimeInterpreter")] /* crashes on linux/arm64 */
|
||||
public void TestStart()
|
||||
{
|
||||
{
|
||||
@ -349,6 +351,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestApartmentState ()
|
||||
{
|
||||
C2Test test1 = new C2Test();
|
||||
@ -450,7 +453,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("InterpreterNotWorking")]
|
||||
[Category ("NotWorkingRuntimeInterpreter")]
|
||||
public void TestUndivisibleByPageSizeMaxStackSize ()
|
||||
{
|
||||
const int undivisible_stacksize = 1048573;
|
||||
@ -461,6 +464,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestIsBackground1 ()
|
||||
{
|
||||
C2Test test1 = new C2Test();
|
||||
@ -480,6 +484,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestIsBackground2 ()
|
||||
{
|
||||
C2Test test1 = new C2Test();
|
||||
@ -505,6 +510,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestName()
|
||||
{
|
||||
C2Test test1 = new C2Test();
|
||||
@ -545,6 +551,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestNestedThreads1()
|
||||
{
|
||||
C3Test test1 = new C3Test();
|
||||
@ -562,6 +569,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestNestedThreads2()
|
||||
{
|
||||
C4Test test1 = new C4Test();
|
||||
@ -578,6 +586,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestJoin1()
|
||||
{
|
||||
C1Test test1 = new C1Test();
|
||||
@ -664,6 +673,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestThreadState ()
|
||||
{
|
||||
//TODO: Test The rest of the possible transitions
|
||||
@ -768,6 +778,7 @@ namespace MonoTests.System.Threading
|
||||
|
||||
#if MONO_FEATURE_THREAD_SUSPEND_RESUME
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestSuspend ()
|
||||
{
|
||||
Thread t = new Thread (new ThreadStart (DoCount));
|
||||
@ -795,6 +806,7 @@ namespace MonoTests.System.Threading
|
||||
#if MONO_FEATURE_THREAD_SUSPEND_RESUME && MONO_FEATURE_THREAD_ABORT
|
||||
[Test]
|
||||
[Category("NotDotNet")] // On MS, ThreadStateException is thrown on Abort: "Thread is suspended; attempting to abort"
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestSuspendAbort ()
|
||||
{
|
||||
Thread t = new Thread (new ThreadStart (DoCount));
|
||||
@ -982,6 +994,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test] // bug #81720
|
||||
[Category ("MultiThreaded")]
|
||||
public void IsBackGround ()
|
||||
{
|
||||
Thread t1 = new Thread (new ThreadStart (Start));
|
||||
@ -1020,6 +1033,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test] // bug #60031
|
||||
[Category ("MultiThreaded")]
|
||||
public void StoppedThreadsThrowThreadStateException ()
|
||||
{
|
||||
var t = new Thread (() => { });
|
||||
@ -1150,6 +1164,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test] // bug #81658
|
||||
[Category ("MultiThreaded")]
|
||||
public void ApartmentState_StoppedThread ()
|
||||
{
|
||||
Thread t1 = new Thread (new ThreadStart (Start));
|
||||
@ -1189,6 +1204,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestApartmentState ()
|
||||
{
|
||||
Thread t1 = new Thread (new ThreadStart (Start));
|
||||
@ -1253,6 +1269,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestTrySetApartmentState ()
|
||||
{
|
||||
Thread t1 = new Thread (new ThreadStart (Start));
|
||||
@ -1267,6 +1284,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestTrySetApartmentStateRunning ()
|
||||
{
|
||||
Thread t1 = new Thread (new ThreadStart (Start));
|
||||
@ -1303,6 +1321,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void ThreadStartSimple ()
|
||||
{
|
||||
int i = 0;
|
||||
@ -1316,6 +1335,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void ParametrizedThreadStart ()
|
||||
{
|
||||
int i = 0;
|
||||
|
@ -317,6 +317,7 @@ namespace MonoTests.System.Threading {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void InterrupedWaitAny ()
|
||||
{
|
||||
using (var m1 = new Mutex (true)) {
|
||||
@ -345,6 +346,7 @@ namespace MonoTests.System.Threading {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void InterrupedWaitAll ()
|
||||
{
|
||||
using (var m1 = new Mutex (true)) {
|
||||
@ -373,6 +375,7 @@ namespace MonoTests.System.Threading {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void InterrupedWaitOne ()
|
||||
{
|
||||
using (var m1 = new Mutex (true)) {
|
||||
@ -398,6 +401,7 @@ namespace MonoTests.System.Threading {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void WaitOneWithAbandonedMutex ()
|
||||
{
|
||||
using (var m = new Mutex (false)) {
|
||||
@ -432,6 +436,7 @@ namespace MonoTests.System.Threading {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void WaitOneWithAbandonedMutexAndMultipleThreads ()
|
||||
{
|
||||
using (var m = new Mutex (true)) {
|
||||
@ -465,6 +470,7 @@ namespace MonoTests.System.Threading {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void WaitAnyWithSecondMutexAbandoned ()
|
||||
{
|
||||
using (var m1 = new Mutex (false)) {
|
||||
@ -525,6 +531,7 @@ namespace MonoTests.System.Threading {
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (AbandonedMutexException))]
|
||||
[Category ("MultiThreaded")]
|
||||
public void WaitAllWithOneAbandonedMutex ()
|
||||
{
|
||||
using (var m1 = new Mutex (false)) {
|
||||
@ -541,6 +548,7 @@ namespace MonoTests.System.Threading {
|
||||
|
||||
#if MONO_FEATURE_THREAD_SUSPEND_RESUME
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void WaitOneWithTimeoutAndSpuriousWake ()
|
||||
{
|
||||
/* This is to test that WaitEvent.WaitOne is not going to wait largely
|
||||
@ -570,6 +578,7 @@ namespace MonoTests.System.Threading {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void WaitAnyWithTimeoutAndSpuriousWake ()
|
||||
{
|
||||
/* This is to test that WaitEvent.WaitAny is not going to wait largely
|
||||
@ -600,6 +609,7 @@ namespace MonoTests.System.Threading {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MultiThreaded")]
|
||||
public void WaitAllWithTimeoutAndSpuriousWake ()
|
||||
{
|
||||
/* This is to test that WaitEvent.WaitAll is not going to wait largely
|
||||
|
Reference in New Issue
Block a user