Closed Bug 1052937 Opened 5 years ago Closed 5 years ago

Missing subtest (assertion) name in mochitest conflicts with structured logs

Categories

(Testing :: Mozbase, defect)

defect
Not set

Tracking

(firefox33 fixed, firefox34 fixed)

RESOLVED FIXED
mozilla34
Tracking Status
firefox33 --- fixed
firefox34 --- fixed

People

(Reporter: akachkach, Assigned: akachkach)

Details

Attachments

(1 file, 1 obsolete file)

Testing a patch for bug 1050251, I added a seeded timeout error and hit this exception in logtypes: 

https://tbpl.mozilla.org/php/getParsedLog.php?id=45790129&tree=Try&full=1#error5
Do we know what the js output was when this message was hit? If not can we find out? I imagine you should see the same error locally.
I can't test mochitests locally (due to a change in Apple's headers, long story :)), but could this be caused by the fact that a test_status doesn't have a message field? (the patch slightly changed the structured logging to ignore empty strings when creating a test_status message)
This should do it (the issue was that some assertions had an undefined name, which causes the subtest field to be missing). Maybe we should have a check for missing fields in the future?
Attachment #8472501 - Flags: review?(ahalberstadt)
Comment on attachment 8472501 [details] [diff] [review]
0001-Bug-1052937-Default-value-for-mochitest-assertions-n.patch

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

Lgtm!
Attachment #8472501 - Flags: review?(ahalberstadt) → review+
Try run looks good.
Assignee: nobody → akachkach
Status: NEW → ASSIGNED
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8a6bb8913ecb
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Summary: TypeError: Too few arguments in logtypes.py on a mochitest run with a seeded failure → Missing subtest (assertion) name in mochitest conflicts with structured logs
athena from #devtools just reported that she was encountering the same bug in devtools test. This is because we only fixed this issue in SimpleTest instead of fixing it at the root (in the structured logger).

With this patch, this problem is also fixed for tests that do not use SimpleTest
Attachment #8472501 - Attachment is obsolete: true
Attachment #8475006 - Flags: review?(ahalberstadt)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #8475006 - Flags: review?(ahalberstadt) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/b7aa62ee02a5
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.