Closed Bug 1497203 Opened Last year Closed 5 months ago

Apply Meta CSP to about:plugins

Categories

(Core :: DOM: Security, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: ckerschb, Assigned: ckerschb)

References

Details

(Whiteboard: [domsecurity-backlog1])

Attachments

(1 file)

No description provided.
Assignee: nobody → ckerschb
Status: NEW → ASSIGNED

Backed out changeset 93cfc2131ea5 (Bug 1497203) for config/tests/test_mozbuild_reading.py related build bustages

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=linux%2Cbuild&fromchange=3378e367e1d9c56bd6334849914b8de3814e8b47&tochange=1e6dcacb3ab034b215d25a5cad501e8546e4c4e4&selectedJob=255989668

Backout link: https://hg.mozilla.org/integration/autoland/rev/1e6dcacb3ab034b215d25a5cad501e8546e4c4e4

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=255989668&repo=autoland&lineNumber=41222

[task 2019-07-11T18:29:14.083Z] 18:29:14 INFO - /builds/worker/workspace/build/src/config/tests/test_mozbuild_reading.py
[task 2019-07-11T18:29:14.083Z] 18:29:14 INFO - ============================= test session starts ==============================
[task 2019-07-11T18:29:14.083Z] 18:29:14 INFO - platform linux2 -- Python 2.7.9, pytest-3.6.2, py-1.5.4, pluggy-0.6.0 -- /builds/worker/workspace/build/src/obj-firefox/_virtualenvs/obj-firefox-8yIyzR8r-2.7/bin/python
[task 2019-07-11T18:29:14.083Z] 18:29:14 INFO - rootdir: /builds/worker/workspace/build/src, inifile: /builds/worker/workspace/build/src/config/mozunit/mozunit/pytest.ini
[task 2019-07-11T18:29:14.083Z] 18:29:14 INFO - collecting ... collected 3 items
[task 2019-07-11T18:29:14.083Z] 18:29:14 INFO - ../config/tests/test_mozbuild_reading.py::TestMozbuildReading::test_filesystem_traversal_no_config PASSED
[task 2019-07-11T18:29:14.084Z] 18:29:14 INFO - ../config/tests/test_mozbuild_reading.py::TestMozbuildReading::test_filesystem_traversal_reading <- ../../../../../usr/lib/python2.7/unittest/case.py SKIPPED
[task 2019-07-11T18:29:14.084Z] 18:29:14 WARNING - ../config/tests/test_mozbuild_reading.py::TestMozbuildReading::test_orphan_file_patterns TEST-UNEXPECTED-FAIL
[task 2019-07-11T18:29:14.084Z] 18:29:14 INFO - =================================== FAILURES ===================================
[task 2019-07-11T18:29:14.084Z] 18:29:14 INFO - ________________ TestMozbuildReading.test_orphan_file_patterns _________________
[task 2019-07-11T18:29:14.084Z] 18:29:14 INFO - self = <test_mozbuild_reading.TestMozbuildReading testMethod=test_orphan_file_patterns>
[task 2019-07-11T18:29:14.084Z] 18:29:14 INFO - def test_orphan_file_patterns(self):
[task 2019-07-11T18:29:14.084Z] 18:29:14 INFO - if sys.platform == 'win32':
[task 2019-07-11T18:29:14.084Z] 18:29:14 INFO - raise unittest.SkipTest('failing on windows builds')
[task 2019-07-11T18:29:14.084Z] 18:29:14 INFO - mb = MozbuildObject.from_environment(detect_virtualenv_mozinfo=False)
[task 2019-07-11T18:29:14.084Z] 18:29:14 INFO - try:
[task 2019-07-11T18:29:14.084Z] 18:29:14 INFO - config = mb.config_environment
[task 2019-07-11T18:29:14.084Z] 18:29:14 INFO - except Exception as e:
[task 2019-07-11T18:29:14.084Z] 18:29:14 INFO - if e.message == 'config.status not available. Run configure.':
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - raise unittest.SkipTest('failing without config.status')
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - raise
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - if config.substs['MOZ_BUILD_APP'] == 'js':
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - raise unittest.SkipTest('failing in Spidermonkey builds')
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - reader = BuildReader(config)
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - all_paths = self._mozbuilds(reader)
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - _, contexts = reader.read_relevant_mozbuilds(all_paths)
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - finder = FileFinder(config.topsrcdir, ignore=['obj*'])
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - def pattern_exists(pat):
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - return [p for p in finder.find(pat)] != []
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - for ctx in contexts:
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - if not isinstance(ctx, Files):
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - continue
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - relsrcdir = ctx.relsrcdir
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - for p in ctx.patterns:
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - if not pattern_exists(os.path.join(relsrcdir, p)):
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - self.fail("The pattern '%s' in a Files() entry in "
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - "'%s' corresponds to no files in the tree.\n"
[task 2019-07-11T18:29:14.085Z] 18:29:14 INFO - "Please update this entry." %
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - > (p, ctx.main_path))
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - E AssertionError: The pattern 'direction*' in a Files() entry in '/builds/worker/workspace/build/src/toolkit/content/moz.build' corresponds to no files in the tree.
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - E Please update this entry.
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - ../config/tests/test_mozbuild_reading.py:106: AssertionError
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - =============== 1 failed, 1 passed, 1 skipped in 138.16 seconds ================
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - Setting retcode to 1 from /builds/worker/workspace/build/src/config/tests/test_mozbuild_reading.py
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - /builds/worker/workspace/build/src/config/tests/unit-nsinstall.py
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - ============================= test session starts ==============================
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - platform linux2 -- Python 2.7.9, pytest-3.6.2, py-1.5.4, pluggy-0.6.0 -- /builds/worker/workspace/build/src/obj-firefox/_virtualenvs/obj-firefox-8yIyzR8r-2.7/bin/python
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - rootdir: /builds/worker/workspace/build/src, inifile: /builds/worker/workspace/build/src/config/mozunit/mozunit/pytest.ini
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - collecting ... collected 8 items
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - ../config/tests/unit-nsinstall.py::TestNsinstall::test_nsinstall_D PASSED
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - ../config/tests/unit-nsinstall.py::TestNsinstall::test_nsinstall_basic PASSED
[task 2019-07-11T18:29:14.087Z] 18:29:14 INFO - ../config/tests/unit-nsinstall.py::TestNsinstall::test_nsinstall_basic_recursive PASSED
[task 2019-07-11T18:29:14.087Z] 18:29:14 INFO - ../config/tests/unit-nsinstall.py::TestNsinstall::test_nsinstall_d PASSED
[task 2019-07-11T18:29:14.087Z] 18:29:14 INFO - ../config/tests/unit-nsinstall.py::TestNsinstall::test_nsinstall_dir_exists PASSED
[task 2019-07-11T18:29:14.087Z] 18:29:14 INFO - ../config/tests/unit-nsinstall.py::TestNsinstall::test_nsinstall_m PASSED
[task 2019-07-11T18:29:14.087Z] 18:29:14 INFO - ../config/tests/unit-nsinstall.py::TestNsinstall::test_nsinstall_multiple PASSED
[task 2019-07-11T18:29:14.087Z] 18:29:14 INFO - ../config/tests/unit-nsinstall.py::TestNsinstall::test_nsinstall_t PASSED
[task 2019-07-11T18:29:14.087Z] 18:29:14 INFO - =========================== 8 passed in 0.03 seconds ===========================
[task 2019-07-11T18:29:14.087Z] 18:29:14 INFO - Return code from mach python-test: 1
[task 2019-07-11T18:29:14.241Z] 18:29:14 INFO - /builds/worker/workspace/build/src/testing/testsuite-targets.mk:269: recipe for target 'check' failed
[task 2019-07-11T18:29:14.241Z] 18:29:14 INFO - make: *** [check] Error 1
[task 2019-07-11T18:29:14.241Z] 18:29:14 INFO - /usr/bin/make recurse_check

Flags: needinfo?(ckerschb)

Gijs, I have no idea what's wrong here - do you have any ideas?

Flags: needinfo?(ckerschb) → needinfo?(gijskruitbosch+bugs)

(In reply to Bogdan Tara[:bogdan_tara] from comment #3)

Backed out changeset 93cfc2131ea5 (Bug 1497203) for config/tests/test_mozbuild_reading.py related build bustages

This tells you it's something to do with moz.build files.

[task 2019-07-11T18:29:14.084Z] 18:29:14 WARNING - ../config/tests/test_mozbuild_reading.py::TestMozbuildReading::test_orphan_file_patterns TEST-UNEXPECTED-FAIL

Something to do with "orphan" files

[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - E AssertionError: The pattern 'direction*' in a Files() entry in '/builds/worker/workspace/build/src/toolkit/content/moz.build' corresponds to no files in the tree.
[task 2019-07-11T18:29:14.086Z] 18:29:14 INFO - E Please update this entry.

https://searchfox.org/mozilla-central/rev/15be167a5b436b57fef944b84eef061d24c1af8c/toolkit/content/moz.build#263

looks like it needs removing.

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(ckerschb)

(In reply to :Gijs (he/him) from comment #5)

https://searchfox.org/mozilla-central/rev/15be167a5b436b57fef944b84eef061d24c1af8c/toolkit/content/moz.build#263

looks like it needs removing.

Indeed, thank you. I ran the test 'test_mozbuild_reading.py' locally and it seems to work now.

%-- Before removing the file I get:

1:50.95 E AssertionError: The pattern 'direction*' in a Files() entry in '/home/ckerschb/source/mc/toolkit/content/moz.build' corresponds to no files in the tree.
1:50.95 E Please update this entry.
1:50.95
1:50.95 config/tests/test_mozbuild_reading.py:106: AssertionError

%-- After removing the file I get:

1:42.93 config/tests/test_mozbuild_reading.py::TestMozbuildReading::test_filesystem_traversal_no_config PASSED
1:42.93 config/tests/test_mozbuild_reading.py::TestMozbuildReading::test_filesystem_traversal_reading <- ../../../../usr/lib/python2.7/unittest/case.py SKIPPED
1:42.93 config/tests/test_mozbuild_reading.py::TestMozbuildReading::test_orphan_file_patterns PASSED
1:42.93
1:42.94 ===================== 2 passed, 1 skipped in 95.32 seconds =====================

I'll reland the patch with that line in moz.build removed - thank you!

Flags: needinfo?(ckerschb)
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Blocks: 1481057
You need to log in before you can comment on or make changes to this bug.