Closed Bug 1548924 Opened 5 years ago Closed 5 years ago

reduce or eliminate unnecessary sleep statement in test-linux.sh

Categories

(Testing :: General, enhancement, P2)

enhancement

Tracking

(firefox68 fixed)

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: egao, Assigned: egao)

References

Details

Attachments

(1 file)

Summary

In the logs for linux platform tests, there is a section where the test-linux.sh script is forced to sleep for 15 seconds.

Example from linux64:

[task 2019-04-29T16:56:11.387Z] if $NEED_WINDOW_MANAGER; then
[task 2019-04-29T16:56:11.387Z]     # This is read by xsession to select the window manager
[task 2019-04-29T16:56:11.388Z]     echo DESKTOP_SESSION=ubuntu > $HOME/.xsessionrc
[task 2019-04-29T16:56:11.389Z] 
[task 2019-04-29T16:56:11.389Z]     # note that doing anything with this display before running Xsession will cause sadness (like,
[task 2019-04-29T16:56:11.389Z]     # crashes in compiz). Make sure that X has enough time to start
[task 2019-04-29T16:56:11.389Z]     sleep 15
[task 2019-04-29T16:56:11.389Z]     # DISPLAY has already been set above
[task 2019-04-29T16:56:11.390Z]     # XXX: it would be ideal to add a semaphore logic to make sure that the
[task 2019-04-29T16:56:11.390Z]     # window manager is ready
[task 2019-04-29T16:56:11.390Z]     /etc/X11/Xsession 2>&1 &

Scope

Investigate if feasible to:

  • reduce the sleep duration, or;
  • eliminate entirely

Test Plan

Ensure the changes do not have adverse impact by running all linux jobs.

Type: defect → enhancement
No longer depends on: 1548106
Assignee: nobody → egao

Baseline:
https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&resultStatus=pending%2Crunning%2Csuperseded%2Cusercancel%2Cretry%2Csuccess%2Ctestfailed%2Cbusted%2Cexception&classifiedState=unclassified&tier=1%2C2%2C3&group_state=expanded&revision=e8aebe488b2f2e567940577de25013d00e818f7c&selectedJob=243355619

elimination of sleep 15 clause

https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=ac823a45a223844ead72f64b811f8a0112b69d8d&searchStr=linux&selectedJob=244588779

Current results are preliminary (not enough tests run), however it appears that eliminating the sleep 15 clause from test-linux.sh script has no adverse impact.

A sample test from each suite for every Linux platform has been run, and so far all results are green.

conclusion

At this point I believe it is safe to say that it is possible to eliminate this extraneous sleep to gain 15s back per chunk for all Linux platforms. This will add up to a significant time savings.

I believe the same script is used for all/many Android tests.

(In reply to Geoff Brown [:gbrown] from comment #2)

I believe the same script is used for all/many Android tests.

I'll be sure to check Android, just to ensure compatibility if I press ahead with the change.

Pushed by egao@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0e9e744accd3
task efficiency: remove sleep 15 clause from test-linux.sh r=gbrown,jmaher
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

(In reply to Mihai Alexandru Michis [:malexandru] from comment #7)

Backed out changeset 0e9e744accd3 (Bug 1548924) for causing leaks

Backout link: https://hg.mozilla.org/integration/autoland/rev/8bde97e9f598f2bea1c0182de7d0b7f52126c933

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=success%2Ctestfailed%2Cbusted%2Cexception&searchStr=linux%2Cx64%2Casan%2Cmochitests%2Ctest-linux64-asan%2Fopt-mochitest-browser-chrome-e10s-3%2Cm%28bc3%29&revision=0e9e744accd3ed7b7b0ff2436904ed78a92bf9e2

Log link: https://treeherder.mozilla.org/logviewer.html#?job_id=245234416&repo=autoland

From what I see, leaks for linux64-asan/opt-mochitest-browser-chrome-3 started much earlier than my push in autoland: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=success%2Ctestfailed%2Cbusted%2Cexception&searchStr=linux64-asan%2Fopt-mochitest-browser-chrome-e10s-3&revision=f9833a7d765abb8eba66b95cfc183845db8e1b32

The above push is where I see the first instance of the leaks.

I will be pushing additional try runs with my changes as well as updated mozilla-central with no changes; I expect the leaks to be present in my baseline push, since it doesn't appear that my changes are related to the leaks in my opinion.

Flags: needinfo?(malexandru)
Pushed by malexandru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/65a693623cee
task efficiency: remove sleep 15 clause from test-linux.sh r=gbrown,jmaher CLOSED TREE

I relanded this

Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Flags: needinfo?(malexandru)
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

(In reply to Mihai Alexandru Michis [:malexandru] from comment #10)

I relanded this

Thanks, if it causes the leaks to occur again then I'm more than happy to take another look.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: