OzonePlatform::Shutdown() causes tests to fail and be retried |
|||||||
Issue descriptionI've noticed that in many test targets there are a bunch of tests that fail on the first run but pass when rerun. I looked into and there is an issue with OzonePlatform::Shutdown(). It's a common pattern for the TestSuite to call GLSurfaceTestSupport::InitializeOneOff() during suite initialization. This calls OzonePlatform::InitializeForGPU(). However individual tests will create and destroy aura::Env which will call OzonePlatform::InitializeForUI() and then OzonePlatform::Shutdown(). Basically the following happens: 1. TestSuite initialization calls OzonePlatform::InitializeForGPU(). 2. Test case #1 setup calls OzonePlatform::InitializeForUI(). 3. Test case #1 teardown calls OzonePlatform::Shutdown() which deletes the OzonePlatform instance. 4. Test case #2 setup calls OzonePlatform::InitializeForUI(). 5. Test case #2 calls OzonePlatform::GetSurfaceFactory(). A new OzonePlatform instance was created in step 4 but the GPU specific parts we not initialized. OzonePlatform::GetSurfaceFactory() returns nullptr. The test fails or crashes. 6. Test case #2 gets rerun individually in a new process. This passes because TestSuite initialization is run again.
,
Jun 23 2017
is this a dup of http://crbug.com/728166
,
Jun 26 2017
No, I think that is a different issue. This crash isn't at shutdown, it's after things get shutdown and then partially restarted again.
,
Aug 16 2017
,
Aug 17 2017
,
Nov 22 2017
is crbug/785405 caused by this?
,
Nov 22 2017
It definitely looks like it. rjkroege@ do you have time to fix or should I look into this?
,
Nov 23 2017
,
Nov 23 2017
The problem was introduced in this CL: https://codereview.chromium.org/2795503002
,
Nov 27 2017
,
Apr 16 2018
kylechar@ does this still happen?
,
Apr 16 2018
Issue 728166 has been merged into this issue.
,
Apr 16 2018
The two targets that have comments saying they're failing were ui_chromeos_unittests and app_list_presenter_unittests. ui_chromeos_unittests was fixed by someone else in crbug.com/807148 . app_list_presenter_unittests are all disabled now (not sure they weren't deleted). I'm not sure if there are others, but the two mentioned are fixed. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by kylec...@chromium.org
, Jun 23 2017