Page MenuHomePhabricator

tests: optimize eio tests
ClosedPublic

Authored by zmike on May 3 2018, 11:57 AM.

Details

Summary

by removing the sleep() calls and reducing timeout time, tests remain
as accurate while taking less than 5% of the required time to run

fix T6914

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.
zmike created this revision.May 3 2018, 11:57 AM
zmike requested review of this revision.May 3 2018, 11:57 AM
zmike added a comment.May 3 2018, 12:15 PM

T6915 documents all remaining issues with the eio test suite that I'm aware of. None of the issues from this ticket are related to this change; they were either concealed by the extremely long timeouts or are rare enough that they have not been noticed until now.

cedric added a comment.May 3 2018, 1:04 PM

I remember that there was a potential race condition between when a file is created and when a monitor is added and that is why we had this usleep. Basically, the file could some time popup in the monitor even if it was clearly created before. Did you see that problem or is it gone ? I would blame the kernel for such a behavior, but well, it impacts our tests.

zmike added a comment.May 3 2018, 1:18 PM

I ran the updated tests hundreds of times. I ran them with forking enabled and disabled. I ran them under extreme cpu load and under no load. The tests succeeded in every case excepting the issues listed in T6915.

At no point could this be an issue since I added a check to ignore events on the directory which is created before starting the main loop. I don't know whether such events are received but it's irrelevant even if they are.

cedric accepted this revision.May 3 2018, 1:36 PM

Great !

This revision is now accepted and ready to land.May 3 2018, 1:36 PM
zmike added a comment.May 4 2018, 5:32 AM

@stefan_schmidt do you also want to review or is @cedric enough?

I am actually on it right now. Just giving it some testing and push it when it all holds together.

stefan_schmidt accepted this revision.May 4 2018, 5:47 AM
This revision was automatically updated to reflect the committed changes.