runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Microsoft.Extensions.Logging.Console failures

Open MichalStrehovsky opened this issue 1 year ago • 3 comments

This looks like a trimming issue around one of the Microsoft.Configuration things.

Either the suppressions within the framework are wrong or we have a dataflow bug.

[FAIL] Microsoft.Extensions.Logging.Console.Test.ConsoleLoggerExtensionsTests.AddJsonConsole_ChangeProperties_IsReadFromLoggingConfiguration
Assert.True() Failure
Expected: True
Actual:   False
   at Microsoft.Extensions.Logging.Console.Test.ConsoleLoggerExtensionsTests.AddJsonConsole_ChangeProperties_IsReadFromLoggingConfiguration() + 0x277
   at Microsoft.Extensions.Logging.Console.Tests!<BaseAddress>+0x88e32c
   at System.Reflection.DynamicInvokeInfo.Invoke(Object, IntPtr, Object[], BinderBundle, Boolean) + 0xf1
[FAIL] Microsoft.Extensions.Logging.Console.Test.SimpleConsoleFormatterTests.Log_WritingScopes_LogsWithCorrectColorsWhenColorEnabled(colorBehavior: Default)
Assert.Equal() Failure
Expected: 1
Actual:   2
   at Microsoft.Extensions.Logging.Console.Test.SimpleConsoleFormatterTests.Log_WritingScopes_LogsWithCorrectColorsWhenColorEnabled(LoggerColorBehavior) + 0x3ad
   at Microsoft.Extensions.Logging.Console.Tests!<BaseAddress>+0x8935ec
   at System.Reflection.DynamicInvokeInfo.Invoke(Object, IntPtr, Object[], BinderBundle, Boolean) + 0x172
[SKIP] Microsoft.Extensions.Logging.Console.Test.ConsoleLoggerTest.AddConsole_IsOutputRedirected_ColorDisabled
Finished Microsoft.Extensions.Logging.Console.Tests, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60

MichalStrehovsky avatar Aug 05 '22 07:08 MichalStrehovsky

Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @sbomer, @joperezr See info in area-owners.md if you want to be subscribed.

Issue Details

This looks like a trimming issue around one of the Microsoft.Configuration things.

Either the suppressions within the framework are wrong or we have a dataflow bug.

[FAIL] Microsoft.Extensions.Logging.Console.Test.ConsoleLoggerExtensionsTests.AddJsonConsole_ChangeProperties_IsReadFromLoggingConfiguration
Assert.True() Failure
Expected: True
Actual:   False
   at Microsoft.Extensions.Logging.Console.Test.ConsoleLoggerExtensionsTests.AddJsonConsole_ChangeProperties_IsReadFromLoggingConfiguration() + 0x277
   at Microsoft.Extensions.Logging.Console.Tests!<BaseAddress>+0x88e32c
   at System.Reflection.DynamicInvokeInfo.Invoke(Object, IntPtr, Object[], BinderBundle, Boolean) + 0xf1
[FAIL] Microsoft.Extensions.Logging.Console.Test.SimpleConsoleFormatterTests.Log_WritingScopes_LogsWithCorrectColorsWhenColorEnabled(colorBehavior: Default)
Assert.Equal() Failure
Expected: 1
Actual:   2
   at Microsoft.Extensions.Logging.Console.Test.SimpleConsoleFormatterTests.Log_WritingScopes_LogsWithCorrectColorsWhenColorEnabled(LoggerColorBehavior) + 0x3ad
   at Microsoft.Extensions.Logging.Console.Tests!<BaseAddress>+0x8935ec
   at System.Reflection.DynamicInvokeInfo.Invoke(Object, IntPtr, Object[], BinderBundle, Boolean) + 0x172
[SKIP] Microsoft.Extensions.Logging.Console.Test.ConsoleLoggerTest.AddConsole_IsOutputRedirected_ColorDisabled
Finished Microsoft.Extensions.Logging.Console.Tests, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
Author: MichalStrehovsky
Assignees: -
Labels:

linkable-framework, area-NativeAOT-coreclr

Milestone: 7.0.0

msftbot[bot] avatar Aug 05 '22 07:08 msftbot[bot]

How did you build the test in question for NativeAOT? I tried the usual way but it fails for me.

vitek-karas avatar Aug 05 '22 14:08 vitek-karas

I hit this during the test bringup. What I do during the bringup is I modify the list of SmokeTestProject itemgroup in src/libraries/tests.proj to have only the tests I'm interested in. More here: https://github.com/dotnet/runtime/issues/73048#issuecomment-1200112499

MichalStrehovsky avatar Aug 08 '22 00:08 MichalStrehovsky

RE:

[FAIL] Microsoft.Extensions.Logging.Console.Test.SimpleConsoleFormatterTests.Log_WritingScopes_LogsWithCorrectColorsWhenColorEnabled(colorBehavior: Default) Assert.Equal() Failure Expected: 1 Actual: 2 at Microsoft.Extensions.Logging.Console.Test.SimpleConsoleFormatterTests.Log_WritingScopes_LogsWithCorrectColorsWhenColorEnabled(LoggerColorBehavior) + 0x3ad at Microsoft.Extensions.Logging.Console.Tests!<BaseAddress>+0x8935ec at System.Reflection.DynamicInvokeInfo.Invoke(Object, IntPtr, Object[], BinderBundle, Boolean) + 0x172

I cannot repro this error with the latest code on both Windows and Linux x64. I'll submit a PR to remove this ActiveIssue to see in CI what leg is failing for this test.

eerhardt avatar Aug 22 '22 20:08 eerhardt