Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm][debugger] Fix tests broken on 'main' #68054

Merged
merged 1 commit into from
Apr 15, 2022
Merged

Conversation

radical
Copy link
Member

@radical radical commented Apr 14, 2022

This test broke because it was checking for the number of members on
System.TimeSpan, and that changed with
#67666 , which added new members
like TotalNanoseconds.

The test shouldn't depend on this number anyway, so remove that.

  Failed DebuggerTests.MiscTests.InspectLocalsForToStringDescriptions(line: 137, col: 12, method_name: "MethodWithLocalsForToStringTest", call_other: False, invoke_async: False) [758 ms]
  Error Message:
   [ts_props] Number of fields don't match, Expected: 12, Actual: 16
Expected: True
Actual:   False
  Stack Trace:
     at DebuggerTests.DebuggerTestBase.CheckProps(JToken actual, Object exp_o, String label, Int32 num_fields) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 800
   at DebuggerTests.DebuggerTestBase.CompareObjectPropertiesFor(JToken locals, String name, Object o, String label, Int32 num_fields) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 908
   at DebuggerTests.MiscTests.InspectLocalsForToStringDescriptions(Int32 line, Int32 col, String method_name, Boolean call_other, Boolean invoke_async) in /_/src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs:line 559

This test broke because it was checking for the number of members on
`System.TimeSpan`, and that changed with
dotnet#67666 , which added new members
like `TotalNanoseconds`.

The test shouldn't depend on this number anyway, so remove that.

```
  Failed DebuggerTests.MiscTests.InspectLocalsForToStringDescriptions(line: 137, col: 12, method_name: "MethodWithLocalsForToStringTest", call_other: False, invoke_async: False) [758 ms]
  Error Message:
   [ts_props] Number of fields don't match, Expected: 12, Actual: 16
Expected: True
Actual:   False
  Stack Trace:
     at DebuggerTests.DebuggerTestBase.CheckProps(JToken actual, Object exp_o, String label, Int32 num_fields) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 800
   at DebuggerTests.DebuggerTestBase.CompareObjectPropertiesFor(JToken locals, String name, Object o, String label, Int32 num_fields) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 908
   at DebuggerTests.MiscTests.InspectLocalsForToStringDescriptions(Int32 line, Int32 col, String method_name, Boolean call_other, Boolean invoke_async) in /_/src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs:line 559
```
@radical radical added arch-wasm WebAssembly architecture area-Debugger-mono labels Apr 14, 2022
@radical radical requested review from lewing and thaystg April 14, 2022 22:01
@ghost ghost assigned radical Apr 14, 2022
@ghost
Copy link

ghost commented Apr 14, 2022

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

This test broke because it was checking for the number of members on
System.TimeSpan, and that changed with
#67666 , which added new members
like TotalNanoseconds.

The test shouldn't depend on this number anyway, so remove that.

  Failed DebuggerTests.MiscTests.InspectLocalsForToStringDescriptions(line: 137, col: 12, method_name: "MethodWithLocalsForToStringTest", call_other: False, invoke_async: False) [758 ms]
  Error Message:
   [ts_props] Number of fields don't match, Expected: 12, Actual: 16
Expected: True
Actual:   False
  Stack Trace:
     at DebuggerTests.DebuggerTestBase.CheckProps(JToken actual, Object exp_o, String label, Int32 num_fields) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 800
   at DebuggerTests.DebuggerTestBase.CompareObjectPropertiesFor(JToken locals, String name, Object o, String label, Int32 num_fields) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 908
   at DebuggerTests.MiscTests.InspectLocalsForToStringDescriptions(Int32 line, Int32 col, String method_name, Boolean call_other, Boolean invoke_async) in /_/src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs:line 559
Author: radical
Assignees: -
Labels:

arch-wasm, area-Debugger-mono

Milestone: -

Copy link
Member

@lewing lewing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

{
if (label == null)
label = name;
var props = await GetObjectOnLocals(locals, name);
try
{
if (o != null)
await CheckProps(props, o, label, num_fields);
await CheckProps(props, o, label, num_fields, skip_num_fields_check);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could reflect in the test ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that, and it's a little messy. And the number of members being returned will also change soon (to include private ones), so I'll have to stick with this check!

@radical radical merged commit 895715e into dotnet:main Apr 15, 2022
@radical radical deleted the fix-dbg-test branch April 15, 2022 03:54
@ghost ghost locked as resolved and limited conversation to collaborators May 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Debugger-mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants