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][aot] Test failure in System.Drawing.Primitives test suite #83394

Closed
vargaz opened this issue Mar 14, 2023 · 6 comments
Closed

[wasm][aot] Test failure in System.Drawing.Primitives test suite #83394

vargaz opened this issue Mar 14, 2023 · 6 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-System.Drawing disabled-test The test is disabled in source code against the issue wasm-aot-test WebAssembly AOT Test
Milestone

Comments

@vargaz
Copy link
Contributor

vargaz commented Mar 14, 2023

Description

Expected result: pass
Actual result:

  fail: [FAIL] System.Drawing.PrimitivesTest.RectangleTests.RectangleFConversionTest(x: 3.40282347E+38, y: -3.40282347E+38, width: 3.40282347E+38, height: -3.40282347E+38)
  info: Assert.Equal() Failure
  info: Expected: {X=-2147483648,Y=-2147483648,Width=-2147483648,Height=-2147483648}
  info: Actual:   {X=2147483647,Y=-2147483648,Width=2147483647,Height=-2147483648}
  info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
  fail: [FAIL] System.Drawing.PrimitivesTest.RectangleTests.RectangleFConversionTest(x: -3.40282347E+38, y: 3.40282347E+38, width: -3.40282347E+38, height: 3.40282347E+38)
  info: Assert.Equal() Failure
  info: Expected: {X=-2147483648,Y=-2147483648,Width=-2147483648,Height=-2147483648}
  info: Actual:   {X=-2147483648,Y=2147483647,Width=-2147483648,Height=2147483647}
  info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )

To reproduce:
./dotnet.sh build /t:Test /p:TargetOS=browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:EnableAggressiveTrimming=true /p:RunAOTCompilation=true /p:WasmNativeStrip=false src/libraries/System.Drawing.Primitives/tests/

Testcase:

using System;
using System.Drawing;
using System.Runtime.CompilerServices;

public class Test
{
	public static void Main () {
		float x = float.MaxValue;

		var rect = new RectangleF(x, x, x, x);

		var r2 = Rectangle.Truncate(rect);
		Console.WriteLine (r2);
	}
}

The testcase should print:
{X=-2147483648,Y=-2147483648,Width=-2147483648,Height=-2147483648}
With AOT it prints:
{X=2147483647,Y=2147483647,Width=2147483647,Height=2147483647}

Reproduction Steps

.

Expected behavior

.

Actual behavior

.

Regression?

Yes

Known Workarounds

.

Configuration

No response

Other information

No response

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Mar 14, 2023
@ghost
Copy link

ghost commented Mar 14, 2023

Tagging subscribers to this area: @dotnet/area-system-drawing
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

Expected result: pass
Actual result:

  fail: [FAIL] System.Drawing.PrimitivesTest.RectangleTests.RectangleFConversionTest(x: 3.40282347E+38, y: -3.40282347E+38, width: 3.40282347E+38, height: -3.40282347E+38)
  info: Assert.Equal() Failure
  info: Expected: {X=-2147483648,Y=-2147483648,Width=-2147483648,Height=-2147483648}
  info: Actual:   {X=2147483647,Y=-2147483648,Width=2147483647,Height=-2147483648}
  info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
  fail: [FAIL] System.Drawing.PrimitivesTest.RectangleTests.RectangleFConversionTest(x: -3.40282347E+38, y: 3.40282347E+38, width: -3.40282347E+38, height: 3.40282347E+38)
  info: Assert.Equal() Failure
  info: Expected: {X=-2147483648,Y=-2147483648,Width=-2147483648,Height=-2147483648}
  info: Actual:   {X=-2147483648,Y=2147483647,Width=-2147483648,Height=2147483647}
  info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )

To reproduce:
./dotnet.sh build /t:Test /p:TargetOS=browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:EnableAggressiveTrimming=true /p:RunAOTCompilation=true /p:WasmNativeStrip=false src/libraries/System.Drawing.Primitives/tests/

Testcase:

using System;
using System.Drawing;
using System.Runtime.CompilerServices;

public class Test
{
	public static void Main () {
		float x = float.MaxValue;

		var rect = new RectangleF(x, x, x, x);

		var r2 = Rectangle.Truncate(rect);
		Console.WriteLine (r2);
	}
}

The testcase should print:
{X=-2147483648,Y=-2147483648,Width=-2147483648,Height=-2147483648}
With AOT it prints:
{X=2147483647,Y=2147483647,Width=2147483647,Height=2147483647}

Reproduction Steps

.

Expected behavior

.

Actual behavior

.

Regression?

Yes

Known Workarounds

.

Configuration

No response

Other information

No response

Author: vargaz
Assignees: -
Labels:

area-System.Drawing, untriaged

Milestone: -

@vargaz vargaz added arch-wasm WebAssembly architecture wasm-aot-test WebAssembly AOT Test labels Mar 14, 2023
@ghost
Copy link

ghost commented Mar 14, 2023

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

Issue Details

Description

Expected result: pass
Actual result:

  fail: [FAIL] System.Drawing.PrimitivesTest.RectangleTests.RectangleFConversionTest(x: 3.40282347E+38, y: -3.40282347E+38, width: 3.40282347E+38, height: -3.40282347E+38)
  info: Assert.Equal() Failure
  info: Expected: {X=-2147483648,Y=-2147483648,Width=-2147483648,Height=-2147483648}
  info: Actual:   {X=2147483647,Y=-2147483648,Width=2147483647,Height=-2147483648}
  info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
  fail: [FAIL] System.Drawing.PrimitivesTest.RectangleTests.RectangleFConversionTest(x: -3.40282347E+38, y: 3.40282347E+38, width: -3.40282347E+38, height: 3.40282347E+38)
  info: Assert.Equal() Failure
  info: Expected: {X=-2147483648,Y=-2147483648,Width=-2147483648,Height=-2147483648}
  info: Actual:   {X=-2147483648,Y=2147483647,Width=-2147483648,Height=2147483647}
  info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )

To reproduce:
./dotnet.sh build /t:Test /p:TargetOS=browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:EnableAggressiveTrimming=true /p:RunAOTCompilation=true /p:WasmNativeStrip=false src/libraries/System.Drawing.Primitives/tests/

Testcase:

using System;
using System.Drawing;
using System.Runtime.CompilerServices;

public class Test
{
	public static void Main () {
		float x = float.MaxValue;

		var rect = new RectangleF(x, x, x, x);

		var r2 = Rectangle.Truncate(rect);
		Console.WriteLine (r2);
	}
}

The testcase should print:
{X=-2147483648,Y=-2147483648,Width=-2147483648,Height=-2147483648}
With AOT it prints:
{X=2147483647,Y=2147483647,Width=2147483647,Height=2147483647}

Reproduction Steps

.

Expected behavior

.

Actual behavior

.

Regression?

Yes

Known Workarounds

.

Configuration

No response

Other information

No response

Author: vargaz
Assignees: -
Labels:

arch-wasm, area-System.Drawing, untriaged, wasm-aot-test

Milestone: -

@vargaz
Copy link
Contributor Author

vargaz commented Mar 14, 2023

Disabled in:
#83397

@ViktorHofer ViktorHofer added disabled-test The test is disabled in source code against the issue untriaged New issue has not been triaged by the area owner and removed untriaged New issue has not been triaged by the area owner labels Jun 28, 2023
@ViktorHofer ViktorHofer added this to the 8.0.0 milestone Jul 5, 2023
@lewing
Copy link
Member

lewing commented Aug 18, 2023

@radekdoulik @vargaz any thoughts on this?

@lewing lewing modified the milestones: 8.0.0, 9.0.0, Future May 16, 2024
@ilonatommy
Copy link
Member

It is still an issue. @radekdoulik, what might be the problem here?

@lewing
Copy link
Member

lewing commented Jul 29, 2024

duplicate of #60585

@lewing lewing closed this as completed Jul 29, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Drawing disabled-test The test is disabled in source code against the issue wasm-aot-test WebAssembly AOT Test
Projects
None yet
Development

No branches or pull requests

5 participants