Closed Bug 918408 Opened 11 years ago Closed 11 years ago

marionette.log file created in users' profile folder

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(firefox26 wontfix, firefox27 wontfix, firefox28 fixed, b2g-v1.2 fixed)

RESOLVED FIXED
mozilla28
Tracking Status
firefox26 --- wontfix
firefox27 --- wontfix
firefox28 --- fixed
b2g-v1.2 --- fixed

People

(Reporter: Dolske, Assigned: mdas)

Details

Attachments

(2 files, 3 obsolete files)

Running a Firefox with a new profile creates a marionette.log file there. Deleting the log file and running Firefox again recreates it. Why is marionette being initialized and creating this file? These are end-user systems, not test boxes. I'd expect this test framework to be checking a pref or environment variable, and only enabling itself if explicitly needed.
Thanks for noticing this, we shouldn't create that file if the marionette server isn't meant to run. tested this locally and it won't drop the file unless the marionette-server is supposed to start via --marionette cli arg or by the pref.
Attachment #807809 - Flags: review?(jgriffin)
Comment on attachment 807809 [details] [diff] [review] remove log lines when marionette is not going to be running Review of attachment 807809 [details] [diff] [review]: ----------------------------------------------------------------- lgtm
Attachment #807809 - Flags: review?(jgriffin) → review+
Why does marionette log to file at all?
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #3) > Why does marionette log to file at all? We can remove the file now too, since no one is using it anymore. So if it's not a debug build (or a b2g build), do we want to have any log output? If we remove the file logging, then we won't have any stdout (dump appenders) for any build other than these two build types. Should we output to stdout for any type of build? I'm not sure what we want here.
Flags: needinfo?(jgriffin)
Can this also be back-ported to Firefox 25, 26 ?
(In reply to Malini Das [:mdas] from comment #4) > (In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment > #3) > > Why does marionette log to file at all? > > We can remove the file now too, since no one is using it anymore. > > So if it's not a debug build (or a b2g build), do we want to have any log > output? If we remove the file logging, then we won't have any stdout (dump > appenders) for any build other than these two build types. Should we output > to stdout for any type of build? I'm not sure what we want here. We should probably default to not dumping anything on opt Firefox builds, but have a preference that can be set to enable this, so that we can still get meaningful debug information from TBPL jobs. We can set that preference in http://mxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/geckoinstance.py.
Flags: needinfo?(jgriffin)
(In reply to Jim Jeffery not reading bug-mail 1/2/11 from comment #5) > Can this also be back-ported to Firefox 25, 26 ? Yes, if this is useful we can back-port it.
Tested locally for debug/non-debug builds. This adds support for a pref called 'marionette.logging' which controls marionette logging for non-debug/non-b2g builds.
Attachment #807809 - Attachment is obsolete: true
Attachment #823480 - Flags: review?(jgriffin)
Comment on attachment 823480 [details] [diff] [review] remove marionette.log file, and enable stdout logging via pref for non-debug/non-b2g builds Review of attachment 823480 [details] [diff] [review]: ----------------------------------------------------------------- ::: testing/marionette/components/marionettecomponent.js @@ +38,5 @@ > #endif > #ifdef MOZ_B2G > dumper = true; > #endif > + if (dumper || Services.prefs.getBoolPref(MARIONETTE_LOG_PREF)) { getBoolPref will throw an exception when this pref doesn't exist, so it needs to be inside a try/catch block.
Attachment #823480 - Flags: review?(jgriffin) → review-
Thanks, I didn't get any error output in the minimal gecko log in the non-debug build so I didn't realize that was an issue. Fixed in this patch and tested.
Attachment #823480 - Attachment is obsolete: true
Attachment #823587 - Flags: review?(jgriffin)
Attachment #823587 - Attachment is patch: true
Comment on attachment 823587 [details] [diff] [review] remove marionette.log file, and enable stdout logging via pref for non-debug/non-b2g builds v2.0 Review of attachment 823587 [details] [diff] [review]: ----------------------------------------------------------------- Thanks. ::: testing/marionette/components/marionettecomponent.js @@ +42,5 @@ > + try { > + if (dumper || Services.prefs.getBoolPref(MARIONETTE_LOG_PREF)) { > + let formatter = new Log.BasicFormatter(); > + this.logger.addAppender(new Log.DumpAppender(formatter)); > + this.logger.info("MDAS: bool pref: " + Services.prefs.getBoolPref(MARIONETTE_LOG_PREF)); Can delete this line :)
Attachment #823587 - Flags: review?(jgriffin) → review+
Hah whoops. Carrying r+ forward, and testing out on try first before landing: https://tbpl.mozilla.org/?tree=Try&rev=5e5ab351669a
Attachment #823587 - Attachment is obsolete: true
Attachment #824023 - Flags: review+
Assignee: nobody → mdas
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [checkin-needed-b2g26]
This doesn't apply very well to b2g26 due to bug 451283 landing on Gecko 27. Please post a branch patch :)
Whiteboard: [checkin-needed-b2g26]
This patch should apply cleanly to mozilla-b2g26
Attachment #826907 - Flags: review+
Whiteboard: [checkin-needed-b2g26]
Not sure from this patch if the intention was to not create the log.file at all for end-users, or.. to remove the marionette.log. In my test profiles after this landed the marionette.log file remains in my profiles. Manually removing them works and they are not re-created... At any rate it may not be a big deal to have it linger around, but could perhaps raise questions again down the road when someone else discovers the file.
(In reply to Jim Jeffery not reading bug-mail 1/2/11 from comment #17) > Not sure from this patch if the intention was to not create the log.file at > all for end-users, or.. to remove the marionette.log. > > In my test profiles after this landed the marionette.log file remains in my > profiles. > Manually removing them works and they are not re-created... This was to prevent the marionette.log file from being written to a file, and does not remove existing marionette.log files. > > At any rate it may not be a big deal to have it linger around, but could > perhaps raise questions again down the road when someone else discovers the > file. This is a good point though...
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: