@@ -22,8 +22,13 @@ internal static int Run()
2222 if ( ThreadStaticAlignmentTest . Run ( ) != Pass )
2323 return Fail ;
2424
25- if ( ThreadTest . Run ( ) != Pass )
26- return Fail ;
25+ if ( ! OperatingSystem . IsAndroid ( ) )
26+ {
27+ // Disabled on Android: https://github.com/dotnet/runtime/issues/121451
28+
29+ if ( ThreadTest . Run ( ) != Pass )
30+ return Fail ;
31+ }
2732
2833 if ( TimerTest . Run ( ) != Pass )
2934 return Fail ;
@@ -450,23 +455,18 @@ private static void TestConcurrentIsBackgroundProperty()
450455
451456 private static void TestIsBackgroundProperty ( )
452457 {
453- if ( ! OperatingSystem . IsAndroid ( ) )
454- {
455- // Disabled on Android due to https://github.com/dotnet/runtime/issues/121451
456-
457- // Thread created using Thread.Start
458- var t_event = new AutoResetEvent ( false ) ;
459- var t = new Thread ( ( ) => t_event . WaitOne ( ) ) ;
458+ // Thread created using Thread.Start
459+ var t_event = new AutoResetEvent ( false ) ;
460+ var t = new Thread ( ( ) => t_event . WaitOne ( ) ) ;
460461
461- t . Start ( ) ;
462- s_startedThreads . Add ( t ) ;
462+ t . Start ( ) ;
463+ s_startedThreads . Add ( t ) ;
463464
464- Expect ( ! t . IsBackground , "Expected t.IsBackground == false" ) ;
465- t_event . Set ( ) ;
466- t . Join ( ) ;
467- ExpectException < ThreadStateException > ( ( ) => Console . WriteLine ( t . IsBackground ) ,
468- "Expected ThreadStateException for t.IsBackground" ) ;
469- }
465+ Expect ( ! t . IsBackground , "Expected t.IsBackground == false" ) ;
466+ t_event . Set ( ) ;
467+ t . Join ( ) ;
468+ ExpectException < ThreadStateException > ( ( ) => Console . WriteLine ( t . IsBackground ) ,
469+ "Expected ThreadStateException for t.IsBackground" ) ;
470470
471471 // Thread pool thread
472472 Task . Factory . StartNew ( ( ) => Expect ( Thread . CurrentThread . IsBackground , "Expected IsBackground == true" ) ) . Wait ( ) ;
@@ -482,7 +482,7 @@ private static void TestIsBackgroundProperty()
482482 // Main thread
483483 Expect ( ! Thread . CurrentThread . IsBackground , "Expected CurrentThread.IsBackground == false" ) ;
484484
485- ExpectPassed ( nameof ( TestIsBackgroundProperty ) , OperatingSystem . IsAndroid ( ) ? 4 : 6 ) ;
485+ ExpectPassed ( nameof ( TestIsBackgroundProperty ) , 6 ) ;
486486 }
487487
488488 private static void TestIsThreadPoolThreadProperty ( )
0 commit comments