Skip to content

Commit 1ceed18

Browse files
authored
Disable failing outerloop tests and fix a build issue in MonoAOTCompiler (#89922)
See #89921 for the test failures. Additionally, the Android build was failing while compiling an AOT test due to this error: ``` /__w/1/s/artifacts/bin/Android.Device_Emulator.Aot.Test/Release/net8.0/android-x64/AppBundle/modules.c:51:6: error: no previous prototype for function 'register_aot_modules' [-Werror,-Wmissing-prototypes] void register_aot_modules () ^ ``` This is because we turned on `-Werror=missing-prototypes` in #89197 but the MonoAOTCompiler didn't emit a function prototype in modules.c Fixes #89566
1 parent 4f9fbcf commit 1ceed18

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

src/libraries/System.Threading.Tasks/tests/Task/TaskRunSyncTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ public static void TaskRunSyncTest14()
524524
}
525525

526526
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
527+
[ActiveIssue("https://github.com/dotnet/runtime/issues/89921", typeof(PlatformDetection), nameof(PlatformDetection.IsAlpine), nameof(PlatformDetection.IsMonoRuntime))]
527528
[OuterLoop]
528529
public static void TaskRunSyncTest15()
529530
{
@@ -541,6 +542,7 @@ public static void TaskRunSyncTest16()
541542
}
542543

543544
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
545+
[ActiveIssue("https://github.com/dotnet/runtime/issues/89921", typeof(PlatformDetection), nameof(PlatformDetection.IsAlpine), nameof(PlatformDetection.IsMonoRuntime))]
544546
[OuterLoop]
545547
public static void TaskRunSyncTest17()
546548
{
@@ -550,6 +552,7 @@ public static void TaskRunSyncTest17()
550552
}
551553

552554
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
555+
[ActiveIssue("https://github.com/dotnet/runtime/issues/89921", typeof(PlatformDetection), nameof(PlatformDetection.IsAlpine), nameof(PlatformDetection.IsMonoRuntime))]
553556
[OuterLoop]
554557
public static void TaskRunSyncTest18()
555558
{
@@ -558,6 +561,7 @@ public static void TaskRunSyncTest18()
558561
test.RealRun();
559562
}
560563
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
564+
[ActiveIssue("https://github.com/dotnet/runtime/issues/89921", typeof(PlatformDetection), nameof(PlatformDetection.IsAlpine), nameof(PlatformDetection.IsMonoRuntime))]
561565
[OuterLoop]
562566
public static void TaskRunSyncTest19()
563567
{
@@ -567,6 +571,7 @@ public static void TaskRunSyncTest19()
567571
}
568572

569573
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
574+
[ActiveIssue("https://github.com/dotnet/runtime/issues/89921", typeof(PlatformDetection), nameof(PlatformDetection.IsAlpine), nameof(PlatformDetection.IsMonoRuntime))]
570575
[OuterLoop]
571576
public static void TaskRunSyncTest20()
572577
{
@@ -591,6 +596,7 @@ public static void TaskRunSyncTest22()
591596
}
592597

593598
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
599+
[ActiveIssue("https://github.com/dotnet/runtime/issues/89921", typeof(PlatformDetection), nameof(PlatformDetection.IsAlpine), nameof(PlatformDetection.IsMonoRuntime))]
594600
[OuterLoop]
595601
public static void TaskRunSyncTest23()
596602
{

src/libraries/System.Threading.Tasks/tests/TaskScheduler/TaskSchedulerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ public static void RunBuggySchedulerTests()
211211

212212
[Fact]
213213
[OuterLoop]
214+
[ActiveIssue("https://github.com/dotnet/runtime/issues/89921", typeof(PlatformDetection), nameof(PlatformDetection.IsAlpine), nameof(PlatformDetection.IsMonoRuntime))]
214215
public static void RunSynchronizationContextTaskSchedulerTests()
215216
{
216217
// Remember the current SynchronizationContext, so that we can restore it

src/tasks/AndroidAppBuilder/Templates/monodroid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ Java_net_dot_MonoRunner_initRuntime (JNIEnv* env, jobject thiz, jstring j_files_
367367
for (int i = 0; i < args_len; ++i)
368368
{
369369
jstring j_arg = (*env)->GetObjectArrayElement(env, j_args, i);
370-
managed_argv[i + 1] = (*env)->GetStringUTFChars(env, j_arg, NULL);
370+
managed_argv[i + 1] = (char*)((*env)->GetStringUTFChars(env, j_arg, NULL));
371371
}
372372

373373
int res = mono_droid_runtime_init (executable, managed_argc, managed_argv, current_local_time);

src/tasks/AotCompilerTask/MonoAOTCompiler.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,8 @@ private bool GenerateAotModulesTable(IEnumerable<ITaskItem> assemblies, string[]
11061106
{
11071107
writer.WriteLine($"extern void *{symbol};");
11081108
}
1109-
writer.WriteLine("void register_aot_modules ()");
1109+
writer.WriteLine("void register_aot_modules (void);");
1110+
writer.WriteLine("void register_aot_modules (void)");
11101111
writer.WriteLine("{");
11111112
foreach (var symbol in symbols)
11121113
{
@@ -1142,6 +1143,7 @@ private bool GenerateAotModulesTable(IEnumerable<ITaskItem> assemblies, string[]
11421143
writer.WriteLine($"extern void *{symbol};");
11431144
}
11441145

1146+
writer.WriteLine("void register_aot_modules (void);");
11451147
writer.WriteLine("void register_aot_modules (void)");
11461148
writer.WriteLine("{");
11471149
foreach (var symbol in symbols)

0 commit comments

Comments
 (0)