New issue
Advanced search Search tips

Issue 662556 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: ----

Blocking:
issue 662559



Sign in to add a comment

Vector3dTest.CrossProduct fails on arm

Project Member Reported by thakis@chromium.org, Nov 4 2016

Issue description

I figured we should run gfx_unittests on Android (https://codereview.chromium.org/2483493002).

https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/62130/steps/gfx_unittests%20%28with%20patch%29%20on%20Android/logs/Vector3dTest.CrossProduct

Vector3dTest.CrossProduct (run #1):
[ RUN      ] Vector3dTest.CrossProduct
../../ui/gfx/geometry/vector3d_unittest.cc:230: Failure
Value of: actual.ToString()
  Actual: "[0.000000 0.000000 -0.000000]"
Expected: tests[i].expected.ToString()
Which is: "[0.000000 0.000000 0.000000]"


I guess we shouldn't compare floats per string, but per https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuide.md#floating-point-comparison

Dana, can you take a look? This blocks running gfx_unittests on Android.
 
Blocking: 662559

Comment 3 by danakj@chromium.org, Nov 16 2016

Ditto here, this test passes on Nexus 7 for me.

I   15.269s run_tests_on_device(05829591)  Note: Google Test filter = Vector3dTest.CrossProduct
I   15.269s run_tests_on_device(05829591)  [==========] Running 1 test from 1 test case.
I   15.269s run_tests_on_device(05829591)  [----------] Global test environment set-up.
I   15.269s run_tests_on_device(05829591)  [----------] 1 test from Vector3dTest
I   15.269s run_tests_on_device(05829591)  [ RUN      ] Vector3dTest.CrossProduct
I   15.269s run_tests_on_device(05829591)  [       OK ] Vector3dTest.CrossProduct (0 ms)
I   15.269s run_tests_on_device(05829591)  [----------] 1 test from Vector3dTest (1 ms total)
I   15.269s run_tests_on_device(05829591)  
I   15.269s run_tests_on_device(05829591)  [----------] Global test environment tear-down
I   15.269s run_tests_on_device(05829591)  [==========] 1 test from 1 test case ran. (2 ms total)
I   15.269s run_tests_on_device(05829591)  [  PASSED  ] 1 test.

Project Member

Comment 4 by bugdroid1@chromium.org, Nov 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f740dbd1a15d3a904f40a4175eaad8c536becd7

commit 1f740dbd1a15d3a904f40a4175eaad8c536becd7
Author: danakj <danakj@chromium.org>
Date: Thu Nov 17 01:42:10 2016

Fix QuadF::ContainsPoint and gfx::CrossProduct on arm64

These methods require the use of doubles to not give incorrect
answers. Tests were failing on arm64 due to precision mistakes
with floats.

BUG= 662561 , 662556 

Review-Url: https://codereview.chromium.org/2504583003
Cr-Commit-Position: refs/heads/master@{#432685}

[modify] https://crrev.com/1f740dbd1a15d3a904f40a4175eaad8c536becd7/ui/gfx/geometry/quad_f.cc
[modify] https://crrev.com/1f740dbd1a15d3a904f40a4175eaad8c536becd7/ui/gfx/geometry/quad_unittest.cc
[modify] https://crrev.com/1f740dbd1a15d3a904f40a4175eaad8c536becd7/ui/gfx/geometry/vector3d_f.cc
[modify] https://crrev.com/1f740dbd1a15d3a904f40a4175eaad8c536becd7/ui/gfx/geometry/vector3d_unittest.cc

Comment 5 by danakj@chromium.org, Nov 17 2016

Status: Fixed (was: Assigned)

Sign in to add a comment