[mozlog] xpcshell-test PROCESS_OUTPUT contains extra newlines

RESOLVED FIXED in mozilla36

Status

Testing
Mozbase
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: markh, Assigned: markh)

Tracking

unspecified
mozilla36
Points:
1
Bug Flags:
firefox-backlog +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment, 1 obsolete attachment)

Created attachment 8517834 [details] [diff] [review]
t.patch

If you run xpcshell tests that generate "process output", the output looks like:

0:01.27 PROCESS_OUTPUT: Thread-1 (pid:13600) "1415236493351	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]
"
 0:01.27 PROCESS_OUTPUT: Thread-1 (pid:13600) "1415236493351	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]
"

(which might be hard to see if bugzilla wraps the line, but each output line looks like '... "an output line\n"\n' - ie, every line of output includes the raw \n (\r\n on Windows) character from the process output, then a close quote and additional \n added by the test harness.

With the following patch applied the output becomes:

0:01.24 PROCESS_OUTPUT: Thread-1 (pid:15216) "1415236662103	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]"
 0:01.24 PROCESS_OUTPUT: Thread-1 (pid:15216) "1415236662103	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]"

Chris, does this patch make sense, or should it be handled elsewhere?

(In-fact, I'd prefer to see it look something like:
0:01.24 PROCESS_OUTPUT: Thread-1 (pid:15216):   141523....

(ie, a ':\t' instead of the open quote and no closing quote, but that might be more controversial)
Attachment #8517834 - Flags: feedback?(cmanchester)
Comment on attachment 8517834 [details] [diff] [review]
t.patch

Review of attachment 8517834 [details] [diff] [review]:
-----------------------------------------------------------------

I'm all for it, but I think I'd err on the side of doing this in the producer, somewhere around http://hg.mozilla.org/mozilla-central/file/2114ef80f6ae/testing/xpcshell/runxpcshelltests.py#l492
Attachment #8517834 - Flags: feedback?(cmanchester) → feedback+
(Assignee)

Comment 2

3 years ago
Created attachment 8517850 [details] [diff] [review]
0005-Bug-1094526-remove-extra-n-chars-from-xpcshell-test-.patch

SGTM!
Attachment #8517834 - Attachment is obsolete: true
Attachment #8517850 - Flags: review?(cmanchester)
Attachment #8517850 - Flags: review?(cmanchester) → review+
(Assignee)

Comment 3

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/f79e13de65b0
Assignee: nobody → mhammond
Status: NEW → ASSIGNED
Points: --- → 1
Flags: firefox-backlog+
Whiteboard: [qa-]
https://hg.mozilla.org/mozilla-central/rev/f79e13de65b0
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36

Updated

3 years ago
Iteration: --- → 36.2
You need to log in before you can comment on or make changes to this bug.