Closed Bug 1907190 Opened 1 year ago Closed 1 year ago

Fix testBrokenApp() to handle logs with async stacks.

Categories

(WebExtensions :: General, task, P3)

task

Tracking

(firefox130 fixed)

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: markh, Assigned: robwu)

References

Details

(Whiteboard: [addons-jira])

Attachments

(1 file)

Bug 1904975 introduced async stacks for xpcshell tests, but test_ext_native_messaging.js has a few assumptions about the stacks which don't work correctly. That bug landed a work-around in that test - this bug is to remove that workaround.

Severity: -- → N/A
Type: enhancement → task
Flags: needinfo?(rob)
Priority: -- → P3

The issue happens because with longer async stacks, the m.message values of identical errors are no longer identical, due to the different call sites. Consequently, the logic that de-duplicates errors does not work, at https://searchfox.org/mozilla-central/rev/54a5c4f14f3eb514a29e0cebcb5a095144bcd450/toolkit/components/extensions/test/xpcshell/test_ext_native_messaging.js#391-396

To fix this, we could use m.errorMessage instead of m.message.

Another alternative is to duplicate the expectation. I'm going to do this, so that every error is explicitly accounted for.

Assignee: nobody → rob
Flags: needinfo?(rob)
Whiteboard: [addons-jira]

When I fixed the underlying issue by requiring every error message to be accounted for, a new duplicate test failure appeared because there was another source of a duplicate message.

I fixed that and attached the patch to bug 1908201, which will have to land before the patch to this bug.

Depends on: 1908201
Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/5e05038eefbf Fix test expectations for duplicate error messages r=willdurand
Regressions: 1908263

Backed out for causing xpcshell failures on test_ext_native_messaging.js

[task 2024-07-16T23:51:24.534Z] 23:51:24     INFO -  TEST-START | toolkit/components/extensions/test/xpcshell/test_ext_native_messaging.js
[task 2024-07-16T23:56:24.537Z] 23:56:24  WARNING -  TEST-UNEXPECTED-TIMEOUT | toolkit/components/extensions/test/xpcshell/test_ext_native_messaging.js | Test timed out
[task 2024-07-16T23:56:24.537Z] 23:56:24     INFO -  TEST-INFO took 300004ms
[task 2024-07-16T23:56:24.538Z] 23:56:24     INFO -  >>>>>>>
[task 2024-07-16T23:56:24.538Z] 23:56:24     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2024-07-16T23:56:24.539Z] 23:56:24     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2024-07-16T23:56:24.539Z] 23:56:24     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2024-07-16T23:56:24.539Z] 23:56:24     INFO -  running event loop
[task 2024-07-16T23:56:24.539Z] 23:56:24     INFO -  toolkit/components/extensions/test/xpcshell/test_ext_native_messaging.js | Starting setup check_remote
[task 2024-07-16T23:56:24.540Z] 23:56:24     INFO -  (xpcshell/head.js) | test check_remote pending (2)
[task 2024-07-16T23:56:24.540Z] 23:56:24     INFO -  TEST-PASS | toolkit/components/extensions/test/xpcshell/test_ext_native_messaging.js | check_remote - [check_remote : 1] useRemoteWebExtensions matches - false == false
Flags: needinfo?(rob)

Was an issue with the patch in bug 1908201; will fix and reland.

Flags: needinfo?(rob)
Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/44210ec80d0d Fix test expectations for duplicate error messages r=willdurand
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
No longer regressions: 1908263
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: