Open Bug 1816553 Opened 3 years ago Updated 2 years ago

[xpcshell] add support to log preferences that are not reset after a test finishes

Categories

(Testing :: XPCShell Harness, enhancement)

Default
enhancement

Tracking

(Not tracked)

People

(Reporter: jmaher, Unassigned)

References

(Blocks 1 open bug)

Details

xpcshell tests run in parallel, but upon failure, tests are run serially. When tests are run serially the harness should compare the profile/browser preferences at startup vs the end of the test, and log as an error any preference that has changed.

With this capability it would be possible to run all the tests serially and determine which preferences are "bleeding-through". Like other mochitest harnesses many preferences are ok to change and we need to find the ones that are problematic.

I'm not sure I understand the intent of this bug with respect to xpcshell-tests. xpcshell-tests are run in individual profiles/instances and so can't bleed into each other regardless of being run in parallel or serial.

Whilst we could still look for preferences that are not reset at the end of the test, I think that might be a lot of work to resolve. We have typically had a "no cleanup required" for xpcshell-tests precisely because of the separate profiles & instances, and hence I think that will be a significant amount of work.

If there's some other reason then it is possible we could think about this.

we have done this work for mochitest and was looking to extend this to xpcshell for consistency. I agree there is little risk here given how xpcshell has a different profile for different tests, but an accident in the tools could lead to bleed-through of preferences set intentionally, accidentally, or as a side effect of other transactions within the browser.

You need to log in before you can comment on or make changes to this bug.