Closed Bug 1744203 Opened 2 years ago Closed 2 years ago

FAIL Test connect_abstract_permit was permitted (security/sandbox/test/browser_sandbox_test.js)

Categories

(Core :: Security: Process Sandboxing, defect, P1)

defect

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: gerard-majax, Assigned: jld)

References

Details

Attachments

(2 files)

STR:

  1. mach test --headless security/sandbox/test/browser_sandbox_test.js

Expected:
Test passes

Actual:

Unexpected Results
------------------
security/sandbox/test/browser_sandbox_test.js
  FAIL Test connect_abstract_permit was permitted.  | Succeeded -

Running with xvfb-run mach test security/sandbox/test/browser_sandbox_test.js the test is properly passing

Assignee: nobody → lissyx+mozillians

I have patches that should fix this. I can't reproduce it with just ./mach test --headless, but setting the security.sandbox.content.headless pref breaks the test, because the broker rejects the call (EACCES) instead of permitting it and having the connection fail (ECONNREFUSED). The error message is incorrect in that case (was permitted and Succeeded instead of the actual error), and I've also fixed that.

Assignee: lissyx+mozillians → jld
Summary: FAIL Test connect_abstract_permit was permitted → FAIL Test connect_abstract_permit was permitted (security/sandbox/test/browser_sandbox_test.js)

The original SandboxTesting protocol assumed tests would just care about
whether operations succeeded or failed, but now we have tests that check
for specific error codes. Currently that doesn't work well: getting an
error with the wrong error code is misreported as the syscall succeeding.

This patch changes the protocol to simply indicate whether the test
passed and give an unstructured message about what happened, and fixes
the SandboxTestingChild::*Test methods to include the relevant
information in the message.

Pushed by jedavis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/453b154f2cec
Fix SandboxTesting when test cases expect a specific error. r=gerard-majax
https://hg.mozilla.org/integration/autoland/rev/62c677d99313
Fix the `connect_abstract_permit` test to handle X11 connections not being allowed. r=gerard-majax

Backed out 2 changesets (Bug 1744203) for causing bc test failures.
Backout link
Push with failures
Failure Log

Flags: needinfo?(jld)

I don't understand this. I didn't change the .ini file, only some implementation details of the test.

But, I notice that the failed jobs are all for ASan, which doesn't use sandboxing; it shouldn't even have been trying to touch security/sandbox on that build type. Maybe there's some heuristic that's trying to run tests only for changed files, and it's being too clever for its own good….

Severity: -- → S4
Priority: -- → P1

The CI failure is bug 1667271, and the best workaround seems to be to re-land this (and warn the sheriffs, now that I know this is problem). But I'm going to wait until after the winter holidays to try that.

Flags: needinfo?(jld)

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:jld, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(lissyx+mozillians)
Flags: needinfo?(jld)
Flags: needinfo?(lissyx+mozillians)
Blocks: 1749606
Pushed by jedavis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d5a90dc653fb
Fix SandboxTesting when test cases expect a specific error. r=gerard-majax
https://hg.mozilla.org/integration/autoland/rev/47830047263a
Fix the `connect_abstract_permit` test to handle X11 connections not being allowed. r=gerard-majax
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
Flags: needinfo?(jld)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: