USD test fails in debug mode #76355

Closed
opened 2020-05-03 00:57:14 +02:00 by Ray molenkamp · 8 comments
Member

System Information
Operating system: Windows
Graphics card: N/A

Blender Version
Broken: Current master
Worked: who knows

106: Test command: K:\BlenderGit\build_windows_Full_x64_vc16_Debug\bin\tests\Debug\usd_test.exe "--test-assets-dir" "K:/BlenderGit/blender/../lib/tests"
106: Environment variables:
106:  LSAN_OPTIONS=exitcode=0
106: Test timeout computed to be: 10000000
106: [==========] Running 5 tests from 2 test cases.
106: [----------] Global test environment set-up.
106: [----------] 1 test from USDHierarchyIteratorTest
106: [ RUN      ] USDHierarchyIteratorTest.ExportHierarchyTest
106: [       OK ] USDHierarchyIteratorTest.ExportHierarchyTest (58 ms)
106: [----------] 1 test from USDHierarchyIteratorTest (58 ms total)
106:
106: [----------] 4 tests from HierarchyContextOrderTest
106: [ RUN      ] HierarchyContextOrderTest.ObjectPointerTest
106: [       OK ] HierarchyContextOrderTest.ObjectPointerTest (0 ms)
106: [ RUN      ] HierarchyContextOrderTest.DuplicatorPointerTest
106: [       OK ] HierarchyContextOrderTest.DuplicatorPointerTest (0 ms)
106: [ RUN      ] HierarchyContextOrderTest.ExportParentTest
106: K:\BlenderGit\blender\tests\gtests\usd\hierarchy_context_order_test.cc(79): error:       Expected: true
106: To be equal to: ctx_a < ctx_b
106:       Which is: false
106: [  FAILED  ] HierarchyContextOrderTest.ExportParentTest (1 ms)
106: [ RUN      ] HierarchyContextOrderTest.TransitiveTest
106: [       OK ] HierarchyContextOrderTest.TransitiveTest (0 ms)
106: [----------] 4 tests from HierarchyContextOrderTest (1 ms total)
106:
106: [----------] Global test environment tear-down
106: [==========] 5 tests from 2 test cases ran. (149 ms total)
106: [  PASSED  ] 4 tests.
106: [  FAILED  ] 1 test, listed below:
106: [  FAILED  ] HierarchyContextOrderTest.ExportParentTest
106:
106:  1 FAILED TEST
106/106 Test #106: usd_test ............................***Failed    1.92 sec

Exact steps for others to reproduce the error

  • build in debug mode
  • run the test
**System Information** Operating system: Windows Graphics card: N/A **Blender Version** Broken: Current master Worked: who knows ``` 106: Test command: K:\BlenderGit\build_windows_Full_x64_vc16_Debug\bin\tests\Debug\usd_test.exe "--test-assets-dir" "K:/BlenderGit/blender/../lib/tests" 106: Environment variables: 106: LSAN_OPTIONS=exitcode=0 106: Test timeout computed to be: 10000000 106: [==========] Running 5 tests from 2 test cases. 106: [----------] Global test environment set-up. 106: [----------] 1 test from USDHierarchyIteratorTest 106: [ RUN ] USDHierarchyIteratorTest.ExportHierarchyTest 106: [ OK ] USDHierarchyIteratorTest.ExportHierarchyTest (58 ms) 106: [----------] 1 test from USDHierarchyIteratorTest (58 ms total) 106: 106: [----------] 4 tests from HierarchyContextOrderTest 106: [ RUN ] HierarchyContextOrderTest.ObjectPointerTest 106: [ OK ] HierarchyContextOrderTest.ObjectPointerTest (0 ms) 106: [ RUN ] HierarchyContextOrderTest.DuplicatorPointerTest 106: [ OK ] HierarchyContextOrderTest.DuplicatorPointerTest (0 ms) 106: [ RUN ] HierarchyContextOrderTest.ExportParentTest 106: K:\BlenderGit\blender\tests\gtests\usd\hierarchy_context_order_test.cc(79): error: Expected: true 106: To be equal to: ctx_a < ctx_b 106: Which is: false 106: [ FAILED ] HierarchyContextOrderTest.ExportParentTest (1 ms) 106: [ RUN ] HierarchyContextOrderTest.TransitiveTest 106: [ OK ] HierarchyContextOrderTest.TransitiveTest (0 ms) 106: [----------] 4 tests from HierarchyContextOrderTest (1 ms total) 106: 106: [----------] Global test environment tear-down 106: [==========] 5 tests from 2 test cases ran. (149 ms total) 106: [ PASSED ] 4 tests. 106: [ FAILED ] 1 test, listed below: 106: [ FAILED ] HierarchyContextOrderTest.ExportParentTest 106: 106: 1 FAILED TEST 106/106 Test #106: usd_test ............................***Failed 1.92 sec ``` **Exact steps for others to reproduce the error** - build in debug mode - run the test
Author
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Sybren A. Stüvel was assigned by Ray molenkamp 2020-05-03 00:57:41 +02:00
Author
Member

Mind taking a peek here?

Mind taking a peek here?

Added subscriber: @Sergey

Added subscriber: @Sergey

@dr.sybren some related notes:

  • Use EXPECT_LT to check a < b.
  • Use EXPECT_FALSE to expect an expression to be false.
  • Use EXPECT_TRUE to expect an expression to be truth.
@dr.sybren some related notes: - Use `EXPECT_LT` to check `a < b`. - Use `EXPECT_FALSE` to expect an expression to be false. - Use `EXPECT_TRUE` to expect an expression to be truth.

@Sergey thanks, that's been addressed in b3553c0961.

@LazyDodo here in Linux it all works fine, both in debug and release mode. All the operator<() function under test is doing is some pointer comparisons. Do you know of anything that could cause the debug build in Windows to behave differently in that regard? In other words, would you expect the pointer value of static_cast<Object *>(POINTER_FROM_INT(327)) to become different from 327?

Maybe could you give this a try?

diff --git a/tests/gtests/usd/hierarchy_context_order_test.cc b/tests/gtests/usd/hierarchy_context_order_test.cc
index a6a8aa16766..c3f86eebe44 100644
--- a/tests/gtests/usd/hierarchy_context_order_test.cc
+++ b/tests/gtests/usd/hierarchy_context_order_test.cc
@@ -34,6 +34,12 @@ static Object *fake_pointer(int value)
   return static_cast<Object *>(POINTER_FROM_INT(value));
 }
 
+TEST_F(HierarchyContextOrderTest, FakePointerTest)
+{
+  Object *fake_object_ptr = fake_pointer(327);
+  EXPECT_EQ(327, (intptr_t)fake_object_ptr);
+}
+
 TEST_F(HierarchyContextOrderTest, ObjectPointerTest)
 {
   HierarchyContext ctx_a;
@Sergey thanks, that's been addressed in b3553c0961. @LazyDodo here in Linux it all works fine, both in debug and release mode. All the `operator<()` function under test is doing is some pointer comparisons. Do you know of anything that could cause the debug build in Windows to behave differently in that regard? In other words, would you expect the pointer value of `static_cast<Object *>(POINTER_FROM_INT(327))` to become different from 327? Maybe could you give this a try? ``` diff --git a/tests/gtests/usd/hierarchy_context_order_test.cc b/tests/gtests/usd/hierarchy_context_order_test.cc index a6a8aa16766..c3f86eebe44 100644 --- a/tests/gtests/usd/hierarchy_context_order_test.cc +++ b/tests/gtests/usd/hierarchy_context_order_test.cc @@ -34,6 +34,12 @@ static Object *fake_pointer(int value) return static_cast<Object *>(POINTER_FROM_INT(value)); } +TEST_F(HierarchyContextOrderTest, FakePointerTest) +{ + Object *fake_object_ptr = fake_pointer(327); + EXPECT_EQ(327, (intptr_t)fake_object_ptr); +} + TEST_F(HierarchyContextOrderTest, ObjectPointerTest) { HierarchyContext ctx_a; ```

This issue was referenced by 0c8b872188

This issue was referenced by 0c8b872188a3b413e08e84d1661bc1fd482359c1

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#76355
No description provided.