Closed Bug 1386013 Opened 7 years ago Closed 7 years ago

Log an error when Safe Browsing times out

Categories

(Toolkit :: Safe Browsing, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: francois, Assigned: francois)

References

Details

(Whiteboard: #sbv4-m8)

Attachments

(1 file)

In order to be able to easily diagnose the cause of test failures (e.g. in testing/firefox-ui/tests/functional/security/test_safe_browsing_initial_download.py), we should log an error using `MOZ_LOG()` here:

https://searchfox.org/mozilla-central/rev/09c065976fd4f18d4ad764d7cb4bbc684bf56714/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp#972-992

MOZ_LOG(gUrlClassifierStreamUpdaterLog, mozilla::LogLevel::Error, ...)

and for completeness, we  could also add a `log()` line here:

https://searchfox.org/mozilla-central/rev/09c065976fd4f18d4ad764d7cb4bbc684bf56714/toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js#418-423

Then we could add `MOZ_LOG=UrlClassifierStreamUpdater:1` to the above marionette test.
Henrik, is it easy to export extra environment variables in a marionette test?
Flags: needinfo?(hskupin)
Whiteboard: #sbv4-m8
Assignee: nobody → francois
Status: NEW → ASSIGNED
Comment on attachment 8892221 [details]
Bug 1386013 - Log an error when Safe Browsing times out.

https://reviewboard.mozilla.org/r/163166/#review168556
Attachment #8892221 - Flags: review?(hchang) → review+
hg error in cmd: hg rebase -s b2fe1512555d -d 1eea95104a3a: abort: can't rebase public changeset b2fe1512555d
(see 'hg help phases' for details)
Pushed by fmarier@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/576d291d9449
Log an error when Safe Browsing times out. r=hchang
https://hg.mozilla.org/mozilla-central/rev/576d291d9449
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
(In reply to François Marier [:francois] from comment #1)
> Henrik, is it easy to export extra environment variables in a marionette
> test?

Without modifications to geckoinstance.py I do not see a way to get this done. Right now we only use a hard-coded set of env variables on top of the os wide ones. If you think it's worth extending feel free to patch that file so env variables could be set via `self.marionette.instance.env` or such.
Flags: needinfo?(hskupin)
See Also: → 1386810
(In reply to Henrik Skupin (:whimboo) from comment #8)
> Without modifications to geckoinstance.py I do not see a way to get this
> done. Right now we only use a hard-coded set of env variables on top of the
> os wide ones.

Where are the hard-coded envvars defined?

I only found one here: https://searchfox.org/mozilla-central/rev/bbc1c59e460a27b20929b56489e2e55438de81fa/testing/firefox-ui/harness/firefox_ui_harness/runners/update.py#45

> If you think it's worth extending feel free to patch that file
> so env variables could be set via `self.marionette.instance.env` or such.

For now, we can set this one globally since it's very low-noise, but I filed bug 1386810 so that we can expose more debugging info in the Safe Browsing tests in the future.
Flags: needinfo?(hskupin)
(In reply to François Marier [:francois] from comment #9)
> > Without modifications to geckoinstance.py I do not see a way to get this
> > done. Right now we only use a hard-coded set of env variables on top of the
> > os wide ones.
> 
> Where are the hard-coded envvars defined?

I gave the requested information over on bug 1386810.

> For now, we can set this one globally since it's very low-noise, but I filed
> bug 1386810 so that we can expose more debugging info in the Safe Browsing
> tests in the future.

Just don't miss to remove it afterward. Safe browsing is disabled by default through, but I wouldn't like to see side-effects from having it enabled for the remaining tests. Thanks.
Flags: needinfo?(hskupin)
Blocks: 1387612
You need to log in before you can comment on or make changes to this bug.