Closed Bug 1227138 Opened 6 years ago Closed 6 years ago

browser_AddonWatcher.js picks up system/other add-ons

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

browser_AddonWatcher.js appears to be trying to simulate an add-on causing high CPU by installing its own add-on and then doing work for it.

However, it doesn't seem to be taking into account that system add-ons could be installed during the tests.

In the Loop system add-on, in development in bug 1186172, we are seeing:

https://treeherder.mozilla.org/logviewer.html#?job_id=13975387&repo=try

 11:12:21     INFO -  179 INFO TEST-PASS | toolkit/components/perfmonitoring/tests/browser/browser_AddonWatcher.js | Histogram MISBEHAVING_ADDONS_CPOW_TIME_MS is initially empty for the add-on - 0 == 0 -
 11:12:21     INFO -  180 INFO Burning some CPU. This should cause an add-on watcher notification
 11:12:21     INFO -  181 INFO Burning some CPU. This should cause an add-on watcher notification
 11:12:21     INFO -  182 INFO Burning some CPU. This should cause an add-on watcher notification
 11:12:21     INFO -  183 INFO Burning some CPU. This should cause an add-on watcher notification
 11:12:21     INFO -  184 INFO Burning some CPU. This should cause an add-on watcher notification
 11:12:21     INFO -  185 INFO Burning some CPU. This should cause an add-on watcher notification
 11:12:21     INFO -  186 INFO TEST-UNEXPECTED-FAIL | toolkit/components/perfmonitoring/tests/browser/browser_AddonWatcher.js | The add-on watcher has detected the misbehaving addon - "loop@test.mozilla.org" == "addonwatcher-test@mozilla.com" - JS frame :: chrome://mochitests/content/browser/toolkit/components/perfmonitoring/tests/browser/browser_AddonWatcher.js :: burn_rubber</wait</< :: line 64
 11:12:21     INFO -  Stack trace:
 11:12:21     INFO -      chrome://mochitests/content/browser/toolkit/components/perfmonitoring/tests/browser/browser_AddonWatcher.js:burn_rubber</wait</<:64
 11:12:21     INFO -      resource://gre/modules/AddonWatcher.jsm:AddonWatcher._checkAddons/<:271
 11:12:21     INFO -      AddonWatcher._checkAddons@resource://gre/modules/AddonWatcher.jsm:187:1
 11:12:21     INFO -  187 INFO Reason: longestDuration, expected longestDuration
This is a possible fix, but I don't understand the tests enough to know if its the right one or not. This just adds in a check that if it isn't the expected add-on, then it lets the test continue until the expected add-on is found (or it times out).

If this needs a different fix, I'd appreciate someone familiar with the code picking it up. Thanks.
Attachment #8690820 - Flags: review?(dtownsend)
Attachment #8690820 - Flags: review?(dtownsend) → review+
Assignee: nobody → standard8
https://hg.mozilla.org/mozilla-central/rev/f4d4e5177047
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.