Page MenuHomePhabricator

ecore: make sure that ecore stay initialized during the full test.
ClosedPublic

Authored by cedric on Apr 6 2019, 6:43 PM.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cedric created this revision.Apr 6 2019, 6:43 PM
cedric requested review of this revision.Apr 6 2019, 6:43 PM

Why ? If it ever happens that ecore_init is not initialized in the beginning, then something else is really wrong.

Why ? If it ever happens that ecore_init is not initialized in the beginning, then something else is really wrong.

I forgot the exact scenario, maybe during a CK_FORK=no, but if I remember correctly there is a test before that, that need to trigger an ecore_shutdown, which lead to this test having no init when started. I will have to look at it more to remember.

bu5hm4n requested changes to this revision.Sat, Apr 20, 6:01 AM

Mhm, i did not write the init stuff for tests, but @zmike, should we do that ? or should the other test rather ensure that the init codes are the same on the outway as on the in way ?

This revision now requires changes to proceed.Sat, Apr 20, 6:01 AM
cedric updated this revision to Diff 21572.Tue, Apr 23, 9:56 AM

rebase.

zmike requested changes to this revision.Tue, Apr 23, 11:37 AM

If a test needs to call ecore_shutdown then it should also call ecore_init after to restore the global state.

Rejected for being wrong and also for not having a commit log.

This revision now requires changes to proceed.Tue, Apr 23, 11:37 AM
In D8566#158289, @zmike wrote:

If a test needs to call ecore_shutdown then it should also call ecore_init after to restore the global state.

Rejected for being wrong and also for not having a commit log.

The way the promise test is written doesn't follow that pattern at all. To maintain the count correct for ecore_init in other test the fixture does shutdown ecore during the fixture init and turn it back in after. The change above just follow the current pattern used in this file. If we want to change this, we will have to patch the entire file.

zmike accepted this revision.Thu, May 9, 9:40 AM

I forgot about the the promise test fixture, just add some commit log and this is ok.

bu5hm4n accepted this revision.EditedThu, May 9, 10:14 AM

I trust mike

EDIT: sometimes.

This revision is now accepted and ready to land.Thu, May 9, 10:14 AM
This revision was automatically updated to reflect the committed changes.